Route preview method and device, network equipment, storage medium and program product
By generating route preview videos of recommended tour routes in the virtual scene of the Metaverse, the problem of time waste and mismatch between users' needs when making travel plans is solved, and an intuitive route experience is provided.
Patent Information
- Application Number
- CN202510744857.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-06-05
- Publication Date
- 2025-09-12
AI Technical Summary
When users make travel plans, they waste time based on videos and pictures and cannot intuitively feel whether the plan meets their needs, nor can they obtain intuitive route references in scenic spots.
By determining the user's recommended tour route in the metaverse virtual scene, using the user's coordinate location and route requirement information to generate a route preview video, combined with the rating value and popularity parameters of the tour points, an intuitive route preview is provided.
Users can intuitively feel whether the tour route meets their needs in the virtual scene of the metaverse, avoiding the waste of time and energy based on videos and pictures.
Smart Images

Figure CN120632230A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of metaverse technology, and in particular to a route preview method, apparatus, network device, storage medium, and program product. Background Art
[0002] Currently, when users make travel guides, they need to collect guide videos, texts, pictures and other materials related to travel attractions, which requires a lot of time and energy. Moreover, travel guides based on videos, pictures and texts cannot allow users to intuitively feel whether the attractions suit their preferences, nor can they intuitively feel the scenery along the travel route. There is no reference data during the route travel in the scenic area, and users cannot accurately judge whether the travel route meets their travel needs. Summary of the Invention
[0003] The purpose of the technical solution of this application is to provide a route preview method, device, network equipment, storage medium and program product, which is used to solve the problem that users of the existing technology use travel guides based on videos, pictures and texts, which wastes a lot of time and energy and cannot intuitively feel whether the guide meets their own needs.
[0004] One embodiment of the present application provides a route preview method, which includes:
[0005] Determine the second coordinate position in the metaverse virtual scene based on the first coordinate position of the user in the current real scene;
[0006] Determining a recommended tour route based on the second coordinate position, the route requirement information input by the user, and the tour point data in the current real scene;
[0007] A route preview video corresponding to the recommended tour route is generated in the metaverse virtual scene.
[0008] Optionally, the route preview method, wherein determining a recommended tour route based on the second coordinate position, the route requirement information input by the user, and the tour point data in the current real scene, includes:
[0009] Calculating a score value for each of the plurality of tourist spots based on the route demand information input by the user and the tourist spot data in the current real scene;
[0010] Selecting multiple tourist spots in order according to the corresponding ranking order of the score values from high to low to form multiple tourist spot sequences;
[0011] Taking the second coordinate position as the starting coordinate, calculating the tour order of the plurality of tour points in the tour point sequence in the metaverse virtual scene;
[0012] The recommended tour route is determined according to the tour sequence.
[0013] Optionally, in the route preview method, the route demand information includes a tourist spot preference parameter or a user experience preference parameter; wherein the method further comprises:
[0014] In a case where the route demand information includes a tourist spot preference parameter, determining to use a first method to calculate a rating value of the tourist spot; wherein the rating value determined using the first method is positively correlated with the popularity parameter corresponding to the tourist spot and the tourist spot data;
[0015] When the route demand information includes a user experience preference parameter, it is determined that a second method is used to calculate the rating value of the tourist spot; wherein the rating value determined by the second method is positively correlated with the popularity parameter corresponding to the tourist spot and negatively correlated with the tourist spot data.
[0016] Optionally, in the route preview method, the first method includes the following formula:
[0017] Score(u,i)=PrefWeight(u,i)×(β×Popularity(i)+CurrentTraffic(i));
[0018] Among them, Score(u,i) represents the score value of tourist spot i calculated for user u; PrefWeight(u,i) represents the preference weight of user u for tourist spot i; Popularity(i) represents the popularity parameter corresponding to tourist spot i; CurrentTraffic(i) represents the tourist spot data corresponding to tourist spot i; β represents the adjustment factor.
[0019] Optionally, in the route preview method, the second method includes the following formula:
[0020] Score(u,i)=PrefWeight(u,i)×Popularity(i)×1 / (CurrentTraffic(i)+α);
[0021] Among them, Score(u,i) represents the score value of tourist spot i calculated for user u; PrefWeight(u,i) represents the preference weight of user u for tourist spot i; Popularity(i) represents the popularity parameter corresponding to tourist spot i; CurrentTraffic(i) represents the tourist spot data corresponding to tourist spot i; α represents the adjustment factor.
[0022] Optionally, the route preview method, wherein the second coordinate position is used as the starting coordinate, and the touring order of the plurality of touring points in the touring point sequence in the metaverse virtual scene is calculated, comprises:
[0023] Taking the second coordinate position as the starting coordinate, calculating a first distance from each tour point in the tour point sequence in the metaverse virtual scene to the second coordinate position;
[0024] According to the first distance between each tour point and the second coordinate position, a weighted proximity algorithm is adopted to determine the tour order of the multiple tour points in the tour point sequence.
[0025] Optionally, the route preview method further comprises:
[0026] Calculating the second distance between each two adjacent tour points according to the tour order of the plurality of tour points in the tour point sequence;
[0027] The total length of the recommended tour route corresponding to the sequence of tour points is calculated according to the second distance between every two adjacent tour points.
[0028] Optionally, the route preview method further comprises:
[0029] In the route preview video, one or more of the tour points in the recommended tour route, the total route length of the recommended tour route, and the estimated tour duration are displayed.
[0030] Optionally, the route preview method further comprises:
[0031] Obtaining the user's adjustment of sightseeing spots and / or adjustment of the order of sightseeing spots on the recommended sightseeing route;
[0032] A route preview video after adjusting the tour points and / or the order of the tour points of the recommended tour route is displayed in the metaverse virtual scene.
[0033] Optionally, the route preview method, wherein generating a route preview video corresponding to the recommended tour route in the metaverse virtual scene, includes:
[0034] According to the recommended tour route, taking the second coordinate position as a starting position, matching each camera position on the recommended tour route;
[0035] Calculating visual parameters corresponding to each camera position according to the camera position and the traveling direction of the recommended tour route;
[0036] Generate a camera movement script based on the visual parameters corresponding to each camera position;
[0037] Run the camera movement script to generate the route preview video.
[0038] One embodiment of the present application further provides a route preview device, which includes:
[0039] A position determination module, configured to determine a second coordinate position of the user in the metaverse virtual scene based on the first coordinate position of the user in the current real scene;
[0040] a route determination module, configured to determine a recommended tour route based on the second coordinate position, the route requirement information input by the user, and the tour point data in the current real scene;
[0041] A video generation module is used to generate a route preview video corresponding to the recommended tour route in the metaverse virtual scene.
[0042] One embodiment of the present application further provides a network device, which includes a processor, a memory, and a program stored in the memory and executable on the processor, wherein the program, when executed by the processor, implements the route preview method as described in any one of the above items.
[0043] One embodiment of the present application further provides a readable storage medium, wherein a program is stored on the readable storage medium, and when the program is executed by a processor, the steps in the route preview method as described in any one of the above items are implemented.
[0044] The above technical solutions of the embodiments of the present application have at least the following beneficial effects:
[0045] The route preview method described in the embodiment of the present application uses a metaverse virtual scene modeled based on the current real scene to determine the user's recommended tour route, and generates a corresponding preview video of the route in the metaverse virtual scene, so that the user can get an intuitive feeling of the tour route and judge whether the tour route meets their own needs, avoiding the use of travel guides based on videos, pictures and texts, which wastes a lot of time and energy and cannot intuitively feel whether the guide meets their own needs. BRIEF DESCRIPTION OF THE DRAWINGS
[0046] Figure 1 This is a flowchart of the route preview method described in an embodiment of the present application;
[0047] Figure 2 This is a structural diagram of the route preview device described in an embodiment of the present application. DETAILED DESCRIPTION
[0048] In order to make the technical problems, technical solutions and advantages to be solved by this application clearer, a detailed description will be given below with reference to the accompanying drawings and specific embodiments.
[0049] The following will be combined with the drawings in the embodiments of this application to clearly and completely describe the technical solutions in the embodiments of this application. Obviously, the embodiments described are part of the embodiments of this application, not all of them. Based on the embodiments in this application, all other embodiments obtained by ordinary technicians in this field without making creative efforts are within the scope of protection of this application.
[0050] The terms "first," "second," and the like in the specification and claims of this application are used to distinguish similar objects, and are not used to describe a specific order or precedence. It should be understood that the terms used in this manner are interchangeable where appropriate, so that the embodiments of this application can be implemented in an order other than that illustrated or described herein, and that the objects distinguished by "first," "second," and the like are generally of the same type, and do not limit the number of objects; for example, the first object can be one or more. In addition, the term "and / or" in the specification and claims refers to at least one of the connected objects, and the character " / " generally indicates that the objects connected are in an "or" relationship.
[0051] In order to solve the problem that users of the prior art waste a lot of time and energy by using travel guides based on videos, pictures and texts, and cannot intuitively feel whether the guides meet their own needs, the embodiment of the present application provides a route preview method, which uses a metaverse virtual scene modeled based on the current real scene to determine the user's recommended tour route and generate a corresponding preview video of the route in the metaverse virtual scene, so that the user can get an intuitive feeling of the tour route and judge whether the tour route meets their own needs, avoiding the problem that users waste a lot of time and energy by using travel guides based on videos, pictures and texts, and cannot intuitively feel whether the guides meet their own needs.
[0052] Figure 1 This is a flowchart of a route preview method according to one embodiment of the present application, which includes:
[0053] S110, determining a second coordinate position in the metaverse virtual scene based on the first coordinate position of the user in the current real scene;
[0054] S120, determining a recommended tour route based on the second coordinate position, the route requirement information input by the user, and the tour point data in the current real scene;
[0055] S130, generating a route preview video corresponding to the recommended tour route in the metaverse virtual scene.
[0056] The route preview method described in this embodiment is adopted, by obtaining the first coordinate position of the user in the current real scene, determining the second coordinate position in the metaverse virtual scene based on the first coordinate position, and determining the recommended tour route based on the second coordinate position, the route demand information input by the user and the tour point data in the current real scene, so that the determined recommended tour route is more in line with user needs and scene conditions. In addition, the route preview video corresponding to the recommended tour route generated in the metaverse virtual scene allows the user to gain an intuitive experience of the tour route through the metaverse virtual scene.
[0057] The route preview method described in the embodiment of the present application is used, and the method further includes:
[0058] Construct a metaverse virtual scene based on the current real scene;
[0059] Establish a mapping relationship between the coordinate map of the metaverse virtual scene and the coordinate map of the current real scene.
[0060] Among them, the current real scene can be but is not limited to a scenic area or a commercial area, and the tourist spots mentioned in the embodiments of the present application can be but are not limited to scenic spots or shopping mall counters.
[0061] Optionally, each real scene corresponds to a QR code, which is associated with the corresponding metaverse virtual scene. After obtaining the user's registration information by scanning the QR code, the corresponding metaverse virtual scene is displayed on the user's terminal device.
[0062] In some of the embodiments, optionally, the first coordinate position of the user in the current real scene can be obtained through a positioning system of the user terminal device.
[0063] In step S110, according to the first coordinate position of the user in the current real scene, the second coordinate position in the metaverse virtual scene is determined, including:
[0064] According to the first coordinate position of the user in the current real scene, the two-dimensional coordinates in the metaverse virtual scene can be determined through the mapping relationship between the established coordinate map of the metaverse virtual scene and the coordinate map of the current real scene;
[0065] Obtaining Z-axis data according to the two-dimensional coordinates and terrain height data corresponding to the two-dimensional coordinates in the metaverse virtual scene;
[0066] According to the two-dimensional coordinates and the Z-axis data, the second coordinate position in the metaverse virtual scene is determined.
[0067] Specifically, the mapping relationship between the established coordinate map of the metaverse virtual scene and the coordinate map of the current real scene can be utilized. Through a coordinate transformation model, the unreachable areas in the metaverse virtual scene can be excluded. Based on the linear transformation method and the nearest neighbor matching principle, the first coordinate position of the current real scene can be determined. The corresponding two-dimensional coordinate in the metaverse virtual scene is then automatically determined based on the corresponding terrain height data in the metaverse virtual scene. Based on the two-dimensional coordinate data and the Z-axis data, the second coordinate position of the user in the metaverse virtual scene is obtained.
[0068] In an embodiment of the present application, optionally, the method further includes:
[0069] According to the determined second coordinate position in the metaverse virtual scene, a virtual person corresponding to the user is automatically generated in the metaverse virtual scene, that is, the virtual person corresponding to the user is automatically born at the corresponding position corresponding to the second coordinate position in the metaverse virtual scene.
[0070] In another embodiment, optionally, the method further comprises:
[0071] The user's orientation in the current real scene is obtained based on the gyroscope of the user's terminal device.
[0072] According to the determined orientation, when a virtual person corresponding to the user is automatically generated in the metaverse virtual scene, the orientation of the virtual person is kept consistent with the user's orientation. In this way, when the user enters the metaverse virtual scene, he or she can intuitively see the current real-life location, thereby enhancing the sense of reality and familiarity.
[0073] In the embodiment of the present application, optionally, in step S120, determining a recommended tour route based on the second coordinate position, the route requirement information input by the user, and the tour point data in the current real scene includes:
[0074] Calculating a score value for each of the plurality of tourist spots based on the route demand information input by the user and the tourist spot data in the current real scene;
[0075] Selecting multiple tourist spots in order according to the corresponding ranking order of the score values from high to low to form multiple tourist spot sequences;
[0076] Taking the second coordinate position as the starting coordinate, calculating the tour order of the plurality of tour points in the tour point sequence in the metaverse virtual scene;
[0077] The recommended tour route is determined according to the tour sequence.
[0078] In the embodiment of the present application, optionally, the route demand information includes a tourist spot preference parameter or a user experience preference parameter; wherein the method further includes:
[0079] In a case where the route demand information includes a tourist spot preference parameter, determining to use a first method to calculate a rating value of the tourist spot; wherein the rating value determined using the first method is positively correlated with the popularity parameter corresponding to the tourist spot and the tourist spot data;
[0080] When the route demand information includes a user experience preference parameter, it is determined that a second method is used to calculate the rating value of the tourist spot; wherein the rating value determined by the second method is positively correlated with the popularity parameter corresponding to the tourist spot and negatively correlated with the tourist spot data.
[0081] By adopting the route preview method described in this embodiment, it is possible to recommend tour routes based on the route demand information input by the user and the tour point data in the current real scene, so that the recommended tour routes can better meet the user's tour needs and the tour conditions in the current real scene.
[0082] In the embodiment of the present application, optionally, the route demand information is information indicating the user's preferred tour destination, such as a tour point preference parameter indicating that the user prefers popular tour points; or a user experience preference parameter indicating that the user enjoys a good tour experience and hopes to avoid congestion.
[0083] In another embodiment, optionally, the method further comprises:
[0084] Get the user's preference weight for each tourist spot logo.
[0085] The preference weight represents the user's preference for a particular attraction. For example, attractions that have been visited or are of little interest can be assigned a preference weight of 0. For attractions that have not been visited or are of interest, preference weights can be assigned based on the user's interest level. A larger weight indicates greater interest in the attraction. For example, a weight of 1 indicates a weak preference, while a weight of 3 indicates a strong preference.
[0086] With this implementation, after the user scans the QR code and logs in to the corresponding metaverse virtual scene, prompt information can be output to prompt the user to enter route requirement information and to identify the preference weights of each tourist spot in the scene.
[0087] In another embodiment, optionally, the method further comprises:
[0088] The popularity of each tourist spot is marked according to the popularity of each tourist spot in the current real scene, that is, the popularity parameter of the tourist spot is obtained. The higher the popularity of the tourist spot, the higher the popularity and the larger the number of customers. Optionally, the popularity of the tourist spot is between 1 and 3.
[0089] In another embodiment, optionally, the method further comprises:
[0090] Count the passenger flow data of each tourist spot within a preset time period before the current time, and obtain the tourist spot data corresponding to the tourist spot.
[0091] Based on the above, by counting the route demand information, tourist spot data and popularity parameters of the tourist spots input by the user, the rating values of the tourist spots are calculated in different ways according to different route demand information, so that the calculated rating values of the tourist spots can be more in line with the user's preferences.
[0092] In one embodiment, when the route demand information includes a tourist spot preference parameter, a first method is used to calculate the rating value of the tourist spot. The first method includes the following formula:
[0093] Score(u,i)=PrefWeight(u,i)×(β×Popularity(i)+CurrentTraffic(i));
[0094] Among them, Score(u,i) represents the score value of tourist spot i calculated for user u; PrefWeight(u,i) represents the preference weight of user u for tourist spot i; Popularity(i) represents the popularity parameter corresponding to tourist spot i; CurrentTraffic(i) represents the tourist spot data corresponding to tourist spot i; β represents the adjustment factor.
[0095] The adjustment factor β is used to control the contribution of popular tourist attraction preferences to the increase in score. The larger the β value, the greater the contribution of tourist attraction popularity to the increase in score. Optionally, the β value can be set by the system or input by the user according to needs.
[0096] By adopting the above method for calculating the rating value of the tourist spot, the determined rating value is positively correlated with the popularity parameter and tourist spot data corresponding to the tourist spot, so that the determined rating value is more in line with the user's preference for popular tourist spots.
[0097] In another embodiment, when the route demand information includes a user experience preference parameter, a second method is used to calculate the rating value of the tourist spot. The second method includes the following formula:
[0098] Score(u,i)=PrefWeight(u,i)×Popularity(i)×1 / (CurrentTraffic(i)+α);
[0099] Among them, Score(u,i) represents the score value of tourist spot i calculated for user u; PrefWeight(u,i) represents the preference weight of user u for tourist spot i; Popularity(i) represents the popularity parameter corresponding to tourist spot i; CurrentTraffic(i) represents the tourist spot data corresponding to tourist spot i; α represents the adjustment factor.
[0100] The adjustment factor α is used to control the degree of influence of the visitor flow of a tourist spot on the rating value, wherein the larger the α value, the smaller the influence of the visitor flow of a tourist spot on the rating value. Optionally, the α value can be set by the system or input by the user according to needs.
[0101] By using the above-mentioned method of calculating the rating value of the tourist spot, the determined rating value is positively correlated with the popularity parameter corresponding to the tourist spot and negatively correlated with the tourist spot data, so that the determined rating value is more in line with the user's preference for the tour experience and can avoid congested tourist spots.
[0102] In the embodiment of the present application, after calculating the score value Score(u,i) of each of the multiple tour points in the above manner, multiple tour points are selected in sequence according to the corresponding ranking order of the score values from high to low to form multiple tour point sequences.
[0103] In one embodiment, optionally, multiple tourist spots are selected in order of their corresponding ratings from high to low to form multiple tourist spot sequences, including:
[0104] Selecting a preset number X of tourist spots based on the order of the corresponding ratings from high to low; wherein the value of X can be preset;
[0105] According to X tourist spots, X tourist spot sequences are obtained; wherein each of the X tourist spot sequences includes different tourist spots, namely, sequence 1: top 1; sequence 2: top 1, top 2; ¨¨¨; sequence X: top 1, top 2, ¨¨¨, top X.
[0106] The X sightseeing point sequences are a list of sightseeing point sequences of a recommended sightseeing route provided by the user.
[0107] In an embodiment of the present application, optionally, the method further includes:
[0108] Obtaining the order of the preset number Y of tourist spots according to the order of the corresponding rating values from high to low;
[0109] Obtaining a sequence of tour points ultimately used by other recommended users after obtaining the ranking order, which is stored in a database;
[0110] The final used tour point sequence is added to multiple tour point sequences, that is, X tour point sequences are added to form a tour point sequence list of a recommended tour route provided to the user.
[0111] By adopting the above-mentioned embodiment, a plurality of tourist spots are selected in sequence according to the arrangement order of the corresponding scoring values from high to low, and a tourist spot sequence of a recommended tourist route provided to the user can be obtained. After obtaining the tourist spot sequence, the second coordinate position is used as the starting coordinate to calculate the touring order of the plurality of tourist spots in the tourist spot sequence in the metaverse virtual scene.
[0112] In the embodiment of the present application, optionally, the second coordinate position is used as the starting coordinate to calculate the tour order of multiple tour points in the tour point sequence in the metaverse virtual scene, including:
[0113] Taking the second coordinate position as the starting coordinate, calculating a first distance from each tour point in the tour point sequence in the metaverse virtual scene to the second coordinate position;
[0114] According to the first distance between each tour point and the second coordinate position, a weighted proximity algorithm is adopted to determine the tour order of the multiple tour points in the tour point sequence.
[0115] Optionally, the path between points on the map can be calculated using a pre-designed route module Distance(start,end), where start is the starting point coordinate and end is the end point coordinate. By inputting the starting point and the end point into the route module Distance(start,end), the corresponding route and distance are obtained.
[0116] Optionally, the principle of using the route module to calculate the distance between two points on the map can be:
[0117] Distance(start,end)=∫(dx+dy)^(1 / 2)dt;
[0118] Among them, (x, y) is the coordinate of any point on the route between the starting coordinate start and the end coordinate end.
[0119] By using the route module, with the second coordinate position as the starting coordinate and each tourist point in the tourist point sequence as the end coordinate, a first distance from each tourist point in the tourist point sequence to the position corresponding to the second coordinate position can be obtained.
[0120] For example, one of the obtained tour point sequences is a1, a2, a3..., the second coordinate position (that is, the position corresponding to the current starting point) is a1, and the distances from the other tour points a2, a3... in the tour point sequence except a1 to the tour point a1 are calculated cyclically to obtain multiple routes and distances (first distance): Distance(a1, a2), Distance(a1, a3)...
[0121] After obtaining the first distance, a weighted proximity algorithm is used according to the first distance from each tour point to the second coordinate position to determine the tour order of the multiple tour points in the tour point sequence.
[0122] Specifically, a weight corresponding to a weighted value is determined for each first distance from the second coordinate position to each tourist point in the tourist point sequence. A larger first distance indicates a smaller weight; conversely, a smaller first distance indicates a larger weight. The tourist points in the tourist point sequence are sorted in descending order based on the weights corresponding to the first distances to obtain a tour order for the tourist points.
[0123] For example, assuming the first distance is d, the corresponding weight value can be 1 / d. By sorting the weight values corresponding to multiple first distances from large to small, the tour order of multiple tour points can be obtained as: b1, b2, b3, ..., bn.
[0124] In one embodiment of the present application, optionally, the method further includes:
[0125] Calculating the second distance between each two adjacent tour points according to the tour order of the plurality of tour points in the tour point sequence;
[0126] The total length of the recommended tour route corresponding to the sequence of tour points is calculated according to the second distance between every two adjacent tour points.
[0127] For example, when the tour order of the obtained multiple tourist points is: b1, b2, b3, ..., bn, the above-mentioned route module is used to further calculate the distance Distance(b1, b2) between b1 and b2, the distance Distance(b2, b3) between b2 and b3, etc., to obtain the route and distance (second distance) between each two adjacent tourist points, and the distances between each two adjacent tourist points are merged to obtain the total route length of the recommended tour route corresponding to the tourist point sequence.
[0128] The calculation formula for the total length of the route, Total_Distance, can be:
[0129]
[0130] Among them, d i is the i-th second distance.
[0131] In an embodiment of the present application, optionally, the method further includes:
[0132] Obtaining the user's adjustment of sightseeing spots and / or adjustment of the order of sightseeing spots on the recommended sightseeing route;
[0133] A route preview video after adjusting the tour points and / or the order of the tour points of the recommended tour route is displayed in the metaverse virtual scene.
[0134] Using the method described in this embodiment, after obtaining a recommended tour route automatically recommended using the above method, the user can directly select the recommended tour route, or adjust the attractions in the recommended tour route and / or adjust the order of the attractions. For example, some attractions in the recommended tour route can be deleted, attractions can be added, or the order of multiple attractions can be adjusted. This method can increase the flexibility of tour route recommendations.
[0135] In an embodiment of the present application, optionally, the method further includes: displaying one or more of the tour points in the recommended tour route, the total route length of the recommended tour route, and the estimated tour duration in the route preview video.
[0136] In this way, by displaying one or more of the tourist spots in the recommended tour route, the total route length of the recommended tour route, and the estimated tour time, users can more intuitively understand information such as the tourist spots in the recommended tour route.
[0137] In the embodiment of the present application, in step S130, a route preview video corresponding to the recommended tour route is generated in the metaverse virtual scene, including:
[0138] According to the recommended tour route, taking the second coordinate position as a starting position, matching each camera position on the recommended tour route;
[0139] Calculating visual parameters corresponding to each camera position according to the camera position and the traveling direction of the recommended tour route;
[0140] Generate a camera movement script based on the visual parameters corresponding to each camera position;
[0141] Run the camera movement script to generate the route preview video.
[0142] When adopting this implementation mode, in the metaverse virtual scene, according to the terrain of the current real scene, it is necessary to pre-generate the camera path data on the map route of the metaverse virtual scene: including the camera position of the recommended must-see points, each camera position, camera speed and several recommended camera visual parameters, etc.
[0143] Optionally, the visual parameters include camera orientation and / or field of view (FOV), etc.
[0144] According to the camera path data created above, when generating the route preview video corresponding to the recommended tour route, a virtual camera is created. According to the recommended tour route confirmed by the user, starting from the user's current position (second coordinate position), the nearest recommended camera position on the recommended tour route is continuously matched, and the most suitable visual parameters (recommended camera orientation and FOV) are selected according to the direction of travel and the direction algorithm. Among them, each shift and orientation change of the camera is smoothly interpolated to generate a camera movement script. When running the camera movement script, real-time recording is performed to generate a route video for presentation to the user. Optionally, the camera travel speed is updated every time a camera position point is passed. According to the pre-configured recommended speed, the camera will stop relatively slowly for preview at key locations or popular attractions.
[0145] Optionally, the following process may be used to generate a video based on the recommended tour route:
[0146] First, based on the recommended tour route, match the shooting points along the way:
[0147] For example, points on a recommended tour route are represented as [p1=(x1, y1, z1), p2=(x2, y2, z2), ..., pn=(xn, yn, zn)].
[0148] For the p1p2 path on the recommended tour route, screening is performed based on N pre-marked video-capable points within the path range, including:
[0149] Calculate the most important focal point of the camera's view on the path p1p2 for each shooting point. The "most important focal point" of each shooting point is the projection point of its field of view centerline on the path p1p2, that is, the closest intersection point with the path segment along the line of sight from the shooting point.
[0150] Sort the most important focus points of each shooting point in the p1p2 path according to their order.
[0151] According to the above method, a series of finally selected shooting points patpoint1, patpoint2, patpoint3, ... that meet the path p1p2 are matched, so that the tour route can be captured to the greatest extent according to these shooting points.
[0152] Similarly, for the p2p3 path, p3p4 path, etc. on the recommended tour route, the corresponding shooting point sequences are also screened out to form the shooting points patpoint1, patpoint2, patpoint3, ..., patpointm of the tour route p1p2 ... pn.
[0153] After matching the shooting points along the recommended tour route, the camera moves and records the video based on the shooting points, including the following process:
[0154] Based on the shooting points patpoint1, patpoint2, patpoint3, ..., patpointm, the virtual camera virtualCam is first configured to the position and angle of patpoint1. After executing the camera movement code, the camera moves from patpoint1 to patpoint2 according to the configured speed and angle. After a suitable pause, the camera moves to patpoint3, and the camera movement code for each point is executed in this way. In this way, after executing the camera movement at each shooting point, the RenderTexture of the virtual camera can be collected and sent to the FFmpeg input stream to generate the recorded video.
[0155] It should be noted that the above process of generating a recorded video is only an example and is not limited to this.
[0156] In another embodiment of the method of the embodiment of the present application, after performing real-time recording when running the camera movement script, the method further includes:
[0157] If the rendering effect of the preview video of the recommended tour route has been pre-saved in the cloud data, the preview video is obtained from the cloud data and displayed;
[0158] If the rendering effect of the preview video of the recommended tour route is not pre-saved in the cloud data, the preview video is rendered locally to obtain the rendered preview video and upload it to the cloud platform. Alternatively, the client sends a video generation request to the cloud device, which includes the path parameters of the recommended tour route. The cloud device performs route recording and rendering task scheduling, generates a preview video, and sends it to the client. Optionally, the path parameters include the coordinate information of multiple points on the recommended tour route, such as [p1 = (x1, y1, z1), p2 = (x2, y2, z2), ..., pn = (xn, yn, zn)].
[0159] Optionally, when the preview video is generated locally, the user can quickly view the preview effect through the client, and after uploading it to the cloud platform, the preview video can be previewed again; when the preview video is generated by a cloud device, the local game operation of the client will not be affected during the generation of the preview video, but the preview effect can only be seen after the cloud rendering task is scheduled and executed.
[0160] The route preview method described in the embodiments of the present application can obtain the user's current location information, generate a recommended tour route based on the current location information and user preferences and settings, and generate a route preview video corresponding to the recommended tour route in the Metaverse virtual scenic area based on the user's current location information and the recommended tour route. Using this method, a virtual camera-recorded preview route can be created for the user in conjunction with the real-life Metaverse scene. This allows the user to match their actual current location within the Metaverse scene, gain an intuitive understanding of the tour route, and determine whether the tour route meets their needs. This avoids the problem of using travel guides based on videos, images, and text, which wastes a lot of time and energy and provides no intuitive understanding of whether the guide meets their needs.
[0161] One embodiment of the present application further provides a route preview device, such as Figure 2 Shown, including:
[0162] A position determination module 210 is configured to determine a second coordinate position of the user in the metaverse virtual scene based on the first coordinate position of the user in the current real scene;
[0163] a route determination module 220 for determining a recommended tour route based on the second coordinate position, the route requirement information input by the user, and the tour point data in the current real scene;
[0164] The video generation module 230 is used to generate a route preview video corresponding to the recommended tour route in the metaverse virtual scene.
[0165] By using this route preview device, the user's recommended tour route is determined using the metaverse virtual scene modeled based on the current real scene, and a corresponding preview video of the route is generated in the metaverse virtual scene, so that the user can get an intuitive feeling of the tour route and judge whether the tour route meets their own needs, avoiding the use of travel guides based on videos, pictures and texts, which wastes a lot of time and energy and cannot intuitively feel whether the guide meets their own needs.
[0166] Optionally, in the route preview device, the route determination module 220 determines a recommended tour route based on the second coordinate position, the route requirement information input by the user, and the tour point data in the current real scene, including:
[0167] Calculating a score value for each of the plurality of tourist spots based on the route demand information input by the user and the tourist spot data in the current real scene;
[0168] Selecting multiple tourist spots in order according to the corresponding ranking order of the score values from high to low to form multiple tourist spot sequences;
[0169] Taking the second coordinate position as the starting coordinate, calculating the tour order of the plurality of tour points in the tour point sequence in the metaverse virtual scene;
[0170] The recommended tour route is determined according to the tour sequence.
[0171] Optionally, in the route preview device, the route demand information includes a tourist spot preference parameter or a user experience preference parameter; wherein the route determination module 220 is further configured to:
[0172] In a case where the route demand information includes a tourist spot preference parameter, determining to use a first method to calculate a rating value of the tourist spot; wherein the rating value determined using the first method is positively correlated with the popularity parameter corresponding to the tourist spot and the tourist spot data;
[0173] When the route demand information includes a user experience preference parameter, it is determined that a second method is used to calculate the rating value of the tourist spot; wherein the rating value determined by the second method is positively correlated with the popularity parameter corresponding to the tourist spot and negatively correlated with the tourist spot data.
[0174] Optionally, in the route preview device, the first method includes the following formula:
[0175] Score(u,i)=PrefWeight(u,i)×(β×Popularity(i)+CurrentTraffic(i));
[0176] Among them, Score(u,i) represents the score value of tourist spot i calculated for user u; PrefWeight(u,i) represents the preference weight of user u for tourist spot i; Popularity(i) represents the popularity parameter corresponding to tourist spot i; CurrentTraffic(i) represents the tourist spot data corresponding to tourist spot i; β represents the adjustment factor.
[0177] Optionally, in the route preview device, the second method includes the following formula:
[0178] Score(u,i)=PrefWeight(u,i)×Popularity(i)×1 / (CurrentTraffic(i)+α);
[0179] Among them, Score(u,i) represents the score value of tourist spot i calculated for user u; PrefWeight(u,i) represents the preference weight of user u for tourist spot i; Popularity(i) represents the popularity parameter corresponding to tourist spot i; CurrentTraffic(i) represents the tourist spot data corresponding to tourist spot i; α represents the adjustment factor.
[0180] Optionally, in the route preview device, the route determination module 220 calculates the tour order of the plurality of tour points in the tour point sequence in the metaverse virtual scene using the second coordinate position as the starting coordinate, including:
[0181] Taking the second coordinate position as the starting coordinate, calculating a first distance from each tour point in the tour point sequence in the metaverse virtual scene to the second coordinate position;
[0182] According to the first distance between each tour point and the second coordinate position, a weighted proximity algorithm is adopted to determine the tour order of the multiple tour points in the tour point sequence.
[0183] Optionally, in the route preview device, the route determination module 220 is further configured to:
[0184] Calculating the second distance between each two adjacent tour points according to the tour order of the plurality of tour points in the tour point sequence;
[0185] The total length of the recommended tour route corresponding to the sequence of tour points is calculated according to the second distance between every two adjacent tour points.
[0186] Optionally, in the route preview device, the video generation module 230 is further configured to:
[0187] In the route preview video, one or more of the tour points in the recommended tour route, the total route length of the recommended tour route, and the estimated tour duration are displayed.
[0188] Optionally, in the route preview device, the video generation module 230 is further configured to:
[0189] Obtaining the user's adjustment of sightseeing spots and / or adjustment of the order of sightseeing spots on the recommended sightseeing route;
[0190] A route preview video after adjusting the tour points and / or the order of the tour points of the recommended tour route is displayed in the metaverse virtual scene.
[0191] Optionally, in the route preview device, the video generation module 230 generates a route preview video corresponding to the recommended tour route in the metaverse virtual scene, including:
[0192] According to the recommended tour route, taking the second coordinate position as a starting position, matching each camera position on the recommended tour route;
[0193] Calculating visual parameters corresponding to each camera position according to the camera position and the traveling direction of the recommended tour route;
[0194] Generate a camera movement script based on the visual parameters corresponding to each camera position;
[0195] Run the camera movement script to generate the route preview video.
[0196] The route preview method and the route preview device described in the embodiment of the present application are based on the same application concept. Since the principles of solving problems by the method and the device are similar, the implementation of the device and the method can refer to each other, and the repeated parts will not be repeated.
[0197] One embodiment of the present application further provides a network device, which includes a processor, a memory, and a program stored in the memory and executable on the processor, wherein the program, when executed by the processor, implements the route preview method as described in any one of the above items.
[0198] The specific implementation of the route preview method executed by the program running on the processor of the network device can be found in the detailed description of the route preview method, which will not be repeated here.
[0199] In addition, a specific embodiment of the present application further provides a readable storage medium having a computer program stored thereon, wherein when the program is executed by a processor, the steps in the route preview method described in any one of the above items are implemented.
[0200] Specifically, the readable storage medium is applied to the above-mentioned network device. When applied to the network device, the execution steps in the corresponding route preview method are as described in detail above and will not be repeated here.
[0201] Another embodiment of the present application further provides a computer program product, which includes computer instructions, and when the computer instructions are executed by a processor, the steps in any one of the route preview methods described above are implemented.
[0202] Optionally, the embodiments of the present application may take the form of a computer program product implemented on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code.
[0203] The computer program product described in the embodiment of the present application includes computer instructions that, when executed by a processor, implement the various processes of the method embodiment shown above and can achieve the same technical effect. To avoid repetition, they will not be described here.
[0204] In the several embodiments provided in this application, it should be understood that the disclosed methods and devices can be implemented in other ways. For example, the device embodiments described above are merely schematic. For example, the division of the units is merely a logical function division. In actual implementation, there may be other division methods, such as multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be an indirect coupling or communication connection of some interfaces, devices or units, which can be electrical, mechanical or other forms.
[0205] In addition, the functional units in the various embodiments of the present application may be integrated into a single processing unit, or each unit may be physically included separately, or two or more units may be integrated into a single unit. The aforementioned integrated units may be implemented in the form of hardware or in the form of hardware plus software functional units.
[0206] The above-mentioned integrated unit implemented in the form of a software functional unit can be stored in a computer-readable storage medium. The above-mentioned software functional unit is stored in a storage medium and includes a number of instructions for causing a computer device (which can be a personal computer, server, or network device, etc.) to execute some steps of the sending and receiving methods described in various embodiments of the present application. The aforementioned storage medium includes: a USB flash drive, a mobile hard disk, a read-only memory (ROM), a random access memory (RAM), a magnetic disk, or an optical disk, etc., various media that can store program code.
[0207] The above is a preferred embodiment of the present application. It should be pointed out that for ordinary personnel in this technical field, several improvements and modifications can be made without departing from the principles described in the present application. These improvements and modifications should also be regarded as the scope of protection of the present application.
Claims
1. A route preview method, characterized in that: include: Determine the second coordinate position in the metaverse virtual scene based on the first coordinate position of the user in the current real scene; Determining a recommended tour route based on the second coordinate position, the route requirement information input by the user, and the tour point data in the current real scene; A route preview video corresponding to the recommended tour route is generated in the metaverse virtual scene.
2. The route preview method according to claim 1, characterized in that: Determining a recommended tour route according to the second coordinate position, the route requirement information input by the user, and the tour point data in the current real scene includes: Calculating a score value for each of the plurality of tourist spots based on the route demand information input by the user and the tourist spot data in the current real scene; Selecting multiple tourist spots in order according to the corresponding ranking order of the score values from high to low to form multiple tourist spot sequences; Taking the second coordinate position as the starting coordinate, calculating the tour order of the plurality of tour points in the tour point sequence in the metaverse virtual scene; The recommended tour route is determined according to the tour sequence.
3. The route preview method according to claim 2, characterized in that: The route demand information includes a tourist spot preference parameter or a user experience preference parameter; wherein the method further includes: In a case where the route demand information includes a tourist spot preference parameter, determining to use a first method to calculate a rating value of the tourist spot; wherein the rating value determined using the first method is positively correlated with the popularity parameter corresponding to the tourist spot and the tourist spot data; When the route demand information includes a user experience preference parameter, it is determined that a second method is used to calculate the rating value of the tourist spot; wherein the rating value determined by the second method is positively correlated with the popularity parameter corresponding to the tourist spot and negatively correlated with the tourist spot data.
4. The route preview method according to claim 3, characterized in that: The first method includes the following formula: Score(u,i)=PrefWeight(u,i)×(β×Popularity(i)+CurrentTraffic(i)); Among them, Score(u,i) represents the score value of tourist spot i calculated for user u; PrefWeight(u,i) represents the preference weight of user u for tourist spot i; Popularity(i) represents the popularity parameter corresponding to tourist spot i; CurrentTraffic(i) represents the tourist spot data corresponding to tourist spot i; β represents the adjustment factor.
5. The route preview method according to claim 3, characterized in that: The second method includes the following formula: Score(u,i)=PrefWeight(u,i)×Popularity(i)×1 / (CurrentTraffic(i)+α); Among them, Score(u,i) represents the score value of tourist spot i calculated for user u; PrefWeight(u,i) represents the preference weight of user u for tourist spot i; Popularity(i) represents the popularity parameter corresponding to tourist spot i; CurrentTraffic(i) represents the tourist spot data corresponding to tourist spot i; α represents the adjustment factor.
6. The route preview method according to claim 2, characterized in that: Taking the second coordinate position as the starting coordinate, calculating the tour order of multiple tour points in the tour point sequence in the metaverse virtual scene, including: Taking the second coordinate position as the starting coordinate, calculating a first distance from each tour point in the tour point sequence in the metaverse virtual scene to the second coordinate position; According to the first distance between each tour point and the second coordinate position, a weighted proximity algorithm is adopted to determine the tour order of the multiple tour points in the tour point sequence.
7. The route preview method according to claim 2 or 6, characterized in that: The method further comprises: Calculating the second distance between each two adjacent tour points according to the tour order of the plurality of tour points in the tour point sequence; The total length of the recommended tour route corresponding to the sequence of tour points is calculated according to the second distance between every two adjacent tour points.
8. A route preview device, characterized in that: include: A position determination module, configured to determine a second coordinate position of the user in the metaverse virtual scene based on the first coordinate position of the user in the current real scene; a route determination module, configured to determine a recommended tour route based on the second coordinate position, the route requirement information input by the user, and the tour point data in the current real scene; A video generation module is used to generate a route preview video corresponding to the recommended tour route in the metaverse virtual scene.
9. A network device, characterized in that: The method comprises a processor, a memory, and a program stored in the memory and executable on the processor, wherein when the program is executed by the processor, the route preview method according to any one of claims 1 to 7 is implemented.
10. A readable storage medium, characterized in that: The readable storage medium stores a program, and when the program is executed by the processor, the steps in the route preview method according to any one of claims 1 to 7 are implemented.
Citation Information
Cited By
Guide path display method and device of virtual scene, computer equipment and medium
CN121165945A