Line selection method and device, electronic equipment and storage medium

By iterating the line data and updating the fitness value, the problems of cumbersome calculations and high resource utilization of traditional line planning algorithms are solved, and efficient and high-precision line selection is achieved, reducing costs and improving the scope of application.

CN119623793APending Publication Date: 2025-03-14GAC AION NEW ENERGY AUTOMOBILE CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411684744.X
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-11-22
Publication Date
2025-03-14

AI Technical Summary

Technical Problem

In the existing global line planning technology, traditional genetic algorithms and particle swarm algorithms have problems such as excessive parameters, cumbersome calculations, long time, and complex structures, resulting in high occupation of computing space and storage space, and cannot be applied to multiple complex environments, which is expensive and cannot be widely used.

Method used

By acquiring line data, iterating according to preset control parameters, a candidate data group is obtained, and the average duration data of each group of lines is calculated as the first fitness value, and updated it to obtain a second fitness value, and finally the target line is selected based on the second fitness value.

Benefits of technology

It realizes an efficient and high-precision line selection method, simplifies the computing structure, reduces time and resource usage, reduces costs, and improves flexibility and scope of application.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119623793A_ABST
    Figure CN119623793A_ABST
Patent Text Reader

Abstract

The invention provides a line selection method and device, electronic equipment and a storage medium, and the method comprises the steps: obtaining line data; iterating the line data according to a preset control parameter to obtain a candidate data set; obtaining average time length data corresponding to each group of lines in the candidate data group, and determining the average time length data as a first fitness value; updating the first fitness value to obtain a second fitness value; and selecting a target line in the candidate data group according to the second fitness value. By implementing the method, an efficient and high-precision line selection mode can be realized, a line selection calculation structure can be simplified, time consumption can be reduced, occupation of calculation space and storage space can be reduced, cost can be reduced, the flexibility is higher, and the application range is wider.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the technical field of line planning, and in particular to a line selection method, device, electronic device and storage medium. Background Art

[0002] Global route planning is a route selection method commonly used in the fields of map construction and vehicle autonomous driving. It can plan the best route among many routes to facilitate applications such as vehicle driving. In the existing technology, the solutions for solving global route planning problems using optimization algorithms basically directly use more basic algorithms such as genetic algorithms and particle swarm algorithms. These traditional methods have problems such as too many parameters, cumbersome calculations, long time consumption, and complex structures. They greatly consume computing space and storage space, and are not universal. They are only applicable to specific occasions and cannot be applied to a variety of complex environments. They are costly and cannot be widely used. Summary of the invention

[0003] The purpose of the present application is to provide a line selection method, device, electronic device and storage medium, which can realize an efficient and high-precision line selection method, simplify the line selection calculation structure, reduce time consumption, reduce the occupation of computing space and storage space, reduce costs, have higher flexibility and a wider range of applications.

[0004] In a first aspect, an embodiment of the present application provides a line selection method, the method comprising:

[0005] Get line data;

[0006] Iterate the line data according to a preset control parameter to obtain a candidate data group;

[0007] Obtaining average duration data corresponding to each group of routes in the candidate data group, and determining the average duration data as a first fitness value;

[0008] Updating the first fitness value to obtain a second fitness value;

[0009] A target route in the candidate data set is selected according to the second fitness value.

[0010] In the above implementation process, after the first fitness value is updated, the target line is selected according to the second fitness value, which can realize an efficient and high-precision line selection method, simplify the line selection calculation structure, reduce time consumption, reduce the occupation of computing space and storage space, reduce costs, and have higher flexibility and a wider range of applications.

[0011] Furthermore, the step of iterating the line data according to the preset control parameters to obtain the candidate data group includes:

[0012] Initializing the line data to obtain an initialization candidate data group;

[0013] Iterate the initialization candidate data group according to the control parameter to obtain the number of iterations;

[0014] Determine whether the number of iterations reaches an iteration threshold;

[0015] If so, taking the initialized candidate data group as the candidate data group;

[0016] If not, the initialized candidate data group is updated to obtain the candidate data group.

[0017] In the above implementation process, the initialized candidate data group is iterated, and the initialized candidate data group is updated according to the number of iterations, so that the obtained candidate data group has higher accuracy, which can improve the subsequent calculation accuracy.

[0018] Furthermore, the step of obtaining average duration data corresponding to each group of routes in the candidate data group and determining the average duration data as the first fitness value includes:

[0019] Obtaining the route length and route time from the initial point to the target point of each set of routes in the candidate data set;

[0020] Obtaining a target route length and a target route time from an initial point to a target point of each route group in the candidate data group;

[0021] Obtaining an average value of the line length and the target line length to obtain an average line length;

[0022] Obtaining an average of the route time and the target route time to obtain an average time;

[0023] The average duration data is obtained according to the average route length and the average time, and the average duration data is determined as a first fitness value.

[0024] In the above implementation process, average duration data is obtained according to the average route length and the average time, and the average duration data is determined as the first fitness value, so that the route can be evaluated more accurately and provide a basis for selecting the optimal route.

[0025] Furthermore, the step of selecting a target route in the candidate data group according to the second fitness value includes:

[0026] Acquire an initial point set, a target point set, an optional path point set, and a traversed route point set in the candidate data set;

[0027] Determine the route with the smallest second fitness value in the set of optional route points as the current node;

[0028] The target line is selected according to the current node.

[0029] In the above implementation process, selecting the current node for target line selection according to the second fitness value can improve the flexibility of target line selection, reduce the complexity of calculation in the target line selection process, and improve the selection accuracy.

[0030] Furthermore, the step of selecting the target line according to the current node includes:

[0031] Adding the current node to the traversed route point set;

[0032] Obtain the connecting line and the left and right lines of the current node;

[0033] Determine whether the connecting route and the left and right routes exist in the traversed route point set;

[0034] If so, determining whether the set of optional route points is empty, if the set of optional route points is empty, there is no target route, if the set of optional route points is not empty, determining the route in the set of optional route points as the target route;

[0035] If not, determine whether the current node exists in the set of optional route points; if the current node exists in the set of optional route points, determine the target route according to the cost value; if the current node does not exist in the set of optional route points, update the parent node of the current node to the current node, and determine the target route according to the cost value of the parent node and the second fitness value of the parent node.

[0036] In the above implementation process, according to whether the connecting route and the left and right routes exist in the traversed route point set, and further judging the state of the optional route point set, the optimal route can be accurately selected to reduce the error in the selection process.

[0037] Furthermore, the step of determining the target route according to the cost value includes:

[0038] Obtaining the cost value of the current node;

[0039] Determine whether there is a route in the set of optional path points whose cost value is greater than the cost value of the current node;

[0040] If yes, update the parent node of the current node to be the current node, and update the cost value of the parent node and the second fitness value of the parent node;

[0041] If not, determine whether the set of optional route points is empty. If the set of optional route points is empty, there is no target route. If the set of optional route points is not empty, determine that the current node is the target route.

[0042] In the above implementation process, determining the route according to the cost value can increase the weight of the cost value in the target route selection process, thereby improving the effectiveness and rationality of the target route selection.

[0043] Further, the step of determining the target route according to the cost value of the parent node and the second fitness value of the parent node includes:

[0044] Determining whether the set of optional waypoints is empty;

[0045] If yes, there is no target line;

[0046] If not, it is determined that the current node is the target line.

[0047] In the above implementation process, determining the target route according to the status of the optional waypoint set can reduce the computation time, reduce the occupation of computation space and storage space, and reduce the cost.

[0048] In a second aspect, an embodiment of the present application further provides a line selection device, the device comprising:

[0049] An acquisition module, used to acquire line data;

[0050] An iteration module, used for iterating the line data according to a preset control parameter to obtain a candidate data group;

[0051] A data acquisition module, used to obtain average duration data corresponding to each group of routes in the candidate data group, and determine the average duration data as a first fitness value;

[0052] An updating module, used for updating the first fitness value to obtain a second fitness value;

[0053] A selection module is used to select a target route in the candidate data group according to the second fitness value.

[0054] In the above implementation process, after the first fitness value is updated, the target line is selected according to the second fitness value, which can realize an efficient and high-precision line selection method, simplify the line selection calculation structure, reduce time consumption, reduce the occupation of computing space and storage space, reduce costs, and have higher flexibility and a wider range of applications.

[0055] In a third aspect, an embodiment of the present application provides an electronic device, comprising: a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor implements the steps of the method described in any one of the first aspects when executing the computer program.

[0056] In a fourth aspect, an embodiment of the present application provides a computer-readable storage medium, on which instructions are stored. When the instructions are executed on a computer, the computer executes the method as described in any one of the first aspects.

[0057] Other features and advantages of the present disclosure will be set forth in the following description, or some features and advantages may be inferred or unambiguously determined from the description, or may be learned by implementing the above-mentioned technology of the present disclosure.

[0058] And it can be implemented according to the contents of the specification. The following is a detailed description of the preferred embodiments of the present application with reference to the accompanying drawings. BRIEF DESCRIPTION OF THE DRAWINGS

[0059] In order to more clearly illustrate the technical solutions of the embodiments of the present application, the drawings required for use in the embodiments of the present application will be briefly introduced below. It should be understood that the following drawings only show certain embodiments of the present application and therefore should not be regarded as limiting the range values. For ordinary technicians in this field, other related drawings can be obtained based on these drawings without paying any creative work.

[0060] Figure 1 A schematic diagram of a flow chart of a line selection method provided in an embodiment of the present application;

[0061] Figure 2 A schematic diagram of the structure of a line selection device provided in an embodiment of the present application;

[0062] Figure 3 A schematic diagram of the structural composition of an electronic device provided in an embodiment of the present application. DETAILED DESCRIPTION

[0063] The technical solutions in the embodiments of the present application will be described below in conjunction with the drawings in the embodiments of the present application.

[0064] It should be noted that similar reference numerals and letters represent similar items in the following drawings, so once an item is defined in one drawing, it does not need to be further defined and explained in subsequent drawings. At the same time, in the description of this application, the terms "first", "second", etc. are only used to distinguish the description and cannot be understood as indicating or implying relative importance.

[0065] The specific implementation methods of the present application are further described in detail below in conjunction with the accompanying drawings and examples. The following examples are used to illustrate the present application, but are not used to limit the scope of the present application.

[0066] Embodiment 1

[0067] Figure 1 is a flow chart of the line selection method provided in the embodiment of the present application, such as Figure 1 As shown, the method includes:

[0068] S1, obtain line data;

[0069] S2, iterating the line data according to the preset control parameters to obtain a candidate data group;

[0070] S3, obtaining average duration data corresponding to each group of routes in the candidate data group, and determining the average duration data as a first fitness value;

[0071] S4, updating the first fitness value to obtain a second fitness value;

[0072] S5, selecting a target route in the candidate data group according to the second fitness value.

[0073] In the above implementation process, after the first fitness value is updated, the target line is selected according to the second fitness value, which can realize an efficient and high-precision line selection method, simplify the line selection calculation structure, reduce time consumption, reduce the occupation of computing space and storage space, reduce costs, and have higher flexibility and a wider range of applications.

[0074] The iterative process of the embodiment of the present application is implemented based on the A* algorithm. In the state iteration process of the A* algorithm, the basis for selecting the next state is mainly the cost consumed to reach the current state and the estimated cost value of the next state to reach the final state. The selection of the estimated cost value has a great influence on the solution accuracy and solution speed of the algorithm. Generally, when the estimated cost value is greater than the actual cost value, the algorithm solution accuracy is high, but the solution time is long; on the contrary, when the estimated cost value is less than the actual cost value, the algorithm solution accuracy decreases, but the solution time is shortened; when the estimated cost value is just equal to the actual cost value, the algorithm performance reaches the optimal level, and the optimal solution can be stably obtained in a relatively short time.

[0075] Generally, when the A* algorithm is used for global route planning in two-dimensional space, Manhattan distance or Euclidean distance is directly used. This application focuses on the weight distribution of Manhattan distance and Euclidean distance in estimating cost value, and proposes a route planning method that combines the advantages of A* algorithm and Gray Wolf Algorithm.

[0076] Furthermore, S2 includes:

[0077] Initializing the line data to obtain an initialization candidate data group;

[0078] Iterate the initialized candidate data group according to the control parameter to obtain the number of iterations;

[0079] Determine whether the number of iterations reaches the iteration threshold;

[0080] If so, the initialized candidate data group is used as the candidate data group;

[0081] If not, the initialized candidate data set is updated to obtain a candidate data set.

[0082] In the above implementation process, the initialized candidate data group is iterated, and the initialized candidate data group is updated according to the number of iterations, so that the obtained candidate data group has higher accuracy, which can improve the subsequent calculation accuracy.

[0083] The initialization candidate data set includes all route paths formed according to the route data.

[0084] The control parameters include algorithm-related parameters such as the maximum number of iterations. After the data is initialized, the candidate data set is updated to obtain the initialized candidate data set, and the conditions for the end of the iteration are determined. If the number of iterations reaches the preset value (iteration threshold), the fitness value and other parameters of the candidate data set are directly output to end the algorithm. Before the number of iterations is reached, the three routes in the initialized candidate data set are saved as the optimal routes, and then the algorithm is iterated.

[0085] In each iteration, each control parameter is updated, and the fitness value of the line is calculated after the update. The line with the higher value is taken to continue updating, and so on, until the iteration is completed.

[0086] Furthermore, S3 includes:

[0087] Obtain the route length and route time from the initial point to the target point of each route in the candidate data group;

[0088] Obtaining the target route length and target route time from the initial point to the target point of each route group in the candidate data group;

[0089] The average of the line length and the target line length is obtained to obtain the average line length;

[0090] Get the average of the route time and the target route time to get the average time;

[0091] The average duration data is obtained according to the average route length and the average time, and the average duration data is determined as the first fitness value.

[0092] In the above implementation process, average duration data is obtained according to the average route length and the average time, and the average duration data is determined as the first fitness value, which can more accurately evaluate the route and provide a basis for selecting the optimal route.

[0093] The embodiment of the present application takes into account the route selection of different map features, and obtains a parameter group suitable for a variety of maps through algorithm convergence. Different maps correspond to different weight parameter groups, thereby achieving route selection for different problem backgrounds, optimizing the calculation of estimated cost values, and improving the algorithm solution performance.

[0094] The fitness value calculation of the embodiment of the present application is implemented by the Grey Wolf Algorithm. A search is performed under the parameter group of the Grey Wolf Algorithm to obtain the optimal route and calculate the various parameters of the route to obtain the fitness value of the route.

[0095] The average of the line length between the initial point and the target point of the line and the target line length is the average line length, and the average of the line time and the target line time is the average time. The fitness value (the first fitness value obtained in this embodiment of the application is determined as the first fitness value) can be obtained as follows:

[0096] F = length + 10 * t;

[0097] Among them, length represents the average line length, and t represents the average time.

[0098] Furthermore, S5 includes:

[0099] Obtaining an initial point set, a target point set, an optional path point set, and a traversed route point set in the candidate data set;

[0100] Determine the route with the smallest second fitness value in the set of optional route points as the current node;

[0101] Select the target line based on the current node.

[0102] In the above implementation process, selecting the current node for target line selection according to the second fitness value can improve the flexibility of target line selection, reduce the complexity of calculation in the target line selection process, and improve the selection accuracy.

[0103] Initialize the initial point set, target point set, optional waypoint set and traversed route point set. The initial point set contains the starting points of all routes, the target point set contains the end points of all routes, the optional waypoints contain the points passed by each route, and the traversed route point set contains the points in the traversed routes.

[0104] Optionally, if there is an initial point and a target point combination that has not been searched, a set of initial points and target points are selected, and the initial points are added to the set of optional route points; otherwise, the algorithm is terminated and the fitness values ​​corresponding to all routes are output.

[0105] Find the node with the smallest fitness value (the second fitness value in this case) in the set of optional route points as the current node, and add the current node to the set of traversed route points.

[0106] Furthermore, the step of selecting a target line according to the current node includes:

[0107] Add the current node to the traversed route point set;

[0108] Get the connection line and left and right lines of the current node;

[0109] Determine whether the connecting line and the left and right lines exist in the traversed line point set;

[0110] If so, determine whether the set of optional waypoints is empty. If the set of optional waypoints is empty, there is no target route. If the set of optional waypoints is not empty, determine that the route in the set of optional waypoints is the target route.

[0111] If not, determine whether the current node exists in the set of optional route points. If the current node exists in the set of optional route points, determine the target route according to the cost value. If the current node does not exist in the set of optional route points, update the parent node of the current node to the current node, and determine the target route according to the cost value of the parent node and the second fitness value of the parent node.

[0112] In the above implementation process, according to whether the connecting route and the left and right routes exist in the traversed route point set, and further judging the state of the optional route point set, the optimal route can be accurately selected to reduce the error in the selection process.

[0113] The cost value is the computing power cost consumed to complete each route. Optionally, it can be measured by the length of each route or the time taken to complete each route. The smaller the cost value, the shorter the route length, or the less time it takes to complete the route, indicating that the route is more optimized.

[0114] Check whether the connecting route and the left and right routes of the current node are in the traversed route point set respectively. If they are, determine whether the set of optional route points is empty. If the set of optional route points is empty, it indicates that there is no target route.

[0115] The embodiment of the present application checks whether there is a better route than the current node in the set of optional route points, using the cost value as a reference. If there is a better route, the parent node of the current node is updated to the current point, and the cost value and fitness value of the parent node are recalculated.

[0116] Furthermore, the step of determining the target route according to the cost value includes:

[0117] Get the cost value of the current node;

[0118] Determine whether there is a route in the set of optional path points whose cost value is greater than the cost value of the current node;

[0119] If yes, update the parent node of the current node to be the current node, and update the cost value of the parent node and the second fitness value of the parent node;

[0120] If not, determine whether the set of optional waypoints is empty. If the set of optional waypoints is empty, there is no target route. If the set of optional waypoints is not empty, determine that the current node is the target route.

[0121] In the above implementation process, determining the route according to the cost value can increase the weight of the cost value in the target route selection process, thereby improving the effectiveness and rationality of the target route selection.

[0122] Further, the step of determining the target route according to the cost value of the parent node and the second fitness value of the parent node includes:

[0123] Determine whether the set of optional waypoints is empty;

[0124] If yes, there is no target line;

[0125] If not, determine that the current node is the target line.

[0126] In the above implementation process, determining the target route according to the status of the optional waypoint set can reduce the computation time, reduce the occupation of computation space and storage space, and reduce the cost.

[0127] If the set of optional waypoints is empty, the query fails, indicating that there is no route, and the search ends. If the part is empty, it means that the target point is in the set of optional waypoints, and the traversal ends. The target route and its fitness value and the duration data of the target route are output.

[0128] The embodiments of the present application can obtain an optimal route for different maps, improve the search and iteration efficiency, reduce the search for other routes, thereby speeding up the progress, reducing the time spent searching for the target route, and ensuring the superiority of the target route.

[0129] Embodiment 2

[0130] In order to execute the method corresponding to the above embodiment 1 to achieve the corresponding functions and technical effects, a line selection device is provided below, such as Figure 2 As shown, the device comprises:

[0131] Acquisition module 1, used to acquire line data;

[0132] Iteration module 2, used for iterating the line data according to a preset control parameter to obtain a candidate data group;

[0133] A data acquisition module 3 is used to obtain average duration data corresponding to each group of routes in the candidate data group, and determine the average duration data as a first fitness value;

[0134] An updating module 4, used for updating the first fitness value to obtain a second fitness value;

[0135] The selection module 5 is used to select a target route in the candidate data group according to the second fitness value.

[0136] In the above implementation process, after the first fitness value is updated, the target line is selected according to the second fitness value, which can realize an efficient and high-precision line selection method, simplify the line selection calculation structure, reduce time consumption, reduce the occupation of computing space and storage space, reduce costs, and have higher flexibility and a wider range of applications.

[0137] Furthermore, the iteration module 2 is also used for:

[0138] Initializing the line data to obtain an initialization candidate data group;

[0139] Iterate the initialized candidate data group according to the control parameter to obtain the number of iterations;

[0140] Determine whether the number of iterations reaches the iteration threshold;

[0141] If so, the initialized candidate data group is used as the candidate data group;

[0142] If not, the initialized candidate data set is updated to obtain a candidate data set.

[0143] In the above implementation process, the initialized candidate data group is iterated, and the initialized candidate data group is updated according to the number of iterations, so that the obtained candidate data group has higher accuracy, which can improve the subsequent calculation accuracy.

[0144] Furthermore, the data acquisition module 3 is also used for:

[0145] Obtain the route length and route time from the initial point to the target point of each route in the candidate data group;

[0146] Obtaining the target route length and target route time from the initial point to the target point of each route group in the candidate data group;

[0147] The average of the line length and the target line length is obtained to obtain the average line length;

[0148] Get the average of the route time and the target route time to get the average time;

[0149] The average duration data is obtained according to the average route length and the average time, and the average duration data is determined as the first fitness value.

[0150] In the above implementation process, average duration data is obtained according to the average route length and the average time, and the average duration data is determined as the first fitness value, which can more accurately evaluate the route and provide a basis for selecting the optimal route.

[0151] Furthermore, the selection module 5 is also used for:

[0152] Obtaining an initial point set, a target point set, an optional path point set, and a traversed route point set in the candidate data set;

[0153] Determine the route with the smallest second fitness value in the set of optional route points as the current node;

[0154] Select the target line based on the current node.

[0155] In the above implementation process, selecting the current node for target line selection according to the second fitness value can improve the flexibility of target line selection, reduce the complexity of calculation in the target line selection process, and improve the selection accuracy.

[0156] Furthermore, the selection module 5 is also used for:

[0157] Add the current node to the traversed route point set;

[0158] Get the connection line and left and right lines of the current node;

[0159] Determine whether the connecting line and the left and right lines exist in the traversed line point set;

[0160] If so, determine whether the set of optional waypoints is empty. If the set of optional waypoints is empty, there is no target route. If the set of optional waypoints is not empty, determine that the route in the set of optional waypoints is the target route.

[0161] If not, determine whether the current node exists in the set of optional route points. If the current node exists in the set of optional route points, determine the target route according to the cost value. If the current node does not exist in the set of optional route points, update the parent node of the current node to the current node, and determine the target route according to the cost value of the parent node and the second fitness value of the parent node.

[0162] In the above implementation process, according to whether the connecting route and the left and right routes exist in the traversed route point set, and further judging the state of the optional route point set, the optimal route can be accurately selected to reduce the error in the selection process.

[0163] Furthermore, the selection module 5 is also used for:

[0164] Get the cost value of the current node;

[0165] Determine whether there is a route in the set of optional path points whose cost value is greater than the cost value of the current node;

[0166] If yes, update the parent node of the current node to be the current node, and update the cost value of the parent node and the second fitness value of the parent node;

[0167] If not, determine whether the set of optional waypoints is empty. If the set of optional waypoints is empty, there is no target route. If the set of optional waypoints is not empty, determine that the current node is the target route.

[0168] In the above implementation process, determining the route according to the cost value can increase the weight of the cost value in the target route selection process, thereby improving the effectiveness and rationality of the target route selection.

[0169] Furthermore, the selection module 5 is also used for:

[0170] Determine whether the set of optional waypoints is empty;

[0171] If yes, there is no target line;

[0172] If not, determine that the current node is the target line.

[0173] In the above implementation process, determining the target route according to the status of the optional waypoint set can reduce the computation time, reduce the occupation of computation space and storage space, and reduce the cost.

[0174] The above-mentioned line selection device can implement the method of the above-mentioned embodiment 1. The options in the above-mentioned embodiment 1 are also applicable to this embodiment and will not be described in detail here.

[0175] The rest of the contents of the embodiments of the present application can refer to the contents of the above-mentioned embodiment 1, and will not be repeated in this embodiment.

[0176] Embodiment 3

[0177] An embodiment of the present application provides an electronic device, including a memory and a processor, wherein the memory is used to store a computer program, and the processor runs the computer program to enable the electronic device to execute the line selection method of the first embodiment.

[0178] Optionally, the above-mentioned electronic device may be a server.

[0179] See also Figure 3 , Figure 3 The schematic diagram of the structure of the electronic device provided in the embodiment of the present application. The electronic device may include a processor 31, a communication interface 32, a memory 33 and at least one communication bus 34. The communication bus 34 is used to realize direct connection and communication between these components.

[0180] Optionally, the electronic device may further include a storage controller and an input / output unit. The memory 33, the storage controller, the processor 31, the peripheral interface, and the input / output unit are electrically connected to each other directly or indirectly to achieve data transmission or interaction.

[0181] The input and output unit is used to provide users with the task creation and to create an optional time period or preset execution time for the task to enable interaction between the user and the server. The input and output unit can be, but is not limited to, a mouse and a keyboard.

[0182] Understandably, Figure 3 The structure shown is for illustration only. The electronic device may also include Figure 3 More or fewer components as shown, or with Figure 3 Different configurations are shown. Figure 3 Each component shown in the figure can be implemented by hardware, software or a combination thereof.

[0183] In addition, an embodiment of the present application further provides a computer-readable storage medium storing a computer program, which implements the line selection method of the first embodiment when the computer program is executed by a processor.

[0184] The embodiment of the present application also provides a computer program product, which, when running on a computer, enables the computer to execute the method described in the method embodiment.

[0185] The above description is only an embodiment of the present application and is not intended to limit the protection scope of the present application. For those skilled in the art, the present application may have various changes and variations. Any modifications, equivalent substitutions, improvements, etc. made within the spirit and principles of the present application should be included in the protection scope of the present application. It should be noted that similar numbers and letters represent similar items in the following drawings, so once an item is defined in one drawing, it does not need to be further defined and explained in the subsequent drawings.

[0186] The above is only a specific implementation of the present application, but the protection range of the present application is not limited thereto. Any technician familiar with the technical field can easily think of changes or substitutions within the technical range disclosed in the present application, which should be included in the protection range of the present application. Therefore, the protection range of the present application should be based on the protection range of the claims.

Claims

1. A line selection method, characterized in that: The method comprises: Get line data; Iterate the line data according to a preset control parameter to obtain a candidate data group; Obtaining average duration data corresponding to each group of routes in the candidate data group, and determining the average duration data as a first fitness value; Updating the first fitness value to obtain a second fitness value; A target route in the candidate data set is selected according to the second fitness value.

2. The line selection method according to claim 1, characterized in that: The step of iterating the line data according to the preset control parameters to obtain the candidate data group includes: Initializing the line data to obtain an initialization candidate data group; Iterate the initialization candidate data group according to the control parameter to obtain the number of iterations; Determine whether the number of iterations reaches an iteration threshold; If so, taking the initialized candidate data group as the candidate data group; If not, the initialized candidate data group is updated to obtain the candidate data group.

3. The line selection method according to claim 1, characterized in that: The step of obtaining average duration data corresponding to each group of routes in the candidate data group and determining the average duration data as the first fitness value includes: Obtaining the route length and route time from the initial point to the target point of each set of routes in the candidate data set; Obtaining a target route length and a target route time from an initial point to a target point of each route group in the candidate data group; Obtaining an average value of the line length and the target line length to obtain an average line length; Obtaining an average of the route time and the target route time to obtain an average time; The average duration data is obtained according to the average route length and the average time, and the average duration data is determined as a first fitness value.

4. The line selection method according to claim 1, characterized in that: The step of selecting a target route in the candidate data group according to the second fitness value comprises: Acquire an initial point set, a target point set, an optional path point set, and a traversed route point set in the candidate data set; Determine the route with the smallest second fitness value in the set of optional route points as the current node; The target line is selected according to the current node.

5. The line selection method according to claim 4, characterized in that: The step of selecting the target line according to the current node includes: Adding the current node to the traversed route point set; Obtain the connecting line and the left and right lines of the current node; Determine whether the connecting route and the left and right routes exist in the traversed route point set; If so, determining whether the set of optional route points is empty, if the set of optional route points is empty, there is no target route, if the set of optional route points is not empty, determining the route in the set of optional route points as the target route; If not, determine whether the current node exists in the set of optional route points; if the current node exists in the set of optional route points, determine the target route according to the cost value; if the current node does not exist in the set of optional route points, update the parent node of the current node to the current node, and determine the target route according to the cost value of the parent node and the second fitness value of the parent node.

6. The line selection method according to claim 5, characterized in that: The step of determining the target route according to the cost value includes: Obtaining the cost value of the current node; Determine whether there is a route in the set of optional path points whose cost value is greater than the cost value of the current node; If yes, update the parent node of the current node to be the current node, and update the cost value of the parent node and the second fitness value of the parent node; If not, determine whether the set of optional route points is empty. If the set of optional route points is empty, there is no target route. If the set of optional route points is not empty, determine that the current node is the target route.

7. The line selection method according to claim 5, characterized in that: The step of determining the target route according to the cost value of the parent node and the second fitness value of the parent node comprises: Determining whether the set of optional waypoints is empty; If yes, there is no target line; If not, it is determined that the current node is the target line.

8. A line selection device, characterized in that: The device comprises: An acquisition module, used to acquire line data; An iteration module, used for iterating the line data according to a preset control parameter to obtain a candidate data group; A data acquisition module, used to obtain average duration data corresponding to each group of routes in the candidate data group, and determine the average duration data as a first fitness value; An updating module, used for updating the first fitness value to obtain a second fitness value; A selection module is used to select a target route in the candidate data group according to the second fitness value.

9. An electronic device, characterized in that: The electronic device comprises a memory and a processor, wherein the memory is used to store a computer program, and the processor runs the computer program to enable the electronic device to execute the line selection method according to any one of claims 1 to 7.

10. A storage medium, characterized in that: It stores a computer program, and when the computer program is executed by a processor, the line selection method according to any one of claims 1 to 7 is implemented.