Travel salesman problem processing method and device and storage medium
By compressing the problem size and supporting neighborhood structure changes during TSP processing, combined with hierarchical design and machine learning models, the problem of low TSP solving efficiency in the existing technology is solved, and the effect of finding a better path in the same time is achieved. .
Patent Information
- Application Number
- CN202310371877.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2023-03-30
- Publication Date
- 2024-10-01
AI Technical Summary
When existing technology solves the Traveling Salesman Problem (TSP), the neighborhood search algorithm has reduced solving efficiency in large-scale instances, making it difficult to find a better path within the same running time, and it is difficult to transform it into other combinatorial optimization problems.
By compressing the problem size during TSP processing, and supporting the change of neighborhood structure during each neighborhood search, generating an initial path for variable neighborhood search, obtaining candidate paths and compressing the problem size, using hierarchical design modules and machine learning models Optimize the path.
It significantly improves the probability of optimizing the path for each neighborhood search, achieves a better path within the same running time, improves TSP solution efficiency and excellence, and is suitable for large-scale instances.
Smart Images

Figure CN118735085A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of artificial intelligence technology, and in particular to a method, device and storage medium for processing a traveling salesman problem (TSP). Background Art
[0002] The TSP problem can be defined as: a salesman wants to go to some cities to sell goods. The locations of the cities and the distances between them are known. He hopes to find a shortest path that can traverse all cities, visit each city only once, and finally return to the starting city to save time and travel costs. For example, Figure 1 As shown in the figure, the TSP problem can be expressed as follows: the input parameters are n points in space and the distance between any two points, and the output parameter is a loop. TSP is simple in form and easy to understand. It can be applied in scenarios such as path planning, chip circuit design, 3D printing, power grid planning, grid optimization, pipeline laying, and logistics scheduling. With slight modifications, it can also be used to solve sub-problems such as DNA sequencing. Taking circuit design as an example, when drilling holes in a printed circuit board, n holes need to be drilled on a circuit board, and the drill moves between these holes, which is equivalent to a tour of all the holes. This problem can be directly converted into TSP, that is, a hole is equivalent to a city. The travel time from hole to hole is equivalent to the distance between cities. In the industry, the solution of these problems often relies on high-performance TSP solvers.
[0003] In the related art, TSP solvers based on neighborhood search algorithms are often used to solve large-scale TSP instances. The basic idea of the neighborhood search algorithm is to try to improve a part of a feasible solution until it can no longer be improved. One of the most typical improvement methods is called the k-OPT method, which temporarily replaces the k edges in the current feasible solution with the k edges (called neighborhoods) that have not yet been added to the current feasible solution, and calculates the total length of the corresponding path. If the total length is reduced, it is replaced until it can no longer be improved. k is usually 2 or 3. This type of technology has a fast solution speed and high accuracy on TSP instances of various sizes. This type of technology is often used in scenarios such as chip circuit design and 3D printing. These scenarios involve large vertices and high path costs. That is, if the total length of the path is reduced a little, a lot of costs can be saved. Although it is difficult to guarantee the optimal path, it is still necessary to solve a high-quality approximate solution.
[0004] When the neighborhood search algorithm continuously improves the feasible solution, as the feasible solution gets closer and closer to the optimal path, its improvement efficiency will be significantly reduced, that is, it needs to search a large number of neighborhoods to find a solution that can improve the current solution. This is mainly because when this type of algorithm framework designs neighborhood rules (such as the k-OPT method), the neighborhood size is fixed (such as always k edges). In addition, such ideas are often tailored for TSP and are not easy to transform for other combinatorial optimization problems. Summary of the invention
[0005] In view of this, a TSP processing method, device and storage medium are proposed. The embodiment of the present application significantly improves the probability that each neighborhood search can optimize the current path by compressing the problem scale during the TSP processing process and supporting the change of the neighborhood structure during each neighborhood search, thereby achieving a better path within the same running time.
[0006] In a first aspect, an embodiment of the present application provides a TSP processing method, the method comprising:
[0007] According to the TSP instance, generate corresponding k initial paths;
[0008] Performing a variable neighborhood search on the k initial paths to obtain k candidate paths, wherein the variable neighborhood search indicates that the neighborhood structure changes during each neighborhood search;
[0009] Compressing the k candidate paths to obtain a compressed TSP instance;
[0010] Output the target path corresponding to the compressed TSP instance.
[0011] In this implementation, k corresponding initial paths are generated according to the TSP instance; a variable neighborhood search is performed on the k initial paths to obtain k candidate paths, and the variable neighborhood search indicates that the neighborhood structure changes at each neighborhood search; the problem scale is compressed on the k candidate paths to obtain a compressed TSP instance; and the target path corresponding to the compressed TSP instance is output; by compressing the problem scale during the TSP processing and supporting the neighborhood structure change at each neighborhood search, the probability that each neighborhood search can optimize the current path is significantly improved, thereby achieving a better path within the same running time.
[0012] In a possible implementation, compressing the k candidate paths to obtain a compressed TSP instance includes:
[0013] When the preset termination condition is not met, the k candidate paths are input into the hierarchical design module to output the compressed TSP instance, in which some edges are fixed and the problem scale is compressed; based on the compressed TSP instance, the steps of generating corresponding k initial paths according to the TSP instance are repeatedly performed; and performing variable neighborhood search on the k initial paths to obtain k candidate paths are performed;
[0014] The outputting the target path corresponding to the compressed TSP instance includes:
[0015] When a preset termination condition is met, the target path corresponding to the compressed TSP instance is output, and the target path is the candidate path with the shortest path among the k candidate paths.
[0016] In this implementation, when the preset termination condition is not met, k candidate paths are input into the hierarchical design module to output a compressed TSP instance, in which some edges are fixed and the problem scale is compressed; based on the compressed TSP instance, the steps of generating corresponding k initial paths according to the TSP instance are repeatedly executed; a variable neighborhood search is performed on the k initial paths to obtain k candidate paths; when the preset termination condition is met, the target path corresponding to the compressed TSP instance is output, and the target path is the candidate path with the shortest path among the k candidate paths; that is, when the preset termination condition is not met during the TSP processing process, the problem scale is continuously compressed, thereby further improving the efficiency and quality of TSP solution.
[0017] In another possible implementation, the hierarchical design module is used to:
[0018] Fixing common edges in the k candidate paths and deleting other edges to obtain processed k candidate paths, wherein the other edges are edges in the k candidate paths other than the common edges;
[0019] Some edges in the processed k candidate paths are replaced to obtain the compressed TSP instance.
[0020] In this implementation, k processed candidate paths are obtained by fixing common edges in k candidate paths and deleting other edges, where the other edges are edges other than the common edges in the k candidate paths; some edges in the processed k candidate paths are replaced to obtain a compressed TSP instance, so that some edges of the compressed TSP instance are fixed and the problem scale is compressed.
[0021] In another possible implementation, the preset termination condition includes that the current time reaches a preset maximum running time.
[0022] In this implementation, the preset termination condition includes that the current moment reaches a preset maximum running time, so that when the preset termination condition is not met, the problem scale is continuously compressed and a better solution can be found within the same time limit.
[0023] In another possible implementation, performing a variable neighborhood search on the k initial paths to obtain k candidate paths includes:
[0024] For each of the k initial paths, the TSP instance and the initial path are input into a variable neighborhood search module, and a candidate path corresponding to the initial path is output.
[0025] In this implementation, for each of the k initial paths, the TSP instance and the initial path are input into the variable neighborhood search module, and the candidate path corresponding to the initial path is output, that is, the variable neighborhood search is applied to the TSP problem solution. Compared with the fixed neighborhood rule in the related technology, it is more efficient in the large-scale instance solving process.
[0026] In another possible implementation, the variable neighborhood search module is used to:
[0027] Determine and destroy some edges of the initial path;
[0028] Replace each unbroken original edge group in the initial path with a corresponding virtual edge to obtain a sub-TSP instance, wherein the original edge group includes a polyline segment or a straight line segment composed of a plurality of edges connected in sequence at the first position, and the virtual edge is a straight line segment between a starting point and an end point of the original edge group;
[0029] Solving the sub-TSP instance;
[0030] Each of the virtual edges in the sub-TSP instance is replaced with the corresponding original edge group to repair and obtain the candidate path.
[0031] In this implementation, some edges of the initial path are determined and destroyed; each group of original edges that are not destroyed in the initial path is replaced with the corresponding virtual edges to obtain a sub-TSP instance, where the original edge group includes a broken line segment or a straight line segment composed of multiple edges connected in sequence at the first position, and the virtual edge is a straight line segment between the start point and the end point of the original edge group; the sub-TSP instance is solved; each virtual edge in the sub-TSP instance is replaced with the corresponding original edge group and repaired to obtain a candidate path, that is, the optimal candidate path solving function is implemented through the destruction and repair method.
[0032] In another possible implementation, solving the sub-TSP instance includes:
[0033] A TSP solver is used to solve the sub-TSP instance, wherein the TSP solver includes a solver based on a genetic algorithm.
[0034] In this implementation,
[0035] In another possible implementation, before solving the sub-TSP instance, the method further includes:
[0036] According to the sub-TSP instance, calling the machine learning model to output a target improvement probability, wherein the target improvement probability is a predicted probability that the sub-TSP instance is improved;
[0037] When the target improvement probability is less than a preset threshold, re-execute the step of determining and destroying some edges of the initial path;
[0038] When the target improvement probability is greater than or equal to the preset threshold, the step of solving the sub-TSP instance is executed.
[0039] In this implementation, according to the sub-TSP instance, the machine learning model is called to output the target improvement probability, which is the predicted probability of the sub-TSP instance being improved; when the target improvement probability is less than a preset threshold, the steps of determining part of the edges of the initial path and destroying them are re-executed; when the target improvement probability is greater than or equal to the preset threshold, the step of solving the sub-TSP instance is executed; based on the hierarchical variable neighborhood search framework, a supervised learning auxiliary method is designed, that is, before solving the sub-TSP instance, the machine learning model is used to predict the probability that it can be improved, so as to further improve the solution efficiency.
[0040] In a second aspect, an embodiment of the present application provides a TSP processing device, the device comprising:
[0041] A generating unit, used for generating corresponding k initial paths according to the TSP instance;
[0042] A search unit, configured to perform a variable neighborhood search on the k initial paths to obtain k candidate paths, wherein the variable neighborhood search indicates that the neighborhood structure changes during each neighborhood search;
[0043] A compression unit, used for compressing the k candidate paths to obtain a compressed TSP instance;
[0044] The output unit is used to output the target path corresponding to the compressed TSP instance.
[0045] In a possible implementation, the compression unit is further configured to:
[0046] When the preset termination condition is not met, the k candidate paths are input into the hierarchical design module to output the compressed TSP instance, in which some edges are fixed and the problem scale is compressed; based on the compressed TSP instance, the steps of generating corresponding k initial paths according to the TSP instance are repeatedly performed; and performing variable neighborhood search on the k initial paths to obtain k candidate paths are performed;
[0047] The output unit is further used for:
[0048] When a preset termination condition is met, the target path corresponding to the compressed TSP instance is output, and the target path is the candidate path with the shortest path among the k candidate paths.
[0049] In another possible implementation, the hierarchical design module is used to:
[0050] Fixing common edges in the k candidate paths and deleting other edges to obtain processed k candidate paths, wherein the other edges are edges in the k candidate paths other than the common edges;
[0051] Some edges in the processed k candidate paths are replaced to obtain the compressed TSP instance.
[0052] In another possible implementation, the preset termination condition includes that the current time reaches a preset maximum running time.
[0053] In another possible implementation, the search unit is further configured to:
[0054] For each of the k initial paths, the TSP instance and the initial path are input into a variable neighborhood search module, and a candidate path corresponding to the initial path is output.
[0055] In this implementation,
[0056] In another possible implementation, the variable neighborhood search module is used to:
[0057] Determine and destroy some edges of the initial path;
[0058] Replace each unbroken original edge group in the initial path with a corresponding virtual edge to obtain a sub-TSP instance, wherein the original edge group includes a polyline segment or a straight line segment composed of a plurality of edges connected in sequence at the first position, and the virtual edge is a straight line segment between a starting point and an end point of the original edge group;
[0059] Solving the sub-TSP instance;
[0060] Each of the virtual edges in the sub-TSP instance is replaced with the corresponding original edge group to repair and obtain the candidate path.
[0061] In another possible implementation, the search unit is further configured to:
[0062] A TSP solver is used to solve the sub-TSP instance, wherein the TSP solver includes a solver based on a genetic algorithm.
[0063] In another possible implementation, the device further includes: a judgment unit; the judgment unit is configured to:
[0064] According to the sub-TSP instance, calling the machine learning model to output a target improvement probability, wherein the target improvement probability is a predicted probability that the sub-TSP instance is improved;
[0065] When the target improvement probability is less than a preset threshold, re-execute the step of determining and destroying some edges of the initial path;
[0066] When the target improvement probability is greater than or equal to the preset threshold, the step of solving the sub-TSP instance is executed.
[0067] In a third aspect, an embodiment of the present application provides a TSP processing device, the device comprising:
[0068] processor;
[0069] a memory for storing processor-executable instructions;
[0070] The processor is configured to implement the method provided by the first aspect or any possible implementation manner of the first aspect when executing the instruction.
[0071] In a fourth aspect, an embodiment of the present application provides a non-volatile computer-readable storage medium having computer program instructions stored thereon, wherein the computer program instructions, when executed by a processor, implement the method provided by the first aspect or any possible implementation of the first aspect.
[0072] In a fifth aspect, an embodiment of the present application provides a computer program product, which includes a computer-readable code, or a non-volatile computer-readable storage medium carrying the computer-readable code. When the computer-readable code runs in a computing device, the processor in the computing device executes the method provided in the first aspect or any possible implementation of the first aspect. BRIEF DESCRIPTION OF THE DRAWINGS
[0073] The accompanying drawings, which are incorporated in and constitute a part of the specification, illustrate exemplary embodiments, features, and aspects of the present application and, together with the description, serve to explain the principles of the present application.
[0074] Figure 1 A schematic diagram of a TSP problem provided in the related art is shown.
[0075] Figure 2 A schematic diagram of the structure of a computing device provided by an exemplary embodiment of the present application is shown.
[0076] Figure 3 A flowchart of calling a TSP processing device in a printed circuit board provided by an exemplary embodiment of the present application is shown.
[0077] Figure 4 A flowchart of a TSP processing method provided by an exemplary embodiment of the present application is shown.
[0078] Figure 5 A schematic diagram showing the principles of a destruction and repair optimization method provided by an exemplary embodiment of the present application is shown.
[0079] Figure 6 A flowchart of a TSP processing method provided by another exemplary embodiment of the present application is shown.
[0080] Figure 7 A block diagram of a TSP processing device provided by an exemplary embodiment of the present application is shown. DETAILED DESCRIPTION
[0081] Various exemplary embodiments, features and aspects of the present application will be described in detail below with reference to the accompanying drawings. The same reference numerals in the accompanying drawings represent elements with the same or similar functions. Although various aspects of the embodiments are shown in the accompanying drawings, the drawings are not necessarily drawn to scale unless otherwise specified.
[0082] The word “exemplary” is used exclusively herein to mean “serving as an example, example, or illustration.” Any embodiment described herein as “exemplary” is not necessarily to be construed as preferred or advantageous over other embodiments.
[0083] In addition, in order to better illustrate the present application, numerous specific details are given in the following specific embodiments. It should be understood by those skilled in the art that the present application can also be implemented without certain specific details. In some examples, methods, means, components and circuits well known to those skilled in the art are not described in detail in order to highlight the subject matter of the present application.
[0084] First, the terms involved in this application are introduced.
[0085] 1. Traveling Salesman Problem: Given a series of cities and the distances between each pair of cities, find the shortest path that visits each city once and returns to the starting city.
[0086] 2. Neighborhood search: Neighborhood search algorithm (or local search algorithm) is a very common improved algorithm that finds a better solution by searching the "neighborhood" of the current solution at each iteration.
[0087] 3. Destroy and repair: A special form of neighborhood search algorithm in which the neighborhood is implicitly defined by the destruction (English: destroy) and repair (English: repair) methods. The destruction method destroys part of the current solution, and then the repair method reconstructs the destroyed solution. The destruction method usually contains an element of randomness so that different parts of the solution are destroyed each time the destruction method is called. Therefore, the neighborhood N(x) of a solution x can be defined as: first, by destroying the solution x using the destruction method, and then reconstructing the solution x using the repair method, so as to obtain a set of solutions.
[0088] 4. Solution: For a TSP instance, the solution of the TSP instance is also called the path corresponding to the TSP instance. The solution of the TSP instance is a loop that passes through each city only once.
[0089] 5. Goodness: For a solution to a TSP instance, the goodness of the solution represents the difference between the total path length of the solution and the total path length of the optimal path (i.e., the shortest path of the TSP instance). A solution with a "higher" goodness or a "better" solution is generally called a solution that has a smaller difference between the total path length of the solution and the optimal path, or a shorter total path length.
[0090] TSP is the most classic type of combinatorial optimization problem and a typical NP-complete problem. Although domestic and foreign scholars have conducted extensive research on it, as the scale of the problem increases, the corresponding solution is still very difficult. Especially when solving industrial ultra-large-scale examples, it often takes a huge amount of time, and it may even be impossible to solve it within the specified time. For the application of TSP, especially in the industry, the existing technologies in academia and industry can be divided into two categories according to the solution goals: exact solution and approximate solution.
[0091] Exact solution technology is generally based on enumeration, backtracking or branch-and-bound methods for searching. Well-known exact algorithm solvers include Concorde (open source), OR-Tools (Google), and CPLEX (IBM). They are often used in scenarios such as power grid planning, logistics scheduling, and pipeline laying. The problem scale of these scenarios is small, but the path cost is very high. The cost savings brought by the optimal path compared to the approximate solution are obvious, so a relatively long time can be used to ensure that the optimal path is found. Since the time required for exact solution increases exponentially with the increase of the problem scale, within an acceptable time constraint, this type of technology can solve TSPs of up to 10,000 scale (including the number of vertices).
[0092] The approximate solution of TSP technology can be divided into three main types according to its underlying algorithm: neighborhood search, genetic algorithm and machine learning. The neighborhood search algorithm currently has the best comprehensive effect in solving TSP, but there are problems such as fixed neighborhood rules, which leads to a rapid decrease in efficiency in the later stage of the solution process when solving large-scale instances. The embodiment of the present application aims to propose a new variable neighborhood search framework for TSP solution to improve the solution efficiency and excellence. In addition, the current machine learning technology is applicable to a small scale of instances when solving TSP, and it is difficult to have a significant effect when combined with other traditional algorithms. The embodiment of the present application aims to design a new machine learning-assisted solution technology for the variable neighborhood search framework, so that it is applicable to TSP instances of any scale and improves the solution efficiency and excellence.
[0093] The hierarchical variable neighborhood search framework proposed in the embodiment of the present application is more efficient in the large-scale instance solving process than the fixed neighborhood rules in the related art. The input parameter of the machine learning model in the embodiment of the present application is the small-scale sub-TSP instance obtained in the solution process, and the output parameter is the probability that the instance can be improved. The training difficulty is low and the time consumption is small. The embodiment of the present application can solve the small-scale sub-TSP instance based on the TSP solver of the genetic algorithm. The basic idea of the genetic algorithm is to first initialize a set of feasible solutions, then select some of the multiple feasible solutions for crossover, and perform appropriate mutations to generate offspring feasible solutions, and repeat this process. This type of technology usually solves very quickly and with high accuracy on small-scale TSP instances.
[0094] The present application embodiment provides a TSP processing method, the execution subject is a computing device, the computing device includes a TSP processing device, and the computing device calls the TSP processing device to execute the TSP processing method provided by the present application embodiment. Figure 2 , which shows a schematic diagram of the structure of a computing device provided by an exemplary embodiment of the present application.
[0095] The computing device may be a terminal or a server. The terminal includes a mobile terminal or a fixed terminal, such as a mobile phone, a tablet computer, a laptop computer, a desktop computer, etc. The server may be a server, a server cluster consisting of several servers, or a cloud computing service center.
[0096] like Figure 2 As shown, the computing device includes a processor 10, a memory 20, and a communication interface 30. Those skilled in the art will appreciate that Figure 2 The structure shown in the figure does not constitute a limitation on the computing device, and may include more or fewer components than shown in the figure, or combine certain components, or arrange the components differently.
[0097] The processor 10 is the control center of the computing device, and uses various interfaces and lines to connect various parts of the entire computing device. It executes various functions of the computing device and processes data by running or executing software programs and / or modules stored in the memory 20, and calling data stored in the memory 20, thereby controlling the computing device as a whole. The processor 10 can be implemented by a CPU or a graphics processing unit (GPU).
[0098] The memory 20 can be used to store software programs and modules. The processor 10 executes various functional applications and data processing by running the software programs and modules stored in the memory 20. The memory 20 may mainly include a program storage area and a data storage area, wherein the program storage area may store an operating system 21, a generation unit 22, a search unit 23, a compression unit 24, an output unit 25 and an application required for at least one function, etc.; the data storage area may store data created according to the use of the computing device, etc. The memory 20 may be implemented by any type of volatile or non-volatile storage device or a combination thereof, such as a static random access memory (SRAM), an electrically erasable programmable read-only memory (EEPROM), an erasable programmable read-only memory (EPROM), a programmable read-only memory (PROM), a read-only memory (ROM), a magnetic memory, a flash memory, a magnetic disk or an optical disk. Accordingly, the memory 20 may further include a memory controller to provide the processor 10 with access to the memory 20 .
[0099] The processor 10 performs the following functions by running the generation unit 22: generating corresponding k initial paths according to the TSP instance. The processor 10 performs the following functions by running the search unit 23: performing variable neighborhood search on the k initial paths to obtain k candidate paths, wherein the variable neighborhood search indicates that the neighborhood structure changes during each neighborhood search. The processor 10 performs the following functions by running the compression unit 24: compressing the problem scale on the k candidate paths to obtain a compressed TSP instance. The processor 10 performs the following functions by running the output unit 25: outputting the target path corresponding to the compressed TSP instance.
[0100] Taking a printed circuit board as an example, the process of a computing device calling a TSP processing device is as follows: Figure 3 As shown in the figure: after determining the logic circuit to be printed, the coordinates of the corresponding holes to be drilled are calculated according to the circuit. Each hole is regarded as a vertex, and the distance between two holes is the distance between vertices. In this way, a TSP instance is generated and input into the TSP processing device to solve the optimal moving path, i.e., the target path. Next, the drill moves to the corresponding coordinates along the target path to drill holes, and then the circuit printing of other circuit components is completed. The solving efficiency and quality of the TSP processing device determine the efficiency of the subsequent steps.
[0101] The TSP processing method provided in the embodiments of the present application is introduced below using several exemplary embodiments.
[0102] Please refer to Figure 4 , which shows a flowchart of a TSP processing method provided by an exemplary embodiment of the present application. This embodiment uses the method for Figure 2 The method is illustrated by using the computing device shown in FIG.
[0103] Step 401: Generate corresponding k initial paths according to the TSP instance.
[0104] The computing device obtains the TSP instance, and randomly generates corresponding k initial paths according to the TSP instance.
[0105] Optionally, the TSP instance indicates n points in space and the distance between any two of the n points.
[0106] Optionally, the TSP instance includes any one of a travel path planning problem instance, a drone path planning problem instance, and a printed circuit board path planning problem instance. This embodiment of the present application does not limit this.
[0107] Optionally, the initial path of the TSP instance is also referred to as a solution of the TSP instance, the initial path includes n points, and the initial path is a cycle that traverses each of the n points only once.
[0108] Step 402: Perform a variable neighborhood search on the k initial paths to obtain k candidate paths, where the variable neighborhood search indicates that the neighborhood structure changes during each neighborhood search.
[0109] The computing device performs a variable neighborhood search on the k initial paths to obtain k candidate paths, and the variable neighborhood search indicates that the neighborhood structure changes during each neighborhood search.
[0110] Optionally, for each of the k initial paths, the computing device inputs the TSP instance and the initial path into a variable neighborhood search module, and outputs a candidate path corresponding to the initial path.
[0111] Optionally, the variable neighborhood search module is used to: determine some edges of the initial path and destroy them; replace each group of original edges that are not destroyed in the initial path with corresponding virtual edges to obtain a sub-TSP instance, where the original edge group includes a broken line segment or a straight line segment composed of multiple edges connected in sequence, and the virtual edge is a straight line segment between the start point and the end point of the original edge group; solve the sub-TSP instance; replace each virtual edge in the sub-TSP instance with the corresponding original edge group, and repair to obtain a candidate path. That is, for each of the k initial paths, the computing device determines some edges of the initial path and destroys them; replaces each group of original edges that are not destroyed in the initial path with the corresponding virtual edges to obtain a sub-TSP instance, and replaces each virtual edge in the sub-TSP instance with the corresponding original edge group to repair to obtain a candidate path.
[0112] Optionally, the partial edges to be destroyed are determined randomly or according to a preset rule. For example, the computing device takes the least selected point in history as the center, determines the m edges closest to the center and not fixed by the upper search as the partial edges to be destroyed, and destroys these m edges. The edges not fixed by the upper search are the edges that were not fixed in the previous one or more previous problem scale compression processes.
[0113] As the stratification in step 403 proceeds, the value of m may be appropriately increased.
[0114] Optionally, the original edge group includes continuous multiple edges connected in sequence, and the original edge group includes a polyline segment or a straight line segment composed of multiple edges connected in sequence at the first position, and the virtual edge obtained by replacement is a straight line segment determined by the starting point and the end point of the original edge group. In other words, the original edge group is replaced with the corresponding virtual edge, and only two endpoints, namely the starting point and the end point of the original edge group, are retained. For example, m edges of the initial path are destroyed, and each group of original edge groups that are not destroyed in the initial path is replaced with the corresponding virtual edge to obtain a sub-TSP instance. The sub-TSP instance includes at most 2m points. If the sub-TSP instance includes 2m points, then m of the edges can be fixed.
[0115] Optionally, the computing device uses a TSP solver to solve the sub-TSP instance. The computing device can use any TSP solver to solve the sub-TSP instance. Due to the small problem size, the comprehensive speed and goodness, the use of a genetic algorithm-based solver (such as EAX) is the best, and the use of an exact algorithm (such as Concorde) has the highest final goodness.
[0116] The computing device replaces each virtual edge in the sub-TSP instance with the corresponding original edge group, repairs the initial path, and thus completes an optimization to obtain a candidate path.
[0117] In an illustrative example, the principle diagram of the destruction and repair optimization method is as follows: Figure 5 As shown, the computing device obtains an input TSP instance, the TSP instance is Figure 5 (a) shows that k initial paths are randomly generated; damage and repair optimization is performed based on each initial path, and the input parameters are TSP instance and initial path. The input parameters are as follows Figure 5 (b) As shown in the figure, in the process of destruction and repair optimization, the point that has been selected least in history is taken as the center, and the m edges closest to the center and not fixed by the upper search are determined as the partial edges to be destroyed. These m edges are destroyed, and the result after destruction is as follows: Figure 5 (c) As shown in Figure 2, replace each group of original edges that are not destroyed in the initial path with the corresponding virtual edges to obtain a sub-TSP instance, as shown in Figure 2. Figure 5 As shown in (d), the original edge group (six edges connected in sequence from point 16 to point 2 to point 9 to point 1 to point 4 to point 20 to point 10) is replaced by the corresponding virtual edge, i.e., the straight line segment between point 16 and point 10. For another example, the original edge group (one edge between point 5 and point 15) is replaced by the corresponding virtual edge, i.e., the straight line segment between point 5 and point 15. For another example, the original edge group (three edges connected in sequence from point 6 to point 13 to point 7 to point 19) is replaced by the corresponding virtual edge, i.e., the straight line segment between point 6 and point 19. Solve the sub-TSP instance, as shown in Figure 5 (d) shows that the result is Figure 5 (e) As shown; Finally, each virtual edge in the sub-TSP instance is replaced with the corresponding original edge group, and the candidate path is repaired, as shown in Figure 5 As shown in (f), an optimization is completed and the candidate path corresponding to the initial path is output.
[0118] During the optimization process, machine learning methods can be used for enhancement: for the obtained sub-TSP instance, the machine learning model can be used to predict its probability of being improved. If it is less than a certain threshold, it is directly abandoned and the next optimization cycle is entered. Optionally, before the computing device solves the sub-TSP instance, it also includes: according to the sub-TSP instance, calling the machine learning model to output the target improvement probability, the target improvement probability is the predicted probability of the sub-TSP instance being improved; when the target improvement probability is less than the preset threshold, re-execute the step of determining part of the edges of the initial path and destroying them; when the target improvement probability is greater than or equal to the preset threshold, execute the step of solving the sub-TSP instance.
[0119] The machine learning model is used to predict the probability of the sub-TSP instance being improved. The embodiment of the present application does not limit the type of model.
[0120] Step 403: compress the k candidate paths to obtain a compressed TSP instance.
[0121] The computing device performs one or more problem scale compression on the k candidate paths to obtain a compressed TSP instance.
[0122] Optionally, the hierarchical design module is used to: fix common edges in the k candidate paths and delete other edges to obtain processed k candidate paths, where other edges are edges other than common edges in the k candidate paths; replace some edges in the processed k candidate paths to obtain a compressed TSP instance. In other words, the computing device can use the shortest candidate path among the k candidate paths as a benchmark (if there are multiple, randomly select one of them), fix common edges in the k candidate paths and delete other edges to obtain processed k candidate paths, replace some edges in the processed k candidate paths to obtain a compressed TSP instance.
[0123] Optionally, for at least one group of continuous polygons in the processed k candidate paths, each group of continuous polygons is replaced by an edge, and the replaced edge is a straight line segment determined by the start point and the end point of the group of continuous polygons.
[0124] It should be noted that the process of replacing some edges in the processed k candidate paths can be analogously referred to the above description of replacing each group of undamaged original edges in the initial path with corresponding virtual edges, which will not be repeated here.
[0125] Optionally, the computing device determines whether a preset termination condition is met. When the preset termination condition is not met, the k candidate paths are input into the hierarchical design module to output a compressed TSP instance, in which some edges are fixed and the problem scale is compressed; based on the compressed TSP instance, the above steps 401 to 403 are repeatedly performed, that is, according to the compressed TSP instance, corresponding k initial paths are generated; and the k initial paths are subjected to variable neighborhood search to obtain k candidate paths. When the preset termination condition is met, step 404 is performed.
[0126] Optionally, the preset termination condition includes that the current time reaches the preset maximum running time, or the preset termination condition includes that the k candidate paths obtained in this search are the same as the k candidate paths obtained in the previous search. The embodiment of the present application does not limit the setting of the preset termination condition.
[0127] Step 404: output the target path corresponding to the compressed TSP instance.
[0128] Optionally, when a preset termination condition is met, the computing device outputs a target path corresponding to the compressed TSP instance, where the target path is the shortest candidate path among the k candidate paths.
[0129] In an illustrative example, the flowchart of the TSP processing method is as follows: Figure 6 As shown, in the TSP processing process, step 601, generate k initial paths, the initial paths can be randomly generated, and each solution is a loop that traverses all vertices exactly once; step 602, each initial path is destroyed and repaired for optimization. Step 603, after optimizing the fixed number of rounds, the current k candidate paths are summarized, for example, the current target path, i.e., the candidate path with the shortest path among the k candidate paths, is recorded during the summary, and it is determined whether the preset termination condition is met at this time. If the preset termination condition is met, the target path is output; step 604, if the preset termination condition is not met, the common edges in the k candidate paths are fixed and other edges are deleted, the problem scale is compressed to obtain the compressed TSP instance, and then the above process, i.e., steps 601 to 603, is repeated.
[0130] In summary, the TSP processing method provided in the embodiment of the present application, on the one hand, provides a hierarchical variable neighborhood search framework, applies variable neighborhood search to the solution of the TSP problem, and adds a hierarchical structure to it, thereby continuously compressing the problem scale in the process of solving the TSP and improving the solution efficiency and quality; on the other hand, it provides machine learning-assisted solution, and designs a supervised learning-assisted method based on the hierarchical variable neighborhood search framework to further improve the solution efficiency.
[0131] Optionally, the TSP instance includes any one of a travel path planning problem instance, a drone path planning problem instance, and a printed circuit board path planning problem instance. This embodiment of the present application does not limit this.
[0132] In an illustrative example, the TSP example above is used as a problem example of printed circuit board path planning. In the process of printing circuit boards, a TSP processing device is used to calculate the shortest movement path of a drill. In the printing process, the shorter the total length of the drill movement path, the shorter the movement time and the corresponding mechanical loss. Therefore, a good TSP processing device can significantly save costs in the printing process.
[0133] After determining the logic circuit to be printed, the coordinates of the corresponding holes to be drilled are calculated according to the circuit. Each hole is regarded as a vertex, and the distance between two holes is the distance between the vertices. In this way, a TSP instance is generated. At this time, the shortest path for the drill to move needs to be determined, so the TSP processing method provided in the embodiment of the present application is started. Among them, firstly, the number of initial paths k is selected, and k initial paths are randomly generated; according to the scale of the TSP instance, the number of edges m to be destroyed in each round of optimization is selected, and destruction and repair optimization are performed to obtain k optimized solutions, i.e., candidate paths; if the preset maximum running time is reached, the current target path is output, otherwise k candidate paths are summarized, the problem scale is compressed, and the above steps are repeated, wherein the value of m can be increased after each repetition. After the TSP processing device gives the target path for the drill to move, the drill moves to the corresponding coordinates along the target path in sequence to drill holes, and then completes the printing of other circuit elements. Since the total length of the drill bit movement is the shortest, the overall printing time and mechanical loss can be minimized. The destruction and repair optimization steps mainly realize the optimal movement path solving function. When there are many locations that need to be drilled, the step of compressing the problem scale can significantly reduce the time required for solving, or find a better path within the same time limit.
[0134] In another illustrative example, the TSP example above is used as a problem example of drone path planning. In the path planning process, the TSP processing device is used to calculate the optimal path. Taking the completion of a drone mission as an example, before the drone sets off, it is necessary to determine the points along the way to complete the mission. The optimal flight path can minimize the time required to complete the mission and minimize energy consumption. Therefore, a good TSP processing device can significantly save the cost of completing the mission.
[0135] After determining the starting point, end point, and path point of the task, these points are used as vertices, and the distance between two points is the distance between vertices. In addition, a virtual vertex is added, and its distance from the starting point and the end point is 0, and the distance from other path points is infinite, so as to generate a TSP instance, so the TSP processing method provided by the embodiment of the present application is started, and the description of each step in the above embodiment is referred to by analogy. In the target path finally obtained, the virtual vertex must be connected to the starting point and the end point. Deleting these two edges is the optimal target path. Then the drone can start from the starting point and reach the path points in turn along the target path given by the TSP processing device to complete the task. Since the total length of the flight path is the shortest, the overall task completion time and energy consumption can be minimized. Among them, the steps of destruction and repair optimization mainly realize the optimal flight path solution function. When there are many points on the path required to complete the task, the step of compressing the problem scale can significantly reduce the time required for solution, or find a better path within the same time limit. In addition, before the drone sets off, the energy consumption of the entire task can also be calculated in advance according to the path calculated by the TSP processing device to ensure that the drone has enough energy to complete the entire task.
[0136] In summary, the embodiments of the present application provide a hierarchical variable neighborhood search framework, including variable domain search and hierarchical framework design. Compared with the currently optimal neighborhood search technology, the embodiments of the present application continuously compress the problem scale during the solution process through hierarchical design, and support the change of neighborhood scale during each neighborhood search, which significantly improves the probability that each neighborhood search can optimize the current solution, thereby achieving a better solution within the same running time, and the best effect on random instances above 10,000 (same time and machine resources). At the same time, the hierarchical design greatly reduces the gap (English: GAP) with the optimal solution in the same time compared to the solution without stratification. The embodiments of the present application also provide a machine learning assisted solution, which uses a machine learning model to predict the probability that it can be improved before each neighborhood search is performed, thereby improving the solution efficiency.
[0137] The following is an embodiment of the device of the present application, which can be used to execute the embodiment of the method 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 method of the present application.
[0138] Please refer to Figure 7 , which shows a block diagram of a TSP processing device provided by an exemplary embodiment of the present application. The device can be implemented as all or part of a computing device through software, hardware, or a combination of both. The device may include: a generation unit 710, a search unit 720, a compression unit 730, and an output unit 740.
[0139] A generating unit 710, configured to generate corresponding k initial paths according to the TSP instance;
[0140] A search unit 720, configured to perform a variable neighborhood search on the k initial paths to obtain k candidate paths, wherein the variable neighborhood search indicates that the neighborhood structure changes during each neighborhood search;
[0141] A compression unit 730, configured to compress the k candidate paths to obtain a compressed TSP instance;
[0142] The output unit 740 is used to output the target path corresponding to the compressed TSP instance.
[0143] In a possible implementation, the compression unit 730 is further configured to:
[0144] When the preset termination condition is not met, the k candidate paths are input into the hierarchical design module to output a compressed TSP instance, in which some edges are fixed and the problem scale is compressed; based on the compressed TSP instance, the steps of generating corresponding k initial paths according to the TSP instance are repeatedly executed; and the steps of performing variable neighborhood search on the k initial paths to obtain k candidate paths are performed;
[0145] The output unit 740 is further configured to:
[0146] When the preset termination condition is met, the target path corresponding to the compressed TSP instance is output, and the target path is the candidate path with the shortest path among the k candidate paths.
[0147] In another possible implementation, the hierarchical design module is used to:
[0148] Fix the common edges in the k candidate paths and delete other edges to obtain the processed k candidate paths, where the other edges are the edges in the k candidate paths except the common edges;
[0149] Replace some edges in the processed k candidate paths to obtain a compressed TSP instance.
[0150] In another possible implementation, the preset termination condition includes that the current time reaches a preset maximum running time.
[0151] In another possible implementation, the searching unit 720 is further configured to:
[0152] For each of the k initial paths, the TSP instance and the initial path are input into the variable neighborhood search module, and the candidate path corresponding to the initial path is output.
[0153] In this implementation,
[0154] In another possible implementation, the variable neighborhood search module is used to:
[0155] Determine some edges of the initial path and destroy them;
[0156] Replace each unbroken original edge group in the initial path with the corresponding virtual edge to obtain a sub-TSP instance, where the original edge group includes a polyline segment or a straight line segment composed of multiple edges connected in sequence at the first position, and the virtual edge is a straight line segment between the starting point and the end point of the original edge group;
[0157] Solve the sub-TSP instance;
[0158] Replace each virtual edge in the sub-TSP instance with the corresponding original edge group and repair the candidate path.
[0159] In another possible implementation, the searching unit 720 is further configured to:
[0160] The sub-TSP instance is solved by using a TSP solver, wherein the TSP solver includes a solver based on a genetic algorithm.
[0161] In another possible implementation, the device further includes: a judgment unit; the judgment unit is configured to:
[0162] According to the sub-TSP instance, the machine learning model is called to output the target improvement probability, which is the predicted probability that the sub-TSP instance will be improved;
[0163] When the target improvement probability is less than a preset threshold, the steps of determining and destroying some edges of the initial path are re-executed;
[0164] When the target improvement probability is greater than or equal to a preset threshold, the step of solving the sub-TSP instance is executed.
[0165] It should be noted that the device provided in the above embodiment, when implementing its functions, is only illustrated by the division of the above functional modules. In actual applications, the above functions can be assigned to different functional modules as needed, that is, the internal structure of the device is divided into different functional modules to complete all or part of the functions described above. In addition, the device and method embodiments provided in the above embodiment belong to the same concept, and the specific implementation process is detailed in the method embodiment, which will not be repeated here.
[0166] An embodiment of the present application provides a TSP processing device, which includes: a processor; a memory for storing processor-executable instructions; wherein the processor is configured to implement the methods performed by the computing device in the above-mentioned various embodiments when executing the instructions.
[0167] An embodiment of the present application provides a non-volatile computer-readable storage medium on which computer program instructions are stored. When the computer program instructions are executed by a processor, the methods performed by the computing device in the above-mentioned various embodiments are implemented.
[0168] An embodiment of the present application provides a computer program product, which includes a computer-readable code, or a non-volatile computer-readable storage medium carrying the computer-readable code. When the computer-readable code runs in a computing device, a processor in the computing device executes the method performed by the computing device in the above-mentioned embodiments.
[0169] A computer-readable storage medium may be a tangible device that can hold and store instructions used by an instruction execution device. A computer-readable storage medium may be, for example, but not limited to, an electrical storage device, a magnetic storage device, an optical storage device, an electromagnetic storage device, a semiconductor storage device, or any suitable combination of the foregoing. More specific examples of computer-readable storage media (a non-exhaustive list) include: a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), a static random access memory (SRAM), a portable compact disc read-only memory (CD-ROM), a digital versatile disc (DVD), a memory stick, a floppy disk, a mechanical encoding device, such as a punch card or a raised structure in a groove on which instructions are stored, and any suitable combination of the foregoing.
[0170] The computer-readable program instructions or codes described herein can be downloaded from a computer-readable storage medium to each computing / processing device, or downloaded to an external computer or external storage device via a network, such as the Internet, a local area network, a wide area network, and / or a wireless network. The network can include copper transmission cables, optical fiber transmissions, wireless transmissions, routers, firewalls, switches, gateway computers, and / or edge servers. The network adapter card or network interface in each computing / processing device receives the computer-readable program instructions from the network and forwards the computer-readable program instructions for storage in the computer-readable storage medium in each computing / processing device.
[0171] The computer program instructions for performing the operation of the present application may be assembly instructions, instruction set architecture (ISA) instructions, machine instructions, machine-related instructions, microcode, firmware instructions, state setting data, or source code or object code written in any combination of one or more programming languages, including object-oriented programming languages, such as Smalltalk, C++, etc., and conventional procedural programming languages, such as "C" language or similar programming languages. Computer-readable program instructions may be executed completely on a user's computer, partially on a user's computer, as an independent software package, partially on a user's computer, partially on a remote computer, or completely on a remote computer or server. In the case of a remote computer, the remote computer may be connected to the user's computer via any type of network, including a local area network (LAN) or a wide area network (WAN), or may be connected to an external computer (e.g., using an Internet service provider to connect via the Internet). In some embodiments, by utilizing the state information of computer-readable program instructions to personalize an electronic circuit, such as a programmable logic circuit, a field programmable gate array (FPGA) or a programmable logic array (PLA), the electronic circuit can execute the computer-readable program instructions to implement various aspects of the present application.
[0172] Various aspects of the present application are described herein with reference to the flowcharts and / or block diagrams of the methods, devices (systems) and computer program products according to the embodiments of the present application. It should be understood that each box in the flowchart and / or block diagram and the combination of each box in the flowchart and / or block diagram can be implemented by computer-readable program instructions.
[0173] These computer-readable program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, or other programmable data processing device, thereby producing a machine, so that when these instructions are executed by the processor of the computer or other programmable data processing device, a device that implements the functions / actions specified in one or more boxes in the flowchart and / or block diagram is generated. These computer-readable program instructions can also be stored in a computer-readable storage medium, and these instructions cause the computer, programmable data processing device, and / or other equipment to work in a specific manner, so that the computer-readable medium storing the instructions includes a manufactured product, which includes instructions for implementing various aspects of the functions / actions specified in one or more boxes in the flowchart and / or block diagram.
[0174] Computer-readable program instructions may also be loaded onto a computer, other programmable data processing apparatus, or other device so that a series of operating steps are performed on the computer, other programmable data processing apparatus, or other device to produce a computer-implemented process, thereby causing the instructions executed on the computer, other programmable data processing apparatus, or other device to implement the functions / actions specified in one or more boxes in the flowchart and / or block diagram.
[0175] The flow chart and block diagram in the accompanying drawings show the possible architecture, function and operation of the device, system, method and computer program product according to multiple embodiments of the present application. In this regard, each square frame in the flow chart or block diagram can represent a part of a module, program segment or instruction, and a part of the module, program segment or instruction includes one or more executable instructions for realizing the logical function of the specification. In some alternative implementations, the functions marked in the square frame can also occur in a sequence different from that marked in the accompanying drawings. For example, two continuous square frames can actually be executed substantially in parallel, and they can also be executed in reverse order sometimes, depending on the functions involved.
[0176] It should also be noted that each box in the block diagram and / or flowchart, and the combination of boxes in the block diagram and / or flowchart, can be implemented by hardware (such as a circuit or ASIC (Application Specific Integrated Circuit)) that performs the corresponding function or action, or can be implemented by a combination of hardware and software, such as firmware.
[0177] Although the present application is described herein in conjunction with various embodiments, in the process of implementing the claimed application, those skilled in the art may understand and implement other variations of the disclosed embodiments by viewing the drawings, the disclosure, and the appended claims. In the claims, the word "comprising" does not exclude other components or steps, and "one" or "an" does not exclude multiple situations. A single processor or other unit may implement several functions listed in the claims. Certain measures are recorded in different dependent claims, but this does not mean that these measures cannot be combined to produce good results.
[0178] The embodiments of the present application have been described above, and the above description is exemplary, not exhaustive, and is not limited to the disclosed embodiments. Many modifications and changes will be apparent to those of ordinary skill in the art without departing from the scope and spirit of the described embodiments. The selection of terms used herein is intended to best explain the principles of the embodiments, practical applications, or improvements to the technology in the market, or to enable other persons of ordinary skill in the art to understand the embodiments disclosed herein.
Claims
1. A method for processing the traveling salesman problem TSP, characterized in that: The method comprises: According to the TSP instance, generate corresponding k initial paths; Performing a variable neighborhood search on the k initial paths to obtain k candidate paths, wherein the variable neighborhood search indicates that the neighborhood structure changes during each neighborhood search; Compressing the k candidate paths to obtain a compressed TSP instance; Output the target path corresponding to the compressed TSP instance.
2. The method according to claim 1, characterized in that The step of compressing the k candidate paths to obtain a compressed TSP instance includes: When the preset termination condition is not met, the k candidate paths are input into the hierarchical design module to output the compressed TSP instance, in which some edges are fixed and the problem scale is compressed; based on the compressed TSP instance, the steps of generating corresponding k initial paths according to the TSP instance are repeatedly performed; and performing variable neighborhood search on the k initial paths to obtain k candidate paths are performed; The outputting the target path corresponding to the compressed TSP instance includes: When a preset termination condition is met, the target path corresponding to the compressed TSP instance is output, and the target path is the candidate path with the shortest path among the k candidate paths.
3. The method according to claim 2, characterized in that The hierarchical design module is used to: Fixing common edges in the k candidate paths and deleting other edges to obtain processed k candidate paths, wherein the other edges are edges in the k candidate paths other than the common edges; Some edges in the processed k candidate paths are replaced to obtain the compressed TSP instance.
4. The method according to claim 2, characterized in that: The preset termination condition includes that the current time reaches the preset maximum running time.
5. The method according to any one of claims 1 to 4, characterized in that: The step of performing variable neighborhood search on the k initial paths to obtain k candidate paths includes: For each of the k initial paths, the TSP instance and the initial path are input into a variable neighborhood search module, and a candidate path corresponding to the initial path is output.
6. The method according to claim 5, characterized in that The variable neighborhood search module is used for: Determine and destroy some edges of the initial path; Replace each unbroken original edge group in the initial path with a corresponding virtual edge to obtain a sub-TSP instance, wherein the original edge group includes a polyline segment or a straight line segment composed of a plurality of edges connected in sequence at the first position, and the virtual edge is a straight line segment between a starting point and an end point of the original edge group; Solving the sub-TSP instance; Each of the virtual edges in the sub-TSP instance is replaced with the corresponding original edge group to repair and obtain the candidate path.
7. The method according to claim 6, characterized in that The solving of the sub-TSP instance comprises: A TSP solver is used to solve the sub-TSP instance, wherein the TSP solver includes a solver based on a genetic algorithm.
8. The method according to claim 6 or 7, characterized in that: Before solving the sub-TSP instance, the method further includes: According to the sub-TSP instance, calling the machine learning model to output a target improvement probability, wherein the target improvement probability is a predicted probability that the sub-TSP instance is improved; When the target improvement probability is less than a preset threshold, re-execute the step of determining and destroying some edges of the initial path; When the target improvement probability is greater than or equal to the preset threshold, the step of solving the sub-TSP instance is executed.
9. A TSP processing device, characterized in that: The device comprises: A generating unit, used for generating corresponding k initial paths according to the TSP instance; A search unit, configured to perform a variable neighborhood search on the k initial paths to obtain k candidate paths, wherein the variable neighborhood search indicates that the neighborhood structure changes during each neighborhood search; A compression unit, used for compressing the k candidate paths to obtain a compressed TSP instance; The output unit is used to output the target path corresponding to the compressed TSP instance.
10. A TSP processing device, characterized in that: The device comprises: processor; a memory for storing processor-executable instructions; Wherein, the processor is configured to implement the method according to any one of claims 1 to 8 when executing the instructions.
11. A non-volatile computer-readable storage medium having computer program instructions stored thereon, characterized in that: When the computer program instructions are executed by a processor, the method according to any one of claims 1 to 8 is implemented.
12. A computer program product, comprising a computer readable code, or a non-volatile computer readable storage medium carrying the computer readable code, characterized in that: When the computer readable code is executed in a computing device, a processor in the computing device executes the method according to any one of claims 1 to 8.
