Intelligent generation method and device for scenic spot map card and storage medium
By obtaining the list of attractions, calculating similarity, and using GPS maps and interpolation algorithms to generate scenic spot map cards, the problem of wasted time in personal travel route formulation and map search is solved, and convenient travel routes and map cards are provided, providing convenience for independent travel.
Patent Information
- Application Number
- CN202411444588.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-10-16
- Publication Date
- 2025-01-14
AI Technical Summary
When traveling in person or relatives and friends, they need to formulate their own travel routes and find maps, resulting in a waste of energy and time.
By obtaining the list of attractions, calculating the similarity of attractions, selecting the attractions with the highest similarity as the tourist route, using GPS maps and interpolation algorithms to fit the tourism curve, generating scenic spot map cards, and providing map cards and tourist routes based on the target attractions.
Save users the time and energy to find travel routes on the Internet and provide convenience for independent travel.
Smart Images

Figure CN119311172A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of map generation, and in particular to a method, device and storage medium for intelligently generating a scenic spot map card. Background Art
[0002] In today's society, people are generally under great work pressure, and traveling has become an effective means for people to relieve stress. Therefore, the tourism industry has always been booming. At the beginning, people like to find a tour guide or travel in a group, but gradually people find that there are too many people when finding a tour guide or traveling in a group, and there are strangers, and the travel experience is not good; but if you choose to travel alone or with relatives and friends, you need to plan your own travel route, and looking for guides and maps on the Internet is a waste of energy and time. Summary of the invention
[0003] In view of this, the purpose of the present invention is to provide a method, device and storage medium for intelligently generating scenic map cards, so as to solve the problem in the prior art that individuals or friends traveling with their families need to plan their own travel routes, but searching for guides and maps on the Internet is a waste of energy and time.
[0004] According to a first aspect of an embodiment of the present invention, a method for intelligently generating a scenic spot map card is provided, the method comprising: Get all the attractions in a certain area and generate a list of attractions; Select any one scenic spot from the scenic spot list as a reference scenic spot, and obtain all other scenic spots within a preset range of the reference scenic spot in the GPS map; Calculating the similarity between all other attractions within the preset range of the reference attraction and the reference attraction respectively; Sort all other attractions within the preset range of the reference attraction by their similarity to the reference attraction, and select N attractions with the highest similarity as the attractions to be generated; Query the GPS coordinates of the scenic spots to be generated and the reference scenic spots one by one, and convert the GPS coordinates of the scenic spots to be generated and the reference scenic spots into pixel coordinates on the map card to be generated; According to the preset size of the map card to be generated, generating the scenic spot to be generated and the reference scenic spot at the pixel coordinate position corresponding to the map card to be generated; The scenic spots to be generated and the reference scenic spots on the map card to be generated are used as coordinate points of the travel route, and an interpolation algorithm is used to fit the travel curve to obtain a map card based on the reference scenic spots; Traverse each scenic spot in the scenic spot list to obtain a map card of each scenic spot.
[0005] Preferably, The step of obtaining all other attractions within the preset range of the reference attraction includes: A first circular range is obtained with the reference scenic spot as the center and minR as the radius; A second circular range is obtained with the reference scenic spot as the center and maxR as the radius, wherein the radius minR is smaller than the radius maxR; Removing the overlapping portion of the first circular range from the second circular range to obtain a remaining reference circular ring; A two-dimensional coordinate system is established with the reference scenic spot as the origin, and the portion of the reference ring falling in the second quadrant and the third quadrant of the two-dimensional coordinate system is removed, and the remaining portion in the first quadrant and the fourth quadrant is the preset range; Get all other scenic spots within the preset range.
[0006] Preferably, The minR may be 0. When minR is 0, a second circular range with maxR as the radius and the reference scenic spot as the center is obtained; A two-dimensional coordinate system is established with the reference scenic spot as the origin, and the semicircle of the second circular range falling in the second quadrant and the third quadrant of the two-dimensional coordinate system is removed, and the remaining semicircle of the first quadrant and the fourth quadrant is the preset range; Get all other scenic spots within the preset range.
[0007] Preferably, The step of respectively calculating the similarity between all other attractions within the preset range of the reference attraction and the reference attraction comprises: Pre-label each scenic spot with a label based on its characteristics; Respectively obtain the scenic spot labels of the reference scenic spot and all other scenic spots within a preset range of the reference scenic spot; Generate a label vector of the reference scenic spot and all other scenic spots within the preset range of the reference scenic spot according to the scenic spot labels of the reference scenic spot and all other scenic spots within the preset range of the reference scenic spot; According to the label vector of the reference scenic spot and the label vectors of other scenic spots, the similarities between the reference scenic spot and all other scenic spots are calculated respectively by using cosine similarity.
[0008] Preferably, The converting the GPS coordinates of the scenic spot to be generated and the reference scenic spot into pixel coordinates on the map card to be generated comprises: The latitude and longitude scale is obtained, and the GPS coordinates of the scenic spot to be generated and the reference scenic spot are scaled according to the latitude and longitude scale to obtain pixel coordinates.
[0009] Preferably, The obtaining of the latitude and longitude scale comprises: Select any two scenic spots on the map card as mapping scenic spots, and obtain the GPS coordinates and pixel coordinates of the two mapping scenic spots respectively; Obtaining a longitude scale according to the longitudes of the GPS coordinates of the two mapped scenic spots and the pixel abscissas of the pixel coordinates; The latitude scale is obtained according to the latitude of the GPS coordinates of the two mapped scenic spots and the pixel ordinate of the pixel coordinates.
[0010] Preferably, Scaling the GPS coordinates of the scenic spot to be generated and the reference scenic spot according to the latitude and longitude scale to obtain pixel coordinates includes: Select any one of the two mapped scenic spots; Obtaining the increasing direction of longitude and latitude of the to-be-generated scenic spot or the reference scenic spot to be converted according to the selected mapped scenic spot; Acquire the coordinates of the middle pixel according to the increasing direction of the longitude and latitude and the longitude and latitude scale; The pixel coordinates of the scenic spot to be generated or the reference scenic spot are obtained according to the pixel intermediate coordinates and the pixel coordinates of the selected mapped scenic spot.
[0011] According to a second aspect of an embodiment of the present invention, a device for intelligently generating a scenic spot map card is provided, the device comprising: Scenic spot list acquisition module: used to obtain all scenic spots in a certain area and generate a scenic spot list; The scenic spot range acquisition module is used to select any scenic spot from the scenic spot list as a reference scenic spot, and obtain all other scenic spots within the preset range of the reference scenic spot in the GPS map; Similarity calculation module: used to respectively calculate the similarity between all other attractions within the preset range of the reference attraction and the reference attraction; The module for acquiring scenic spots to be generated is used to sort the similarities between all other scenic spots within the preset range of the reference scenic spot and the reference scenic spot, and select the N scenic spots with the highest similarity as the scenic spots to be generated; Coordinate conversion module: used to query the GPS coordinates of the scenic spots to be generated and the reference scenic spots one by one, and convert the GPS coordinates of the scenic spots to be generated and the reference scenic spots into pixel coordinates on the map card to be generated; Scenic spot mapping module: used to generate the scenic spot to be generated and the reference scenic spot at the pixel coordinate position corresponding to the map card to be generated according to the preset size of the map card to be generated; A map card acquisition module is used to use the to-be-generated scenic spots and reference scenic spots on the to-be-generated map card as the coordinate points of the travel route, and use an interpolation algorithm to fit the travel curve to obtain a map card based on the reference scenic spots; Map card output module: used to traverse each scenic spot in the scenic spot list and obtain a map card for each scenic spot.
[0012] According to a third aspect of an embodiment of the present invention, there is provided a storage medium, wherein the storage medium stores a computer program, and when the computer program is executed by a main controller, each step in the above method is implemented.
[0013] The technical solution provided by the embodiments of the present invention may have the following beneficial effects: The present application selects any one scenic spot in the scenic spot list as a reference scenic spot, obtains other scenic spots within a certain range in the GPS map, and respectively calculates the similarity between the reference scenic spot and the other scenic spots; sorts the similarities, thereby selecting N scenic spots with the highest similarity as the scenic spots to be generated; converts the GPS coordinates of the scenic spot to be generated and the reference scenic spot into pixel coordinates on the map card to be generated; uses the scenic spot to be generated and the reference scenic spot on the map card to be generated as the coordinate points of the travel route, adopts the interpolation algorithm to fit the travel curve, and obtains a map card based on the reference scenic spot; through this solution, the user only needs to know any target scenic spot he wants to go to, and he can obtain a map card based on the target scenic spot, and the map card has the travel route and coordinates based on the target scenic spot, which provides convenience for people's independent travel and saves users time and energy in searching for travel routes on the Internet.
[0014] It is to be understood that the foregoing general description and the following detailed description are exemplary and explanatory only and are not restrictive of the invention. BRIEF DESCRIPTION OF THE DRAWINGS
[0015] The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the invention and, together with the description, serve to explain the principles of the invention.
[0016] Figure 1 It is a flowchart of a method for intelligently generating a scenic spot map card according to an exemplary embodiment; Figure 2 is a schematic diagram of mapping scenic spots according to another exemplary embodiment; Figure 3 is a schematic diagram showing a method of acquiring all other scenic spots within a preset range of a reference scenic spot according to another exemplary embodiment; Figure 4 is a system schematic diagram of a device for intelligently generating a scenic spot map card according to another exemplary embodiment; In the attached figure: 1-scenic spot list acquisition module, 2-scenic spot range acquisition module, 3-similarity calculation module, 4-scenic spot acquisition module to be generated, 5-coordinate conversion module, 6-scenic spot mapping module, 7-map card acquisition module, 8-map card output module. DETAILED DESCRIPTION
[0017] Exemplary embodiments will be described in detail herein, examples of which are shown in the accompanying drawings. When the following description refers to the drawings, the same numbers in different drawings represent the same or similar elements unless otherwise indicated. The embodiments described in the following exemplary embodiments do not represent all embodiments consistent with the present invention. Instead, they are merely examples of devices and methods consistent with some aspects of the present invention as detailed in the appended claims.
[0018] Embodiment 1 Figure 1 is a flow chart of a method for intelligently generating a scenic spot map card according to an exemplary embodiment. Figure 1 As shown, the method includes: S1, obtain all scenic spots in a certain area and generate a list of scenic spots; S2, selecting any one scenic spot from the scenic spot list as a reference scenic spot, and obtaining all other scenic spots within a preset range of the reference scenic spot in the GPS map; S3, respectively calculating the similarity between all other attractions within a preset range of the reference attraction and the reference attraction; S4, sorting the similarities between all other scenic spots within the preset range of the reference scenic spot and the reference scenic spot, and selecting N scenic spots with the highest similarity as the scenic spots to be generated; S5, querying the GPS coordinates of the scenic spots to be generated and the reference scenic spots one by one, and converting the GPS coordinates of the scenic spots to be generated and the reference scenic spots into pixel coordinates on the map card to be generated; S6, generating the scenic spot to be generated and the reference scenic spot at the pixel coordinate position corresponding to the map card to be generated according to the preset size of the map card to be generated; S7, using the to-be-generated scenic spots and the reference scenic spots on the to-be-generated map card as the coordinate points of the travel route, and fitting the travel curve by using an interpolation algorithm to obtain a map card based on the reference scenic spots; S8, traversing each scenic spot in the scenic spot list to obtain a map card of each scenic spot; It is understandable that the specific solution of this embodiment is as follows: Traverse the list of attractions and take out the attractions that need to be processed currently, such as the attached Figure 3As shown, the current scenic spot is taken as the center of the circle and minR is the radius to obtain the first circular range; maxR is the radius to obtain the second circular range, that is, two concentric circles, and there must be a ring between the two concentric circles. In order to formulate a tourist route, tourists always face in one direction. In this embodiment, the direction of the X-axis from small to large is taken as the standard, and the ring of the negative half axis of the X-axis is removed, that is, a two-dimensional coordinate system is established with the origin as the center. At this time, the XY axis of the coordinate system divides the entire ring into 4 parts, and they fall in the four quadrants of the coordinate system respectively. The direction of the negative half axis of the X-axis is cancelled, that is, the parts of the second and third quadrants are removed, and the remaining ring part is the preset range, and the scenic spots in the remaining half of the ring are the other scenic spots mentioned above; there is another case where minR is 0, then a circle is obtained with maxR as the radius, and the left half of the circle is removed. The removal method is as shown above, and the remaining half circle is the preset range, and the scenic spots falling in the remaining half circle are other scenic spots; Prior to this, each scenic spot needed to be manually labeled according to its characteristics, such as whether the mountain was high, the water was deep, or there were many or few temples. After obtaining the reference scenic spot and all other scenic spots within the preset range, it is also necessary to generate a label vector based on the labels of the reference scenic spot and the scenic spots within the preset range, for example: v1:[ 0 0 0 0 1 0 0 0 0 0 0 0 ... 1 0 0 0 0 1 0 0 1 ] v2:[ 0 1 0 0 0 0 0 0 0 0 0 0 ... 0 0 0 0 0 1 0 0 1 ] v3:[ 0 0 0 1 0 0 0 0 1 0 0 0 ... 1 0 0 0 0 1 0 0 1 ] v4:[ 1 0 0 0 0 0 0 1 0 0 0 0 ... 1 0 0 0 0 1 0 0 1 ] ...... vn:[ 1 1 1 0 0 0 0 1 0 0 0 0 ... 1 0 0 0 0 0 0 0 1 ] Among them, v1, v2, v3 ... vn correspond to the label vectors of the reference scenic spot and all other scenic spots within the preset range respectively. The method of generating label vectors by using labels is a common and mature technology in the prior art, and this embodiment will not be described in detail here. After obtaining the label vectors of the reference scenic spot and all other scenic spots within the preset range, the cosine similarity method is used to calculate the similarity between the reference scenic spot and the scenic spots within each preset range respectively; Arrange the calculated multiple similarities in descending order, and return the top N attractions as the attractions to be generated; In existing maps, such as Baidu Maps and Amap, the GPS coordinates of the reference attractions and the attractions to be generated are queried one by one, and the GPS coordinates of the reference attractions and the attractions to be generated are converted into pixel coordinates on the map card, specifically: Based on the large map of the scenic spot, two scenic spot pixel coordinates with the upper left corner of the picture as the coordinate origin are provided as reference coordinates. The two scenic spot pixel coordinates (that is, the two mapped scenic spots mentioned above) are distributed near the two diagonals of the picture and the distance is preferably far, as shown in the attached figure. Figure 2 As shown; The names and coordinates of the two mapped scenic spots P1 and P2 are used as reference coordinates of the scenic spot map image, which are recorded as P1: (x1, y1) and P2: (x2, y2) respectively; the GPS coordinates of P1 and P2 are queried through the Internet map API, which are recorded as P1: (j1, w1) and P2: (j2, w2) respectively; in order to facilitate the subsequent conversion of reference scenic spots and other scenic spots into pixel coordinates without the need for one-to-one query, this embodiment proposes a method for calculating the scale in the longitude (x-axis) and latitude (y-axis) directions. In order to calculate the accuracy, the difference between the longitude and latitude is magnified by 10 to the fifth power. The calculation method is as follows: Longitude (x-axis) scale: xScale = |j2 - j1| * 100000 / |x2 - x1| Latitude (y-axis) scale: yScale = |w2 - w1| * 100000 / |y2 - y1| After setting the latitude and longitude scale, it is necessary to transform the coordinates of the reference scenic spot and the N scenic spots to be generated that are screened out and have a high similarity with the reference scenic spot within the preset range. Specifically: P1 and P2 are the reference coordinates mentioned above. The pixel coordinates of P1 and P2 are (x1, y1) and (x2, y2) respectively. The GPS coordinates of P1 and P2 are (j1, w1) and (j2, w2). The pixel coordinates (x, y) of the scenic spot P (the scenic spot P is the reference scenic spot or N scenic spots to be generated within a preset range with a high degree of similarity to the reference scenic spot) are obtained. The GPS coordinates of P are (j, w) obtained by querying the Internet map API. Then: Choose a reference coordinate arbitrarily, assume P1 (it can also be P2); Calculate the GPS longitude dela, the longitude increment direction is the same as the xi axis direction: jDelta = (j - j1) * 100000; Calculate GPS latitude delta. The latitude increment direction is opposite to the y-axis direction, so yDelta is reversed: wDelta = -(w - w1) * 100000; Calculate the middle pixel longitude coordinate xDelta: xDelta = jDelta / xScale; where xScale is the longitude (x-axis) scale mentioned above; Calculate the middle pixel latitude coordinate yDelta: yDelta = wDelta / yScale, where yScale is the latitude (y-axis) scale mentioned above; Calculate pixel coordinates (x, y): x = x1 + xDelta; y = y1 + yDelta; After obtaining the pixel coordinates of the reference scenic spot and the scenic spot to be generated, they are arranged in ascending order according to the x-axis coordinates. When the subsequent scenic spots are connected as a tourist route, they are connected in ascending order according to the x-axis coordinates; Calculate the minimum (x, y) coordinates and the maximum (x, y) coordinates of the reference scenic spot and the scenic spot to be generated. The minimum and maximum coordinates correspond to the two scenic spots at the upper left corner and lower right corner of the area, which are the starting point and end point of the tourist route (because the negative half axis of the X axis is removed when determining the preset range, the reference scenic spot is usually the starting point of the tourist route, and the tourist route is generally in the positive infinity direction of the X axis); Set the image size of the map card to be generated, such as length, width and other parameters; According to the fixed aspect ratio of the output map card size, the length and width are adaptively filled, that is, the reference scenic spots and the scenic spots to be generated are reflected in the map card of fixed size; The y value is calculated for each x-axis pixel using an interpolation algorithm. Multiple interpolation algorithms are supported. The experimental results show that the SHEPARD interpolation algorithm works best. The tourist route curve is drawn based on the interpolated (x[], y[]). The significance of this design is: if we simply connect the reference attractions and the attractions to be generated, we will get multiple broken line segments, which do not conform to the actual tourist route. Therefore, it is necessary to smooth the tourist route of broken line segments into a curved tourist route.
[0019] According to the above scheme, each scenic spot in the scenic spot list is traversed, and a map card of each scenic spot is generated, so that the user only needs to know any target scenic spot he wants to go to, and he can get a map card based on the target scenic spot. The map card contains the travel route and coordinates based on the target scenic spot, which provides convenience for people's independent travel and saves users' time and energy in searching for travel routes on the Internet.
[0020] Embodiment 2 Figure 4 is a system schematic diagram of a device for intelligently generating a scenic spot map card according to another exemplary embodiment, the device comprising: Scenic spot list acquisition module 1: used to obtain all scenic spots in a certain area and generate a scenic spot list; Scenic spot range acquisition module 2: used to select any one scenic spot from the scenic spot list as a reference scenic spot, and obtain all other scenic spots within the preset range of the reference scenic spot in the GPS map; Similarity calculation module 3: used to respectively calculate the similarity between all other attractions within the preset range of the reference attraction and the reference attraction; The scenic spot acquisition module 4 to be generated is used to sort the similarities between all other scenic spots within the preset range of the reference scenic spot and the reference scenic spot, and select the N scenic spots with the highest similarity as the scenic spots to be generated; Coordinate conversion module 5: used to query the GPS coordinates of the scenic spots to be generated and the reference scenic spots one by one, and convert the GPS coordinates of the scenic spots to be generated and the reference scenic spots into pixel coordinates on the map card to be generated; Scenic spot mapping module 6: used to generate the scenic spot to be generated and the reference scenic spot at the pixel coordinate position corresponding to the map card to be generated according to the preset size of the map card to be generated; Map card acquisition module 7: used to use the to-be-generated scenic spots and reference scenic spots on the to-be-generated map card as the coordinate points of the travel route, and use the interpolation algorithm to fit the travel curve to obtain a map card based on the reference scenic spots; The map card output module 8 is used to traverse each scenic spot in the scenic spot list and obtain a map card of each scenic spot.
[0021] Embodiment three: This embodiment provides a storage medium, wherein the storage medium stores a computer program, and when the computer program is executed by a main controller, each step in the above method is implemented; It is understandable that the storage medium mentioned above can be a read-only memory, a magnetic disk or an optical disk, etc.
[0022] It can be understood that the same or similar parts of the above embodiments can be referenced to each other, and the contents not described in detail in some embodiments can refer to the same or similar contents in other embodiments.
[0023] It should be noted that, in the description of the present invention, the terms "first", "second", etc. are only used for descriptive purposes and cannot be understood as indicating or implying relative importance. In addition, in the description of the present invention, unless otherwise specified, the meaning of "plurality" refers to at least two.
[0024] Any process or method description in a flowchart or otherwise described herein may be understood to represent a module, segment or portion of code that includes one or more executable instructions for implementing the steps of a specific logical function or process, and the scope of the preferred embodiments of the present invention includes alternative implementations in which functions may not be performed in the order shown or discussed, including performing functions in a substantially simultaneous manner or in the reverse order depending on the functions involved, which should be understood by those skilled in the art to which the embodiments of the present invention belong.
[0025] It should be understood that the various parts of the present invention can be implemented by hardware, software, firmware or a combination thereof. In the above-mentioned embodiments, multiple steps or methods can be implemented by software or firmware stored in a memory and executed by a suitable instruction execution system. For example, if implemented by hardware, as in another embodiment, it can be implemented by any one of the following technologies known in the art or their combination: a discrete logic circuit having a logic gate circuit for implementing a logic function for a data signal, a dedicated integrated circuit having a suitable combination of logic gate circuits, a programmable gate array (PGA), a field programmable gate array (FPGA), etc.
[0026] A person skilled in the art may understand that all or part of the steps in the method for implementing the above-mentioned embodiment may be completed by instructing related hardware through a program, and the program may be stored in a computer-readable storage medium, which, when executed, includes one or a combination of the steps of the method embodiment.
[0027] In addition, each functional unit in each embodiment of the present invention may be integrated into a processing module, or each unit may exist physically separately, or two or more units may be integrated into one module. The above-mentioned integrated module may be implemented in the form of hardware or in the form of a software functional module. If the integrated module is implemented in the form of a software functional module and sold or used as an independent product, it may also be stored in a computer-readable storage medium.
[0028] The storage medium mentioned above can be a read-only memory, a magnetic disk or an optical disk, etc.
[0029] In the description of this specification, the description with reference to the terms "one embodiment", "some embodiments", "examples", "specific examples", or "some examples" means that the specific features, structures, materials or characteristics described in conjunction with the embodiment or example are included in at least one embodiment or example of the present invention. In this specification, the schematic representation of the above terms does not necessarily refer to the same embodiment or example. Moreover, the specific features, structures, materials or characteristics described may be combined in any one or more embodiments or examples in a suitable manner.
[0030] Although the embodiments of the present invention have been shown and described above, it is to be understood that the above embodiments are exemplary and are not to be construed as limitations of the present invention. A person skilled in the art may change, modify, replace and vary the above embodiments within the scope of the present invention.
Claims
1. A method for intelligently generating scenic spot map cards, characterized in that: The method comprises: Get all the attractions in a certain area and generate a list of attractions; Select any one scenic spot from the scenic spot list as a reference scenic spot, and obtain all other scenic spots within a preset range of the reference scenic spot in the GPS map; Calculating the similarity between all other attractions within the preset range of the reference attraction and the reference attraction respectively; Sort all other attractions within the preset range of the reference attraction by their similarity to the reference attraction, and select N attractions with the highest similarity as the attractions to be generated; Query the GPS coordinates of the scenic spots to be generated and the reference scenic spots one by one, and convert the GPS coordinates of the scenic spots to be generated and the reference scenic spots into pixel coordinates on the map card to be generated; According to the preset size of the map card to be generated, generating the scenic spot to be generated and the reference scenic spot at the pixel coordinate position corresponding to the map card to be generated; The scenic spots to be generated and the reference scenic spots on the map card to be generated are used as coordinate points of the travel route, and an interpolation algorithm is used to fit the travel curve to obtain a map card based on the reference scenic spots; Traverse each scenic spot in the scenic spot list to obtain a map card of each scenic spot.
2. The method according to claim 1, characterized in that The step of obtaining all other attractions within the preset range of the reference attraction includes: A first circular range is obtained with the reference scenic spot as the center and minR as the radius; A second circular range is obtained with the reference scenic spot as the center and maxR as the radius, wherein the radius minR is smaller than the radius maxR; Removing the overlapping portion of the first circular range from the second circular range to obtain a remaining reference circular ring; A two-dimensional coordinate system is established with the reference scenic spot as the origin, and the portion of the reference ring falling in the second quadrant and the third quadrant of the two-dimensional coordinate system is removed, and the remaining portion in the first quadrant and the fourth quadrant is the preset range; Get all other scenic spots within the preset range.
3. The method according to claim 2, characterized in that The minR may be 0. When minR is 0, a second circular range with maxR as the radius and the reference scenic spot as the center is obtained; A two-dimensional coordinate system is established with the reference scenic spot as the origin, and the semicircle of the second circular range falling in the second quadrant and the third quadrant of the two-dimensional coordinate system is removed, and the remaining semicircle of the first quadrant and the fourth quadrant is the preset range; Get all other scenic spots within the preset range.
4. The method according to any one of claims 2 or 3, characterized in that: The step of respectively calculating the similarity between all other attractions within the preset range of the reference attraction and the reference attraction comprises: Pre-label each scenic spot with a label based on its characteristics; Respectively obtain the scenic spot labels of the reference scenic spot and all other scenic spots within a preset range of the reference scenic spot; Generate a label vector of the reference scenic spot and all other scenic spots within the preset range of the reference scenic spot according to the scenic spot labels of the reference scenic spot and all other scenic spots within the preset range of the reference scenic spot; According to the label vector of the reference scenic spot and the label vectors of other scenic spots, the similarities between the reference scenic spot and all other scenic spots are calculated respectively by using cosine similarity.
5. The method according to claim 4, characterized in that The converting the GPS coordinates of the scenic spot to be generated and the reference scenic spot into pixel coordinates on the map card to be generated comprises: The latitude and longitude scale is obtained, and the GPS coordinates of the scenic spot to be generated and the reference scenic spot are scaled according to the latitude and longitude scale to obtain pixel coordinates.
6. The method according to claim 5, characterized in that The obtaining of the latitude and longitude scale comprises: Select any two scenic spots on the map card as mapping scenic spots, and obtain the GPS coordinates and pixel coordinates of the two mapping scenic spots respectively; Obtaining a longitude scale according to the longitudes of the GPS coordinates of the two mapped scenic spots and the pixel abscissas of the pixel coordinates; The latitude scale is obtained according to the latitude of the GPS coordinates of the two mapped scenic spots and the pixel ordinate of the pixel coordinates.
7. The method according to claim 6, characterized in that Scaling the GPS coordinates of the scenic spot to be generated and the reference scenic spot according to the latitude and longitude scale to obtain pixel coordinates includes: Select any one of the two mapped scenic spots; Obtaining the increasing direction of longitude and latitude of the to-be-generated scenic spot or the reference scenic spot to be converted according to the selected mapped scenic spot; Acquire the coordinates of the middle pixel according to the increasing direction of the longitude and latitude and the longitude and latitude scale; The pixel coordinates of the scenic spot to be generated or the reference scenic spot are obtained according to the pixel intermediate coordinates and the pixel coordinates of the selected mapped scenic spot.
8. A device for intelligently generating scenic area map cards, characterized in that: The device comprises: Scenic spot list acquisition module: used to obtain all scenic spots in a certain area and generate a scenic spot list; The scenic spot range acquisition module is used to select any scenic spot from the scenic spot list as a reference scenic spot, and obtain all other scenic spots within the preset range of the reference scenic spot in the GPS map; Similarity calculation module: used to respectively calculate the similarity between all other attractions within the preset range of the reference attraction and the reference attraction; The module for acquiring scenic spots to be generated is used to sort the similarities between all other scenic spots within the preset range of the reference scenic spot and the reference scenic spot, and select the N scenic spots with the highest similarity as the scenic spots to be generated; Coordinate conversion module: used to query the GPS coordinates of the scenic spots to be generated and the reference scenic spots one by one, and convert the GPS coordinates of the scenic spots to be generated and the reference scenic spots into pixel coordinates on the map card to be generated; Scenic spot mapping module: used to generate the scenic spot to be generated and the reference scenic spot at the pixel coordinate position corresponding to the map card to be generated according to the preset size of the map card to be generated; A map card acquisition module is used to use the to-be-generated scenic spots and reference scenic spots on the to-be-generated map card as the coordinate points of the travel route, and use an interpolation algorithm to fit the travel curve to obtain a map card based on the reference scenic spots; Map card output module: used to traverse each scenic spot in the scenic spot list and obtain a map card for each scenic spot.
9. A storage medium, characterized in that: The storage medium stores a computer program, and when the computer program is executed by the main controller, each step in the method for intelligently generating a scenic spot map card as described in any one of claims 1 to 7 is implemented.
Citation Information
Cited By
Map card adaptive generation method, system and equipment
CN121861169A