Route processing method, device, computer readable medium and electronic device
By generating link expressions and using pre-trained models for multi-layer forward propagation processing, the dependence problem of labeled data in path planning is solved, the accuracy of service processing is improved, and the application in multiple business fields is realized.
Patent Information
- Application Number
- CN202310161446.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2023-02-14
- Publication Date
- 2025-02-14
- Estimated Expiration
- 2043-02-14
AI Technical Summary
The prior art requires a large amount of labeled data for model training in path planning, resulting in huge workload and low accuracy of business processing results.
By generating link expressions corresponding to the planning route samples, the pre-trained model extracts the initial embedding vectors corresponding to elements in the link expression, generates input feature vectors, and performs multi-layer forward propagation processing for model training and processing Specify the route.
Reliance on a large amount of labeled data is reduced, the accuracy of business processing is improved, and multiple business fields are implemented for different set services.
Smart Images

Figure CN116295409B_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of computer and communication technology, and in particular to a route processing method, device, computer-readable medium and electronic device. Background Art
[0002] Path planning is to find a route from the starting point to the end point in a specified area. For example, in the field of map navigation, after the map user selects the starting point and the end point on the map, a route from the starting point to the end point can be planned. For example, in the field of robot control, path planning is to plan a collision-free and safe route for the robot from the starting point to the end point. After obtaining the planned route, the planned route can usually be processed for related business such as rationality assessment to improve the path planning strategy based on the evaluation results. In related technologies, developers are usually required to model based on industry experience and train the model based on feature engineering. This solution not only has the problem of huge workload, but also has low accuracy in business processing results. Summary of the invention
[0003] The embodiments of the present application provide a route processing method, device, computer-readable medium and electronic device, which can solve the problem of huge workload caused by requiring a large amount of labeled data for model training, and can improve the accuracy of business processing.
[0004] Other features and advantages of the present application will become apparent from the following detailed description, or may be learned in part by the practice of the present application.
[0005] According to one aspect of an embodiment of the present application, a route processing method is provided, comprising: generating a link expression corresponding to a planned route sample based on multiple links contained in the planned route sample and attribute information of each link; extracting multiple initial embedding vectors corresponding to each element in the link expression through a pre-trained model, and generating input feature vectors corresponding to each element based on the multiple initial embedding vectors; performing multi-layer forward propagation processing according to the input feature vectors corresponding to each element, and performing model training processing based on the planned route sample, the training tasks corresponding to the pre-trained model, and the intermediate result vectors corresponding to each element obtained by the multi-layer forward propagation processing, so as to process the specified route based on the converged pre-trained module.
[0006] According to one aspect of an embodiment of the present application, a route processing device is provided, comprising: a first generating unit configured to generate a link expression corresponding to the planned route sample according to multiple links contained in the planned route sample and attribute information of each link; a feature extracting unit configured to extract multiple initial embedding vectors corresponding to each element in the link expression through a pre-trained model; a second generating unit configured to generate input feature vectors corresponding to each element according to the multiple initial embedding vectors; a model training unit configured to perform multi-layer forward propagation processing according to the input feature vectors corresponding to each element, and perform model training processing based on the planned route sample, the training task corresponding to the pre-trained model, and the intermediate result vector corresponding to each element obtained by the multi-layer forward propagation processing, so as to process the designated route based on the converged pre-trained module. .
[0007] In some embodiments of the present application, based on the aforementioned scheme, the first generation unit is configured to: generate elements corresponding to each link for representing the attribute characteristics according to at least one attribute characteristic contained in the attribute information of each link; combine the elements corresponding to the multiple links according to the order of the multiple links in the planned route sample, and generate a link expression corresponding to the planned route sample.
[0008] In some embodiments of the present application, based on the aforementioned scheme, the first generation unit is configured to: add a position flag corresponding to a specified link among the multiple links in the planned route sample in the link expression; wherein the position flag includes at least one of the following: a first flag added before the element corresponding to the starting link in the planned route sample, a second flag added between the elements corresponding to two specified links, and a third flag added after the element corresponding to the ending link in the planned route sample.
[0009] In some embodiments of the present application, based on the aforementioned solution, the two designated links include: a link located at a road intersection in the planned route sample, or any two adjacent links among the multiple links.
[0010] In some embodiments of the present application, based on the aforementioned scheme, the feature extraction unit is configured to: extract the word embedding vector, position embedding vector and route interval embedding vector corresponding to each element in the link expression through a pre-trained model; wherein the position embedding vector is used to represent the specific position of the element in the link expression, and the route interval embedding vector is used to represent the interval where the element is located in the link expression.
[0011] In some embodiments of the present application, based on the aforementioned scheme, the second generation unit is configured to: merge the multiple initial embedding vectors corresponding to the each element based on the set merging processing method, and use the result of the merging processing as the input feature vector corresponding to the each element.
[0012] In some embodiments of the present application, based on the aforementioned scheme, the model training unit is configured as follows: for the links other than the starting link in the planned route sample, replacement operations are performed respectively according to set probabilities to obtain processed planned route samples; the replacement operation includes at least one of the following: replacement with a set flag bit, replacement with a random link, and remaining unchanged; the intermediate result vector corresponding to each element is taken as input, and the link represented by the set flag bit is restored to the actual link in the planned route sample as the optimization target corresponding to the first training task, and model training processing is performed.
[0013] In some embodiments of the present application, based on the aforementioned scheme, replacement operations are performed on the other links in the planned route sample except the starting link according to the set probabilities, including: for the other links in the planned route sample except the starting link, determining whether to perform a replacement operation according to the first probability; for the links that need to be replaced, performing the replacement operation by replacing them with the second probability of a set flag bit, replacing them with the third probability of a random link, and keeping the fourth probability unchanged.
[0014] In some embodiments of the present application, based on the aforementioned scheme, the model training unit is configured as follows: the second half of the links in the planned route sample are replaced with random links with a set probability; wherein the planned route sample is divided into the first half of the links and the second half of the links at two designated links; the intermediate result vector corresponding to the first flag bit added before the element corresponding to the starting link in the link expression is taken as input, the random links are restored to the second half of the links in the planned route sample as the optimization target corresponding to the second training task, and model training processing is performed.
[0015] In some embodiments of the present application, based on the aforementioned scheme, the route processing device also includes: a processing unit, configured to extract the target embedding vector corresponding to each element through a converged pre-trained model; generate a route embedding vector corresponding to the planned route sample according to the target embedding vector corresponding to each element; take the route embedding vector and the target input information for adjusting the pre-trained model as input, take the set business as the optimization target, and adjust the model parameters of the pre-trained model.
[0016] In some embodiments of the present application, based on the aforementioned scheme, the processing unit is configured to: calculate the mean of the target embedding vector corresponding to the starting link in the planned route sample according to the multiple target embedding vectors corresponding to the starting link; calculate the mean of the target embedding vectors corresponding to the multiple links contained in the planned route sample according to the multiple target embedding vectors respectively corresponding to the multiple links; calculate the mean of the target embedding vector corresponding to the terminating link according to the multiple target embedding vectors corresponding to the terminating link in the planned route sample; generate the route embedding vector corresponding to the planned route sample according to the mean of the target embedding vector corresponding to the starting link, the mean of the target embedding vectors corresponding to the multiple links and the mean of the target embedding vector corresponding to the terminating link.
[0017] In some embodiments of the present application, based on the aforementioned scheme, the target input information used to adjust the pre-trained model includes at least one of the following: route characteristics of the planned route samples obtained through feature engineering; prediction results obtained by predicting the set business through a machine learning model based on the route characteristics of the planned route samples.
[0018] In some embodiments of the present application, based on the aforementioned scheme, the route processing device also includes: a first prediction unit; the first generation unit is also configured to: generate a link expression corresponding to the target planning route to be processed according to the links contained in the target planning route to be processed, and the attribute information of each link; the feature extraction unit is also configured to: extract the target embedding vector corresponding to each link in the target planning route through the converged pre-training model; the first prediction unit is configured to: perform prediction processing of the set business based on the target embedding vector corresponding to each link in the target planning route.
[0019] In some embodiments of the present application, based on the aforementioned scheme, the first prediction unit is configured to: based on the target embedding vector corresponding to each link in the target planned route, perform at least one of the following processing on the target planned route: abnormal link detection processing, missing link completion processing in the target planned route, subsequent planned route generation processing, and route correlation processing.
[0020] In some embodiments of the present application, based on the aforementioned scheme, the route processing device also includes: a second prediction unit; the first generation unit is also configured to: generate a link expression corresponding to the target planning route to be processed according to the links contained in the target planning route to be processed, and the attribute information of each link; the second prediction unit is configured to: use the link expression as the input of the converged pre-trained model, and output the prediction result of the target planning route for the set business through the converged pre-trained model; wherein the set business includes at least one of the following: the coverage rate of the driving trajectory and the target planning route, the driving time of the target planning route, the planning rationality of the target planning route, the navigation completion rate of the target planning route, and the traffic volume of the target planning route.
[0021] According to one aspect of an embodiment of the present application, a computer-readable medium is provided, on which a computer program is stored. When the computer program is executed by a processor, the route processing method described in the above embodiment is implemented.
[0022] According to one aspect of an embodiment of the present application, an electronic device is provided, comprising: one or more processors; a storage device for storing one or more computer programs, wherein when the one or more computer programs are executed by the one or more processors, the electronic device implements the route processing method as described in the above embodiments.
[0023] According to one aspect of an embodiment of the present application, a computer program product is provided, the computer program product comprising a computer program stored in a computer-readable storage medium. A processor of an electronic device reads and executes the computer program from the computer-readable storage medium, so that the electronic device executes the route processing method provided in the above various optional embodiments.
[0024] In the technical solutions provided in some embodiments of the present application, a link expression corresponding to the planned route sample is generated according to multiple links contained in the planned route sample and the attribute information of each link, and then multiple initial embedding vectors corresponding to each element in the link expression are extracted through a pre-trained model, and an input feature vector corresponding to each element is generated according to the multiple initial embedding vectors, and then multi-layer forward propagation processing is performed according to the input feature vector corresponding to each element, and model training processing is performed based on the planned route sample, the training task corresponding to the pre-training model, and the intermediate result vector corresponding to each element, so as to process the specified route based on the converged pre-training module, so that the unlabeled planned route samples can be processed, which solves the problem of huge workload caused by the need for a large amount of labeled data for model training, and because the detailed features in the planned route samples can be learned through multi-layer forward propagation processing, the accuracy of business processing can be improved, and different set businesses can also be processed, realizing effective application in multiple business fields.
[0025] It should be understood that the foregoing general description and the following detailed description are exemplary and explanatory only and are not restrictive of the present application. BRIEF DESCRIPTION OF THE DRAWINGS
[0026] Figure 1 A schematic diagram showing an exemplary system architecture to which the technical solution of the embodiments of the present application can be applied;
[0027] Figure 2 A flowchart of a route processing method according to an embodiment of the present application is shown;
[0028] Figure 3 A flowchart of a route processing method according to an embodiment of the present application is shown;
[0029] Figure 4 A flowchart of a route processing method according to an embodiment of the present application is shown;
[0030] Figure 5 A route processing flow chart according to an embodiment of the present application is shown;
[0031] Figure 6 A schematic diagram showing interruption of a route according to an embodiment of the present application is shown;
[0032] Figure 7 A schematic diagram of embedding features corresponding to links in a route according to an embodiment of the present application is shown;
[0033] Figure 8 A schematic diagram of Transformer forward propagation according to an embodiment of the present application is shown;
[0034] Fig. 9 A schematic diagram of the processing probability of each link according to an embodiment of the present application is shown;
[0035] Fig.10 A schematic diagram of model fine-tuning according to an embodiment of the present application is shown;
[0036] Fig.11 A block diagram of a route processing device according to an embodiment of the present application is shown;
[0037] Fig.12 A schematic diagram of the structure of a computer system suitable for implementing an electronic device of an embodiment of the present application is shown. DETAILED DESCRIPTION
[0038] The exemplary embodiments are now described in a more comprehensive manner with reference to the accompanying drawings. However, the exemplary embodiments can be implemented in various forms and should not be understood as being limited to these examples; on the contrary, the purpose of providing these embodiments is to make this application more comprehensive and complete, and to fully convey the concept of the exemplary embodiments to those skilled in the art.
[0039] In addition, the features, structures or characteristics described in the present application may be combined in one or more embodiments in any suitable manner. In the following description, there are many specific details so that the embodiments of the present application can be fully understood. However, those skilled in the art will appreciate that when implementing the technical scheme of the present application, all the detailed features in the embodiments may not be needed, one or more specific details may be omitted, or other methods, elements, devices, steps, etc. may be adopted.
[0040] The block diagrams shown in the accompanying drawings are merely functional entities and do not necessarily correspond to physically independent entities. That is, these functional entities may be implemented in software form, or in one or more hardware modules or integrated circuits, or in different networks and / or processor devices and / or microcontroller devices.
[0041] The flowcharts shown in the accompanying drawings are only exemplary and do not necessarily include all the contents and operations / steps, nor must they be executed in the order described. For example, some operations / steps can be decomposed, and some operations / steps can be combined or partially combined, so the actual execution order may change according to actual conditions.
[0042] It should be noted that the "multiple" mentioned in this article refers to two or more. "And / or" describes the association relationship of the associated objects, indicating that there can be three relationships. For example, A and / or B can mean: A exists alone, A and B exist at the same time, and B exists alone. The character " / " generally indicates that the associated objects before and after are in an "or" relationship.
[0043] It is understandable that in the specific implementation of this application, related data such as planned routes are involved. When the above embodiments of this application are applied to specific products or technologies, user permission or consent is required, and the collection, use and processing of relevant data need to comply with relevant laws, regulations and standards of relevant countries and regions.
[0044] like Figure 1 As shown in the map navigation field, after a map user selects a starting point and an end point on the map, a route from the starting point to the end point can be planned, as shown in FIG. Figure 1 The planned route shown in FIG. 1 includes Link 1, Link 2, Link 3 and Link 4. Link is the smallest data unit describing a road, which is a set of structured data, including but not limited to the length, width, road grade and other attributes of the Link.
[0045] After obtaining the planned route, the planned route can usually be processed with related services such as rationality evaluation to improve the path planning strategy based on the evaluation results. When evaluating the planned path, the machine learning algorithm in artificial intelligence (AI) can be used. Among them. Artificial intelligence 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 similar way to human intelligence. Artificial intelligence is to study the design principles and implementation methods of various intelligent machines so that the machines have the functions of perception, reasoning and decision-making. The basic technologies of artificial intelligence generally include sensors, dedicated artificial intelligence chips, cloud computing, distributed storage, big data processing technology, operation / interaction systems, mechatronics and other technologies. Artificial intelligence software technology mainly includes computer vision technology, speech processing technology, natural language processing technology, as well as machine learning / deep learning, autonomous driving, smart transportation and other major directions.
[0046] Machine Learning (ML) is a multi-disciplinary subject involving probability theory, statistics, approximation theory, convex analysis, algorithm complexity theory and other disciplines. It specializes in studying how computers simulate or implement human learning behavior to acquire new knowledge or skills and reorganize existing knowledge structures to continuously improve their performance. Machine learning is the core of artificial intelligence and the fundamental way to make computers intelligent. Its applications are spread across all areas of artificial intelligence. Machine learning and deep learning usually include artificial neural networks, belief networks, reinforcement learning, transfer learning, inductive learning, and teaching learning.
[0047] In the related technology, when processing related business such as rationality evaluation of planned routes, developers are usually required to build models based on industry experience and train the models based on feature engineering. This solution not only has the problem of huge workload, but also has low accuracy of business processing results.
[0048] Based on this, a new route processing solution is proposed in one embodiment of the present application, such as Figure 1 As shown, after the vehicle terminal 101 selects the starting point and the end point on the electronic map, the server 102 can generate a planned route including Link 1, Link 2, Link 3 and Link 4 according to the starting point and the end point. In order to perform business processing such as rationality evaluation on the planned route, the server 102 can train the pre-trained model based on the planned route sample, and then evaluate the planned route through the converged pre-trained model.
[0049] In one embodiment of the present application, when the server 102 trains the pre-trained model based on the planned route sample, the link expression corresponding to the planned route sample can be generated according to the multiple links contained in the planned route sample and the attribute information of each link; then the multiple initial embedding vectors corresponding to each element in the link expression are extracted through the pre-trained model, and the input feature vectors corresponding to each element in the link expression are generated according to the multiple initial embedding vectors; then, multi-layer forward propagation processing is performed according to the input feature vectors corresponding to each element in the link expression, and model training processing is performed based on the planned route sample, the training task corresponding to the pre-trained model, and the intermediate result vectors corresponding to each element obtained by the multi-layer forward propagation processing; after the model converges, the specified route can be processed based on the converged pre-trained module. For example, the target embedding vector corresponding to each element in the link expression can be extracted through the converged pre-trained model, and the prediction processing of the set business can be performed based on the target embedding vector. For example, the rationality of the planned route sample is evaluated.
[0050] It should be noted that the server 102 can be an independent physical server, or a server cluster or distributed system composed of at least two physical servers, or 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 networks (CDN), and big data and artificial intelligence platforms. The vehicle terminal 101 can specifically refer to a smart phone with vehicle-mounted functions, a smart speaker, a screen speaker, a smart watch, etc., but is not limited to this. For example, the vehicle terminal 101 can also be replaced by a mobile terminal such as an aircraft. Each vehicle terminal and server can be directly or indirectly connected by wired or wireless communication. At the same time, the number of vehicle terminals and servers can be one or at least two, and this application does not limit this.
[0051] The implementation details of the technical solution of the embodiment of the present application are described in detail below:
[0052] Figure 2 A flowchart of a route processing method according to an embodiment of the present application is shown. The route processing method can be executed by a server or by a terminal device (such as Figure 1 The vehicle terminal 101 shown in FIG. 1 can be executed, or it can be completed by a server and a terminal device together. Figure 2 As shown, the route processing method at least includes steps S210 to S230, which are described in detail as follows:
[0053] In step S210, a link expression corresponding to the planned route sample is generated according to a plurality of links included in the planned route sample and attribute information of each link.
[0054] In some optional embodiments, a link is Link, which is the smallest data unit describing a road. The attribute information of the link includes but is not limited to the link's ID, length, width, road grade, road condition, traffic, and other attributes.
[0055] In some optional embodiments, the process of generating a link expression corresponding to the planned route sample according to the multiple links contained in the planned route sample and the attribute information of each link can be: generating an element corresponding to each link for representing the attribute feature according to at least one attribute feature contained in the attribute information of each link, and then combining the elements corresponding to the multiple links according to the order of the multiple links in the planned route sample to generate a link expression corresponding to the planned route sample. For example, if the link expression is generated according to the link ID, the planned route sample R can be expressed as: route R = {link1, link2, link3...}; wherein link1, link2, link3... respectively represent the IDs of the corresponding links, which are the elements corresponding to the links in the link expression.
[0056] If the link expression is generated according to the road grade, road condition and flow of the link, then the planned route sample R is expressed as: route R = {rc_rs_flow1, rc_rs_flow2, rc_rs_flow3...}; wherein, rc_rs_flow1 represents the road grade, road condition and flow of link1, which is the element corresponding to link 1 in the link expression; rc_rs_flow2 represents the road grade, road condition and flow of link2, which is the element corresponding to link 2 in the link expression; rc_rs_flow3 represents the road grade, road condition and flow of link3, which is the element corresponding to link 3 in the link expression.
[0057] In some optional embodiments, when generating a link expression corresponding to a planned route sample, a position flag corresponding to a specified link can be added to the link expression according to the position of the specified link in the planned route sample among multiple links; wherein the position flag includes at least one of the following: a first flag added before the element corresponding to the starting link in the planned route sample, a second flag added between the elements corresponding to two specified links, and a third flag added after the element corresponding to the terminating link in the planned route sample. That is, the link expression is divided into the first half and the second half by the second flag. Optionally, the first flag can be CLS, and both the second flag and the third flag can be SEP.
[0058] In some optional embodiments, when dividing the link expression into the first half and the second half, the division can be performed at a road intersection in the planned route sample, or at any two adjacent links. That is, the two links specified in the above embodiment include: a link at a road intersection in the planned route sample, or any two adjacent links among the multiple links.
[0059] Continue to refer to Figure 2As shown, in step S220, multiple initial embedding vectors corresponding to each element in the link expression are extracted through the pre-trained model, and input feature vectors corresponding to each element are generated according to the multiple initial embedding vectors.
[0060] It should be noted that the elements in the link expression include the elements corresponding to each link for representing the attribute characteristics, and may also include the elements corresponding to the position flags in the above embodiment.
[0061] In some optional embodiments, the multiple initial embedding vectors corresponding to each element may include: a token embedding vector, a position embedding vector, and a segment embedding vector corresponding to each element; wherein the position embedding vector is used to indicate the specific position of the element in the link expression, and the segment embedding vector is used to indicate the segment in which the element is located in the link expression (i.e., the first half or the second half). Optionally, the multiple initial embedding vectors corresponding to each element may also include: a token embedding vector and a position embedding vector.
[0062] In some optional embodiments, the process of generating the input feature vector corresponding to each element according to the multiple initial embedding vectors may be: based on a set merging processing mode, the multiple initial embedding vectors corresponding to each element are merged, and the result of the merging processing is used as the input feature vector corresponding to each element. For example, the multiple initial embedding vectors corresponding to each element may be superimposed, and the superimposed result is used as the corresponding input feature vector.
[0063] In step S230, multi-layer forward propagation processing is performed according to the input feature vector corresponding to each element, and model training processing is performed based on the planned route sample, the training task corresponding to the pre-trained model, and the intermediate result vector corresponding to each element obtained by the multi-layer forward propagation processing, so as to process the specified route based on the converged pre-trained module.
[0064] In some optional embodiments, the process of model training based on the planned route sample, the training task corresponding to the pre-trained model, and the intermediate result vector corresponding to each element obtained by the multi-layer forward propagation processing may include: replacing the links in the planned route sample except the starting link with the set probability to obtain the processed planned route sample; the replacement operation includes at least one of the following: replacing with a set flag, replacing with a random link, and keeping unchanged; then taking the intermediate result vector corresponding to each element as input, restoring the link represented by the set flag to the actual link in the planned route sample as the optimization target corresponding to the first training task, and performing model training. The technical solution of this embodiment is to perform probability replacement on the links in the original planned route sample except the starting link, and then perform model training by restoring the planned route sample as the optimization target.
[0065] Optionally, when performing replacement operations on other links except the starting link in the planned route sample according to the set probabilities, it is possible to first determine whether to perform replacement operations on other links except the starting link in the planned route sample according to the first probability, and for the links that need to be replaced, perform replacement operations by replacing them with the second probability of the set flag, replacing them with the third probability of the random link, and keeping the fourth probability unchanged. For example, the first probability can be 50%, the second probability can be 50%, the third probability can be 5%, and the fourth probability can be 45%. That is, the sum of the second probability, the third probability and the fourth probability is 1.
[0066] In some optional embodiments, the process of model training based on the planned route sample, the training task corresponding to the pre-trained model, and the intermediate result vector corresponding to each element obtained by the multi-layer forward propagation processing may include: replacing the second half of the link in the planned route sample with a random link by a set probability; wherein the planned route sample is divided into the first half of the link and the second half of the link at two specified links; taking the intermediate result vector corresponding to the first flag bit added before the element corresponding to the starting link in the link expression as input, restoring the random link to the second half of the link in the planned route sample as the optimization target corresponding to the second training task, and performing model training. The technical solution of this embodiment is to replace the second half of the original planned route sample with a probability, and then perform model training by restoring the planned route sample as the optimization target.
[0067] Optionally, the designated route in step S230 may be a planned route sample, or a route planned in actual application, or any selected route.
[0068] In some optional embodiments, after the pre-trained model converges, the specified route is processed based on the converged pre-trained module. Specifically, the target embedding vectors corresponding to the elements are extracted through the converged pre-trained model; according to the target embedding vectors corresponding to the elements, the route embedding vectors corresponding to the planned route samples are generated, and then the route embedding vectors and the target input information for adjusting the pre-trained model are taken as input, the set business is taken as the optimization target, and the model parameters of the pre-trained model are adjusted.
[0069] In an embodiment of the present application, the target embedding vector corresponding to each element may also include a word embedding vector (token embedding), a position embedding vector (position embedding) and a route segment embedding vector (segment embedding).
[0070] The technical solution of this embodiment is to fine-tune the pre-trained model through the target embedding vector corresponding to each element and the target input information. Optionally, the set business in this embodiment includes at least one of the following: evaluating the coverage of the driving trajectory and the planned route sample, estimating the driving time of the planned route sample, evaluating the planning rationality of the planned route sample, estimating the navigation completion rate of the planned route sample, and estimating the traffic of the planned route sample.
[0071] In some optional embodiments, the process of generating the route embedding vector corresponding to the planned route sample according to the target embedding vector corresponding to each element may be: according to the multiple target embedding vectors corresponding to the starting link in the planned route sample, the mean of the target embedding vector corresponding to the starting link is calculated; according to the multiple target embedding vectors corresponding to the multiple links contained in the planned route sample, the mean of the target embedding vector corresponding to the multiple links is calculated; according to the multiple target embedding vectors corresponding to the terminating link in the planned route sample, the mean of the target embedding vector corresponding to the terminating link is calculated; and then, according to the mean of the target embedding vector corresponding to the starting link, the mean of the target embedding vector corresponding to the multiple links, and the mean of the target embedding vector corresponding to the terminating link, the route embedding vector corresponding to the planned route sample is generated. For example, the mean of the target embedding vector corresponding to the starting link, the mean of the target embedding vector corresponding to the multiple links, and the mean of the target embedding vector corresponding to the terminating link can be used as the route embedding vector corresponding to the planned route sample.
[0072] In some optional embodiments, the target input information for adjusting the pre-trained model may include at least one of the following: route features of the planned route samples obtained through feature engineering; prediction results obtained by performing prediction processing of the set business through a machine learning model based on the route features of the planned route samples. Optionally, the machine learning model may be a decision tree model.
[0073] Optionally, the route features may include one or more of mined features, real-time features, and static features. Mined features may include historical arrival times and historical driving speeds of planned route samples; real-time features may include real-time road conditions and real-time driving speeds of planned route samples; static features may include road attributes of planned route samples, such as road width, road type (such as expressway, provincial road, or national road), etc.
[0074] Figure 3 A flowchart of a route processing method according to an embodiment of the present application is shown. The route processing method can be executed by a server or by a terminal device (such as Figure 1 The vehicle terminal 101 shown in FIG. 1 can be executed, or it can be completed by a server and a terminal device together. Figure 3 As shown, the route processing method at least includes steps S310 to S330, which are described in detail as follows:
[0075] In step S310, a link expression corresponding to the target planned route is generated according to the links included in the target planned route to be processed and the attribute information of each link.
[0076] The specific implementation details of this step are similar to those of step S210 and will not be repeated here.
[0077] In step S320, the target embedding vector corresponding to each link in the target planning route is extracted through the converged pre-training model.
[0078] In an embodiment of the present application, the pre-trained model can be Figure 2 The technical solution of the embodiment shown is used for training, and the target embedding vector corresponding to each link may include a word embedding vector (token embedding), a position embedding vector (position embedding) and a route segment embedding vector (segment embedding).
[0079] In step S330, prediction processing of the set service is performed based on the target embedding vector corresponding to each link in the target planning route.
[0080] In some optional embodiments, based on the target embedding vector corresponding to each link in the target planned route, the target planned route can be processed by at least one of the following: abnormal link detection processing, missing link completion processing in the target planned route, subsequent planned route generation processing, and route correlation processing.
[0081] Specifically, for the abnormal link detection service, a prediction value can be generated for each link in the target planning route through the target embedding vector. The prediction value indicates the probability that each link belongs to the target planning route. If the prediction value corresponding to a certain link is small, it can be said that this link may be abnormal. The missing link completion processing can be to predict which link the missing link should be supplemented through by the target embedding vector when a link is missing in the target planning route. The subsequent planning route generation processing can be to predict the missing link or the link that should be supplemented between the starting position and the ending position according to the target embedding vector after the starting position and the ending position are known. The route correlation processing can be to calculate the distance between the routes according to the target embedding vector corresponding to the route, and then determine the correlation according to the distance value.
[0082] Figure 4 A flowchart of a route processing method according to an embodiment of the present application is shown. The route processing method can be executed by a server or by a terminal device (such as Figure 1 The vehicle terminal 101 shown in FIG. 1 can be executed, or it can be completed by a server and a terminal device together. Figure 4 As shown, the route processing method at least includes steps S410 to S420, which are described in detail as follows:
[0083] In step S410, a link expression corresponding to the target planned route is generated according to the links included in the target planned route to be processed and the attribute information of each link.
[0084] The specific implementation details of this step are similar to those of step S210 and will not be repeated here.
[0085] In step S420, the link expression is used as the input of the converged pre-trained model, and the converged pre-trained model outputs the prediction result of the target planning route for the set business.
[0086] In some optional embodiments, the setting business includes at least one of the following: coverage of the driving trajectory and the target planned route, driving time of the target planned route, planning rationality of the target planned route, navigation completion rate of the target planned route, and traffic volume of the target planned route.
[0087] The technical solution of the above-mentioned embodiments of the present application can process unlabeled planned route samples, thereby solving the problem of huge workload caused by the need for a large amount of labeled data for model training. In addition, since detailed features in planned route samples can be learned through multi-layer forward propagation processing, the accuracy of business processing can be improved. At the same time, different set businesses can also be processed, thereby realizing effective application in multiple business fields.
[0088] The following combination Figures 5 to 10 , taking the estimated route rationality as an example, the implementation details of the technical solution of the embodiment of the present application are elaborated in detail:
[0089] In the related art, there are mainly the following schemes for estimating the rationality of routes: Scheme 1, by manually modeling the route, a machine learning model is used to estimate the rationality of a fixed-length route sample. The machine learning model can be, for example, a logistic regression model, a GBDT (Gradient Boosting Decision Tree) model, a LambdaRank (a sorting algorithm) model, etc. Scheme 2, through deep learning combined with manual modeling methods, such as through manual feature extraction, fixed-length feature modeling of route samples, and a route rationality estimation scheme combined with a deep model structure. Scheme 3, through embedding methods, deep learning, and manual modeling methods, such as through a dual-tower model structure, manual feature extraction of routes and users, and embedding of route data units and users respectively, and then the rationality of the route is estimated through a deep network structure.
[0090] However, the manual modeling in Solution 1 and Solution 2 in the related art strongly relies on the industry experience and business understanding of developers, and it is difficult to achieve the completeness of business modeling, and therefore it is difficult to achieve the optimal effect under the business goal. The route embedding solution in Solution 3 is based on the route link topology structure. The information of the embedding result mainly includes the topological properties of the road network composed of the route, which is difficult to match the expected business goals and has a small number of applicable scenarios.
[0091] Based on this, in the technical solution provided in this application, if Figure 5 As shown, the data used includes high-quality navigation routes, which means that the routes composed of link strings are reasonable and acceptable. The quantification methods of rationality usually include: the coverage rate of historical driving trajectories and navigation routes, the navigation completion rate under the navigation route, the rationality probability of the navigation route, etc.
[0092] It should be noted that the navigation route is composed of a series of continuous links in the road network topology structure. The link data unit contains: 1. The geographical location information of the road, such as latitude and longitude coordinates, length, road grade, speed limit, administrative affiliation information, etc.; 2. Road topology information, such as upstream and downstream linkids, surrounding facilities, etc.; 3. Real-time information, such as vehicle speed at a certain moment, road conditions, vehicle speed at historical moments, etc.
[0093] After obtaining a high-quality navigation route, it can be processed to obtain pre-trained route data.
[0094] Specifically, the following design can be used as the input sample of the pre-training model:
[0095] First, use the link ID string as the expression of the route sample. For example, if the link expression is generated based on the link ID, the route sample R can be expressed as: route R = {link1, link2, link3...}; where link1, link2, link3... respectively represent the IDs of the corresponding links.
[0096] You can also use link attribute combinations as route sample expressions for different business scenarios. For example, route sample R = {road grade, traffic status, flow...}, specifically expressed as: route R = {rc_rs_flow1, rc_rs_flow2, rc_rs_flow3...}; where rc_rs_flow1 represents the road grade, traffic status, and flow of link1; rc_rs_flow2 represents the road grade, traffic status, and flow of link2; and rc_rs_flow3 represents the road grade, traffic status, and flow of link3.
[0097] It should be noted that for routes R with different expressions, pre-training will produce different embedding results.
[0098] Secondly, if Figure 6 As shown in the figure, the route R is interrupted at any intersection of the route R, or it can also be interrupted between any two links to form the first half and the second half of the route. Then add the flag CLS before the starting link of the route R, and add the flag SEP after the interruption point and the end link. Then we get an input sample R of the pre-trained model sample :
[0099] R sample ={CLS,link1,link2,link3,SEP,link4,link5,link6,SEP}
[0100] After getting the input sample of the pre-trained model, you can execute Figure 5 Step S501 shown in the figure performs the pre-training process of the model.
[0101] In one embodiment of the present application, a BERT (Bidirectional Encoder Representations from Transformers) model may be used for pre-training. The input training samples of the BERT model are the first half and the second half of a sentence, which may correspond to the first half and the second half of the route in the embodiment of the present application, and the link in the route may correspond to a word in a sentence. Specifically, Figure 7 As shown in Figure 1, a link in a route can have three types of embeddings: TokenEmbedding, SegmentEmbedding, and PositionEmbedding. Segment Embeddings identifies whether a link is located in the first half or the second half. If it is located in the first half, it can be represented as E A ; if it is in the second half, it can be expressed as E B Position Embeddings are used to represent the location characteristics of each link in the route.
[0102] The forward propagation of the BERT model in the embodiment of the present application is divided into two stages: the forward propagation of the Transformer structure and the forward propagation of the two subtasks, which are introduced below respectively.
[0103] The forward propagation process of the Transformer structure is as follows: In the Embedding stage, for each link and flag in the route sample, the corresponding Token Embedding is searched in the Embedding data; the corresponding Segment Embedding is searched according to the route part where each link and flag is located; the corresponding Position Embedding is searched according to the route position where each link and flag is located. Then, the TokenEmbedding, Segment Embedding, and Position Embedding vectors found for each link and flag are accumulated (in other embodiments of the present application, other operations based on Token Embedding, Segment Embedding, and Position Embedding can also be performed) to obtain the Embedding of this link or flag in this route sample. input , that is Figure 8 E1, E2, ..., E shown in N .
[0104] Continue to refer to Figure 8 As shown, using Embeddinginput Multi-layer Transformer forward propagation as input ( Figure 8 An example of two layers is shown in FIG. 1 , and in other embodiments, there may be more layers). When the last layer of Transformer outputs, the intermediate result vector Transformer is obtained. out , that is Figure 8 T1, T2, ..., T N , relying on the attention mechanism of the Transformer structure, Embedding input The intermediate result of the corresponding position is transferred out The link information of other locations on the route sample is integrated.
[0105] The forward propagation process of the two subtasks is as follows: Since the BERT model is designed with two subtasks, they are MLM (Mask Language Model) and NSP (Next Sentence Prediction).
[0106] For the MLM task, firstly, the input sample R sample To process, specifically: the first link of the sample is not operated; for each of the remaining links, such as Fig. 9 As shown, P op The probability of operating a link is P MASK The probability is set as the flag MASK, with P RAND The probability of replacing it with a random link is P KEEP The probability of keeping link unchanged. Optionally, P op =50%, P MASK =50%, P RAND =5%, P KEEP =45%.
[0107] The processed sample contains the flag MASK and random link RAND , the intermediate result vector Transfermor for each link and flag in the MLM task input route out , the DNN (Deep Neural Network) model calculates the softmax for each MASK flag, obtains the probability distribution of all links on this MASK flag, and then compares the true value linkid set to the MASK flag, calculates the gradient and back-propagates. Optionally, in other embodiments of the present application, the DNN model can also be replaced by other deep learning network models.
[0108] For the NSP task, we first perform the input sample R sample Specifically, the second half of the route marked by the SEP flag is processed with P op The probability of replacing the lower half of the route with a random one, optionally, P op = 50%. The intermediate result vector Transfermor of the CLS flag bit of the NSP task input route start position out , calculate the softmax through the DNN model, and get the second half of the route belongs to R sample The probability of being replaced is compared, the gradient is calculated and back-propagated.
[0109] Through pre-training, we can optimize and obtain converged Token Embedding, Segment Embedding, Position Embedding results, and each layer of Transformer structure in massive route samples.
[0110] Figure 5 The fine-tuning process of step S502 shown in the figure is to perform the following processing for the route business: First, the route-level embedding expression is composed of the embedding of the starting link in the route, the average embedding of the route, and the embedding of the ending link. Specifically, it is as follows:
[0111] Embedding start =ΣToken Embedding start ,Segment Embedding start ,PositionEmbedding start
[0112] Embedding end =∑Token Embedding end ,Segment Embedding end ,PositionEmbedding end
[0113]
[0114] Among them, TokenEmbedding start 、SegmentEmbedding start and PositionEmbedding start It is the embedding of the starting link; TokenEmbedding end 、SegmentEmbedding endand PositionEmbedding end It is the embedding that terminates the link; TokenEmbedding i 、SegmentEmbedding i and PositionEmbedding i is the embedding of the ith link; n represents the number of links in the route. In other embodiments of the present application, the route-level embedding may also be based on other calculation results of Token Embedding, Segment Embedding, and Position Embedding vectors.
[0115] Secondly, we can obtain the route features designed by artificial feature engineering and the estimated results output by the machine learning method of the decision tree model, and use these two parts as input information for fine-tuning the model.
[0116] Optionally, the route features may include one or more of mined features, real-time features, and static features. Mined features may include historical arrival times and historical driving speeds of planned route samples; real-time features may include real-time road conditions and real-time driving speeds of planned route samples; static features may include road attributes of planned route samples, such as road width, road type (such as expressway, provincial road, or national road), etc.
[0117] Finally, the coverage ratio T of the historical driving trajectory and the navigation route is used as the quantitative standard of route rationality and the optimization target of the model to fine-tune the model. A more reasonable route has a higher coverage ratio, where T∈(0,1). The fine-tuning process is as follows: Fig.10 As shown, the route-level embedding vector (i.e., Embedding start 、Embedding avg and Embedding end ) are transformed into D1 vectors through multi-layer perceptron MLP1. Link Embedding start 、Embedding avg and Embedding endVector, through multi-layer perceptron MLP2, MLP3, MLP4 transformed to D2 vector, D3 vector and D4 vector. Then, the manually extracted features and the prediction results of the tree model are used as input, and D4 is linked to construct D5 vector. Through multi-layer perceptron MLP5, MLP6 and MLP7, D6 vector, D7 vector and D8 vector are obtained. Optionally, D1=128, D2=1536, D3=384, D4=8, D5=8+N(features)+1, D6=64, D=16, D8=1. D8 vector is a 1-dimensional vector, that is, the output of route rationality estimation result. Fig.10 The number of layers of the multilayer perceptron shown in the figure is only an example, and there may be more layers in other embodiments of the present application.
[0118] In the above technical scheme of the present application, the Token Embedding, Segment Embedding, and Position Embedding results obtained through pre-training can fully consider whether the composition of the entire route is reasonable in the process of route rationality estimation. Different from the general machine learning scheme of manual feature extraction, the model will lose route detail information during the prediction process due to the global feature design of the route. In the above technical scheme of the present application, the attention mechanism based on the Transformer structure makes the route with higher rationality have a better quality route part. And the Embedding results obtained by pre-training in the above embodiments of the present application can also be used for abnormal route detection, route completion, route automatic generation, road correlation analysis, urban road planning and other services, and can realize the function of predicting subsequent routes based on previous trajectories. In addition, the technical scheme of the above embodiments of the present application can not only perform route rationality estimation tasks, but also can optimize the objectives by modifying the pre-training subtasks, and can also be used for route time estimation, route rationality quantification, route probability estimation, route flow estimation and other services.
[0119] The technical solution of the above-mentioned embodiment of the present application is an unsupervised learning solution in the pre-training stage. In the navigation business scenario, route data is a kind of data that is difficult to collect user feedback. The solution of the embodiment of the present application uses a large amount of unlabeled data and a pre-training method to extract information for navigation business in the unlabeled data. Through the information obtained through pre-training, a more effective route rationality prediction model can be obtained by using smaller-scale labeled data in the fine-tuning model stage, which effectively solves problems such as under-labeling of data in the business field, data noise, Position-Bias, etc. In addition, the information obtained in the pre-training stage is rich and diverse, and the information tends to rely on the structural design of the pre-training solution. Therefore, the pre-training model structure can be designed in a targeted manner for different route learning goals. The technical solution of the embodiment of the present application has strong versatility and scalability, and is suitable for business problems with different goals. For example: route time estimation, route rationality quantification, route probability estimation, route traffic estimation, etc.
[0120] The following describes an embodiment of the device of the present application, which can be used to execute the route processing method in the above embodiment of the present application. For details not disclosed in the embodiment of the device of the present application, please refer to the embodiment of the route processing method in the above embodiment of the present application.
[0121] Fig.11 A block diagram of a route processing device according to an embodiment of the present application is shown.
[0122] Reference Fig.11 As shown, a route processing device 1100 according to an embodiment of the present application includes: a first generating unit 1102 , a feature extracting unit 1104 , a second generating unit 1106 and a model training unit 1108 .
[0123] Among them, the first generation unit 1102 is configured to generate a link expression corresponding to the planned route sample according to the multiple links contained in the planned route sample and the attribute information of each link; the feature extraction unit 1104 is configured to extract multiple initial embedding vectors corresponding to each element in the link expression through a pre-trained model; the second generation unit 1106 is configured to generate an input feature vector corresponding to each element according to the multiple initial embedding vectors; the model training unit 1108 is configured to perform multi-layer forward propagation processing according to the input feature vectors corresponding to each element, and perform model training processing based on the planned route sample, the training tasks corresponding to the pre-training model, and the intermediate result vectors corresponding to each element obtained by the multi-layer forward propagation processing, so as to process the specified route based on the converged pre-training module.
[0124] In some embodiments of the present application, based on the aforementioned scheme, the first generation unit 1102 is configured to: generate elements corresponding to each link for representing the attribute characteristics according to at least one attribute characteristic contained in the attribute information of each link; combine the elements corresponding to the multiple links according to the order of the multiple links in the planned route sample to generate a link expression corresponding to the planned route sample.
[0125] In some embodiments of the present application, based on the aforementioned scheme, the first generation unit 1102 is configured to: according to the position of a specified link among the multiple links in the planned route sample, add a position flag corresponding to the specified link in the link expression; wherein the position flag includes at least one of the following: a first flag added before the element corresponding to the starting link in the planned route sample, a second flag added between the elements corresponding to two specified links, and a third flag added after the element corresponding to the ending link in the planned route sample.
[0126] In some embodiments of the present application, based on the aforementioned solution, the two designated links include: a link located at a road intersection in the planned route sample, or any two adjacent links among the multiple links.
[0127] In some embodiments of the present application, based on the aforementioned scheme, the feature extraction unit 1104 is configured to: extract the word embedding vector, position embedding vector and route interval embedding vector corresponding to each element in the link expression through a pre-trained model; wherein the position embedding vector is used to represent the specific position of the element in the link expression, and the route interval embedding vector is used to represent the interval where the element is located in the link expression.
[0128] In some embodiments of the present application, based on the aforementioned scheme, the second generation unit 1106 is configured to: merge the multiple initial embedding vectors corresponding to the each element based on the set merging processing method, and use the result of the merging processing as the input feature vector corresponding to the each element.
[0129] In some embodiments of the present application, based on the aforementioned scheme, the model training unit 1108 is configured to: perform replacement operations on the links other than the starting link in the planned route sample according to set probabilities to obtain processed planned route samples; the replacement operation includes at least one of the following: replacing with a set flag bit, replacing with a random link, and remaining unchanged; taking the intermediate result vector corresponding to each element as input, restoring the link represented by the set flag bit to the actual link in the planned route sample as the optimization target corresponding to the first training task, and performing model training processing.
[0130] In some embodiments of the present application, based on the aforementioned scheme, replacement operations are performed on the other links in the planned route sample except the starting link according to the set probabilities, including: for the other links in the planned route sample except the starting link, determining whether to perform a replacement operation according to the first probability; for the links that need to be replaced, performing the replacement operation by replacing them with the second probability of a set flag bit, replacing them with the third probability of a random link, and keeping the fourth probability unchanged.
[0131] In some embodiments of the present application, based on the aforementioned scheme, the model training unit 1108 is configured to: replace the second half of the links in the planned route sample with random links with a set probability; wherein the planned route sample is divided into the first half of the links and the second half of the links at two designated links; take the intermediate result vector corresponding to the first flag bit added before the element corresponding to the starting link in the link expression as input, restore the random links to the second half of the links in the planned route sample as the optimization target corresponding to the second training task, and perform model training processing.
[0132] In some embodiments of the present application, based on the aforementioned scheme, the route processing device 1100 also includes: a processing unit 1110, configured to extract the target embedding vector corresponding to each element through a converged pre-trained model; generate a route embedding vector corresponding to the planned route sample according to the target embedding vector corresponding to each element; take the route embedding vector and the target input information for adjusting the pre-trained model as input, take the set business as the optimization target, and adjust the model parameters of the pre-trained model.
[0133] In some embodiments of the present application, based on the aforementioned scheme, the processing unit 1110 is configured to: calculate the mean of the target embedding vector corresponding to the starting link in the planned route sample according to the multiple target embedding vectors corresponding to the starting link; calculate the mean of the target embedding vectors corresponding to the multiple links contained in the planned route sample according to the multiple target embedding vectors respectively corresponding to the multiple links; calculate the mean of the target embedding vector corresponding to the terminating link according to the multiple target embedding vectors corresponding to the terminating link in the planned route sample; generate the route embedding vector corresponding to the planned route sample according to the mean of the target embedding vector corresponding to the starting link, the mean of the target embedding vectors corresponding to the multiple links and the mean of the target embedding vector corresponding to the terminating link.
[0134] In some embodiments of the present application, based on the aforementioned scheme, the target input information used to adjust the pre-trained model includes at least one of the following: route characteristics of the planned route samples obtained through feature engineering; prediction results obtained by predicting the set business through a machine learning model based on the route characteristics of the planned route samples.
[0135] In some embodiments of the present application, based on the aforementioned scheme, the route processing device 1100 also includes: a first prediction unit; the first generation unit 1102 is also configured to: generate a link expression corresponding to the target planning route to be processed according to the links contained in the target planning route to be processed, and the attribute information of each link; the feature extraction unit 1104 is also configured to: extract the target embedding vector corresponding to each link in the target planning route through the converged pre-training model; the first prediction unit is configured to: perform prediction processing of the set business based on the target embedding vector corresponding to each link in the target planning route.
[0136] In some embodiments of the present application, based on the aforementioned scheme, the first prediction unit is configured to: based on the target embedding vector corresponding to each link in the target planned route, perform at least one of the following processing on the target planned route: abnormal link detection processing, missing link completion processing in the target planned route, subsequent planned route generation processing, and route correlation processing.
[0137] In some embodiments of the present application, based on the aforementioned scheme, the route processing device 1100 also includes: a second prediction unit; the first generation unit 1102 is also configured to: generate a link expression corresponding to the target planning route to be processed according to the links contained in the target planning route to be processed, and the attribute information of each link; the second prediction unit is configured to: use the link expression as the input of the converged pre-trained model, and output the prediction result of the target planning route for the set business through the converged pre-trained model; wherein the set business includes at least one of the following: the coverage rate of the driving trajectory and the target planning route, the driving time of the target planning route, the planning rationality of the target planning route, the navigation completion rate of the target planning route, and the traffic volume of the target planning route.
[0138] Fig.12 A schematic diagram of the structure of a computer system suitable for implementing an electronic device of an embodiment of the present application is shown.
[0139] It should be noted that Fig.12 The computer system 1200 of the electronic device shown is only an example and should not bring any limitation to the functions and scope of use of the embodiments of the present application.
[0140] like Fig.12 As shown, the computer system 1200 includes a central processing unit (CPU) 1201, which can perform various appropriate actions and processes according to the program stored in the read-only memory (ROM) 1202 or the program loaded from the storage part 1208 to the random access memory (RAM) 1203, such as executing the method described in the above embodiment. In the RAM 1203, various programs and data required for system operation are also stored. The CPU 1201, the ROM 1202 and the RAM 1203 are connected to each other through the bus 1204. The input / output (I / O) interface 1205 is also connected to the bus 1204.
[0141] The following components are connected to the I / O interface 1205: an input section 1206 including a keyboard, a mouse, etc.; an output section 1207 including a cathode ray tube (CRT), a liquid crystal display (LCD), etc., and a speaker, etc.; a storage section 1208 including a hard disk, etc.; and a communication section 1209 including a network interface card such as a LAN (Local Area Network) card, a modem, etc. The communication section 1209 performs communication processing via a network such as the Internet. A drive 1210 is also connected to the I / O interface 1205 as needed. A removable medium 1211, such as a magnetic disk, an optical disk, a magneto-optical disk, a semiconductor memory, etc., is installed on the drive 1210 as needed so that a computer program read therefrom is installed into the storage section 1208 as needed.
[0142] In particular, according to an embodiment of the present application, the process described above with reference to the flowchart can be implemented as a computer software program. For example, an embodiment of the present application includes a computer program product, which includes a computer program carried on a computer-readable medium, and the computer program includes a computer program for executing the method shown in the flowchart. In such an embodiment, the computer program can be downloaded and installed from a network through a communication section 1209, and / or installed from a removable medium 1211. When the computer program is executed by a central processing unit (CPU) 1201, various functions defined in the system of the present application are executed.
[0143] It should be noted that the computer-readable medium shown in the embodiment of the present application may be a computer-readable signal medium or a computer-readable storage medium or any combination of the above two. The computer-readable storage medium may be, for example, - but not limited to - an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, device or device, or any combination of the above. More specific examples of computer-readable storage media may include, but are not limited to: an electrical connection with one or more wires, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM), a flash memory, an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the above. In the present application, a computer-readable storage medium may be any tangible medium containing or storing a program, which may be used by an instruction execution system, device or device or used in combination with it. In the present application, a computer-readable signal medium may include a data signal propagated in a baseband or as part of a carrier wave, wherein a computer-readable computer program is carried. Such propagated data signals may take a variety of forms, including but not limited to electromagnetic signals, optical signals, or any suitable combination of the above. Computer-readable signal media may also be any computer-readable medium other than computer-readable storage media, which may send, propagate, or transmit programs for use by or in conjunction with an instruction execution system, apparatus, or device. The computer program contained on the computer-readable medium may be transmitted using any appropriate medium, including but not limited to: wireless, wired, etc., or any suitable combination of the above.
[0144] The flowchart and block diagram in the accompanying drawings illustrate the possible architecture, functions and operations of the system, method and computer program product according to various embodiments of the present application. Wherein, each box in the flowchart or block diagram can represent a module, a program segment, or a part of the code, and the above-mentioned module, program segment, or a part of the code contains one or more executable instructions for realizing the specified logical function. It should also be noted that in some alternative implementations, the functions marked in the box can also occur in a different order from the order marked in the accompanying drawings. For example, two boxes represented in succession can actually be executed substantially in parallel, and they can sometimes be executed in the opposite order, depending on the functions involved. It should also be noted that each box in the block diagram or flowchart, and the combination of the boxes in the block diagram or flowchart can be implemented with a dedicated hardware-based system that performs a specified function or operation, or can be implemented with a combination of dedicated hardware and a computer program.
[0145] The units involved in the embodiments described in this application may be implemented by software or hardware, and the units described may also be set in a processor. The names of these units do not, in some cases, constitute limitations on the units themselves.
[0146] As another aspect, the present application also provides a computer-readable medium, which may be included in the electronic device described in the above embodiment; or may exist independently without being assembled into the electronic device. The above computer-readable medium carries one or more computer programs, and when the above one or more computer programs are executed by an electronic device, the electronic device implements the method described in the above embodiment.
[0147] It should be noted that, although several modules or units of the equipment for action execution are mentioned in the above detailed description, this division is not mandatory. In fact, according to the embodiments of the present application, the features and functions of two or more modules or units described above can be embodied in one module or unit. On the contrary, the features and functions of one module or unit described above can be further divided into being embodied by multiple modules or units.
[0148] Through the description of the above implementation methods, it is easy for those skilled in the art to understand that the example implementation methods described here can be implemented by software or by combining software with necessary hardware. Therefore, the technical solution according to the implementation methods of the present application can be embodied in the form of a software product, which can be stored in a non-volatile storage medium (which can be a CD-ROM, a USB flash drive, a mobile hard disk, etc.) or on a network, and includes several instructions to enable a computing device (which can be a personal computer, a server, a touch terminal, or a network device, etc.) to execute the method according to the implementation methods of the present application.
[0149] Those skilled in the art will readily appreciate other embodiments of the present application after considering the specification and practicing the embodiments disclosed herein. The present application is intended to cover any variations, uses or adaptations of the present application, which follow the general principles of the present application and include common knowledge or customary technical means in the art that are not disclosed in the present application.
[0150] It should be understood that the present application is not limited to the precise structures that have been described above and shown in the drawings, and that various modifications and changes may be made without departing from the scope thereof. The scope of the present application is limited only by the appended claims.
Claims
1. A route processing method, characterized in that: include: Generate a link expression corresponding to the planned route sample according to multiple links included in the planned route sample and attribute information of each link; Extracting multiple initial embedding vectors corresponding to each element in the link expression through a pre-trained model, and generating input feature vectors corresponding to each element according to the multiple initial embedding vectors; Performing multi-layer forward propagation processing according to the input feature vectors corresponding to the elements, and performing model training processing based on the planned route sample, the training tasks corresponding to the pre-trained model, and the intermediate result vectors corresponding to the elements obtained by the multi-layer forward propagation processing, so as to process the designated route based on the converged pre-trained module; The model training process is performed based on the planned route sample, the training task corresponding to the pre-trained model, and the intermediate result vector corresponding to each element obtained by the multi-layer forward propagation process, including at least one of the following processes: For the links other than the starting link in the planned route sample, replacement operations are performed respectively according to set probabilities to obtain processed planned route samples; the replacement operation includes replacing with set flag bits; taking the intermediate result vectors corresponding to the elements as input, restoring the links represented by the set flag bits to the actual links in the planned route sample as the optimization targets corresponding to the first training task, and performing model training processing; The second half of the links in the planned route sample are replaced with random links with a set probability; wherein the planned route sample is divided into a first half of the links and a second half of the links at two designated links; the intermediate result vector corresponding to the first flag bit added before the element corresponding to the starting link in the link expression is taken as input, and the random links are restored to the second half of the links in the planned route sample as the optimization target corresponding to the second training task, and the model training process is performed.
2. The route processing method according to claim 1, characterized in that: According to the multiple links included in the planned route sample and the attribute information of each link, a link expression corresponding to the planned route sample is generated, including: Generating, according to at least one attribute feature included in the attribute information of each link, an element corresponding to each link and used to represent the attribute feature; According to the order of the multiple links in the planned route sample, the elements corresponding to the multiple links are combined to generate a link expression corresponding to the planned route sample.
3. The route processing method according to claim 2, characterized in that: According to the multiple links included in the planned route sample and the attribute information of each link, a link expression corresponding to the planned route sample is generated, which also includes: According to the position of a specified link among the multiple links in the planned route sample, adding a position flag corresponding to the specified link in the link expression; Among them, the position flag includes at least one of the following: a first flag added before the element corresponding to the starting link in the planned route sample, a second flag added between the elements corresponding to two specified links, and a third flag added after the element corresponding to the ending link in the planned route sample.
4. The route processing method according to claim 3, characterized in that: The two designated links include: a link located at a road intersection in the planned route sample, or any two adjacent links among the multiple links.
5. The route processing method according to claim 1, characterized in that: Extracting multiple initial embedding vectors corresponding to each element in the link expression through a pre-trained model, including: extracting a word embedding vector, a position embedding vector, and a route interval embedding vector corresponding to each element in the link expression through a pre-trained model; The position embedding vector is used to represent the specific position of the element in the link expression, and the route interval embedding vector is used to represent the interval where the element is located in the link expression.
6. The route processing method according to claim 1, characterized in that: Generating an input feature vector corresponding to each element according to the multiple initial embedding vectors includes: Based on the set merging processing mode, a plurality of initial embedding vectors corresponding to the respective elements are merged, and a result of the merging processing is used as an input feature vector corresponding to the respective elements.
7. The route processing method according to claim 1, characterized in that: The replacement operation also includes at least one of the following: replacing with a random link, remaining unchanged; The other links in the planned route sample except the starting link are replaced respectively according to the set probability, including: For each of the links except the starting link in the planned route sample, determining whether to perform a replacement operation according to the first probability; For the link that needs to be replaced, the replacement operation is performed by replacing it with the second probability of setting the flag bit, replacing it with the third probability of a random link, and keeping the fourth probability unchanged.
8. The route processing method according to claim 1, characterized in that: Process the specified route based on the converged pre-trained module, including: Extracting the target embedding vector corresponding to each element through the converged pre-trained model; Generate a route embedding vector corresponding to the planned route sample according to the target embedding vector corresponding to each element; The route embedding vector and target input information for adjusting the pre-trained model are taken as input, the set business is taken as the optimization target, and the model parameters of the pre-trained model are adjusted.
9. The route processing method according to claim 8, characterized in that: Generating a route embedding vector corresponding to the planned route sample according to the target embedding vector corresponding to each element includes: According to a plurality of target embedding vectors corresponding to the starting link in the planned route sample, a mean value of the target embedding vector corresponding to the starting link is calculated; According to a plurality of target embedding vectors respectively corresponding to a plurality of links included in the planned route sample, a mean value of the target embedding vectors corresponding to the plurality of links is calculated; According to a plurality of target embedding vectors corresponding to the termination links in the planned route sample, a mean value of the target embedding vector corresponding to the termination links is calculated; A route embedding vector corresponding to the planned route sample is generated according to the mean value of the target embedding vector corresponding to the starting link, the mean value of the target embedding vectors corresponding to the multiple links, and the mean value of the target embedding vector corresponding to the terminating link.
10. The route processing method according to claim 8, characterized in that: The target input information used to adjust the pre-trained model includes at least one of the following: Route features of the planned route sample obtained through feature engineering; Based on the route characteristics of the planned route sample, a prediction result is obtained by performing prediction processing on the set business through a machine learning model.
11. The route processing method according to any one of claims 1 to 10, characterized in that: Process the specified route based on the converged pre-trained module, including: Generate a link expression corresponding to the target planning route according to the links included in the target planning route to be processed and the attribute information of each link; Extracting the target embedding vector corresponding to each link in the target planning route through the converged pre-trained model; The prediction processing of the set business is performed based on the target embedding vector corresponding to each link in the target planning route.
12. The route processing method according to claim 11, characterized in that: The prediction process of setting the service is performed based on the target embedding vector corresponding to each link in the target planning route, including: Based on the target embedding vector corresponding to each link in the target planning route, the target planning route is subjected to at least one of the following processing: abnormal link detection processing, missing link completion processing in the target planning route, subsequent planning route generation processing, and route correlation processing.
13. The route processing method according to any one of claims 1 to 10, characterized in that: Process the specified route based on the converged pre-trained module, including: Generate a link expression corresponding to the target planning route according to the links included in the target planning route to be processed and the attribute information of each link; The link expression is used as an input of a converged pre-trained model, and a prediction result of the target planning route for a set business is output through the converged pre-trained model; Among them, the set business includes at least one of the following: the coverage rate of the driving trajectory and the target planned route, the driving time of the target planned route, the planning rationality of the target planned route, the navigation completion rate of the target planned route, and the traffic volume of the target planned route.
14. A route processing device, characterized in that: include: A first generating unit is configured to generate a link expression corresponding to the planned route sample according to a plurality of links included in the planned route sample and attribute information of each link; A feature extraction unit, configured to extract a plurality of initial embedding vectors corresponding to each element in the link expression through a pre-trained model; A second generating unit is configured to generate an input feature vector corresponding to each element according to the multiple initial embedding vectors; A model training unit is configured to perform multi-layer forward propagation processing according to the input feature vectors corresponding to the elements, and perform model training processing based on the planned route sample, the training tasks corresponding to the pre-trained model, and the intermediate result vectors corresponding to the elements obtained by the multi-layer forward propagation processing, so as to process the designated route based on the converged pre-trained module; The model training unit is configured to perform at least one of the following processes: For the links other than the starting link in the planned route sample, replacement operations are performed respectively according to set probabilities to obtain processed planned route samples; the replacement operation includes replacing with set flag bits; taking the intermediate result vectors corresponding to the elements as input, restoring the links represented by the set flag bits to the actual links in the planned route sample as the optimization targets corresponding to the first training task, and performing model training processing; The second half of the links in the planned route sample are replaced with random links with a set probability; wherein the planned route sample is divided into a first half of the links and a second half of the links at two designated links; the intermediate result vector corresponding to the first flag bit added before the element corresponding to the starting link in the link expression is taken as input, and the random links are restored to the second half of the links in the planned route sample as the optimization target corresponding to the second training task, and the model training process is performed.
15. A computer readable medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the route processing method according to any one of claims 1 to 13 is implemented.
16. An electronic device, characterized in that: include: one or more processors; A memory for storing one or more computer programs, which, when executed by the one or more processors, enables the electronic device to implement the route processing method as described in any one of claims 1 to 13.
17. A computer program product, characterized in that The computer program product includes a computer program, which is stored in a computer-readable storage medium. A processor of an electronic device reads and executes the computer program from the computer-readable storage medium, so that the electronic device executes the route processing method according to any one of claims 1 to 13.
Citation Information
Patent Citations
AGV path planning method and system based on reinforcement learning
CN113485380A
Method and apparatus for generating route planning model, and storage medium
US20210223056A1