A method for optimizing a road marking application path

By uniformly dividing the road marking image into grids and optimizing it with NSGA-II, the optimal marking path is generated, which solves the problems of low efficiency and poor flexibility in the existing technology and realizes efficient and intelligent marking of complex shape markings.

CN122449948APending Publication Date: 2026-07-24CHANGSHA UNIVERSITY OF SCIENCE AND TECHNOLOGY +1
View PDF 0 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
CHANGSHA UNIVERSITY OF SCIENCE AND TECHNOLOGY
Filing Date
2026-05-27
Publication Date
2026-07-24

AI Technical Summary

Technical Problem

Existing technologies for road marking are inefficient, inflexible, and have a low degree of automation. They are difficult to adapt quickly to complex shape changes, and path planning relies on experience, resulting in large overlapping areas.

Method used

The road marking image is divided into uniform grids, and the optimal marking path is generated by the NSGA-II optimization method. Combining path connectivity, working mode conversion and full coverage constraints, the marking path that minimizes spraying time and overlap area is generated.

Benefits of technology

It realizes intelligent road marking application, reduces empty travel and overlapping spraying, improves paint utilization, and ensures efficient marking effect of road marking materials.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122449948A_ABST
    Figure CN122449948A_ABST
Patent Text Reader

Abstract

The application relates to a road marking application path optimization method, which comprises the following steps: S1, a road marking image to be applied is divided into several uniform grids, and each discrete unit is numbered; S2, total spraying time minimization and spraying overlap area minimization are taken as double optimization objectives, and application constraints are established based on the numbered discrete units; and S3, a Pareto optimal solution set of the double optimization objectives is solved based on the application constraints and an NSGA-II optimization method, so that an optimal application path of the road marking image to be applied is obtained. The method can help intelligent application of road marking by discretizing a road marking image into regular grid units and generating an optimal application path, thereby providing a reference for setting and controlling a road marking material discharge port path.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of road marking technology, and in particular to a method for optimizing road marking paths. Background Technology

[0002] Currently, the application of complex graphics (such as arrows, text, and symbols) in road markings mostly relies on physical templates or molds for masking, followed by manual or simple mechanical spraying. This method has the following problems: 1. Low efficiency: Template production, positioning and replacement are time-consuming and cannot quickly adapt to the diverse and complex shapes of road markings; 2. Poor flexibility: Difficult to cope with non-standard graphics or size changes; 3. Low level of automation: Existing automated equipment is mostly used for straight lines or simple curves, while complex graphics still require manual intervention; 4. For markings of a specific shape, the path (or sequence) during the marking process depends entirely on experience, requiring repeated control of the hot melt material flow switch to mark the markings, resulting in a lack of effective marking paths.

[0003] To complete the application of various sizes and shapes of graphics, and to ensure the shortest application time and the best application effect (minimum overlap area), there is an urgent need for an application path planning and control method that can automatically generate the optimal application path for various graphics while minimizing spraying time and overlap area. Summary of the Invention

[0004] Therefore, it is necessary to provide a method for optimizing the application path of road markings, including: S1: Divide the area to be marked in the road marking image into several uniform grids, and number each discrete unit. S2: The dual optimization objectives are minimizing the total spraying time and minimizing the spraying overlap area, and the application constraints are established based on each discrete unit with a number. S3: Based on the aforementioned marking constraints and the NSGA-II optimization method, solve the Pareto optimal solution set for the dual optimization objectives to obtain the optimal marking path for the area to be marked in the road marking image.

[0005] Preferably, each uniform grid is a square grid, and the side length is consistent with the spraying width of the hot melt material outlet when the road marking is applied.

[0006] Preferably, the road marking image includes a straight arrow image, and the area to be marked includes isosceles triangular regions, triangular regions, rectangular regions, or trapezoidal regions divided from the straight arrow image by a number of second grids. The discrete units divided from the isosceles triangular regions include square units, right-angled triangular units, and trapezoidal units.

[0007] Preferably, the discrete units are numbered, including: Using the axis of symmetry of the straight arrow image as the y-axis, the x-coordinate of the discrete units that the y-axis passes through is set to 0. The x-coordinate of the discrete units to the left of the y-axis decreases by 1 starting from -1, and the x-coordinate of the discrete units to the right of the y-axis increases by 1 starting from 1. Using the base of the isosceles triangle region in the image of the straight arrow as the x-axis, and the x-axis being the 0th row, the vertical coordinates of the discrete units located above the x-axis increase by 1 sequentially starting from 0.

[0008] Preferably, the application constraints are established based on each discrete unit with a number, including: Path connectivity constraints are used to ensure that the vertical or horizontal coordinates of the currently accessed discrete unit are adjacent to those of the next accessed discrete unit. Operating mode switching constraints are used to constrain the operating mode switching of the hot melt material outlet between discrete units; Full coverage constraint is used to constrain all discrete units to be fully coated.

[0009] Preferably, path connectivity constraints include path connectivity constraints based on the number of discrete units or path connectivity constraints based on the centroid coordinates of discrete units. The path connectivity constraint based on the discrete unit numbering includes: ; in, This represents the column coordinates of t discrete cells passed through. Let represent the x-coordinates of the t discrete cells traversed. This represents the column coordinates of the (t+1)th discrete unit visited. Represents the x-coordinate of the t+1 discrete cells passed through; The path connectivity constraint based on the center coordinates of the discrete unit includes: selecting any one of the four discrete units with the shortest Euclidean distance between the constraint and the centroid coordinates of the current discrete unit as the next discrete unit. The Euclidean distance is calculated as follows: ; in, This represents the Euclidean distance between the barycenter coordinates of the current discrete element and the next discrete element. This represents the centroid coordinates of the current discrete element. This indicates the centroid coordinates of the next discrete unit.

[0010] Preferably, the operating modes of the hot melt material outlet include: Mode 1: Horizontal movement; Mode 2: Vertical movement; Mode 3: Rotate to an angle with the positive x-axis. Mode 4: Rotate to an angle with the negative x-axis. Mode 5: Rotate to be parallel to the x-axis; Mode 6: Rotate to be parallel to the y-axis.

[0011] Preferably, the constraint on the switching of the hot melt material outlet working mode between each discrete unit includes: Switching between working modes of the hot melt material outlet from square unit to square unit: Obtain the current movement angle of the hot melt material outlet. When the movement angle makes the error between the translational spraying area of ​​the hot melt material outlet and the area of ​​the next square unit less than a preset threshold, drive the hot melt material outlet to spray the next square unit in mode 1 or mode 2; otherwise, drive the hot melt material outlet to execute mode 5 and spray the next square unit in mode 2, or execute mode 6 and spray the next square unit in mode 1. Switching between working modes for the hot melt material outlet from a square unit to a right-angled triangle unit or trapezoidal unit: When the hot melt material outlet moves toward the boundary of an isosceles triangle region, it is driven to first execute mode 3 or mode 4 and then execute mode 1 to spray the next right-angled triangle unit or trapezoidal unit; when the hot melt material outlet moves at the boundary of an isosceles triangle region, depending on the direction of movement of the hot melt material outlet, it is driven to first execute mode 3 or mode 4 to rotate and then execute mode 1 to move to the top / bottom of the next unit before executing mode 2 to spray the next right-angled triangle unit or trapezoidal unit, or it can first execute mode 3 or mode 4 to rotate and then execute mode 2 to move to the left / right side of the next unit before executing mode 1 to spray the next right-angled triangle unit or trapezoidal unit; Switching between the hot melt material outlet working modes of right-angled triangle units and trapezoidal units: When the ordinate of the next right-angled triangle unit or trapezoidal unit is greater than 16, the hot melt material outlet performs spraying in mode 1 or mode 2; otherwise, the hot melt material outlet only performs spraying in mode 2. Switching the working mode of the hot melt material outlet from a right-angled triangle or trapezoidal unit to a square unit: If the ordinate of the current right-angled triangle or trapezoidal unit is greater than or equal to 22, or the ordinate of the right-angled triangle or trapezoidal unit is greater than the ordinate of the square unit, the hot melt material outlet first executes mode 5 and then executes mode 2 for spraying the next square unit; otherwise, the hot melt material outlet executes mode 1 for spraying the next square unit.

[0012] Preferably, the conditions for complete coating of any discrete unit include: Condition 1: The Euclidean distance between the center coordinates of the hot melt material outlet and the centroid coordinates of the discrete element is less than 0.01; Condition 2: The center of the hot melt material outlet reaches the midpoint of the hypotenuse of the trapezoidal unit or the right triangle unit.

[0013] Preferably, the spraying width of the hot melt material outlet is 5cm.

[0014] Beneficial effects: By discretizing road marking images into regular grid cells, the optimal marking path is generated, providing a reference for the setting and control of the marking material outlet path, and facilitating the intelligent marking of road markings. Attached Figure Description

[0015] To more clearly illustrate the technical solutions in the embodiments of this application or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of this application. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.

[0016] Figure 1 This is a flowchart of the road marking path optimization method in the embodiments of this application.

[0017] Figure 2 This is a schematic diagram of the discrete unit numbering and division in the embodiments of this application.

[0018] Figure 3 This is a pseudocode diagram of the NSGA-II optimization algorithm in the embodiments of this application.

[0019] Figure 4 This is a schematic diagram of the optimal application path for the isosceles trapezoidal region in this embodiment. Detailed Implementation

[0020] To make the above-mentioned objectives, features, and advantages of this application more apparent and understandable, the specific embodiments of this application are described in detail below with reference to the accompanying drawings. Many specific details are set forth in the following description to provide a thorough understanding of this application. However, this application can be implemented in many other ways different from those described herein, and those skilled in the art can make similar modifications without departing from the spirit of this application. Therefore, this application is not limited to the specific embodiments disclosed below.

[0021] Furthermore, the terms "first" and "second" are used for descriptive purposes only and should not be construed as indicating or implying relative importance or implicitly specifying the number of technical features indicated. Thus, a feature defined as "first" or "second" may explicitly or implicitly include at least one of that feature. In the description of this application, "multiple" means at least two, such as two, three, etc., unless otherwise explicitly specified.

[0022] Example 1 To focus on the core optimization objective and eliminate interference from irrelevant variables, this embodiment imposes the following constraints: 1. The forward and backward, left and right movement speed of the hot melt material outlet remains constant; 2. The hot melt material outlet moves in four directions: up, down, left, and right. 3. The rotational angular velocity of the hot melt material outlet is constant; 4. The hot melt material outlet does not move or spray paint when rotating (it can be set to not spray paint but can move).

[0023] The road marking path optimization method provided in this embodiment will be applied to a complex road marking vehicle. This method can divide a complex graphic into several areas to be marked and then splice them together. The complex graphic is marked by the planar movement and rotation of the outlet of the hot melt material and glass microspheres in the rectangular marking work area.

[0024] like Figure 1 As shown, this embodiment provides a method for optimizing the path of road marking, including: S1: Divide the area to be marked in the road marking image into several uniform grids, and number each of the divided discrete units.

[0025] In this embodiment, each uniform grid is a square grid, and the side length is consistent with the spraying width of the hot melt material outlet when the road marking is applied.

[0026] Furthermore, in this embodiment, the road marking image includes a straight arrow image, and the area to be marked includes isosceles triangular regions (e.g., the straight arrow image is divided into several second grids) by the straight arrow image. Figure 2 The isosceles triangular region shown has a base of 45cm and a height of 120cm. The discrete units divided from the isosceles triangular region include square units, right-angled triangular units, and trapezoidal units, such as... Figure 2 As shown.

[0027] It is worth noting that the area to be delineated also includes triangular, rectangular, or trapezoidal areas divided from the straight arrow image by several second grids.

[0028] Furthermore, the discrete units are numbered, including: Using the axis of symmetry of the straight arrow image as the y-axis, the x-coordinate of the discrete units that the y-axis passes through is set to 0. The x-coordinate of the discrete units to the left of the y-axis decreases by 1 starting from -1, and the x-coordinate of the discrete units to the right of the y-axis increases by 1 starting from 1. Using the base of the isosceles triangle region in the image of the straight arrow as the x-axis, and the x-axis being the 0th row, the vertical coordinates of the discrete units located above the x-axis increase by 1 sequentially starting from 0.

[0029] Figure 2 The geometric information of the isosceles triangular region shown includes: Left endpoint A of the base: (-b / 2, 0) = (-22.5cm, 0cm); The right endpoint of the base, B: (b / 2, 0) = (22.5cm, 0cm); Vertex C: (0, a) = (0cm, 120cm); Boundary equations (centimeter level): Left hypotenuse f1: (x∈[-22.5, 0], y∈[0, 120]); Right hypotenuse f2: (x∈[0, 22.5], y∈[0, 120]); bottom edge f3: , (x∈[-22.5, 22.5]).

[0030] According to Figure 2 The diagram shows the division of the triangle into five shapes: square, right triangle, trapezoid, pentagon, and hexagon. For ease of calculation, the area of ​​the right triangle is considered to be less than or equal to 1 cm². 2 When the right triangle is ignored, the pentagon or hexagon is disregarded; when the square (area 25cm²) is... 2 The difference in area between the two is less than or equal to 1 cm. 2 When this pentagon is considered as a square, it is calculated that all pentagons can be considered as squares. Therefore, it can be considered that the isosceles triangle is cut into three shapes: square, right triangle, and trapezoid.

[0031] In this embodiment, the spraying width of the hot melt material outlet is 5cm.

[0032] S2: The dual optimization objectives are minimizing the total spraying time and minimizing the spraying overlap area, and the application constraints are established based on each discrete unit with a number.

[0033] To minimize both spraying time and paint usage, a dual-objective optimization model is established, with the dual objective being to minimize the total spraying time T. totai and minimize the spray overlap area A vertap The total spraying time is the sum of all time periods during the entire spraying process at the hot melt material outlet. It is divided into two parts according to the operation mode: the painting time t1 and the rotation time t2.

[0034] The total coating overlap area is the cumulative area of ​​the overlapping parts of the hot melt material outlet in different path segments. It is necessary to calculate the coating overlap area in each unit based on the optimized path trajectory and the coating method of the hot melt material outlet.

[0035] Furthermore, to ensure the continuity of the hot melt material outlet's movement path during the spraying process, achieve complete coverage of all unit areas, and prevent spraying from exceeding the boundaries of the isosceles triangle's outer area, road marking constraints are established based on each numbered discrete unit, including: Path connectivity constraints are used to ensure that the vertical or horizontal coordinates of the currently accessed discrete unit and the next accessed discrete unit are adjacent, so as to ensure that the movement trajectory of the hot melt material outlet is continuous and feasible, and avoid missed spraying or path confusion caused by skipping grids. Specifically, path connectivity constraints include path connectivity constraints by the number of the discrete unit or by the centroid coordinates of the discrete unit. The path connectivity constraint based on the discrete unit numbering includes: ; in, This represents the column coordinates of t discrete cells passed through. Let represent the x-coordinates of the t discrete cells traversed. This represents the column coordinates of the (t+1)th discrete unit visited. Represents the x-coordinate of the t+1 discrete cells passed through; The path connectivity constraint based on the center coordinates of the discrete unit includes: selecting any one of the four discrete units with the shortest Euclidean distance between the constraint and the centroid coordinates of the current discrete unit as the next discrete unit. The Euclidean distance is calculated as follows: ; in, This represents the Euclidean distance between the barycenter coordinates of the current discrete element and the next discrete element. This represents the centroid coordinates of the current discrete element. This indicates the centroid coordinates of the next discrete unit.

[0036] Operating mode conversion constraints are used to constrain the operating mode conversion of the hot melt material outlet between discrete units; specifically, the operating modes of the hot melt material outlet include: Mode 1: Horizontal movement; Mode 2: Vertical movement; Mode 3: Rotate to an angle with the positive x-axis. Mode 4: Rotate to an angle with the negative x-axis. Mode 5: Rotate to be parallel to the x-axis; Mode 6: Rotate to be parallel to the y-axis.

[0037] Furthermore, the switching of the hot melt material outlet operating mode between each discrete unit is constrained, including: Switching between working modes for the hot melt material outlet of a square unit: Obtain the current movement angle of the hot melt material outlet. When the movement angle ensures that the error between the translational spraying area of ​​the hot melt material outlet and the area of ​​the next square unit is less than a preset threshold, drive the hot melt material outlet to perform spraying in mode 1 or mode 2 on the next square unit. This can be expressed by the formula: ; in, This indicates the working mode of the hot melt material outlet at time t+1, where L represents the area of ​​the square unit. This represents the angle between the outlet of the hot melt material and the x-axis at time t, i.e., the motion angle; Otherwise, drive the hot melt material outlet to execute mode 5 and spray the next square unit to execute mode 2, or execute mode 6 and spray the next square unit to execute mode 1.

[0038] Switching between working modes for the hot melt material outlet from a square unit to a right-angled triangle or trapezoidal unit: When the hot melt material outlet moves towards the boundary of the isosceles triangle region, the hot melt material outlet is driven to first execute mode 3 or mode 4, and then execute mode 1 to spray the next right-angled triangle or trapezoidal unit. This can be expressed by the formula: ; ; in, This indicates the working mode of the hot melt material outlet corresponding to the discrete unit at time t+1. This indicates the working mode of the hot melt material outlet corresponding to the discrete unit at time t+2. The angle between the hot melt material outlet and the x-axis at time t+1 is represented by , and j represents the ordinate value of the discrete element. When the hot melt material outlet moves along the boundary of the isosceles triangle region, depending on the direction of movement, the outlet is driven to first execute mode 3 or mode 4 to rotate, then execute mode 1 to move to the top / bottom of the next unit, and finally execute mode 2 to spray the next right-angled triangle or trapezoidal unit. Alternatively, it can first execute mode 3 or 4 to rotate, then execute mode 2 to move to the left / right of the next unit, and finally execute mode 1 to spray the next right-angled triangle or trapezoidal unit. Specifically, at time t, the hot melt material outlet is located in a square unit on the boundary, and then moves to other shapes on the boundary. At this time, it is necessary to determine the position of the hot melt material outlet relative to the next discrete unit to determine the direction of movement. The center coordinates of the hot melt material outlet are... The centroid coordinates of the next discrete element to be painted are: ,when When the hot melt material outlet needs to be rotated in mode 3 or mode 4, then moved horizontally to the y-axis position, and then moved vertically; At this time, the hot melt material outlet can be moved vertically first, and then horizontally: ; .

[0039] Switching between the hot melt material outlet working modes of right-angled triangle units and trapezoidal units: When the ordinate of the next right-angled triangle unit or trapezoidal unit is greater than 16, the hot melt material outlet executes mode 1 or mode 2 for spraying; otherwise, the hot melt material outlet only executes mode 2 for spraying.

[0040] Switching the hot melt material outlet working mode from a right-angled triangle or trapezoidal unit to a square unit: If the ordinate of the current right-angled triangle or trapezoidal unit is greater than or equal to 22, or if the ordinate of the right-angled triangle or trapezoidal unit is greater than the ordinate of the square unit, the hot melt material outlet first executes mode 5 and then executes mode 2 for spraying the next square unit; otherwise, the hot melt material outlet executes mode 1 for spraying the next square unit. This can be expressed by the formula: ; .

[0041] Full coverage constraint, used to constrain all discrete elements to be fully coated, specifically involves setting a set of... Used to record the numbers of discrete units that have been completely painted; when number of elements When the total number of discrete units is [amount], all discrete units are covered, meaning the painting task is complete. Specifically, the conditions for completely painting any one discrete unit include: Condition 1: The Euclidean distance between the center coordinates of the hot melt material outlet and the centroid coordinates of the discrete element is less than 0.01; Condition 2: The center of the hot melt material outlet reaches the midpoint of the hypotenuse of the trapezoidal unit or the right triangle unit.

[0042] S3: Based on the aforementioned marking constraints and the NSGA-II optimization method, solve the Pareto optimal solution set for the dual optimization objectives to obtain the optimal marking path for the area to be marked in the road marking image.

[0043] Due to the complex constraints and strong nonlinearity of the objective function in this model, traditional optimization algorithms are difficult to solve effectively. Therefore, NSGA-II was chosen as the optimization method. The pseudocode is as follows: Figure 3As shown, NSGA-II eliminates the need to transform multi-objective problems into single-objective ones, fundamentally avoiding the subjectivity of weight setting. It is more flexible in constraint handling and possesses powerful global search capabilities, effectively avoiding getting trapped in local optima. Furthermore, this algorithm can output a Pareto-optimal solution set that achieves the best trade-offs among multiple objectives, providing a richer set of alternatives, while traditional optimization models typically only offer a single solution, significantly limiting their choice space.

[0044] In some alternative embodiments, the NSGA-II optimization method can be replaced by other optimization methods that can achieve multi-objective optimization, such as the NSGA-III optimization algorithm, multi-objective particle swarm optimization algorithm, genetic algorithm variants, etc.

[0045] The road marking path optimization method provided in this embodiment has the following beneficial effects: 1. Optimal application path: NSGA-II optimizes the application path, reducing empty strokes and overlapping application, and improving paint utilization. 2. Based on the optimal path, determine the optimal movement mode of the hot melt material outlet to ensure the marking effect of the marking material.

[0046] 3. This method can be integrated into unmanned road marking vehicles or fixed spraying robots, and is suitable for complex road marking construction in scenarios such as roads, parking lots, and airports.

[0047] In summary, this method generates the optimal application path by discretizing the road marking image into regular grid cells (while minimizing spraying time and spraying overlap area), providing a reference for the setting and control of the road marking material outlet path and facilitating the intelligent application of road markings.

[0048] Example 2 In this embodiment, an isosceles trapezoid with an upper base of 50cm, a lower base of 90cm, and a height of 90cm in the straight arrow image is used as the area to be marked. The optimal marking path is determined using the aforementioned road marking path optimization method. The optimal marking path is as follows: Figure 4 As shown.

[0049] The technical features of the above embodiments can be combined in any way. For the sake of brevity, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this specification.

[0050] The embodiments described above are merely illustrative of several implementation methods of this application, and while the descriptions are relatively specific and detailed, they should not be construed as limiting the scope of the patent application. It should be noted that those skilled in the art can make various modifications and improvements without departing from the concept of this application, and these all fall within the protection scope of this application. Therefore, the protection scope of this patent application should be determined by the appended claims.

Claims

1. A method for optimizing the path of road marking, characterized in that, include: S1: Divide the area to be marked in the road marking image into several uniform grids, and number each discrete unit. S2: The dual optimization objectives are minimizing the total spraying time and minimizing the spraying overlap area, and the application constraints are established based on each discrete unit with a number. S3: Based on the aforementioned marking constraints and the NSGA-II optimization method, solve the Pareto optimal solution set for the dual optimization objectives to obtain the optimal marking path for the area to be marked in the road marking image.

2. The road marking path optimization method according to claim 1, characterized in that, Each uniform grid is a square grid, and the side length is consistent with the spray width of the hot melt material outlet when the road marking is applied.

3. The road marking path optimization method according to claim 2, characterized in that, The road marking image includes a straight arrow image, and the area to be marked includes isosceles triangular regions, triangular regions, rectangular regions, or trapezoidal regions divided from the straight arrow image by several second grids. The discrete units divided from the isosceles triangular regions include square units, right-angled triangular units, and trapezoidal units.

4. The road marking path optimization method according to claim 3, characterized in that, Discrete units are numbered, including: Using the axis of symmetry of the straight arrow image as the y-axis, the x-coordinate of the discrete units that the y-axis passes through is set to 0. The x-coordinate of the discrete units to the left of the y-axis decreases by 1 starting from -1, and the x-coordinate of the discrete units to the right of the y-axis increases by 1 starting from 1. Using the base of the isosceles triangle region in the image of the straight arrow as the x-axis, and the x-axis being the 0th row, the vertical coordinates of the discrete units located above the x-axis increase by 1 sequentially starting from 0.

5. The road marking path optimization method according to claim 4, characterized in that, Based on the numbered discrete units, application constraints are established, including: Path connectivity constraints are used to ensure that the vertical or horizontal coordinates of the currently accessed discrete unit are adjacent to those of the next accessed discrete unit. Operating mode switching constraints are used to constrain the operating mode switching of the hot melt material outlet between discrete units; Full coverage constraint is used to constrain all discrete units to be fully coated.

6. The road marking path optimization method according to claim 5, characterized in that, Path connectivity constraints can be implemented by using the discrete element number or by using the centroid coordinates of the discrete element. The path connectivity constraint based on the discrete unit numbering includes: ; in, This represents the column coordinates of t discrete cells passed through. Let represent the x-coordinates of the t discrete cells traversed. This represents the column coordinates of the (t+1)th discrete unit visited. Represents the x-coordinate of the t+1 discrete cells passed through; The path connectivity constraint based on the center coordinates of the discrete unit includes: selecting any one of the four discrete units with the shortest Euclidean distance between the constraint and the centroid coordinates of the current discrete unit as the next discrete unit. The Euclidean distance is calculated as follows: ; in, This represents the Euclidean distance between the barycenter coordinates of the current discrete element and the next discrete element. This represents the centroid coordinates of the current discrete element. This indicates the centroid coordinates of the next discrete unit.

7. The road marking path optimization method according to claim 5, characterized in that, The operating modes of the hot melt material outlet include: Mode 1: Horizontal movement; Mode 2: Vertical movement; Mode 3: Rotate to an angle with the positive x-axis. Mode 4: Rotate to an angle with the negative x-axis. Mode 5: Rotate to be parallel to the x-axis; Mode 6: Rotate to be parallel to the y-axis.

8. The road marking path optimization method according to claim 7, characterized in that, Constraining the switching of the hot melt material outlet operating mode between discrete units, including: Switching between working modes of the hot melt material outlet from square unit to square unit: Obtain the current movement angle of the hot melt material outlet. When the movement angle makes the error between the translational spraying area of ​​the hot melt material outlet and the area of ​​the next square unit less than a preset threshold, drive the hot melt material outlet to spray the next square unit in mode 1 or mode 2; otherwise, drive the hot melt material outlet to execute mode 5 and spray the next square unit in mode 2, or execute mode 6 and spray the next square unit in mode 1. Switching between working modes for the hot melt material outlet from a square unit to a right-angled triangle unit or trapezoidal unit: When the hot melt material outlet moves toward the boundary of an isosceles triangle region, it is driven to first execute mode 3 or mode 4 and then execute mode 1 to spray the next right-angled triangle unit or trapezoidal unit; when the hot melt material outlet moves at the boundary of an isosceles triangle region, depending on the direction of movement of the hot melt material outlet, it is driven to first execute mode 3 or mode 4 to rotate and then execute mode 1 to move to the top / bottom of the next unit before executing mode 2 to spray the next right-angled triangle unit or trapezoidal unit, or it can first execute mode 3 or mode 4 to rotate and then execute mode 2 to move to the left / right side of the next unit before executing mode 1 to spray the next right-angled triangle unit or trapezoidal unit; Switching between the hot melt material outlet working modes of right-angled triangle units and trapezoidal units: When the ordinate of the next right-angled triangle unit or trapezoidal unit is greater than 16, the hot melt material outlet performs spraying in mode 1 or mode 2; otherwise, the hot melt material outlet only performs spraying in mode 2. Switching the working mode of the hot melt material outlet from a right-angled triangle or trapezoidal unit to a square unit: If the ordinate of the current right-angled triangle or trapezoidal unit is greater than or equal to 22, or the ordinate of the right-angled triangle or trapezoidal unit is greater than the ordinate of the square unit, the hot melt material outlet first executes mode 5 and then executes mode 2 for spraying the next square unit; otherwise, the hot melt material outlet executes mode 1 for spraying the next square unit.

9. The road marking path optimization method according to claim 5, characterized in that, The conditions for complete coating of any discrete unit include: Condition 1: The Euclidean distance between the center coordinates of the hot melt material outlet and the centroid coordinates of the discrete element is less than 0.01; Condition 2: The center of the hot melt material outlet reaches the midpoint of the hypotenuse of the trapezoidal unit or the right triangle unit.

10. The road marking path optimization method according to claim 2, characterized in that, The spray width at the hot melt material outlet is 5cm.