Map update method, autonomous driving method, electronic device and storage medium
By calculating and updating scene images in the cloud map of autonomous driving vehicles, the problem of cloud maps inconsistent with actual scenarios is solved, and the safety of autonomous driving vehicles and map update speed is improved.
Patent Information
- Application Number
- CN202210323055.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-03-29
- Publication Date
- 2025-06-17
- Estimated Expiration
- 2042-03-29
AI Technical Summary
When autonomous vehicles drive based on cloud maps, cloud maps do not match the actual scenarios often occur, which may affect the safety of driverless vehicles.
By obtaining the current scene image and the historical scene image of the target area, the similarity between the two is calculated. When the similarity is less than the preset threshold, the historical scene image in the target map is updated according to the current scene image, thereby realizing the update of the scene image of the target area.
This method ensures that the cloud map received by the autonomous driving vehicle is consistent with the actual scene, improves the safety of the autonomous driving vehicle, and improves the speed of map update by only updating the scene images of the target area.
Smart Images

Figure CN114689036B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of autonomous driving, and particularly to a map updating method, an autonomous driving method, an electronic device, and a storage medium. Background Art
[0002] For a complete set of unmanned driving systems for engineering vehicles, high-precision and low-precision maps, as well as 2D / 3D maps for display, are indispensable. The scenarios faced by unmanned driving can be divided into closed scenarios and open road scenarios. For closed scenarios, the vehicle scenarios are relatively fixed, and the cloud control platform does not have as urgent a need for high-precision maps as in open scenarios, but still requires a high-precision map containing appropriate information.
[0003] However, in the prior art, high-precision maps are generated after a series of operations such as data collection, data processing, element recognition, and manual verification. Therefore, the update of high-precision maps also requires a complex and time-consuming process.
[0004] When an autonomous driving vehicle drives according to a cloud map, there may be a situation where the cloud map does not match the actual scenario, which may affect the safety of the unmanned vehicle. Summary of the Invention
[0005] In view of this, embodiments of the present invention provide a map updating method, an autonomous driving method, an electronic device, and a storage medium, aiming to solve the problem that when an autonomous driving vehicle drives according to a cloud map, there may be a situation where the cloud map does not match the actual scenario, which may affect the safety of the unmanned vehicle.
[0006] According to a first aspect, an embodiment of the present invention provides a map updating method, including:
[0007] Obtain a current scene image of a target area and a historical scene image of the target area in a target map;
[0008] Calculate the similarity between the current scene image and the historical scene image;
[0009] When the similarity is less than a preset similarity threshold, update the historical scene image in the target map according to the current scene image.
[0010] The map update method provided by the embodiments of the present invention obtains the current scene image of the target area, ensuring the accuracy of the obtained current scene image, and obtains the historical scene image of the target area in the target map, so that the current scene image of the target area can be compared with the historical scene image, and the similarity between the current scene image and the historical scene image is calculated, ensuring the accuracy of the calculated similarity between the current scene image and the historical scene image. When the similarity is less than the preset similarity threshold, the historical scene image in the target map is updated according to the current scene image, thereby completing the update of the scene image of the target area in the target map. It is not necessary to update the scene images of all areas in the target map, thereby improving the speed of updating the scene image of the target area. Furthermore, when the autonomous driving vehicle drives according to the cloud map, the situation where the cloud map received by the autonomous driving vehicle matches the actual scene occurs, thereby ensuring the safety of the autonomous driving vehicle.
[0011] In combination with the first aspect, in the first implementation manner of the first aspect, obtaining the current scene image of the target area includes:
[0012] Receiving scene data corresponding to at least one area, where the scene data includes a scene image;
[0013] Storing each piece of scene data into a message queue;
[0014] Filtering the target area from the message queue according to the map update heat corresponding to each area, and obtaining the current scene image of the target area.
[0015] The map update method provided by the embodiments of the present invention receives scene data corresponding to at least one area, where the scene data includes a scene image. Storing each piece of scene data into a message queue can avoid a large amount of received scene data from affecting the normal operation of the electronic device. Then, filtering the target area from the message queue according to the map update heat corresponding to each area, and obtaining the current scene image of the target area. It ensures that the filtering of the target area from the message queue is more accurate, thereby ensuring the accuracy of the obtained current scene image of the target area.
[0016] In combination with the first implementation manner of the first aspect, in the second implementation manner of the first aspect, the method further includes:
[0017] When the historical scene image in the target map is updated, updating the map update heat of the target area.
[0018] The map update method provided by the embodiments of the present invention updates the map update heat of the target area after the historical scene image in the target map is updated, ensuring the accuracy of the map update heat of the target area. Furthermore, when the electronic device filters the target area from the message queue according to the map update heat corresponding to each area, it can accurately obtain the target area.
[0019] Combined with the second implementation manner of the first aspect, in the third implementation manner of the first aspect, after updating the map update heat of the target area, the method further includes:
[0020] Determine the map update heat corresponding to each area according to the updated map update heat of the target area;
[0021] Determine the priority of each area based on the magnitude of the map update heat corresponding to each area.
[0022] The map update method provided by the embodiments of the present invention determines the map update heat corresponding to each area according to the updated map update heat of the target area, ensuring the accuracy of the map update heat corresponding to each area. Then, determine the priority of each area based on the magnitude of the map update heat corresponding to each area. Thus, the accuracy of the determined priority of each area is ensured.
[0023] Combined with the first aspect, in the fourth implementation manner of the first aspect, calculating the similarity between the current scene image and the historical scene image includes:
[0024] Extract features from the current scene image to generate a target feature vector;
[0025] Extract features from the historical scene image to generate a historical feature vector;
[0026] Calculate the similarity between the current scene image and the historical scene image based on the target feature vector and the historical feature vector.
[0027] The map update method provided by the embodiments of the present invention extracts features from the current scene image to generate a target feature vector, ensuring the accuracy of the generated target feature vector. Extract features from the historical scene image to generate a historical feature vector, ensuring the accuracy of the generated historical feature vector. Calculate the similarity between the current scene image and the historical scene image based on the target feature vector and the historical feature vector, ensuring the accuracy of the calculated similarity between the current scene image and the historical scene image.
[0028] Combined with the fourth implementation manner of the first aspect, in the fifth implementation manner of the first aspect, extracting features from the current scene image to generate a target feature vector includes:
[0029] Extract features from the current scene image to generate a target grayscale image of a preset size;
[0030] Calculate the pixel mean value of each pixel based on the pixel value of each pixel in the target grayscale image;
[0031] Generate a target feature vector according to the relationship between the pixel value and the pixel mean value of each pixel in the target grayscale image.
[0032] The map update method provided by the embodiments of the present invention extracts features from the current scene image to generate a target grayscale image of a preset size, ensuring the accuracy of the generated target grayscale image. Calculate the pixel mean value of each pixel based on the pixel value of each pixel in the target grayscale image, ensuring the accuracy of the calculated pixel mean value of each pixel. Then, generate a target feature vector according to the relationship between the pixel value and the pixel mean value of each pixel in the target grayscale image, ensuring the accuracy of the generated target feature vector.
[0033] In combination with the fifth implementation manner of the first aspect, in the sixth implementation manner of the first aspect, generating a target feature vector according to the relationship between the pixel value and the pixel mean value of each pixel in the target grayscale image includes:
[0034] When the pixel value of a pixel is greater than the pixel mean value, determine that the eigenvalue corresponding to the pixel is the first numerical value;
[0035] When the pixel value of a pixel is not greater than the pixel mean value, determine that the eigenvalue corresponding to the pixel is the second numerical value;
[0036] Expand the eigenvalues of each pixel in the target grayscale image in a preset order to generate a target feature vector.
[0037] The map update method provided by the embodiments of the present invention, when the pixel value of a pixel is greater than the pixel mean value, determines that the eigenvalue corresponding to the pixel is the first numerical value, when the pixel value of a pixel is not greater than the pixel mean value, determines that the eigenvalue corresponding to the pixel is the second numerical value, and expands the eigenvalues of each pixel in the target grayscale image in a preset order to generate a target feature vector, ensuring the accuracy of the generated target feature vector.
[0038] According to the second aspect, the embodiments of the present invention provide an automatic driving method, including:
[0039] Obtain the scene image of the target area, and the scene image is updated according to the map update method in the first aspect or any one of the implementation manners of the first aspect;
[0040] Perform automatic driving according to the scene image of the target area.
[0041] The autonomous driving method provided by the embodiment of the present invention obtains the scene image of the target area and performs autonomous driving according to the scene image of the target area, thereby ensuring that the scene image of the target area obtained by the autonomous driving vehicle conforms to the real scene, and further ensuring the safety of autonomous driving.
[0042] According to the third aspect, the embodiment of the present invention further provides a map updating device, including:
[0043] An obtaining module, configured to obtain the current scene image of the target area and the historical scene image of the target area in the target map.
[0044] A calculating module, configured to calculate the similarity between the current scene image and the historical scene image.
[0045] A first updating module, configured to update the historical scene image in the target map according to the current scene image when the similarity is less than a preset similarity threshold.
[0046] The map updating device provided by the embodiment of the present invention obtains the current scene image of the target area, ensuring the accuracy of the obtained current scene image, and obtains the historical scene image of the target area in the target map, so that the current scene image of the target area can be compared with the historical scene image, and the similarity between the current scene image and the historical scene image is calculated, ensuring the accuracy of the calculated similarity between the current scene image and the historical scene image. When the similarity is less than the preset similarity threshold, the historical scene image in the target map is updated according to the current scene image, thereby completing the update of the scene image of the target area in the target map. It is not necessary to update the scene images of all areas in the target map, thereby improving the speed of updating the scene images of the target area. Furthermore, when the autonomous driving vehicle drives according to the cloud map, the situation where the cloud map received by the autonomous driving vehicle conforms to the actual scene occurs, thereby ensuring the safety of the autonomous driving vehicle.
[0047] According to the fourth aspect, the embodiment of the present invention further provides an autonomous driving method, including:
[0048] An obtaining module, configured to obtain the scene image of the target area, and the scene image is updated according to the map updating method in the first aspect or any one of the embodiments of the first aspect;
[0049] A driving module, configured to perform autonomous driving according to the scene image of the target area.
[0050] The automatic driving device provided by the embodiment of the present invention acquires a scene image of a target area and performs automatic driving according to the scene image of the target area, thereby ensuring that the scene image of the target area obtained by the automatic driving vehicle conforms to the real scene, and further ensuring the safety of automatic driving.
[0051] According to a fifth aspect, an embodiment of the present invention provides an electronic device, including a memory and a processor, which are communicatively connected to each other. The memory stores computer instructions, and the processor executes the computer instructions to execute the map update method in the first aspect or any one of the embodiments of the first aspect and the automatic driving method in the embodiment of the second aspect.
[0052] According to a sixth aspect, an embodiment of the present invention provides a computer-readable storage medium that stores computer instructions for causing a computer to execute the map update method in the first aspect or any one of the embodiments of the first aspect and the automatic driving method in the embodiment of the second aspect. BRIEF DESCRIPTION OF THE DRAWINGS
[0053] In order to more clearly illustrate the specific embodiments of the present invention or the technical solutions in the prior art, the following will briefly introduce the drawings required for use in the description of the specific embodiments or the prior art. Obviously, the drawings in the following description are some embodiments of the present invention. For those of ordinary skill in the art, other drawings can be obtained based on these drawings without creative efforts.
[0054] Figure 1 is a framework diagram generated by the automatic driving high-precision map provided by the embodiment of the present invention;
[0055] Figure 2 is a flowchart of the automatic driving process based on a high-precision map provided by the embodiment of the present invention;
[0056] Figure 3 is a schematic diagram of georegistration of two-dimensional grid map data and actual geographical locations provided by the embodiment of the present invention;
[0057] Figure 4 is a flowchart of the map update method provided by the embodiment of the present invention;
[0058] Figure 5 is a flowchart of the map update method provided by another embodiment of the present invention;
[0059] Figure 6 is a schematic diagram of the popularity area ranking list provided by another embodiment of the present invention;
[0060] Figure 7It is a schematic flowchart of the map update method provided by another embodiment of the present invention;
[0061] Figure 8 It is a flowchart of the map update method provided by another embodiment of the present invention;
[0062] Figure 9 It is a schematic diagram of generating a target feature vector in the map update method provided by another embodiment of the present invention;
[0063] Figure 10 It is a flowchart of the map update method provided by another embodiment of the present invention;
[0064] Figure 11 It is a functional module diagram of the map update device provided by an embodiment of the present invention;
[0065] Figure 12 It is a functional module diagram of the map update device provided by an embodiment of the present invention;
[0066] Figure 13 It is a functional module diagram of the map update device provided by an embodiment of the present invention;
[0067] Figure 14 It is a functional module diagram of the autonomous driving device provided by an embodiment of the present invention;
[0068] Figure 15 It is a schematic diagram of the hardware structure of the electronic device provided by an embodiment of the present invention. Detailed implementation manners
[0069] To make the objectives, technical solutions and advantages of the embodiments of the present invention clearer, the technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings in the embodiments of the present invention. Apparently, the described embodiments are some, but not all, of the embodiments of the present invention. All other embodiments obtained by those of ordinary skill in the art based on the embodiments of the present invention without creative efforts shall fall within the protection scope of the present invention.
[0070] For a complete set of engineering vehicle driverless systems, high-precision and low-precision maps, as well as 2D / 3D maps for display, are indispensable. The scenarios faced by driverless vehicles can be divided into closed scenarios and open road scenarios. For closed scenarios, the vehicle scenarios are relatively fixed, and the cloud control platform does not have as urgent a need for high-precision maps as in open scenarios, but still requires a high-precision map containing appropriate information. However, the accuracy of existing third-party maps cannot meet the lane-level engineering vehicle scheduling and planning requirements, and the maps obtained through high-precision sensors such as lidar contain a large amount of redundant information. For cloud vehicle scheduling, a map that can only contain the coordinates of path points and their mutual relationships is obviously very important.
[0071] Therefore, as Figure 1 shown in the framework diagram of the generation of high-precision maps for autonomous driving and Figure 2 shown in the flow chart of the autonomous driving process based on high-precision maps, it can be seen that the current electronic device can obtain the laser point cloud data of the road scene, convert the laser point cloud data into two-dimensional grid map data, perform georegistration on the two-dimensional grid map data and the actual geographical location, and generate the registered map data. Then, the electronic device uses acrMap to vectorize the registered map data and extract information such as topological points, lane lines, and lane surfaces in the map data. Exemplarily, as Figure 3 shown. Then, the map is persisted to the spatial database through the map microservice to provide spatial queries. The front end interacts with the map microservice in a lightweight geojson format and uses openlayers for front-end layer-based display. The vehicle scheduling service queries the mysql spatial database through the nine-intersection model to judge the spatial relationship and issue scheduling tasks, thus solving the problem that the accuracy of existing third-party maps cannot meet the lane-level engineering vehicle scheduling and planning requirements, and the maps obtained through high-precision sensors such as lidar contain a large amount of redundant information.
[0072] However, after obtaining the cloud map suitable for autonomous driving by solving the above problems, since the cloud map cannot quickly change the map information according to the actual scenario, when the autonomous driving vehicle drives according to the cloud map, the situation where the cloud map does not match the actual scenario may occur, and thus the safety of the driverless vehicle may be affected.
[0073] Based on this, the embodiments of the present application provide a map update method, an autonomous driving method, an electronic device, and a storage medium, aiming to solve the problem that when the autonomous driving vehicle drives according to the cloud map, the situation where the cloud map does not match the actual scenario may occur, and thus the safety of the driverless vehicle may be affected.
[0074] It should be noted that for the map update method provided in the embodiments of the present application, the execution subject can be a map update device, and the map update device can be implemented as part or all of a computer device through software, hardware, or a combination of software and hardware. Among them, the computer device can be a server or a terminal, and can also be a control component of an engineering vehicle. Among them, the server in the embodiments of the present application can be a single server or a server cluster composed of multiple servers. The terminal in the embodiments of the present application can be other intelligent hardware devices such as a smart phone, a personal computer, a tablet computer, a wearable device, and a smart robot. In the following method embodiments, the execution subject is taken as an electronic device for illustration.
[0075] In an embodiment of the present application, as Figure 4 shown, a map update method is provided. Taking this method applied to an electronic device as an example for illustration, the method includes the following steps:
[0076] S11. Obtain the current scene image of the target area and the historical scene image of the target area in the target map.
[0077] In an alternative embodiment of the present application, the electronic device can obtain the current scene image of the target area through its own acquisition device, and then query the historical scene image of the target area in the target map in the database.
[0078] In another alternative embodiment of the present application, the electronic device can receive the current scene image of the target area and the historical scene image of the target area in the target map sent by other devices. Among them, the other devices can be data collection vehicles or drones, etc.
[0079] S12. Calculate the similarity between the current scene image and the historical scene image.
[0080] In an alternative embodiment of the present application, the electronic device can calculate the histograms of the current scene image and the historical scene image respectively, and then calculate the histogram intersection distance between the two histograms, so as to calculate the similarity between the current scene image and the historical scene image according to the histogram intersection distance.
[0081] S13. When the similarity is less than a preset similarity threshold, update the historical scene image in the target map according to the current scene image.
[0082] Specifically, when the similarity is less than the preset similarity threshold, it is determined that the current scene image has changed compared with the historical scene image. Then, the electronic device updates the historical scene image in the target map according to the current scene image, so as to realize the update of the target map.
[0083] The map update method provided by the embodiment of the present invention obtains the current scene image of the target area, ensuring the accuracy of the obtained current scene image, and obtains the historical scene image of the target area in the target map, so that the current scene image of the target area can be compared with the historical scene image, and the similarity between the current scene image and the historical scene image is calculated, ensuring the accuracy of the calculated similarity between the current scene image and the historical scene image. When the similarity is less than the preset similarity threshold, the historical scene image in the target map is updated according to the current scene image, thus completing the update of the scene image of the target area in the target map. It is not necessary to update the scene images of all areas in the target map, thereby improving the speed of updating the scene image of the target area. Furthermore, when the autonomous driving vehicle drives according to the cloud map, the situation where the cloud map received by the autonomous driving vehicle conforms to the actual scene occurs, thus ensuring the safety of the autonomous driving vehicle.
[0084] In an embodiment of the present application, as Figure 5 shown, a map update method is provided. Taking the application of this method to an electronic device as an example, the method includes the following steps:
[0085] S21. Obtain the current scene image of the target area and the historical scene image of the target area in the target map.
[0086] In an optional implementation manner of the present application, "obtaining the current scene image of the target area" in the above S21 may include the following steps:
[0087] S211. Receive the scene data corresponding to at least one area.
[0088] Among them, the scene data includes scene images.
[0089] Specifically, terminal devices such as data collection vehicles or drones are converted into the mqtt protocol through a mapper, and the scene data corresponding to at least one area collected in real time is reported to the electronic device, so that the electronic device receives the scene data corresponding to at least one area.
[0090] Optionally, the scene data may include scene images and the area location corresponding to the scene data. The scene images may include the targets detected in the scene data, such as vehicles, buildings, people, animals, etc. The scene data may also include information such as the geometric position and attributes of the targets, as well as the device ID for collecting the scene data.
[0091] S212. Store each scene data in the message queue.
[0092] Specifically, to avoid a large amount of received scene data that may affect the normal operation of the electronic device, the electronic device can store the received scene data in a message queue according to the time sequence.
[0093] S213. Update the heat of each area's corresponding map, filter the target area from the message queue, and obtain the current scene image of the target area.
[0094] Specifically, the electronic device can determine the map update heat corresponding to each area according to the areas corresponding to the respective scene data stored in the message queue. Then, according to the map update heat corresponding to each area, filter the target area with a relatively large map update heat from the message queue, and obtain the current scene image of the target area.
[0095] In another optional implementation manner of the present application, the electronic device can also seal the scene data corresponding to the area with a relatively small map update heat, thereby reducing the workload of the electronic device and enabling the electronic device to pay more attention to the scene data corresponding to the area with a relatively large map update heat.
[0096] S22. Calculate the similarity between the current scene image and the historical scene image.
[0097] For this step, please refer to Figure 4 the introduction of S12, and details will not be elaborated here.
[0098] S23. When the similarity is less than the preset similarity threshold, update the historical scene image in the target map according to the current scene image.
[0099] For this step, please refer to Figure 4 the introduction of S13, and details will not be elaborated here.
[0100] S24. When the historical scene image in the target map is updated, update the map update heat of the target area.
[0101] Specifically, when the historical scene image in the target map is updated, the electronic device can update the map update heat of the target area.
[0102] Exemplarily, assume that before updating the historical scene image in the target map, the map update heat of the target area is 50. After this update of the historical scene image in the target map, the map update heat of the target area +1, that is, the current map update heat of the target area is 51.
[0103] S25. Determine the map update heat corresponding to each area according to the updated map update heat of the target area.
[0104] Specifically, after updating the map update heat of the target area, the electronic device determines the map update heat corresponding to each area according to the updated map update heat of the target area.
[0105] In an alternative embodiment, the electronic device can sort the map update heat of each area through the redis zset data structure according to the updated map update heat of the target area, and generate a heat area leaderboard corresponding to the map update heat of each area, so as to determine the map update heat corresponding to each area.
[0106] S26. Determine the priority of each area based on the magnitude of the map update heat corresponding to each area.
[0107] Specifically, after the map update heat corresponding to each area, the electronic device can determine the priority of each area based on the magnitude of the map update heat corresponding to each area. Among them, the area with a larger map update heat has a higher priority, and the area with a smaller map update heat has a lower priority. That is to say, the electronic device will preferentially select the area with a larger map update heat to update the map corresponding to that area.
[0108] In an alternative embodiment of the present application, after generating the heat area leaderboard corresponding to the map update heat of each area, the electronic device can determine the areas with the top preset data volume N on the leaderboard as heat areas and generate a heat area list. Thus, when the electronic device filters the target area from the message queue according to the map update heat corresponding to each area, it can directly filter the target area from the message queue according to each area included in the heat area list. Thus, it can be realized that the electronic device often processes 20% of the areas in 80% of the actual business time. That is to say, it can be realized that the electronic device spends less business processing time processing the frequently changing heat areas in the top preset data volume on the leaderboard. Therefore, according to the business requirements, the target map update does not need to update all areas, but needs to dynamically pay attention to the most recently and frequently updated areas. The data structure for implementing area topN can use methods such as java treemap. When in a cloud native environment, since the expanded services are not necessarily on the same physical machine, data consistency problems will occur. Therefore, redis is used. Redis is an in-memory database that can implement distributed locks to solve data consistency problems. As Figure 6 shown, the heat area leaderboard is implemented through the redis zset data structure, the preset quantity N is changed according to the map update heat of each area, the websocket push time is shortened, and the map is updated quickly.
[0109] The map update method provided by the embodiments of the present invention receives scene data corresponding to at least one area, and the scene data includes scene images. Store each piece of scene data into the message queue, so as to avoid the large amount of received scene data affecting the normal operation of the electronic device. Then, according to the map update heat corresponding to each area, screen the target area from the message queue, and obtain the current scene image of the target area. This ensures that the screening of the target area from the message queue is more accurate, and thus ensures the accuracy of the current scene image of the obtained target area.
[0110] In addition, when the historical scene image in the target map is updated, update the map update heat of the target area, which ensures the accuracy of the map update heat of the target area. Furthermore, when the electronic device screens the target area from the message queue according to the map update heat corresponding to each area, it can accurately obtain the target area. Determine the map update heat corresponding to each area according to the updated map update heat of the target area, which ensures the accuracy of the map update heat corresponding to each area. Then, determine the priority of each area based on the magnitude of the map update heat corresponding to each area. This ensures the accuracy of the determined priority of each area.
[0111] To more clearly illustrate the map update method in the embodiments of the present application, as Figure 7 shown is a schematic flowchart of a map update method provided by the embodiments of the present application. As Figure 7 shown, various terminal devices such as handheld terminals, drones, and vehicles are converted into the MQTT protocol through a mapper and report the real-time detected scene data to the electronic device. The electronic device stores the received scene data in the message queue according to the time sequence. The electronic device pulls messages from the message queue, passes through the INPUT and OUTPUT rule chains, screens the target area, and obtains the current scene image corresponding to the target area. Then, the electronic device quickly compares the Hamming distance between the current scene image and the historical scene image through the mean hash algorithm. When the distance is higher than a certain threshold, it is determined that the similarity between the current scene image and the historical scene image is low, and the electronic device calls the microservice interface to update the map features corresponding to the target area.
[0112] It should be noted that when the electronic device calls the microservice interface to update the map features corresponding to the target area, the electronic device also needs to update the map update heat corresponding to the target area. Then, update the hot area leaderboard corresponding to each area according to the map update heat. Then, update the INPUT rule chain according to the hot area leaderboard. Thus, it is possible to support dynamically adding rules in INPUT and OUTPUT to screen the target area. The electronic device is deployed in the HPA cloud native manner and can automatically scale horizontally according to the host CPU / memory to maximize resource utilization.
[0113] In one embodiment of the present application, as Figure 8 shown, a map update method is provided. Taking the application of this method to an electronic device as an example, it includes the following steps:
[0114] S31. Obtain the current scene image of the target area and the historical scene image of the target area in the target map.
[0115] S32. Calculate the similarity between the current scene image and the historical scene image.
[0116] In an alternative embodiment of the present application, the above S32 "calculate the similarity between the current scene image and the historical scene image" may include the following steps:
[0117] S321. Extract features from the current scene image to generate a target feature vector.
[0118] In an alternative embodiment of the present application, the above S321 "extract features from the current scene image to generate a target feature vector" may include the following steps:
[0119] (1) Extract features from the current scene image to generate a target grayscale image of a preset size.
[0120] (2) Calculate the pixel mean value of each pixel according to the pixel values of each pixel in the target grayscale image.
[0121] (3) Generate a target feature vector according to the relationship between the pixel values of each pixel in the target grayscale image and the pixel mean value.
[0122] Specifically, the electronic device can extract features from the current scene image, and then generate a target grayscale image of a preset size according to the extracted features. The electronic device obtains the pixel values of each pixel in the target grayscale image, and then adds up the pixel values of each pixel in the target grayscale image and divides by the number of pixels to calculate the pixel mean value of each pixel.
[0123] The electronic device compares the pixel values of each pixel in the target grayscale image with the pixel mean value, and generates a target feature vector according to the comparison result.
[0124] In an alternative embodiment of the present application, the above (3) "generate a target feature vector according to the relationship between the pixel values of each pixel in the target grayscale image and the pixel mean value" may include the following steps:
[0125] (31) When the pixel value of a pixel is greater than the pixel mean value, determine that the feature value corresponding to the pixel is the first numerical value;
[0126] (32) When the pixel value of a pixel is not greater than the pixel mean value, determine that the eigenvalue corresponding to the pixel is the second value;
[0127] (33) Expand the eigenvalues of each pixel in the target grayscale image in a preset order to generate a target feature vector.
[0128] Specifically, when the pixel value of a pixel is greater than the pixel mean value, determine that the eigenvalue corresponding to the pixel is the first value. The first value can be 1 or other values. When the pixel value of a pixel is not greater than the pixel mean value, determine that the eigenvalue corresponding to the pixel is the second value. The second value can be 0 or other values. This application does not make specific limitations on the first value and the second value, but the first value and the second value are different values.
[0129] Then, the electronic device expands the eigenvalues of each pixel in the target grayscale image in a row-by-row order to generate a target feature vector.
[0130] Exemplarily, as Figure 9 shown, the electronic device performs feature extraction on the current scene image to generate an 8*8 target grayscale image, masking the difference in image size. Then, according to the pixel values of each pixel in the target grayscale image, calculate the pixel mean value of each pixel. When the pixel value of a pixel is greater than the pixel mean value, determine that the eigenvalue corresponding to the pixel is 1. When the pixel value of a pixel is not greater than the pixel mean value, determine that the eigenvalue corresponding to the pixel is 0. The electronic device expands the eigenvalues of each pixel in the target grayscale image in a row-by-row order to generate a target feature vector, that is, the picture fingerprint.
[0131] S322. Perform feature extraction on the historical scene image to generate a historical feature vector.
[0132] Specifically, the electronic device can perform feature extraction on the historical scene image, and then generate a historical grayscale image of a preset size according to the extracted features. The electronic device obtains the pixel values of each pixel in the historical grayscale image, then adds up the pixel values of each pixel in the historical grayscale image, and then divides by the number of pixels to calculate the pixel mean value of each pixel in the historical grayscale image.
[0133] When the pixel value of a pixel in the historical grayscale image is greater than the pixel mean value, determine that the eigenvalue corresponding to the pixel is the first value. The first value can be 1 or other values. When the pixel value of a pixel in the historical grayscale image is not greater than the pixel mean value, determine that the eigenvalue corresponding to the pixel is the second value. The second value can be 0 or other values. This application does not make specific limitations on the first value and the second value, but the first value and the second value are different values. Then, the electronic device expands the eigenvalues of each pixel in the historical grayscale image in a row-by-row order to generate a historical feature vector.
[0134] S323. Calculate the similarity between the current scene image and the historical scene image based on the target feature vector and the historical feature vector.
[0135] Specifically, the electronic device calculates the Hamming distance based on the target feature vector and the historical feature vector, and determines the similarity between the current scene image and the historical scene image according to the Hamming distance.
[0136] Specifically, when the Hamming distance is greater than the preset distance threshold, it is determined that the similarity between the current scene image and the historical scene image is less than the preset similarity threshold; when the Hamming distance is not greater than the preset distance threshold, it is determined that the similarity between the current scene image and the historical scene image is not less than the preset similarity threshold.
[0137] S33. When the similarity is less than the preset similarity threshold, update the historical scene image in the target map according to the current scene image.
[0138] For details of this step, please refer to Figure 2 the introduction of S23, which will not be elaborated here.
[0139] The map update method provided by the embodiment of the present invention extracts features from the current scene image to generate a target grayscale image with a preset size, ensuring the accuracy of the generated target grayscale image. According to the pixel values of each pixel in the target grayscale image, calculate the pixel mean value of each pixel, ensuring the accuracy of the calculated pixel mean value of each pixel. When the pixel value of a pixel is greater than the pixel mean value, determine that the feature value corresponding to the pixel is the first value, and when the pixel value of the pixel is not greater than the pixel mean value, determine that the feature value corresponding to the pixel is the second value. Expand the feature values of each pixel in the target grayscale image in a preset order to generate a target feature vector, ensuring the accuracy of the generated target feature vector. Extract features from the historical scene image to generate a historical feature vector, ensuring the accuracy of the generated historical feature vector. Calculate the similarity between the current scene image and the historical scene image based on the target feature vector and the historical feature vector, ensuring the accuracy of the calculated similarity between the current scene image and the historical scene image.
[0140] It should be noted that for the method of autonomous driving provided by the embodiments of the present application, the execution subject may be an autonomous driving device, and the autonomous driving device can be implemented as a part or all of an engineering vehicle through software, hardware, or a combination of software and hardware. In the following method embodiments, the execution subject is an engineering vehicle as an example for illustration.
[0141] In an embodiment of the present application, as Figure 10As shown, an autonomous driving method is provided. Taking the application of this method to engineering vehicles as an example, it includes the following steps:
[0142] S41. Obtain the scene image of the target area.
[0143] Among them, the scene image is updated according to any one of the map update methods in the above embodiments.
[0144] Specifically, the electronic device can, through the map microservice, push the updated scene image of the target area to the vehicle terminal and user interface of the engineering vehicle in real time via websocket, reducing the pressure on the server. Thus, the engineering vehicle can obtain the scene image of the target area.
[0145] S42. Perform autonomous driving according to the scene image of the target area.
[0146] Specifically, the engineering vehicle performs autonomous driving according to the scene image of the target area.
[0147] The autonomous driving method provided by the embodiment of the present invention obtains the scene image of the target area and performs autonomous driving according to the scene image of the target area, thereby ensuring that the scene image of the target area obtained by the autonomous driving vehicle conforms to the real scene, and further ensuring the safety of autonomous driving.
[0148] It should be understood that although Figure 4 、 Figure 5 、 Figure 8 and Figure 10 in the flowchart of each step are shown in sequence according to the arrow indication, but these steps are not necessarily executed in the order indicated by the arrow. Unless there is a clear description in this article, the execution of these steps has no strict order limit, and these steps can be executed in other orders. Moreover, Figure 4 、 Figure 5 、 Figure 8 and Figure 10 at least a part of the steps in can include multiple steps or multiple stages. These steps or stages are not necessarily executed at the same moment, but can be executed at different moments. The execution order of these steps or stages is not necessarily sequential either, but can be executed alternately or in turn with at least a part of the steps or stages in other steps or other steps.
[0149] As Figure 11 shown, this embodiment provides a map update device, including:
[0150] An acquisition module 51, configured to acquire the current scene image of the target area and the historical scene image of the target area in the target map.
[0151] A calculation module 52, configured to calculate the similarity between the current scene image and the historical scene image.
[0152] A first update module 53, configured to update the historical scene image in the target map according to the current scene image when the similarity is less than a preset similarity threshold.
[0153] In an embodiment of the present application, the above-mentioned acquisition module 51 is specifically configured to receive scene data corresponding to at least one area, where the scene data includes a scene image; store each scene data in a message queue; and screen a target area from the message queue according to the map update heat corresponding to each area, and obtain the current scene image of the target area.
[0154] In an embodiment of the present application, as Figure 12 shown, the above-mentioned map update device further includes:
[0155] A second update module 54, configured to update the map update heat of the target area when the historical scene image in the target map is updated.
[0156] In an embodiment of the present application, as Figure 13 shown, the above-mentioned map update device further includes:
[0157] A first determination module 55, configured to update the map update heat of the target area when the historical scene image in the target map is updated.
[0158] A second determination module 56, configured to determine the priority of each area based on the magnitude of the map update heat corresponding to each area.
[0159] In an embodiment of the present application, the above-mentioned calculation module 52 is specifically configured to perform feature extraction on the current scene image to generate a target feature vector; perform feature extraction on the historical scene image to generate a historical feature vector; and calculate the similarity between the current scene image and the historical scene image based on the target feature vector and the historical feature vector.
[0160] In an embodiment of the present application, the above-mentioned calculation module 52 is specifically configured to perform feature extraction on the current scene image to generate a target grayscale image with a preset size; calculate the pixel mean value of each pixel according to the pixel value of each pixel in the target grayscale image; and generate a target feature vector according to the relationship between the pixel value of each pixel in the target grayscale image and the pixel mean value.
[0161] In an embodiment of the present application, the above-mentioned calculation module 52 is specifically configured to determine that the eigenvalue corresponding to a pixel is a first value when the pixel value of the pixel is greater than the pixel mean value; determine that the eigenvalue corresponding to the pixel is a second value when the pixel value of the pixel is not greater than the pixel mean value; and expand the eigenvalues of each pixel in the target grayscale image in a preset order to generate a target eigenvector.
[0162] As Figure 14 shown, this embodiment provides an automatic driving device, including:
[0163] An acquisition module 61, configured to acquire a scene image of a target area, where the scene image is updated according to the map update method in the first aspect or any one of the embodiments of the first aspect;
[0164] A driving module 62, configured to perform automatic driving according to the scene image of the target area.
[0165] For the specific limitations and beneficial effects of the map update device and the automatic driving device, reference can be made to the limitations of the map update method and the automatic driving method in the above text, which will not be elaborated here. Each module in the above map update device and automatic driving device can be implemented in whole or in part by software, hardware, and their combination. The above-mentioned modules can be embedded in or independent of the processor in the electronic device in the form of hardware, or stored in the memory in the electronic device in the form of software, so as to facilitate the processor to call and execute the operations corresponding to the above-mentioned modules.
[0166] An embodiment of the present invention further provides an electronic device having the above-mentioned map update device.
[0167] As Figure 15 shown, Figure 15 is a schematic structural diagram of an electronic device provided by an optional embodiment of the present invention. As Figure 15 shown, the electronic device may include: at least one processor 71, such as a CPU (Central Processing Unit, central processor), at least one communication interface 73, a memory 74, and at least one communication bus 72. Among them, the communication bus 72 is used to realize the connection communication between these components. Among them, the communication interface 73 may include a display screen (Display) and a keyboard (Keyboard). Optionally, the communication interface 73 may further include a standard wired interface and a wireless interface. The memory 74 may be a high-speed RAM memory (Random Access Memory, volatile random access memory), or a non-volatile memory, such as at least one disk memory. Optionally, the memory 74 may further be at least one storage device located far from the aforementioned processor 71. Among them, the processor 71 may be combinedFigures 11 - 13 In the described device, an application program is stored in the memory 74, and the processor 71 calls the program code stored in the memory 74 to execute any of the above method steps.
[0168] Among them, the communication bus 72 can be a Peripheral Component Interconnect (PCI) bus, an Extended Industry Standard Architecture (EISA) bus, etc. The communication bus 72 can be divided into an address bus, a data bus, a control bus, etc. For the sake of convenience of representation, Figure 15 only a thick line is used to represent it in the figure, but it does not mean that there is only one bus or one type of bus.
[0169] Among them, the memory 74 can include volatile memory, such as random-access memory (RAM); the memory can also include non-volatile memory, such as flash memory, a hard disk drive (HDD) or a solid-state drive (SSD); the memory 74 can also include a combination of the above types of memories.
[0170] Among them, the processor 71 can be a central processing unit (CPU), a network processor (NP), or a combination of a CPU and an NP.
[0171] Among them, the processor 71 can further include a hardware chip. The above hardware chip can be an application-specific integrated circuit (ASIC), a programmable logic device (PLD), or a combination thereof. The above PLD can be a complex programmable logic device (CPLD), a field-programmable gate array (FPGA), a generic array logic (GAL), or any combination thereof.
[0172] Optionally, the memory 74 is further configured to store program instructions. The processor 71 may invoke the program instructions to implement the map update method as shown in the embodiments of the present application Figure 4 , Figure 5 and Figure 8 the map update method shown in the embodiments.
[0173] An embodiment of the present application further provides an engineering vehicle, which includes a vehicle body and a controller. The vehicle body is connected to the controller, and the controller is configured to acquire a scene image of a target area and perform autonomous driving according to the scene image of the target area.
[0174] An embodiment of the present invention further provides a non-transitory computer storage medium storing computer-executable instructions that can execute the map update method and the autonomous driving method in any of the above method embodiments. Wherein, the storage medium may be a magnetic disk, an optical disk, a read-only memory (ROM), a random access memory (RAM), a flash memory, a hard disk drive (HDD), or a solid-state drive (SSD), etc.; the storage medium may also include a combination of the above types of memories.
[0175] Although the embodiments of the present invention have been described in conjunction with the accompanying drawings, those skilled in the art can make various modifications and variations without departing from the spirit and scope of the present invention, and such modifications and variations fall within the scope defined by the appended claims.
Claims
1. A method for map update, characterized in that, Including: Obtain the current scene image of the target area and the historical scene image of the target area in the target map; Calculate the similarity between the current scene image and the historical scene image; When the similarity is less than the preset similarity threshold, update the historical scene image in the target map according to the current scene image; Wherein, the obtaining the current scene image of the target area includes: Receive the scene data corresponding to at least one area, and the scene data includes a scene image; Store each piece of the scene data into a message queue; Filter the target area from the message queue according to the map update heat corresponding to each area, and obtain the current scene image of the target area; Wherein, the method further includes: When the historical scene image in the target map is updated, update the map update heat of the target area; Wherein, after updating the map update heat of the target area, the method further includes: Determine the map update heat corresponding to each area according to the updated map update heat of the target area; Determine the priority of each area based on the magnitude of the map update heat corresponding to each area; Wherein, the determining the map update heat corresponding to each area according to the updated map update heat of the target area includes: According to the updated map update heat of the target area, sort the map update heat of each area through the redis zset data structure, and generate a heat area leaderboard corresponding to the map update heat of each area to determine the map update heat corresponding to each area; Wherein, the determining the priority of each area based on the magnitude of the map update heat corresponding to each area includes: Determine the areas with the top preset data volume N on the leaderboard as heat areas, and generate a heat area list, so as to filter the target area from the message queue according to each area included in the heat area list; Wherein, the calculating the similarity between the current scene image and the historical scene image includes: Extract features from the current scene image to generate a target feature vector; Extract features from the historical scene image to generate a historical feature vector; Calculate the similarity between the current scene image and the historical scene image based on the target feature vector and the historical feature vector; Wherein, the extracting features from the current scene image to generate a target feature vector includes: Extract features from the current scene image to generate a target grayscale image of a preset size; Calculate the pixel mean value of each pixel according to the pixel value of each pixel in the target grayscale image; Generate the target feature vector according to the relationship between the pixel value of each pixel in the target grayscale image and the pixel mean value.
2. The method according to claim 1, characterized in that, The generating the target feature vector according to the relationship between the pixel value of each pixel in the target grayscale image and the pixel mean value includes: When the pixel value of the pixel is greater than the pixel mean value, determine that the feature value corresponding to the pixel is the first numerical value; When the pixel value of the pixel is not greater than the pixel mean value, determine that the eigenvalue corresponding to the pixel is the second numerical value; Unfold the eigenvalues of each pixel in the target grayscale image in a preset order to generate the target eigenvector.
3. An autonomous driving method, characterized in that, including: Obtain a scene image of the target area, where the scene image is updated according to the map update method according to any one of claims 1-2; Perform autonomous driving according to the scene image of the target area.
4. An electronic device, characterized in that, including a memory and a processor, where computer instructions are stored in the memory, and the processor executes the computer instructions to execute the map update method according to any one of claims 1-2 and the autonomous driving method according to claim 3.
5. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores computer instructions, and the computer instructions are used to cause a computer to execute the map update method according to any one of claims 1-2 and the autonomous driving method according to claim 3.
Citation Information
Patent Citations
Method and device for determining matching of videos, equipment and readable recording medium
CN113642451A
Map updating system, navigation device, and distribution device
JP2006162270A
Map data updating apparatus and map data updating system
JP2009037062A