A task allocation method, device, equipment and storage medium
By automatically assigning tasks in high-precision map mapping, and reasonably assigning tasks according to the characteristics of the intersections and roads to be drawn in the map, the problems of long processing time and unreasonable manual allocation of a single device are solved, and the mapping efficiency is improved.
Patent Information
- Application Number
- CN202210975621.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-08-15
- Publication Date
- 2025-02-25
- Estimated Expiration
- 2042-08-15
AI Technical Summary
In high-precision map mapping, the processing time of a single device is too long, and the manual assignment of tasks in the prior art is unreasonable, resulting in inefficiency.
By determining the drawing tasks and their associated roads corresponding to the intersections to be drawn in the map to be drawn, the matching degree between each task and the assigned tasks of the processing equipment is calculated, and tasks are allocated reasonably to improve efficiency.
Automatic and rational allocation of map drawing tasks is realized, the mapping efficiency is improved, and the problems of manual intervention and unreasonable allocation are reduced.
Smart Images

Figure CN117632455B_ABST
Abstract
Description
Technical Field
[0001] This specification relates to the field of autonomous driving technology, and in particular to a task allocation method, device, equipment and storage medium. Background Art
[0002] With the development of driverless technology, the production of high-precision maps has become particularly important. For large-scale high-precision mapping, the mapping workload is large. If only one device is used for processing, the processing time will be too long. If the entire process of generating high-precision maps is divided into several tasks and assigned to multiple processing devices to perform map drawing tasks at the same time, the mapping efficiency can be improved. Based on this, how to reasonably allocate map drawing tasks to multiple processing devices has become an urgent problem to be solved.
[0003] In the prior art, a method of manually allocating map drawing tasks is usually adopted to divide the area corresponding to the high-precision map into several sub-areas, and the map drawing tasks corresponding to each sub-area are respectively allocated to each processing device.
[0004] However, the manual allocation method is not only labor-intensive, but also leads to unreasonable allocation problems. Summary of the invention
[0005] This specification provides a task allocation method, device, equipment and storage medium to partially solve the above-mentioned problems existing in the prior art.
[0006] This manual adopts the following technical solutions:
[0007] This specification provides a task allocation method, including:
[0008] Determine the drawing tasks corresponding to each to-be-drawn intersection in the to-be-drawn map, and the to-be-drawn roads associated with each drawing task;
[0009] For each drawing task, determining the matching degree between the drawing task and the assigned drawing tasks of each processing device according to the to-be-drawn road associated with the drawing task and the to-be-drawn road associated with the assigned drawing tasks of each processing device;
[0010] Determining a processing device matching the drawing task from among the processing devices according to the determined matching degrees;
[0011] Determine the target processing device for assigning the drawing task according to the task amount of the assigned drawing task of the matched processing device, and update the assigned drawing task of the target processing device according to the drawing task;
[0012] When all drawing tasks are assigned, the roads to be drawn are assigned to the processing devices according to the association between the assigned drawing tasks of the processing devices and the roads to be drawn, so that the processing devices draw maps.
[0013] Optionally, before determining the drawing tasks corresponding to the intersections to be drawn in the map to be drawn, the method further includes:
[0014] Acquire each driving track of the acquisition device in the map to be drawn;
[0015] For each driving trajectory, determine the key points of the intersection to be drawn in the driving trajectory according to the driving direction and driving speed of each trajectory point in the driving trajectory;
[0016] According to the positions of the key points of the intersections to be drawn in the driving trajectories, the intersections to be drawn in the map to be drawn are determined.
[0017] Optionally, for each driving trajectory, according to the driving direction and driving speed of each trajectory point in the driving trajectory, determining the key points in the driving trajectory specifically includes:
[0018] Determine the direction difference of each trajectory point according to the driving direction of each trajectory point of the driving trajectory and the driving direction of the previous trajectory point of each trajectory point; take the trajectory point whose direction difference is greater than a preset difference threshold as the key point of the intersection to be drawn in the driving trajectory; or,
[0019] Among the trajectory points of the driving trajectory, the trajectory points whose driving speed is lower than the preset speed threshold are used as key points of the intersection to be drawn.
[0020] Optionally, before determining the drawing tasks corresponding to the intersections to be drawn in the map to be drawn, the method further includes:
[0021] Acquire a laser reflectivity base map of the map to be drawn, wherein the laser reflectivity base map is obtained by processing point cloud data collected by a collection device in an area corresponding to the map to be drawn;
[0022] Identify each drawing element included in the laser reflectivity base map, and obtain the position of each drawing element in the laser reflectivity base map;
[0023] According to the positions of the drawing elements in the laser reflectivity map, each intersection to be drawn in the map to be drawn is determined.
[0024] Optionally, according to the to-be-drawn road associated with the drawing task and the to-be-drawn road associated with the assigned drawing tasks of each processing device, determining the matching degree between the drawing task and the assigned drawing tasks of each processing device respectively includes:
[0025] For each processing device, determining whether there is a road to be drawn associated with the drawing task among the roads to be drawn associated with the drawing task assigned to the processing device;
[0026] If so, determining the state information of the assigned drawing tasks of the processing device when the drawing task is assigned to the processing device, and determining the matching degree between the drawing task and the assigned drawing tasks of the processing device according to the state information of the assigned drawing tasks of the processing device;
[0027] If not, it is determined that the matching degree between the drawing task and the assigned drawing tasks of the processing device is a first matching degree.
[0028] Optionally, the state information of the assigned drawing tasks of the processing device includes the task amount of the assigned drawing tasks of the processing device;
[0029] When determining to allocate the drawing task to the processing device, the state information of the allocated drawing task of the processing device specifically includes:
[0030] Obtaining each drawing element contained in the map to be drawn and the position of each drawing element;
[0031] According to the positions of the intersections to be drawn and the roads to be drawn in the map to be drawn, determining the drawing elements that fall within the intersections to be drawn and the roads to be drawn from the drawing elements included in the map to be drawn;
[0032] The task amount of the assigned drawing task of the processing device is determined according to each drawing element falling within each of the to-be-drawn intersections and each of the to-be-drawn roads.
[0033] Optionally, determining the amount of the assigned drawing tasks of the processing device according to the drawing elements falling within the intersections to be drawn and the roads to be drawn specifically includes:
[0034] Determine a first task amount according to the intersections to be drawn corresponding to the assigned drawing tasks of the processing device and the drawing elements falling into the intersections to be drawn;
[0035] Among the roads to be drawn associated with the assigned drawing task of the processing device, only the roads to be drawn that are associated with the drawing task are used as target roads to be drawn by the processing device;
[0036] Determining a second task amount according to the target roads to be drawn by the processing device and the drawing elements falling within the roads to be drawn;
[0037] The task amount of the assigned drawing tasks of the processing device is determined according to the first task amount and the second task amount.
[0038] Optionally, the state information of the allocated drawing tasks of the processing device further includes the number of the allocated drawing tasks of the processing device;
[0039] Determining, according to the state information of the assigned drawing task of the processing device, the matching degree between the drawing task and the assigned drawing task of the processing device, specifically includes:
[0040] Determining whether the state information of the allocated drawing tasks of the processing device satisfies any of the following conditions: the task amount of the allocated drawing tasks of the processing device is higher than a preset task amount threshold; or the number of the allocated drawing tasks of the processing device is higher than a preset number threshold;
[0041] If so, determining that the matching degree between the drawing task and the assigned drawing task of the processing device is a second matching degree; wherein the second matching degree is greater than the first matching degree;
[0042] If not, it is determined that the matching degree between the drawing task and the assigned drawing tasks of the processing device is a third matching degree.
[0043] Optionally, the method further comprises:
[0044] For each processing device, when the processing device does not have an assigned drawing task, it is determined that the matching degree between the drawing task and the processing device is a fourth matching degree, wherein the third matching degree is greater than the fourth matching degree, and the fourth matching degree is greater than the second matching degree.
[0045] Optionally, before determining a processing device matching the drawing task from among the processing devices according to the determined matching degrees, the method further includes:
[0046] Determining a matching index corresponding to the drawing task according to the matching degree between the drawing task and the assigned drawing tasks of each processing device;
[0047] Determine whether the matching index corresponding to the drawing task is higher than a preset index threshold;
[0048] If yes, determine the target processing device for assigning the drawing task according to the matching degree between the drawing task and the assigned drawing tasks of each processing device;
[0049] If not, adjust the allocation order of the drawing tasks.
[0050] Optionally, according to the determined matching degrees, determining a processing device matching the drawing task from the processing devices specifically includes:
[0051] taking the processing devices with matching degrees higher than the matching degree threshold as the processing devices matching the drawing task;
[0052] Determining a target processing device for assigning the drawing task according to the task amount of the assigned drawing task of the matched processing device, specifically includes:
[0053] Respectively obtain the task amount of the assigned drawing task of each processing device matching the drawing task;
[0054] The matched processing device with the smallest task amount is used as the target processing device for assigning the drawing task.
[0055] Optionally, the method further comprises:
[0056] Sorting each drawing task several times to obtain task queues with different sorting orders;
[0057] For each task queue, traverse the drawing tasks in the task queue in sequence according to the sorting order of the drawing tasks in the task queue, and assign the drawing tasks to the processing devices;
[0058] When all drawing tasks are assigned, for each processing device, the roads to be drawn that are only associated with the assigned drawing tasks of the processing device are assigned to the processing device as the target roads to be drawn of the processing device.
[0059] Determine the allocation result of the task queue according to the allocated drawing tasks of each processing device and the allocated roads to be drawn;
[0060] Determine the variance of the allocation result corresponding to the task queue according to the allocation result corresponding to the task queue;
[0061] The allocation result of the target task queue is determined according to the variance of the allocation results corresponding to the task queues, and the drawing tasks and the roads to be drawn associated with the drawing tasks are respectively allocated to the processing devices according to the allocation result of the target task queue.
[0062] This specification provides a task allocation device, including:
[0063] A first determination module is used to determine the drawing tasks corresponding to each to-be-drawn intersection in the to-be-drawn map, and the to-be-drawn roads associated with each drawing task;
[0064] A second determination module is used to determine, for each drawing task in turn, a matching degree between the drawing task and the assigned drawing tasks of each processing device according to the to-be-drawn road associated with the drawing task and the to-be-drawn road associated with the assigned drawing tasks of each processing device;
[0065] A matching module, configured to determine a processing device matching the drawing task from among the processing devices according to the determined matching degrees;
[0066] A drawing task allocation module, used to determine the target processing device for the drawing task allocation according to the task amount of the allocated drawing task of the matched processing device, and update the allocated drawing task of the target processing device according to the drawing task;
[0067] The road allocation module is used to allocate the roads to be drawn to the processing devices according to the association between the allocated drawing tasks of the processing devices and the roads to be drawn when the drawing tasks are allocated, so that the processing devices can draw maps.
[0068] This specification provides a computer-readable storage medium, which stores a computer program. When the computer program is executed by a processor, the above-mentioned task allocation method is implemented.
[0069] This specification provides an electronic device, including a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the above-mentioned task allocation method is implemented when the processor executes the program.
[0070] At least one of the above technical solutions adopted in this specification can achieve the following beneficial effects:
[0071] Based on the drawing tasks corresponding to each intersection to be drawn in the map to be drawn, the matching degree between each task to be drawn and the assigned drawing task of each processing device is determined in turn, and then based on the determined matching degree, the target processing device to which each drawing task is assigned is determined, and the assigned drawing task of each target processing device is updated according to each drawing task. When each drawing task is assigned, each road to be drawn is assigned to each processing device according to the association between the assigned drawing task of each processing device and each road to be drawn, so that each processing device draws the map to be drawn based on the assigned drawing task and the road to be drawn. It can be seen that each drawing task is assigned based on the matching degree between each task to be drawn and the assigned drawing task of each processing device, and the correlation between each drawing task and the assigned drawing task is taken into account, so as to achieve the purpose of automatically and reasonably allocating map drawing tasks. BRIEF DESCRIPTION OF THE DRAWINGS
[0072] The drawings described herein are used to provide a further understanding of this specification and constitute a part of this specification. The illustrative embodiments and descriptions of this specification are used to explain this specification and do not constitute an improper limitation on this specification. In the drawings:
[0073] Figure 1A is a schematic diagram of a road intersection to be drawn in this specification;
[0074] Figure 1B is a schematic diagram of a road intersection to be drawn in this specification;
[0075] Figure 2 A flowchart of a task allocation method in this specification;
[0076] Figure 3 A flowchart of a task allocation method in this specification;
[0077] Figure 4 A schematic diagram of a drawing task in this specification;
[0078] Figure 5 A schematic diagram of a task allocation device provided in this specification;
[0079] Figure 6 The corresponding Figure 2 Schematic diagram of electronic equipment. DETAILED DESCRIPTION
[0080] In order to make the purpose, technical solutions and advantages of this specification more clear, the technical solutions of this specification will be clearly and completely described below in combination with the specific embodiments of this specification and the corresponding drawings. Obviously, the described embodiments are only part of the embodiments of this specification, not all of them. Based on the embodiments in this specification, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of this specification.
[0081] In addition, it should be noted that all actions of acquiring signals, information or data in the present invention are performed in compliance with the corresponding data protection laws and policies of the country where they are located and with the authorization given by the owner of the corresponding device.
[0082] Maps play an important role in today's society, and people cannot live without them in every aspect of their lives. Maps can support service maps such as positioning, route planning, distribution, and navigation. According to the service objects, they can be divided into high-precision maps and standard-precision maps. High-precision maps are mainly used in the field of unmanned driving, and unmanned driving equipment can use high-precision maps for precise positioning. Standard-precision maps are mainly for people's daily lives. The map to be drawn can be a high-precision map or a standard-precision map. The embodiment of this specification takes the drawing of high-precision maps as an example to elaborate on the technical solution in detail.
[0083] With the development of map technology, the scale of map data used for drawing maps is getting larger and larger. It is difficult for a device to store the map data of the entire map in its memory. In order to partition maps with large map data, the complete map drawing task can be split into several subtasks and assigned to multiple devices in the distributed system so that the map drawing tasks can be executed in parallel and the map drawing efficiency can be improved. Based on this, it involves the problem of assigning tasks to each processing device.
[0084] In the embodiment of this specification, each intersection in the map to be drawn is taken as the object of allocation, and each road between any two intersections can be allocated according to the allocation of the intersections that have a connection relationship with the roads. Among them, the intersection refers to the intersection area of two or more roads, and the road refers to the section of the road without a fork, such as Figure 1A As shown in the figure, the area within the dotted line is the intersection area. Generally, the drawing elements of the intersection area may include pedestrian crossing lines, lane stop lines, intersection guide lines, guide arrows, signal lights and traffic signs. The drawing elements contained in the road may include lane lines and guide arrows. Depending on the number and scale of the roads that intersect at the intersection area, the scale of each intersection area is also different, such as Figure 1B The intersection area of two roads and the interactive area of three roads are shown. In the embodiment of this specification, the area where two roads interact is also regarded as an intersection. The scale and size of the intersection area can be determined according to the specific application scenario, and this specification does not limit this.
[0085] The current map task splitting methods are mainly divided into two categories: point partitioning and edge partitioning. The intersections in the map are regarded as points and the roads are regarded as edges. Point partitioning refers to splitting all the intersections within the drawing range into different sub-ranges. If the first and last intersections of a road are divided into different sub-ranges, then this road is a cross-range road. The allocation goal of point partitioning is to generate as few cross-range roads as possible. Edge partitioning refers to splitting all the roads within the drawing range into different sub-ranges. In order to ensure the integrity of the roads within the sub-ranges, the same intersection may be divided into two different sub-ranges. The allocation goal of edge partitioning is to generate as few redundant intersections as possible.
[0086] In actual map drawing tasks, it is necessary to extract drawing elements from the point cloud data collected by the acquisition device, and draw the map to be drawn within the drawing range based on the drawing elements. Drawing elements can be drawing elements such as lane lines, crosswalks, guide arrows, signal lights and traffic signs. Generally, the drawing difficulty of intersections is higher than that of roads. This is because intersections contain more drawing elements than roads, and the complexity of each intersection is different. Some intersections are more complex and some are simpler. It can be seen that the task volume of drawing intersections and roads is different. If the above-mentioned edge partitioning map task division method is adopted, it may happen that the same intersection belongs to different sub-ranges, which causes multiple processing devices in the distributed system to be assigned to the drawing task of the same intersection, greatly reducing the efficiency of map drawing.
[0087] The drawing task allocation method for point partitioning usually adopts the Linear Deterministic Greedy (LDG) method. LDG is a greedy algorithm that takes intersections as input streams. The task allocation goal is to allocate intersections to the partitions with the most neighbors to reduce the number of cross-partition roads. The neighbors here refer to other intersections connected to the intersection to be allocated by roads. However, LDG does not consider the difference in the amount of drawing tasks between intersections and roads, nor does it consider the difference in the amount of drawing tasks between different intersections.
[0088] Based on this, this solution, based on LDG, considers the differences in task volume between roads and intersections, intersections and intersections, and roads and roads, and evenly divides the map drawing tasks to different processing devices to improve the efficiency of map drawing.
[0089] The technical solutions provided by the embodiments of this specification are described in detail below in conjunction with the accompanying drawings.
[0090] Figure 2 The following is a flowchart of a task allocation method in this specification, which specifically includes the following steps:
[0091] S100: Determine the drawing tasks corresponding to the areas to be drawn in the map to be drawn, and the roads to be drawn associated with the drawing tasks.
[0092] In the embodiments of this specification, the execution subject is an electronic device such as a server for allocating map drawing tasks. The map drawing tasks are split and allocated to different processing devices, so that the processing devices execute the map drawing tasks based on the allocated drawing tasks. Since the drawing difficulty and task volume of intersections are higher than those of roads, the intersections to be drawn within the drawing range are taken as the objects of priority allocation, and the tasks of drawing each intersection to be drawn are taken as drawing tasks respectively. The roads to be drawn that have an association relationship with the intersections to be drawn are taken as the roads to be drawn associated with each drawing task. Usually, any two intersections to be drawn that have a connection relationship are connected by roads. After the intersections to be drawn are allocated to different processing devices, each road to be drawn is allocated to the processing device according to the connection relationship between the intersections to be drawn. It can be understood that in the embodiments of this specification, the association relationship is defined as the connection between the intersection to be drawn and the road to be drawn, that is, the intersection to be drawn with an association relationship is connected to the road to be drawn; the connection relationship is defined as the relationship between any two intersections to be drawn connected by the road to be drawn.
[0093] Specifically, each intersection to be drawn in the map to be drawn can be determined based on the driving trajectory when the acquisition device collects map data within the drawing range, and the laser reflectivity map constructed by the collected point cloud data of the map to be drawn, to determine each intersection to be drawn in the drawing range.
[0094] In addition, the task assignment method provided in the embodiments of this specification can also be used to assign drawing tasks to operators who perform map drawing tasks. The operators can perform map drawing tasks based on the assigned drawing tasks and roads to be drawn, as well as the drawing elements corresponding to each drawing task and each road to be drawn.
[0095] S102: For each drawing task, determine the matching degree between the drawing task and the assigned drawing tasks of each processing device according to the to-be-drawn road associated with the drawing task and the to-be-drawn road associated with the assigned drawing tasks of each processing device.
[0096] In order to solve the problem that the scale of graph data used for map drawing is getting larger and larger, and the computing resources of a single device are difficult to support the execution of a complete map drawing task, the map drawing task is split and assigned to each processing device in the distributed system. The processing device can be used to execute the map drawing task, based on the point cloud data collected by the acquisition device within the map drawing range, and automatically mark the position of each drawing element within the drawing range. Among them, the drawing elements can be traffic facility elements such as lane lines, crosswalks, guide arrows, signal lights and traffic signs.
[0097] In this step, each drawing task can be matched with the assigned drawing tasks of each processing device in turn to obtain a matching degree, so that each drawing task can be assigned to each processing device based on the matching degree. Specifically, the matching degree can be determined by the degree of connection between each drawing task and the assigned drawing tasks of each processing device. If there is a target drawing task that has a connection relationship with the drawing task in the assigned drawing tasks of the processing device, then after the drawing task is assigned to the processing device, the road to be drawn between the drawing task and the target drawing task can also be assigned to the processing device, which can greatly reduce the communication overhead between the processing devices and improve the efficiency of the map drawing task. It can be understood that the higher the matching degree between the drawing task and the processing device, the smaller the communication overhead generated by assigning the drawing task to the processing device.
[0098] S104: Determine a processing device matching the drawing task from among the processing devices according to the determined matching degrees.
[0099] The processing devices with matching degrees higher than the matching degree threshold are regarded as processing devices matching the drawing task.
[0100] Since the matching degree between the drawing task and the assigned drawing tasks of each processing device can be used to indicate the probability of assigning the drawing task to each processing device, the higher the matching degree, the higher the possibility of assigning the drawing task to the processing device, and the stronger the rationality. Conversely, the lower the matching degree, the lower the possibility of assigning the drawing task to the processing device, and the weaker the rationality. Therefore, a matching threshold can be preset, and each processing device with a matching degree higher than the matching threshold is regarded as each processing device matching the drawing task, so as to screen several solutions with more reasonable allocation among each processing device.
[0101] Of course, the processing device with the highest matching degree between the drawing task and the assigned drawing tasks of each processing device may be used as each processing device matched with the drawing task. If the number of the processing device with the highest matching degree is only one, the matched processing device may be directly used as the drawing task assigned to the drawing task. If the number of the processing devices with the highest matching degree is greater than one, in order to ensure that the drawing task is only assigned to one processing device, further screening may be performed based on the task amount of the assigned drawing tasks of each matched processing device.
[0102] S106: Determine the target processing device to which the drawing task is to be assigned according to the task amount of the assigned drawing task of the matched processing device, and update the assigned drawing task of the target processing device according to the drawing task.
[0103] After the drawing task is assigned to each matched processing device, the task amount of the assigned drawing task to each matched processing device is determined respectively, and the matched processing device with the smallest task amount is used as the target processing device for assigning the drawing task.
[0104] Further, after determining the matching degree between the drawing task and the assigned drawing tasks of each processing device, the drawing task is reasonably assigned according to the determined matching degrees. When updating the target processing device according to the drawing task, the drawing task can be added to the assigned drawing tasks of the target processing device, so that the processing device executes the drawing task of the map to be drawn according to the assigned drawing task.
[0105] S108 When all drawing tasks are assigned, the roads to be drawn are assigned to the processing devices according to the assigned drawing tasks of the processing devices and the association relationship with the roads to be drawn, so that the processing devices draw the map to be drawn according to the assigned drawing tasks and the roads to be drawn.
[0106] Furthermore, after all drawing tasks are assigned to each processing device, the roads to be drawn associated with each drawing task can also be assigned to each processing device. Specifically, for each processing device, among the roads to be drawn associated with the assigned drawing tasks of the processing device, only the roads to be drawn that are associated with the assigned drawing tasks of the processing device can be used as the target roads to be drawn of the processing device, and the target roads to be drawn of the processing device are assigned to the processing device. For example, the assigned drawing tasks of processing device 1 are drawing tasks A1, A2, and A3, wherein the roads to be drawn associated with drawing task A1 are B1 and B2, and the road to be drawn associated with drawing task A2 is B2. Therefore, road B2 to be drawn is used as the target road to be drawn of processing device 1, and road B2 to be drawn is assigned to processing device 1.
[0107] based on Figure 2The task allocation method shown, based on the drawing tasks corresponding to each intersection to be drawn in the map to be drawn, determines the matching degree between each task to be drawn and the assigned drawing tasks of each processing device in turn, and then determines the target processing device to which each drawing task is assigned based on the determined matching degree, and updates the assigned drawing tasks of each target processing device according to each drawing task. When each drawing task is assigned, each road to be drawn is assigned to each processing device according to the association between the assigned drawing tasks of each processing device and each road to be drawn, so that each processing device draws the map to be drawn based on the assigned drawing tasks and the roads to be drawn. It can be seen that each drawing task is assigned based on the matching degree between each task to be drawn and the assigned drawing tasks of each processing device, and the correlation between each drawing task and the assigned drawing tasks is taken into account, so as to achieve the purpose of automatically and reasonably allocating map drawing tasks.
[0108] In the embodiments of this specification, Figure 2 Before determining the drawing tasks corresponding to the intersections to be drawn in the map to be drawn as shown in step S100, the intersections to be drawn can be determined in the map to be drawn, and specifically, the intersections to be drawn in the map to be drawn can be determined by the driving track of the acquisition device in the map to be drawn and the laser reflectivity map recognized by the acquisition device in the map to be drawn. This can be achieved specifically through the following two solutions.
[0109] Solution 1: Acquire each driving trajectory of the acquisition device in the map to be drawn; for each driving trajectory, determine each key point of the intersection to be drawn in the driving trajectory according to the driving direction and driving speed of each trajectory point in the driving trajectory; determine each intersection to be drawn in the map to be drawn according to the position of each key point of the intersection to be drawn in each driving trajectory.
[0110] Specifically, the direction difference can be determined according to the driving direction of each trajectory point and the driving direction of the previous trajectory point of each trajectory point, and the trajectory point with the direction difference greater than the direction threshold is taken as the key point. Alternatively, according to the driving speed of each trajectory point and the driving speed threshold, the trajectory point with the driving speed less than the driving speed threshold is taken as the key point. Then, based on clustering the positions of the key points, the intersections to be drawn in the map to be drawn and their positions can be obtained.
[0111] Solution 2: Obtain a laser reflectivity base map of the map to be drawn, wherein the laser reflectivity base map is obtained by processing point cloud data collected by an acquisition device in an area corresponding to the map to be drawn; identify each drawing element contained in the laser reflectivity base map, and obtain the position of each drawing element in the laser reflectivity base map; determine each intersection to be drawn in the map to be drawn according to the position of each drawing element in the laser reflectivity map.
[0112] Specifically, a laser reflectivity base map may be obtained, wherein the laser reflectivity base map may be obtained by processing point cloud data, and the point cloud data may refer to point cloud data collected on the road by a vehicle used to collect point cloud data through collection equipment such as laser radar.
[0113] From the laser reflectivity map, the drawing elements contained in the laser reflectivity base map can be identified, and the image areas of these drawing elements in the laser reflectivity base map can be obtained, wherein the drawing elements mentioned here may include traffic markings such as crosswalks and lane stop lines, and of course, the drawing elements may also include road surfaces, etc., that is, the drawing elements may refer to elements related to traffic roads in the laser reflectivity base map, which can be used to construct high-precision maps. The drawing elements contained in the laser reflectivity base map can be identified by a pre-trained recognition model, or the drawing elements therein can be detected by an image boundary detection algorithm, etc.
[0114] Optionally, the area where the pedestrian crossing line or lane stop line is located in the laser reflectivity base map can be identified as the area to be clustered, and the areas to be clustered can be clustered according to the distance between the areas to be clustered. Specifically, the areas to be clustered whose distance is less than a specified threshold can be clustered into one category. Finally, for each category, the minimum circumscribed rectangle of each area to be clustered contained in the category is determined as the intersection area. In addition to using the above method to determine the intersection area, other methods can also be used to determine the intersection area, and this specification does not limit this.
[0115] In the embodiments of this specification, Figure 2 Step S102 shows that for each drawing task, according to the to-be-drawn road associated with the drawing task and the to-be-drawn road associated with the assigned drawing tasks of each processing device, the matching degree between the drawing task and the assigned drawing tasks of each processing device is determined, which is specifically implemented by the following scheme: Figure 3 shown.
[0116] S200: for each processing device, determine whether the processing device has an assigned drawing task, if so, execute step S204, otherwise execute step S202.
[0117] S202: Determine that the matching degree between the drawing task and the assigned drawing tasks of the processing device is a fourth matching degree.
[0118] Among them, the four matching degrees mentioned in the embodiments of this specification are, from large to small, the third matching degree, the fourth matching degree, the second matching degree, and the first matching degree. Specifically, when the processing device is not assigned a drawing task, it means that the assigned drawing tasks of the processing device do not include any intersections to be drawn and roads to be drawn. At this time, the matching degree between the drawing task and the assigned drawing tasks of the processing device can be determined as the fourth matching degree.
[0119] S204: Determine whether there is a road to be drawn associated with the drawing task in the roads to be drawn associated with the drawing task that has been assigned to the processing device. If so, execute step S208; otherwise, execute step S206.
[0120] In this step, it is determined whether the roads to be drawn associated with the assigned drawing tasks of the processing device and the roads to be drawn associated with the drawing task overlap. If there are roads to be drawn associated with the assigned drawing tasks of the processing device that overlap with the roads to be drawn associated with the drawing task, it means that the assigned drawing tasks of the processing device include at least one neighbor task of the drawing task. In the embodiment of this specification, the neighbor tasks of the drawing task refer to other drawing tasks connected to the drawing task through the roads to be drawn.
[0121] For example, Figure 4 FIG. 1 is a schematic diagram of a drawing task and the assigned drawing tasks of a processing device, wherein drawing task C is the drawing task currently to be assigned, and the assigned drawing tasks of processing device A include drawing task A and drawing task D. Figure 4 It can be seen that the roads to be drawn of drawing task C are road B to be drawn and road D to be drawn, the roads to be drawn of drawing task A are road B to be drawn and road E to be drawn, and the road to be drawn of drawing task F is road E to be drawn. Since the roads to be drawn of drawing task A overlap with the roads to be drawn of drawing task C, it can be considered that drawing task A is connected to drawing task C through road B to be drawn, and there is no overlap between the roads to be drawn of drawing task C and drawing task F. Therefore, among the assigned drawing tasks of processing device A, there is drawing task A that has a connection relationship with drawing task C.
[0122] S206: Determine that the matching degree between the drawing task and the assigned drawing tasks of the processing device is a first matching degree. It can be understood that the premise for determining that the matching degree between the drawing task and the assigned drawing tasks of the processing device is the first matching degree is that the processing device has an assigned drawing task, and the drawing task has no connection relationship with any of the assigned drawing tasks of the processing device.
[0123] S208: Determine the state information of the assigned drawing task of the processing device when assigning the drawing task to the processing device.
[0124] The state information of the assigned drawing tasks includes: when the task to be drawn is assigned to the processing device, the task amount of the assigned drawing tasks of the processing device, and the number of the assigned drawing tasks of the processing device.
[0125] In one or more embodiments of the present specification, in order to reasonably allocate each drawing task to each processing device, it is also necessary to consider the difference in task volume between each intersection to be drawn, between each road to be drawn, and between the intersection to be drawn and the road to be drawn. The task volume of the drawing task can be reflected by the drawing elements contained in the intersection to be drawn or the road to be drawn. Generally, the task volume of the road to be drawn can be estimated based on the length of the road to be drawn. This is because the drawing elements contained in the road to be drawn are basically evenly distributed on the road to be drawn, that is, the drawing elements contained in each unit length of the road to be drawn are roughly the same. However, due to the large difference in scale between the roads to be drawn, such as the large number of interactive roads and the complex marking lines in the intersection area. Therefore, in order to ensure the fairness of the distribution of drawing tasks, it is necessary to consider the differences between the drawing elements contained in each intersection to be drawn.
[0126] The number of assigned drawing tasks here refers to the number of intersections to be drawn in the assigned drawing tasks. At this time, the task volume of the assigned drawing tasks of the processing device includes the following parts: the task volume of the current assigned drawing tasks of the processing device when the drawing task is not assigned to the processing device, the task volume of the drawing task, and the task volume of each road to be drawn between the drawing task and the target drawing task in the assigned drawing tasks of the processing device after the drawing task is assigned to the processing device.
[0127] S210: Determine whether the state information of the allocated drawing tasks of the processing device satisfies any of the following conditions: the task amount of the allocated drawing tasks of the processing device is higher than a preset task amount threshold; or the number of the allocated drawing tasks of the processing device is higher than a preset number threshold. If so, execute step S212; otherwise, execute step S214.
[0128] S212: Determine that the matching degree between the drawing task and the assigned drawing tasks of the processing device is a second matching degree.
[0129] Specifically, when the task volume of the assigned drawing tasks of the processing device is higher than the preset task volume threshold, or the number of the assigned drawing tasks of the processing device is higher than the preset number threshold, if the drawing tasks are further assigned to the processing device, the processing device will be burdened with too many drawing tasks, resulting in an imbalance in the task volume of the drawing tasks assigned between the processing devices, thereby reducing the efficiency of each processing device in executing the drawing tasks. Therefore, it can be determined that the matching degree between the drawing task and the assigned drawing tasks of the processing device is the second matching degree, wherein the second matching degree is less than the third matching degree, so that the possibility of assigning the drawing task to a processing device whose status information is not satisfied with the above conditions is higher than that of assigning the drawing task to a processing device whose status information satisfies the above conditions. Optionally, the second matching degree can also be determined based on the number of neighbor tasks that have a connection relationship with the drawing task in the assigned drawing tasks of the processing device and the first weight, wherein the first weight can be an extremely small positive number. The specific formula is as follows,
[0130] Gain=|P i ∩N(v)|θ
[0131] Where Gain is the matching degree between the drawing task and the assigned drawing tasks of the processing device, P i is the assigned drawing task of the processing device, N(v) is the neighbor task of the drawing task, |P i ∩N(v)| may represent the number of neighbor tasks of the drawing task included in the assigned drawing tasks of the processing device, and θ is a first weight, which may be preset to 0.1.
[0132] S214: Determine that the matching degree between the drawing task and the assigned drawing tasks of the processing device is a third matching degree.
[0133] In this step, when the task amount of the assigned drawing tasks of the processing device is not higher than the preset task amount threshold, and the number of the assigned drawing tasks of the processing device is not higher than the preset number threshold, it means that the assignment of the drawing task to the processing device does not affect the balance of task assignment, and therefore, the matching degree between the drawing task and the assigned drawing tasks of the processing device can be determined as the third matching degree. Optionally, the third matching degree can also be determined based on the number of neighbor tasks that have a connection relationship with the drawing task in the assigned drawing tasks of the processing device and the second weight, wherein the second weight can be determined based on the number of the assigned drawing tasks of the processing device and the preset number threshold, and the specific formula is as follows:
[0134]
[0135] Where Gain is the matching degree between the drawing task and the assigned drawing tasks of the processing device, P iis the assigned drawing task of the processing device, N(v) is the neighbor task of the drawing task, |P i ∩N(v)| can represent the number of neighbor tasks of the drawing task included in the assigned drawing tasks of the processing device, is the second weight, N t is the preset quantity threshold.
[0136] It can be seen from the above formula that the third matching degree between the drawing task and the assigned drawing task of the processing device is always greater than 1, and the second matching degree is always between 0 and 1. In one or more embodiments of the present specification, the fourth matching degree can be set to 1, and the second matching degree can be set to 0. Based on this, the magnitude relationship of the four matching degrees can be obtained as follows: the third matching degree is greater than the fourth matching degree, the fourth matching degree is greater than the second matching degree, and the second matching degree is greater than the first matching degree.
[0137] It can be seen that in the embodiment of this specification, the matching degree between the determined drawing task and the assigned drawing task of the processing device may exist in the above four situations:
[0138] The first case: when the assigned drawing tasks of the processing device do not include an assigned drawing task connected to the drawing task through the road to be drawn, the first matching degree between the drawing task and the assigned drawing tasks of the processing device is determined. It can be understood that the premise for determining that the matching degree between the drawing task and the assigned drawing tasks of the processing device is the first matching degree is that the processing device has an assigned drawing task, and the drawing task has no connection relationship with any of the assigned drawing tasks of the processing device.
[0139] The second case: when the assigned drawing tasks of the processing device include an assigned drawing task connected to the drawing task through the road to be drawn, but after the drawing task is assigned to the processing device, the task amount of the assigned drawing tasks of the processing device is higher than the task amount threshold, or the number of the assigned drawing tasks of the processing device is higher than the number threshold, a second matching degree between the drawing task and the assigned drawing tasks of the processing device is determined.
[0140] A third case: when the assigned drawing tasks of the processing device include an assigned drawing task connected to the drawing task through a to-be-drawn road, and after the drawing task is assigned to the processing device, the task amount of the assigned drawing tasks of the processing device is not higher than the task amount threshold, or the number of the assigned drawing tasks of the processing device is not higher than the number threshold, a second matching degree between the drawing task and the assigned drawing tasks of the processing device is determined.
[0141] A fourth situation: when the processing device does not include an assigned drawing task, a fourth matching degree between the drawing task and the assigned drawing tasks of the processing device.
[0142] Among them, the four matching degrees mentioned in the embodiments of this specification are, from large to small, the third matching degree, the fourth matching degree, the second matching degree, and the first matching degree. It can be seen that the drawing task should be preferentially assigned to the processing device whose assigned drawing task includes a neighbor task but whose status information meets the preset conditions, followed by the processing device that is not assigned a drawing task, then the processing device whose assigned drawing task includes a neighbor task but whose status information does not meet the preset conditions, and finally the processing device that has no neighbor task in the assigned drawing task.
[0143] From the matching degree between the drawing tasks and the processing devices determined by the above scheme, it can be seen that in the embodiment of this specification, the drawing tasks are preferentially assigned to the processing devices containing the neighbor tasks, so as to avoid excessive communication overhead between the processing devices and improve the efficiency of the processing devices in executing the drawing tasks of the map to be drawn in parallel.
[0144] In one or more embodiments of the present specification, when allocating the drawing task to the processing device, the state information of the allocated drawing task of the processing device is determined, wherein the state information of the allocated drawing task of the processing device includes the task amount of the allocated drawing task of the processing device and the number of the allocated drawing tasks, which is specifically determined in the following manner:
[0145] The first step: obtaining the drawing elements contained in the map to be drawn and the position of each drawing element.
[0146] The drawing elements respectively included in the intersections to be drawn and the roads are determined according to the point cloud data and the positions of the intersections to be drawn and the roads within the drawing range.
[0147] Step 2: According to the positions of the intersections to be drawn and the roads to be drawn in the map to be drawn, from the drawing elements included in the map to be drawn, determine the drawing elements that fall within the intersections to be drawn and the roads to be drawn.
[0148] Step 3: Determine a first task amount according to the intersections to be drawn corresponding to the assigned drawing tasks of the processing device and the drawing elements falling into the intersections to be drawn.
[0149] Step 4: among the roads to be drawn associated with the assigned drawing tasks of the processing device, only the roads to be drawn that are associated with the assigned drawing tasks of the processing device are used as the target roads to be drawn of the processing device; and the second task amount is determined according to the target roads to be drawn of the processing device and the drawing elements falling within the roads to be drawn.
[0150] Step 5: Determine the task amount of the assigned drawing tasks of the processing device according to the first task amount and the second task amount.
[0151] In the embodiments of this specification, Figure 2 In step S104, before determining the target processing device to which the drawing task is to be assigned based on the determined matching degrees, it is also necessary to determine whether the drawing task needs to be assigned later, which is specifically determined by the following scheme.
[0152] First, according to the matching degree between the drawing task and the assigned drawing tasks of each processing device, a matching index corresponding to the drawing task is determined;
[0153] In this step, the matching degree of the drawing task and the assigned drawing tasks of each processing device is summed to obtain a matching index corresponding to the drawing task.
[0154] Then, it is determined whether the matching index corresponding to the drawing task port is higher than a preset index threshold;
[0155] Specifically, according to Figure 2 In the matching degree determination scheme shown, since the first matching degree is determined on the premise that there is no neighbor task of the drawing task in the assigned drawing tasks of the processing device, the indicator threshold can be determined in advance based on the first matching degree. Optionally, when the first matching degree is 0, the preset indicator threshold can be set to 0, that is, when the drawn intersection is judged to match the matching index corresponding to the intersection to be drawn is greater than zero.
[0156] If yes, determine the target processing device for assigning the drawing task according to the matching degree between the drawing task and the assigned drawing tasks of each processing device;
[0157] If not, adjust the allocation order of the drawing tasks.
[0158] Specifically, based on the above-mentioned indicator threshold determination scheme, when the matching indicator corresponding to the drawing task is not higher than the preset indicator threshold, it means that the matching degree of the drawing task and the assigned drawing tasks of each processing device is the first matching degree, that is, when determining the matching degree of the drawing task and the assigned drawing tasks of each processing device, there is no neighbor task connected to the drawing task in the assigned drawing tasks of each processing device, that is, when the assigned drawing tasks of each processing device are in the current state, it is not appropriate to assign the intersection to be drawn to any processing device. Therefore, the assignment order of the drawing task can be adjusted to postpone the assignment of the drawing task, and after the other drawing tasks are assigned, the matching degree of the drawing task and the assigned drawing tasks of each processing device can be determined again to assign the drawing task. This avoids assigning the drawing task to an inappropriate processing device and reducing the efficiency of executing the drawing task.
[0159] Optionally, the allocation order of the drawing task may be directly adjusted to after the allocation order of other unallocated drawing tasks, or the allocation order of the drawing task may be simply postponed by a preset order so that the drawing task is allocated after other drawing tasks are allocated.
[0160] It can be seen that in the drawing task allocation scheme provided in one or more embodiments of this specification, the allocation goal is to allocate the drawing task to the processing device with neighbor tasks and a large number of neighbor tasks, so as to reduce the communication overhead between the processing devices and improve the efficiency of each processing device in executing the drawing task. In addition, the drawing task is allocated to the processing device with a smaller task volume to avoid the imbalance of the task volume between the processing devices, resulting in a waste of computing resources of the processing devices.
[0161] In an optional embodiment of this specification, in the Figure 2 As shown in step S102, for each drawing task, according to the to-be-drawn road associated with the drawing task and the to-be-drawn road associated with the assigned drawing tasks of each processing device, when determining the matching degree of the drawing task with the assigned drawing tasks of each processing device, each drawing task can also be sorted several times to obtain a plurality of task queues with different sorting orders, and based on the plurality of task queues, the drawing task allocation process is repeated multiple times to obtain a plurality of allocation results, which is specifically achieved in the following manner.
[0162] First, each drawing task is sorted several times to obtain task queues with different sorting orders.
[0163] In this step, each drawing task can be sorted to obtain a task queue. In practical applications, when faced with huge map data for drawing maps, not only will the computing resources of a device be difficult to perform a complete map drawing task, but the memory of a device used to allocate drawing tasks will also be difficult to store the map data of the entire map. In order to partition the huge map, the streaming graph partitioning method can be used to read the map data of the complete map in the form of a stream into the memory of the device used to allocate drawing tasks, and allocate it for each map data read into the memory.
[0164] It can be seen that the allocation of the entire map data can be completed by traversing the complete map data in the form of a stream. Since the intersections to be drawn contained in the drawing range are input into the memory of the device that performs task allocation in the form of a stream, it is necessary to allocate each intersection to be drawn in sequence according to the sorting order of each intersection to be drawn in the task queue. Based on this, it is necessary to sort each drawing task to obtain task queues with different sorting orders, so that in the process of drawing task allocation, according to the sorting order of each drawing task in the task queue, each drawing task in the task queue is traversed in sequence, and each drawing task is allocated to each processing device respectively, and the allocation result corresponding to the task queue is obtained.
[0165] Secondly, for each task queue, the drawing tasks in the task queue are traversed in sequence according to the sorting order of the drawing tasks in the task queue, and the matching degree of each drawing task and the assigned drawing tasks of each processing device is determined respectively according to the to-be-drawn roads associated with each drawing task and the to-be-drawn roads associated with the assigned drawing tasks of each processing device.
[0166] Thirdly, according to the determined matching degree and the respective drawing tasks, the assigned drawing tasks of the respective processing devices are updated.
[0167] Then, when all drawing tasks are assigned, the roads to be drawn are assigned to the processing devices according to the assigned drawing tasks of the processing devices and the association relationship between the roads to be drawn.
[0168] Specifically, for each processing device, among the roads to be drawn associated with the assigned drawing tasks of the processing device, only the roads to be drawn that are associated with the assigned drawing tasks of the processing device are used as the target roads to be drawn of the processing device, and the target roads to be drawn of the processing device are assigned to the processing device.
[0169] Finally, the allocation result of the task queue is determined according to the allocated drawing tasks of each processing device and the allocated roads to be drawn.
[0170] Furthermore, based on the allocation result corresponding to the task queue, the variance of the allocation result corresponding to the task queue is determined, and based on the variance of the allocation results corresponding to each task queue, the allocation result of the target task queue is determined, and based on the allocation result of the target task queue, each drawing task and the roads to be drawn associated with each drawing task are respectively allocated to each processing device.
[0171] Based on an optional embodiment of the present specification described above, it can be seen that, in the task allocation scheme provided in the embodiment of the present specification, the task to be drawn is input in the form of a stream into the memory of the electronic device used to allocate the drawing task, resulting in the current allocation only being able to be performed based on the previous allocation result, which may lead to a local optimal solution and fail to reach the global optimal solution. Therefore, by repeating the allocation process multiple times, multiple task queues with different arrangement orders can be constructed, thereby obtaining multiple allocation results, and selecting the most reasonable allocation from the multiple allocation results as the final allocation result, thereby avoiding the problem that the streaming input scheme cannot reach the global optimal solution.
[0172] In an optional embodiment of the present specification, a task set corresponding to each processing device may be established, and the task set may include assigned drawing tasks that have been assigned to the corresponding processing device. When establishing a task set corresponding to a processing device, the number of task sets may be determined based on the number of processing devices in the distributed system. Normally, the number of task sets established will not exceed the number of processing devices used to perform map drawing tasks in the distributed system. When no allocation is performed, the established task set is an empty set, that is, the task set does not contain any drawing tasks or roads to be drawn. In actual applications, when creating each task set, each task set may be numbered according to each processing device, and after each intersection to be drawn is assigned to each task set, each task set is assigned to each processing device based on the number of the task set, so that the processing device performs the map drawing task based on the assigned drawing task.
[0173] The above is a task allocation method provided in one or more embodiments of this specification. Based on the same idea, this specification also provides a corresponding task allocation device, such as Figure 5 shown.
[0174] Figure 5 A schematic diagram of a task allocation device provided in this specification specifically includes:
[0175] The first determination module 300 is used to determine the drawing tasks corresponding to the intersections to be drawn in the map to be drawn, and the roads to be drawn associated with the drawing tasks;
[0176] The second determination module 302 is used to determine, for each drawing task in turn, the matching degree between the drawing task and the assigned drawing tasks of each processing device according to the to-be-drawn road associated with the drawing task and the to-be-drawn road associated with the assigned drawing tasks of each processing device;
[0177] A matching module 304, configured to determine a processing device matching the drawing task from among the processing devices according to the determined matching degrees;
[0178] A drawing task allocation module 306 is used to determine a target processing device to which the drawing task is allocated according to the determined matching degrees, and to update the allocated drawing task of the target processing device according to the drawing task;
[0179] The road allocation module 308 is used to allocate the roads to be drawn to the processing devices according to the association between the allocated drawing tasks of the processing devices and the roads to be drawn when the drawing tasks are allocated, so that the processing devices can draw the map.
[0180] Optionally, the first determination module 300, before the first determination module 300 determines the drawing tasks corresponding to each intersection to be drawn in the map to be drawn, is also used to obtain each driving trajectory of the acquisition device in the map to be drawn; for each driving trajectory, according to the driving direction and driving speed of each trajectory point in the driving trajectory, determine each key point of the intersection to be drawn in the driving trajectory; according to the position of each key point of the intersection to be drawn in the driving trajectory, determine each intersection to be drawn in the map to be drawn.
[0181] Optionally, the first determination module 300 is specifically used to determine the direction difference of each trajectory point according to the driving direction of each trajectory point of the driving trajectory and the driving direction of the previous trajectory point of each trajectory point; use the trajectory points whose direction difference is greater than a preset difference threshold as the key points of the intersection to be drawn in the driving trajectory; or, use the trajectory points whose driving speed is lower than a preset speed threshold among the trajectory points of the driving trajectory as the key points of the intersection to be drawn.
[0182] Optionally, the first determination module 300 is also used to obtain a laser reflectivity base map of the map to be drawn before the first determination module 300 determines the drawing tasks corresponding to each intersection to be drawn in the map to be drawn, wherein the laser reflectivity base map is obtained by processing point cloud data collected by an acquisition device in an area corresponding to the map to be drawn; identify each drawing element contained in the laser reflectivity base map to obtain the position of each drawing element in the laser reflectivity base map; and determine each intersection to be drawn in the map to be drawn according to the position of each drawing element in the laser reflectivity map.
[0183] Optionally, the second determination module 302 is specifically used to determine, for each processing device, whether there is a road to be drawn associated with the drawing task among the roads to be drawn associated with the assigned drawing tasks of the processing device; if so, determine the status information of the assigned drawing tasks of the processing device when the drawing task is assigned to the processing device, and determine the matching degree between the drawing task and the assigned drawing tasks of the processing device according to the status information of the assigned drawing tasks of the processing device; if not, determine that the matching degree between the drawing task and the assigned drawing tasks of the processing device is the first matching degree.
[0184] Optionally, the state information of the assigned drawing tasks of the processing device includes the task amount of the assigned drawing tasks of the processing device;
[0185] Optionally, the second determination module 302 is specifically used to obtain the drawing elements contained in the map to be drawn and the positions of the drawing elements; determine the drawing elements that fall within the intersections to be drawn and the roads to be drawn from the drawing elements contained in the map to be drawn according to the positions of the intersections to be drawn and the roads to be drawn; and determine the task volume of the assigned drawing tasks of the processing device according to the drawing elements that fall within the intersections to be drawn and the roads to be drawn.
[0186] Optionally, the second determination module 302 is specifically used to determine a first task amount according to the intersections to be drawn corresponding to the assigned drawing tasks of the processing device and the drawing elements falling within the intersections to be drawn; among the roads to be drawn associated with the assigned drawing tasks of the processing device, only the roads to be drawn that are associated with the drawing tasks are used as target roads to be drawn of the processing device; determine a second task amount according to the target roads to be drawn of the processing device and the drawing elements falling within the roads to be drawn; and determine the task amount of the assigned drawing tasks of the processing device according to the first task amount and the second task amount.
[0187] Optionally, the state information of the allocated drawing tasks of the processing device further includes the number of the allocated drawing tasks of the processing device;
[0188] Optionally, the second determination module 302 is specifically used to determine whether the status information of the assigned drawing tasks of the processing device meets any of the following conditions: the task amount of the assigned drawing tasks of the processing device is higher than a preset task amount threshold; or, the number of the assigned drawing tasks of the processing device is higher than a preset number threshold; if so, determine that the matching degree between the drawing task and the assigned drawing tasks of the processing device is a second matching degree; wherein the second matching degree is greater than the first matching degree; if not, determine that the matching degree between the drawing task and the assigned drawing tasks of the processing device is a third matching degree.
[0189] Optionally, the device further comprises:
[0190] The third determination module 310 is used to determine, for each processing device, when the processing device has no assigned drawing task, that the matching degree between the drawing task and the processing device is a fourth matching degree, wherein the third matching degree is greater than the fourth matching degree, and the fourth matching degree is greater than the second matching degree.
[0191] Optionally, the matching module 304 is further used to determine a matching index corresponding to the drawing task according to the matching degrees of the drawing task and the assigned drawing tasks of each processing device, before the matching module 304 determines the processing device that matches the drawing task from the processing devices according to the determined matching degrees; judge whether the matching index corresponding to the drawing task is higher than a preset index threshold; if so, determine the target processing device to which the drawing task is assigned according to the matching degrees of the drawing task and the assigned drawing tasks of each processing device; if not, adjust the assignment order of the drawing tasks.
[0192] Optionally, the matching module 304 is specifically configured to use the processing devices with a matching degree higher than a matching degree threshold as processing devices matching the drawing task;
[0193] Optionally, the drawing task allocation module 306 is specifically configured to respectively obtain the task amount of the assigned drawing tasks of each processing device matching the drawing task; and use the matching processing device with the smallest task amount as the target processing device for assigning the drawing task.
[0194] Optionally, the device further comprises:
[0195] The allocation result determination module 312 is specifically used to sort the drawing tasks several times to obtain task queues with different sorting orders; for each task queue, traverse the drawing tasks in the task queue in turn according to the sorting order of the drawing tasks in the task queue, and allocate the drawing tasks to the processing devices; when the drawing tasks are allocated, for each processing device, among the roads to be drawn associated with the allocated drawing tasks of the processing device, only the roads to be drawn that have an associated relationship with the allocated drawing tasks of the processing device are used as the target roads to be drawn of the processing device, and the target roads to be drawn of the processing device are allocated to the processing device; determine the allocation result of the task queue according to the allocated drawing tasks of the processing devices and the allocated roads to be drawn; determine the variance of the allocation result corresponding to the task queue according to the allocation result corresponding to the task queue; determine the allocation result of the target task queue according to the variance of the allocation results corresponding to the task queues, and allocate the drawing tasks and the roads to be drawn associated with the drawing tasks to the processing devices according to the allocation result of the target task queue.
[0196] This specification also provides a computer-readable storage medium, which stores a computer program, which can be used to execute the above Figure 2 Provides a task allocation method.
[0197] This manual also provides Figure 6 The schematic structure diagram of the electronic device shown in FIG. Figure 6 As mentioned above, at the hardware level, the electronic device includes a processor, an internal bus, a network interface, a memory, and a non-volatile memory, and may also include other hardware required for the business. The processor reads the corresponding computer program from the non-volatile memory into the memory and then runs it to achieve the above Figure 2 Of course, in addition to the software implementation, this specification does not exclude other implementations, such as logic devices or a combination of software and hardware, etc., that is, the execution subject of the following processing flow is not limited to each logic unit, but can also be hardware or logic devices.
[0198] In the 1990s, improvements to a technology could be clearly distinguished as hardware improvements (for example, improvements to the circuit structure of diodes, transistors, switches, etc.) or software improvements (improvements to the method flow). However, with the development of technology, many improvements to the method flow today can be regarded as direct improvements to the hardware circuit structure. Designers almost always obtain the corresponding hardware circuit structure by programming the improved method flow into the hardware circuit. Therefore, it cannot be said that an improvement in a method flow cannot be implemented using a hardware entity module. For example, a programmable logic device (PLD) (such as a field programmable gate array (FPGA)) is such an integrated circuit whose logical function is determined by the user's programming of the device. Designers can "integrate" a digital system on a PLD by programming it themselves, without having to ask a chip manufacturer to design and produce a dedicated integrated circuit chip. Moreover, nowadays, instead of manually making integrated circuit chips, this kind of programming is mostly implemented by "logic compiler" software, which is similar to the software compiler used when developing and writing programs, and the original code before compilation must also be written in a specific programming language, which is called hardware description language (HDL). There is not only one HDL, but many kinds, such as ABEL (Advanced Boolean Expression Language), AHDL (Altera Hardware Description Language), Confluence, CUPL (Cornell University Programming Language), HDCal, JHDL (Java Hardware Description Language), Lava, Lola, MyHDL, PALASM, RHDL (Ruby Hardware Description Language), etc. The most commonly used ones are VHDL (Very-High-Speed Integrated Circuit Hardware Description Language) and Verilog. Those skilled in the art should also know that it is only necessary to program the method flow slightly in the above-mentioned hardware description languages and program it into the integrated circuit, and then it is easy to obtain the hardware circuit that implements the logic method flow.
[0199] The controller can be implemented in any appropriate manner, for example, the controller can take the form of a microprocessor or processor and a computer-readable medium storing a computer-readable program code (such as software or firmware) that can be executed by the (micro)processor, a logic gate, a switch, an application-specific integrated circuit (ASIC), a programmable logic controller, and an embedded microcontroller. Examples of controllers include, but are not limited to, the following microcontrollers: ARC 625D, Atmel AT91SAM, Microchip PIC18F26K20, and Silicone Labs C8051F320. The memory controller can also be implemented as part of the control logic of the memory. Those skilled in the art also know that in addition to implementing the controller in a purely computer-readable program code manner, the controller can be implemented in the form of a logic gate, a switch, an application-specific integrated circuit, a programmable logic controller, and an embedded microcontroller by logically programming the method steps. Therefore, this controller can be considered as a hardware component, and the devices included therein for implementing various functions can also be regarded as structures within the hardware component. Or even, the devices for implementing various functions can be regarded as both software modules for implementing the method and structures within the hardware component.
[0200] The systems, devices, modules or units described in the above embodiments may be implemented by computer chips or entities, or by products with certain functions. A typical implementation device is a computer. Specifically, the computer may be, for example, a personal computer, a laptop computer, a cellular phone, a camera phone, a smart phone, a personal digital assistant, a media player, a navigation device, an email device, a game console, a tablet computer, a wearable device, or a combination of any of these devices.
[0201] For the convenience of description, the above device is described in various units according to their functions. Of course, when implementing this specification, the functions of each unit can be implemented in the same or multiple software and / or hardware.
[0202] Those skilled in the art will appreciate that embodiments of the present invention may be provided as methods, systems, or computer program products. Therefore, the present invention may take the form of a complete hardware embodiment, a complete software embodiment, or an embodiment combining software and hardware. Moreover, the present invention may take the form of a computer program product implemented on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code.
[0203] The present invention is described with reference to the flowchart and / or block diagram of the method, device (system), and computer program product according to the embodiment of the present invention. It should be understood that each process and / or box in the flowchart and / or block diagram, as well as the combination of the process and / or box in the flowchart and / or block diagram can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, an embedded processor or other programmable data processing device to produce a machine, so that the instructions executed by the processor of the computer or other programmable data processing device produce a device for implementing the functions specified in one or more processes in the flowchart and / or one or more boxes in the block diagram.
[0204] These computer program instructions may also be stored in a computer-readable memory that can direct a computer or other programmable data processing device to work in a specific manner, so that the instructions stored in the computer-readable memory produce a manufactured product including an instruction device that implements the functions specified in one or more processes in the flowchart and / or one or more boxes in the block diagram.
[0205] These computer program instructions may also be loaded onto a computer or other programmable data processing device so that a series of operational steps are executed on the computer or other programmable device to produce a computer-implemented process, whereby the instructions executed on the computer or other programmable device provide steps for implementing the functions specified in one or more processes in the flowchart and / or one or more boxes in the block diagram.
[0206] In a typical configuration, a computing device includes one or more processors (CPU), input / output interfaces, network interfaces, and memory.
[0207] The memory may include non-permanent storage in a computer-readable medium, random access memory (RAM) and / or non-volatile memory in the form of read-only memory (ROM) or flash RAM. The memory is an example of a computer-readable medium.
[0208] Computer readable media include permanent and non-permanent, removable and non-removable media that can be implemented by any method or technology to store information. Information can be computer readable instructions, data structures, program modules or other data. Examples of computer storage media include, but are not limited to, phase change memory (PRAM), static random access memory (SRAM), dynamic random access memory (DRAM), other types of random access memory (RAM), read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), flash memory or other memory technology, compact disk read-only memory (CD-ROM), digital versatile disk (DVD) or other optical storage, magnetic cassettes, magnetic tape magnetic disk storage or other magnetic storage devices or any other non-transmission media that can be used to store information that can be accessed by a computing device. As defined herein, computer readable media does not include temporary computer readable media (transitory media), such as modulated data signals and carrier waves.
[0209] It should also be noted that the terms "include", "comprises" or any other variations thereof are intended to cover non-exclusive inclusion, so that a process, method, commodity or device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, commodity or device. In the absence of more restrictions, the elements defined by the sentence "comprises a ..." do not exclude the existence of other identical elements in the process, method, commodity or device including the elements.
[0210] It will be appreciated by those skilled in the art that the embodiments of this specification may be provided as methods, systems or computer program products. Therefore, this specification may take the form of a complete hardware embodiment, a complete software embodiment or an embodiment combining software and hardware. Moreover, this specification may take the form of a computer program product implemented on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code.
[0211] This specification may be described in the general context of computer-executable instructions executed by a computer, such as program modules. Generally, program modules include routines, programs, objects, components, data structures, etc. that perform specific tasks or implement specific abstract data types. This specification may also be practiced in distributed computing environments where tasks are performed by remote processing devices connected through a communication network. In a distributed computing environment, program modules may be located in local and remote computer storage media, including storage devices.
[0212] Each embodiment in this specification is described in a progressive manner, and the same or similar parts between the embodiments can be referred to each other, and each embodiment focuses on the differences from other embodiments. In particular, for the system embodiment, since it is basically similar to the method embodiment, the description is relatively simple, and the relevant parts can be referred to the partial description of the method embodiment.
[0213] The above description is only an embodiment of the present specification and is not intended to limit the present specification. For those skilled in the art, the present specification may have various changes and variations. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present specification shall be included in the scope of the claims of the present specification.
Claims
1. A task allocation method, characterized in that: include: Determine the drawing tasks corresponding to each to-be-drawn intersection in the to-be-drawn map, and the to-be-drawn roads associated with each drawing task; For each drawing task, determining the matching degree between the drawing task and the assigned drawing tasks of each processing device according to the to-be-drawn road associated with the drawing task and the to-be-drawn road associated with the assigned drawing tasks of each processing device; Determining a processing device matching the drawing task from among the processing devices according to the determined matching degrees; Determine the target processing device for assigning the drawing task according to the task amount of the assigned drawing task of the matched processing device, and update the assigned drawing task of the target processing device according to the drawing task; Sorting each drawing task several times to obtain task queues with different sorting orders; For each task queue, traverse the drawing tasks in the task queue in sequence according to the sorting order of the drawing tasks in the task queue, and assign the drawing tasks to the processing devices; When all drawing tasks are assigned, for each processing device, a road to be drawn that is associated with the assigned drawing task of the processing device is assigned to the processing device as a target road to be drawn of the processing device and is assigned to the processing device; Determine the allocation result of the task queue according to the allocated drawing tasks of each processing device and the allocated roads to be drawn; Determine the variance of the allocation result corresponding to the task queue according to the allocation result corresponding to the task queue; Determining the allocation result of the target task queue according to the variance of the allocation results corresponding to the task queues, and respectively allocating the drawing tasks and the to-be-drawn roads associated with the drawing tasks to the processing devices according to the allocation result of the target task queue; When all drawing tasks are assigned, the roads to be drawn are assigned to the processing devices according to the association between the assigned drawing tasks of the processing devices and the roads to be drawn, so that the processing devices draw maps.
2. The method according to claim 1, characterized in that Before determining the drawing tasks corresponding to the intersections to be drawn in the map to be drawn, the method further includes: Acquire each driving track of the acquisition device in the map to be drawn; For each driving trajectory, determine the key points of the intersection to be drawn in the driving trajectory according to the driving direction and driving speed of each trajectory point in the driving trajectory; According to the positions of the key points of the intersections to be drawn in the driving trajectories, the intersections to be drawn in the map to be drawn are determined.
3. The method according to claim 2, characterized in that For each driving trajectory, the key points in the driving trajectory are determined according to the driving direction and driving speed of each trajectory point in the driving trajectory, specifically including: According to the driving direction of each trajectory point of the driving trajectory and the driving direction of the previous trajectory point of each trajectory point, the direction difference of each trajectory point is determined respectively; the trajectory point whose direction difference is greater than a preset difference threshold is used as the key point of the intersection to be drawn in the driving trajectory; or, among the trajectory points of the driving trajectory, the trajectory point whose driving speed is lower than a preset speed threshold is used as the key point of the intersection to be drawn.
4. The method according to claim 1, characterized in that Before determining the drawing tasks corresponding to the intersections to be drawn in the map to be drawn, the method further includes: Acquire a laser reflectivity base map of the map to be drawn, wherein the laser reflectivity base map is obtained by processing point cloud data collected by a collection device in an area corresponding to the map to be drawn; Identify each drawing element included in the laser reflectivity base map, and obtain the position of each drawing element in the laser reflectivity base map; According to the positions of the drawing elements in the laser reflectivity base map, each intersection to be drawn in the map to be drawn is determined.
5. The method according to claim 1, characterized in that According to the to-be-drawn road associated with the drawing task and the to-be-drawn road associated with the assigned drawing tasks of each processing device, determining the matching degree between the drawing task and the assigned drawing tasks of each processing device, specifically includes: For each processing device, determining whether there is a road to be drawn associated with the drawing task among the roads to be drawn associated with the drawing task assigned to the processing device; If so, determining the state information of the assigned drawing tasks of the processing device when the drawing task is assigned to the processing device, and determining the matching degree between the drawing task and the assigned drawing tasks of the processing device according to the state information of the assigned drawing tasks of the processing device; If not, it is determined that the matching degree between the drawing task and the assigned drawing tasks of the processing device is a first matching degree.
6. The method according to claim 5, characterized in that The state information of the assigned drawing tasks of the processing device includes the task amount of the assigned drawing tasks of the processing device; When determining to allocate the drawing task to the processing device, the state information of the allocated drawing task of the processing device specifically includes: Obtaining each drawing element contained in the map to be drawn and the position of each drawing element; According to the positions of the intersections to be drawn and the roads to be drawn in the map to be drawn, determining the drawing elements that fall within the intersections to be drawn and the roads to be drawn from the drawing elements included in the map to be drawn; The task amount of the assigned drawing task of the processing device is determined according to each drawing element falling within each of the to-be-drawn intersections and each of the to-be-drawn roads.
7. The method according to claim 6, characterized in that Determining the amount of the assigned drawing tasks of the processing device according to the drawing elements falling within the intersections to be drawn and the roads to be drawn, specifically includes: Determine a first task amount according to the intersections to be drawn corresponding to the assigned drawing tasks of the processing device and the drawing elements falling into the intersections to be drawn; The road to be drawn that is associated with the drawing task is used as the target road to be drawn by the processing device, wherein the road to be drawn that is associated with the drawing task has an associated relationship means that the intersection to be drawn is connected to the road to be drawn; Determining a second task amount according to the target roads to be drawn by the processing device and the drawing elements falling within the roads to be drawn; The task amount of the assigned drawing tasks of the processing device is determined according to the first task amount and the second task amount.
8. The method according to claim 6, characterized in that The state information of the allocated drawing tasks of the processing device further includes the number of the allocated drawing tasks of the processing device; Determining, according to the state information of the assigned drawing task of the processing device, the matching degree between the drawing task and the assigned drawing task of the processing device, specifically includes: Determining whether the state information of the allocated drawing tasks of the processing device satisfies any of the following conditions: the task amount of the allocated drawing tasks of the processing device is higher than a preset task amount threshold; or the number of the allocated drawing tasks of the processing device is higher than a preset number threshold; If so, determining that the matching degree between the drawing task and the assigned drawing task of the processing device is a second matching degree; wherein the second matching degree is greater than the first matching degree; If not, it is determined that the matching degree between the drawing task and the assigned drawing tasks of the processing device is a third matching degree.
9. The method according to claim 8, characterized in that The method further comprises: For each processing device, when the processing device has no assigned drawing task, it is determined that the matching degree between the drawing task and the processing device is a fourth matching degree; wherein the third matching degree is greater than the fourth matching degree, and the fourth matching degree is greater than the second matching degree.
10. The method according to claim 1, characterized in that Before determining a processing device matching the drawing task from among the processing devices according to the determined matching degrees, the method further includes: Determining a matching index corresponding to the drawing task according to the matching degree between the drawing task and the assigned drawing tasks of each processing device; Determine whether the matching index corresponding to the drawing task is higher than a preset index threshold; If yes, determine the target processing device for assigning the drawing task according to the matching degree between the drawing task and the assigned drawing tasks of each processing device; If not, adjust the allocation order of the drawing tasks.
11. The method according to claim 1, characterized in that Determining a processing device matching the drawing task from the processing devices according to the determined matching degrees specifically includes: taking the processing devices with matching degrees higher than the matching degree threshold as the processing devices matching the drawing task; Determining a target processing device for assigning the drawing task according to the task amount of the assigned drawing task of the matched processing device, specifically includes: Respectively obtain the task amount of the assigned drawing task of each processing device matching the drawing task; The matched processing device with the smallest task amount is used as the target processing device for assigning the drawing task.
12. A task allocation device, characterized in that: include: A first determination module is used to determine the drawing tasks corresponding to each to-be-drawn intersection in the to-be-drawn map, and the to-be-drawn roads associated with each drawing task; A second determination module is used to determine, for each drawing task in turn, a matching degree between the drawing task and the assigned drawing tasks of each processing device according to the to-be-drawn road associated with the drawing task and the to-be-drawn road associated with the assigned drawing tasks of each processing device; A matching module, configured to determine a processing device matching the drawing task from among the processing devices according to the determined matching degrees; A drawing task allocation module is used to determine the target processing device for the drawing task allocation according to the task amount of the allocated drawing task of the matched processing device, and update the allocated drawing task of the target processing device according to the drawing task, and sort each drawing task several times to obtain task queues with different sorting orders; For each task queue, traverse the drawing tasks in the task queue in sequence according to the sorting order of the drawing tasks in the task queue, and assign the drawing tasks to the processing devices; When all drawing tasks are assigned, for each processing device, a road to be drawn that is associated with the assigned drawing task of the processing device is assigned to the processing device as a target road to be drawn of the processing device and is assigned to the processing device; Determine the allocation result of the task queue according to the allocated drawing tasks of each processing device and the allocated roads to be drawn; Determine the variance of the allocation result corresponding to the task queue according to the allocation result corresponding to the task queue; Determining the allocation result of the target task queue according to the variance of the allocation results corresponding to the task queues, and respectively allocating the drawing tasks and the to-be-drawn roads associated with the drawing tasks to the processing devices according to the allocation result of the target task queue; The road allocation module is used to allocate the roads to be drawn to the processing devices according to the association between the allocated drawing tasks of the processing devices and the roads to be drawn when the drawing tasks are allocated, so that the processing devices can draw maps.
Citation Information
Patent Citations
Task generation method for making high-precision map
CN112883136A