Route recommendation method and device, electronic equipment and storage medium
By obtaining road network and safety scoring models, determining road section safety evaluation information and generating safer navigation routes, the problem that existing navigation systems cannot meet personalized needs is solved, especially improving the navigation experience of casual riding users.
Patent Information
- Application Number
- CN202411301680.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-09-18
- Publication Date
- 2024-12-13
AI Technical Summary
The existing map navigation system cannot meet the user's high standards and personalized needs, especially the safety needs of leisure cyclists for navigation routes.
By obtaining the road network, starting point and end point, determining the safety evaluation information of each road section, using the safety scoring model and panoramic images of the image sampling points for safety scoring, and generating a safer navigation recommended route.
Meet users' personalized navigation needs, especially to improve the safety experience of leisure riding users on navigation routes, and stimulate users' enthusiasm.
Smart Images

Figure CN119124204A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of navigation technology, and in particular to a route recommendation method, device, electronic device and storage medium. Background Art
[0002] When users travel, they often use map navigation systems for navigation. However, the route recommendations in existing map navigation systems only take into account factors such as time and distance, and cannot meet the high-standard, personalized needs of users, especially the needs of leisure cyclists. Summary of the invention
[0003] In view of this, it is necessary to provide a route recommendation method, device, electronic device and storage medium to solve the problem that the map navigation system in the prior art cannot meet the personalized needs of users.
[0004] In order to solve the above problems, in a first aspect, the present invention provides a route recommendation method, comprising: Obtain a road network, a starting point, and an end point; wherein the road network includes at least one road segment; Determining safety evaluation information of each of the road sections; A recommended route from the starting point to the end point is determined based on the safety evaluation information of each of the road sections in the road network.
[0005] Optionally, the determining of the safety evaluation information of each of the road sections includes: Acquire a safety scoring model and images of each of the road sections; the safety scoring model is trained based on sample data; the sample data includes sample images of the road section and a first safety score of the sample image by the user; A second safety score for each of the road sections is determined according to the safety score model and the image of each of the road sections.
[0006] Optionally, acquiring the image of each of the road sections includes: Determine the image sampling points on each of the road sections, and obtain the panoramic image at each of the image sampling points; Determining the second safety score of each road section according to the safety score model and the image of each road section includes: Determining a third safety score for each of the image sampling points according to the safety scoring model and the panoramic image at each of the image sampling points; The second safety score of each of the road sections is determined according to the third safety score of the image sampling points on each of the road sections.
[0007] Optionally, the determining of the image sampling points on each of the road sections includes: If the length of the road section is greater than or equal to a preset length threshold, selecting image sampling points on the road section at intervals of preset length; If the length of the road section is less than the preset length threshold, an image sampling point is selected at the center of the road section.
[0008] Optionally, determining a third safety score of each of the image sampling points according to the safety scoring model and the panoramic image at each of the image sampling points includes: Dividing the panoramic image at the image sampling point into N sub-images; wherein N is an integer greater than 0; Inputting the sub-image into the security scoring model to obtain a fourth security score corresponding to the sub-image; An average of the fourth security scores of the N sub-images at the image sampling point is used as the third security score of the image sampling point.
[0009] Optionally, the sample image includes a sample sub-image obtained by segmenting a sample panoramic image; the security scoring model is trained in the following manner: Determine a sample image sampling point, and obtain a sample panoramic image at the sample image sampling point; Dividing the sample panoramic image into N sample sub-images, and obtaining a first security score of the user for the sample sub-images; The security scoring model is trained according to the N sample sub-images and the first security scores of the N sample sub-images.
[0010] Optionally, determining the second safety score of each road section according to the third safety score of the image sampling point on each road section includes: Reversely process the third security score of the image sampling point to obtain a reverse third security score; The average of the inverse third safety scores of the image sampling points on the road section is used as the second safety score of the road section. In a second aspect, the present invention also provides a route recommendation device, comprising: An information acquisition module, used to acquire a road network, a starting point and an end point; wherein the road network includes at least one road section; A road section safety determination module, used to determine the safety evaluation information of each road section; The route recommendation module is used to determine the recommended route from the starting point to the end point according to the safety evaluation information of each road section in the road network.
[0011] In a third aspect, the present invention further provides an electronic device comprising a memory and a processor, wherein the memory is used to store programs; and the processor is coupled to the memory and is used to execute the programs stored in the memory to implement the steps in any one of the route recommendation methods described above.
[0012] In a fourth aspect, the present invention further provides a computer-readable storage medium for storing a computer-readable program, wherein the program or instructions, when executed by a processor, can implement the steps in any one of the above-mentioned route recommendation methods.
[0013] The beneficial effects of the present invention are: The present invention can meet the personalized navigation needs of users, especially the safety needs of leisure cycling users for navigation routes, by acquiring a road network, a starting point and an end point; determining the safety evaluation information of each road section in the road network; and determining a navigation recommended route from the starting point to the end point based on the safety evaluation information of each road section in the road network. BRIEF DESCRIPTION OF THE DRAWINGS
[0014] Figure 1 A schematic diagram of a flow chart of an embodiment of a route recommendation method provided by the present invention; Figure 2 A flowchart of a route recommendation method based on user safety perception provided by the present invention; Figure 3 A flow chart of the safety scoring model training provided by the present invention; Figure 4 A schematic diagram of a recommended route provided by the present invention; Figure 5 A schematic structural diagram of an embodiment of a route recommendation device provided by the present invention. DETAILED DESCRIPTION
[0015] The technical solutions in the embodiments of the present invention will be described clearly and completely below in conjunction with the accompanying drawings in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative work are within the scope of protection of the present invention.
[0016] In the description of the embodiments of the present invention, unless otherwise specified, "multiple" means two or more than two. "And / or" describes the association relationship of associated objects, indicating that three relationships may exist. For example, "A and / or B" may mean: A exists alone, A and B exist at the same time, and B exists alone.
[0017] The descriptions of "first", "second", etc. involved in the embodiments of the present invention are only for descriptive purposes and cannot be understood as indicating or implying their relative importance or implicitly indicating the number of the indicated technical features. Therefore, the technical features defined as "first" and "second" may explicitly or implicitly include at least one of the features.
[0018] Reference to "embodiments" herein means that a particular feature, structure, or characteristic described in conjunction with the embodiments may be included in at least one embodiment of the present invention. The appearance of the phrase in various places in the specification does not necessarily refer to the same embodiment, nor is it an independent or alternative embodiment that is mutually exclusive with other embodiments. It is explicitly and implicitly understood by those skilled in the art that the embodiments described herein may be combined with other embodiments.
[0019] Reference Figure 1 , shows a flow chart of an embodiment of a route recommendation method provided by the present invention, the method comprising: Step S101, obtaining a road network, a starting point and an end point; wherein the road network includes at least one road section.
[0020] Step S102, determining the safety evaluation information of each road section.
[0021] Step S103, determining a recommended route from the starting point to the end point based on the safety evaluation information of each road section in the road network.
[0022] A road network is a system of roads that are interconnected to form a transportation network covering a specific area (such as a city, a village, a country, or a region). A road network includes multiple roads, each of which includes intersections. The road can be divided into multiple sections using the intersections as cutting points.
[0023] The safety evaluation information of the road section may be a second safety score of the road section, and the second safety score of the road section is used to characterize the safety level of the road section. The second safety score of the road section may be determined based on the objective environment of the road section, for example, if the traffic volume on the road section is greater than the traffic volume threshold, then the second safety score of the road section is low; or it may be determined based on the user's safety perception of the road section, for example, after seeing the road section, the user's subjective feeling is that the second safety score of the road section is low.
[0024] After determining the safety evaluation information of each road section, the starting point and the end point entered by the user can be obtained, and based on the safety evaluation information of each road section in the road network, a navigation recommended route with higher safety from the starting point to the end point can be generated.
[0025] This embodiment obtains a road network, a starting point, and an end point; determines safety evaluation information of each road section in the road network; and determines a recommended navigation route from the starting point to the end point based on the safety evaluation information of each road section in the road network, thereby meeting the personalized navigation needs of users, especially the safety needs of leisure cycling users for navigation routes.
[0026] There is a big difference between the second safety score of a road section obtained based on the objective environment and the second safety score of a road section obtained based on the user's subjective feelings. In comparison, the second safety score of a road section obtained based on the user's subjective feelings can better represent the user's actual experience. Therefore, in one embodiment, step S102 may specifically include: obtaining a safety scoring model and images of each road section; the safety scoring model is trained based on sample data; the sample data includes sample images of the road section and the user's first safety score for the sample image; and determining the second safety score of each road section based on the safety scoring model and the image of each road section.
[0027] In this embodiment, we can first obtain sample images of the road section and the user's manual score for the safety of the road section in the sample image (first safety score), then use the sample images and the manual score corresponding to the sample images to train the safety scoring model, and finally use the trained safety scoring model and the images of each road section to predict the safety score corresponding to the image of the road section, and obtain the second safety score of the road section based on the safety score corresponding to the image of the road section.
[0028] A road section may have one or more images. The average of the safety scores of the images of a road section may be used as the second safety score of the road section.
[0029] This embodiment trains the model through sample data, so that the model learns the relationship between the user's subjective feelings, the image of the road section and the second safety score of the road section, so that the trained model can predict the safety score corresponding to the image of any road section from the perspective of the user's subjective feelings. Then, the second safety score of the road section is obtained according to the safety score corresponding to the image of any road section, so that the second safety score can more intuitively represent the actual experience of the user. According to the second safety score of each road section in the road network, the navigation recommended route from the starting point to the end point is determined, which can increase the experience of leisure cycling users and stimulate the enthusiasm of leisure cycling users.
[0030] In one embodiment, the security scoring model can be an EfficientNetV2-XL convolutional neural network model. The EfficientNetV2-XL convolutional neural network is a convolutional neural network (CNN), which is an extended version of the EfficientNet series model. The EfficientNetV2-XL convolutional neural network model has a strong learning ability, can automatically learn features in the labeled data, and can also learn high-level abstract features to fully explore the scoring features of image security perception.
[0031] In one embodiment, the step of acquiring images of each road section may specifically include: determining image sampling points on each road section, and acquiring panoramic images at each image sampling point; and the step of determining a second safety score for each road section based on a safety scoring model and the images of each road section may specifically include: determining a third safety score for each image sampling point based on the safety scoring model and the panoramic images at each image sampling point; and determining a second safety score for each road section based on the third safety scores of the image sampling points on each road section.
[0032] In this embodiment, one or more image sampling points can be set on the road section according to the length of the road section, and the panoramic image at each image sampling point on the road section can be collected. Then, according to the safety scoring model and the panoramic image at the image sampling point, the third safety score corresponding to the image sampling point is obtained, and finally, according to the third safety score corresponding to each image sampling point on the road section, the second safety score of the road section is obtained by comprehensive evaluation.
[0033] This embodiment sets image sampling points on the road section and collects panoramic images at the image sampling points, so that the collected images can more completely and comprehensively display the conditions of the road section, and then obtain a second safety score for the road section based on the panoramic images at the image sampling points, which can make the second safety score of the road section more accurate.
[0034] In one embodiment, the step of determining the image sampling points on each road section may specifically include: if the length of the road section is greater than or equal to a preset length threshold, selecting image sampling points on the road section at preset length intervals; if the length of the road section is less than the preset length threshold, selecting image sampling points at the center of the road section.
[0035] For example, the preset length threshold may be 50 m, and the preset length interval may be 25 m. For a road section with a length less than 50 m, an image sampling point is selected at the center of the road section; for a road section with a length greater than or equal to 50 m, an image sampling point is selected every 25 m.
[0036] In one embodiment, the step of determining the third security score of each image sampling point based on the security scoring model and the panoramic image at each image sampling point may specifically include: dividing the panoramic image at the image sampling point into N sub-images; wherein N is an integer greater than 0; inputting the sub-image into the security scoring model to obtain a fourth security score corresponding to the sub-image; and taking the average of the fourth security scores of the N sub-images at the image sampling point as the third security score of the image sampling point.
[0037] Since the amount of information contained in a panoramic image is too large, if it is directly input into the security scoring model, the security scoring model will predict slowly. Therefore, a panoramic image can be divided into N sub-images, and then the N sub-images are respectively input into the security scoring model to obtain the fourth security scores corresponding to the N sub-images. The average of the fourth security scores of the N sub-images is calculated, and the average is used as the security score of the panoramic image corresponding to the N sub-images, that is, the average is used as the third security score of the image sampling points corresponding to the N sub-images.
[0038] In one embodiment, the panorama image segmentation process may be: a panorama image is segmented into four independent sub-images according to the horizontal viewing angles of 0 degrees, 90 degrees, 180 degrees and 270 degrees. Each sub-image represents the content of the original panorama photo at a different horizontal viewing angle.
[0039] In one embodiment, the sample images used for training the security scoring model may include sample sub-images obtained by segmenting a sample panoramic image; the security scoring model may be trained in the following manner: determining the sample image sampling points, and obtaining the sample panoramic image at the sample image sampling points; segmenting the sample panoramic image into N sample sub-images, and obtaining the user's first security score for the sample sub-image; and training the security scoring model based on the N sample sub-images and the first security scores of the N sample sub-images.
[0040] In one embodiment, the step of determining the second safety score of each road section based on the third safety score of the image sampling points on each road section may specifically include: inversely processing the third safety score of the image sampling points to obtain a reverse third safety score; and taking the average of the reverse third safety scores of the image sampling points on the road section as the first safety score of the road section.
[0041] Inverse processing is a data processing method that is mainly used to convert the values of certain indicators to meet the needs of analysis or comparison. In some cases, the numerical direction of the original indicator may not be consistent with the purpose of analysis. For example, the larger the value of some indicators, the worse the situation, but when analyzing, we hope that the larger the value, the better the situation. In this case, it is necessary to perform inverse processing on the indicator values.
[0042] In this embodiment, the third safety score of the image sampling point can be reversely processed to obtain a reverse third safety score, and then the average of the reverse third safety scores of each image sampling point on the road section is calculated, and the average is used as the second safety score of the road section.
[0043] Reference Figure 2 , showing a flow chart of a route recommendation method based on user safety perception provided by the present invention.
[0044] The method includes: ① Establishing a street safety perception dataset through manual scoring. Access and retrieve images at the image sampling point location of each road section through the map API (Application Programming Interface). The detailed request parameters are set as follows: the pitch angle is 0, the size is 1024×512 pixels, and the sample panoramic photos of each sample image sampling point are segmented according to 0°, 90°, 180°, and 270° viewing angles. Each sample panoramic photo corresponds to 4 sample sub-images. The sample sub-images are grouped into groups of 50, and 100 respondents of different ages and positions are randomly invited. Each group of sample sub-images is randomly assigned to a number of people for scoring. The sample sub-images and the manual scores corresponding to the sample sub-images are used as the street safety perception dataset. ② The EfficientNetV2-XL convolutional neural network model is used for model training. The acquired street safety perception dataset is divided into a training set and a test set in a ratio of 7:3. The training set is used to train the safety scoring model, and the test set is used to evaluate the accuracy of the safety scoring model.
[0045] ③ Obtain the safety perception score (fourth safety score) of each street view image. Use the trained safety score model to predict the safety score of the sub-image of each image sampling point to obtain the fourth safety score of each sub-image.
[0046] ④ The indicators are reversed and deployed in the corresponding regional network. According to the fourth security score of the sub-image of the image sampling point, the third security score of the image sampling point is calculated. The third security score of the image sampling point is reversed to obtain the reverse third security score, and the reverse third security score of the image sampling point is deployed in the network.
[0047] ⑤ Calculate the mean score of the road section and generate a street safety perception distribution map. Calculate the mean of the inverse third safety score corresponding to each image sampling point on the road section, and use the mean as the mean score of the road section.
[0048] ⑥ Deep optimization algorithm to extract the best user cycling route. Select the starting point and end point, and use the depth-first algorithm to search for the optimal path.
[0049] Reference Figure 3 , showing the safety scoring model training flow chart provided by the present invention, the process includes: S201, dividing the street safety perception data set into a training set and a test set in a ratio of 7:3. S202, training the EfficientNetV2-XL convolutional neural network model on the training set. S203, adjusting the parameters of the trained EfficientNetV2-XL convolutional neural network model. Using the model pre-trained in ImageNet, different training methods and parameter combinations are tried in the street safety perception data set, and the optimal model is obtained through evaluation on the test set.
[0050] Reference Figure 4 , showing a schematic diagram of a recommended route provided by the present invention. Figure 4 The arrowhead line is the recommended navigation route from the starting point to the destination.
[0051] Reference Figure 5 , shows a schematic diagram of the structure of an embodiment of a route recommendation device provided by the present invention, wherein the device 300 comprises: The information acquisition module 301 is used to acquire a road network, a starting point and an end point; wherein the road network includes at least one road section; A road section safety determination module 302, used to determine safety evaluation information of each road section; The route recommendation module 303 is used to determine the recommended route from the starting point to the end point according to the safety evaluation information of each road section in the road network.
[0052] In one embodiment, the present invention further provides an electronic device, including a memory and a processor, wherein the memory stores a computer program, and when the computer program is executed by the processor, the steps of any of the above-mentioned route recommendation methods are implemented.
[0053] In one embodiment, the present invention further provides a computer-readable storage medium, on which a computer program is stored, and when the computer program is executed by the processor, the steps of any of the above-mentioned route recommendation methods are implemented.
[0054] Those skilled in the art will appreciate that all or part of the processes of the above-mentioned embodiments can be implemented by instructing related hardware through a computer program, and the program can be stored in a computer-readable storage medium, wherein the computer-readable storage medium is a disk, an optical disk, a read-only storage memory, or a random access memory, etc.
[0055] The above description is only a preferred specific implementation manner of the present invention, but the protection scope of the present invention is not limited thereto. Any changes or substitutions that can be easily conceived by any technician familiar with the technical field within the technical scope disclosed by the present invention should be covered within the protection scope of the present invention.
Claims
1. A route recommendation method, characterized in that: include: Obtain a road network, a starting point, and an end point; wherein the road network includes at least one road segment; Determining safety evaluation information of each of the road sections; A recommended route from the starting point to the end point is determined based on the safety evaluation information of each of the road sections in the road network.
2. The route recommendation method according to claim 1, characterized in that: The determining of the safety evaluation information of each of the road sections includes: Acquire a safety scoring model and images of each of the road sections; the safety scoring model is trained based on sample data; the sample data includes sample images of the road section and a first safety score of the sample image given by the user; A second safety score for each of the road sections is determined according to the safety score model and the image of each of the road sections.
3. The route recommendation method according to claim 2, characterized in that: The acquiring of images of each of the road sections comprises: Determine the image sampling points on each of the road sections, and obtain the panoramic image at each of the image sampling points; Determining the second safety score of each road section according to the safety score model and the image of each road section includes: Determining a third safety score for each of the image sampling points according to the safety scoring model and the panoramic image at each of the image sampling points; The second safety score of each of the road sections is determined according to the third safety score of the image sampling points on each of the road sections.
4. The route recommendation method according to claim 3, characterized in that: The determining of the image sampling points on each of the road sections comprises: If the length of the road section is greater than or equal to a preset length threshold, selecting image sampling points on the road section at intervals of preset length; If the length of the road section is less than the preset length threshold, an image sampling point is selected at the center of the road section.
5. The route recommendation method according to claim 3, characterized in that: Determining a third safety score for each of the image sampling points according to the safety scoring model and the panoramic image at each of the image sampling points includes: Dividing the panoramic image at the image sampling point into N sub-images; wherein N is an integer greater than 0; Inputting the sub-image into the security scoring model to obtain a fourth security score corresponding to the sub-image; An average of the fourth security scores of the N sub-images at the image sampling point is used as the third security score of the image sampling point.
6. The route recommendation method according to claim 5, characterized in that: The sample image includes a sample sub-image obtained by segmenting the sample panoramic image; the security scoring model is trained in the following manner: Determine a sample image sampling point, and obtain a sample panoramic image at the sample image sampling point; Dividing the sample panoramic image into N sample sub-images, and obtaining a first security score of the user for the sample sub-images; The security scoring model is trained according to the N sample sub-images and the first security scores of the N sample sub-images.
7. The route recommendation method according to claim 3, characterized in that: Determining the second safety score of each road section according to the third safety score of the image sampling point on each road section includes: Reversely process the third security score of the image sampling point to obtain a reverse third security score; An average of the inverse third safety scores of the image sampling points on the road section is used as the second safety score of the road section.
8. A route recommendation device, characterized in that: include: An information acquisition module, used to acquire a road network, a starting point and an end point; wherein the road network includes at least one road section; A road section safety determination module, used to determine the safety evaluation information of each road section; The route recommendation module is used to determine the recommended route from the starting point to the end point according to the safety evaluation information of each road section in the road network.
9. An electronic device, characterized in that: comprising a memory and a processor, wherein: The memory is used to store programs; The processor is coupled to the memory and is used to execute the program stored in the memory to implement the steps in the route recommendation method described in any one of claims 1 to 7.
10. A computer-readable storage medium, characterized in that: Used to store a computer-readable program, wherein when the program or instruction is executed by a processor, the steps in the route recommendation method described in any one of claims 1 to 7 can be implemented.
