WO2024027274A1 - 一种地图场景渲染方法、装置、服务器、终端、计算机可读存储介质及计算机程序产品 - Google Patents
一种地图场景渲染方法、装置、服务器、终端、计算机可读存储介质及计算机程序产品 Download PDFInfo
- Publication number
- WO2024027274A1 WO2024027274A1 PCT/CN2023/094191 CN2023094191W WO2024027274A1 WO 2024027274 A1 WO2024027274 A1 WO 2024027274A1 CN 2023094191 W CN2023094191 W CN 2023094191W WO 2024027274 A1 WO2024027274 A1 WO 2024027274A1
- Authority
- WO
- WIPO (PCT)
- Prior art keywords
- rendering
- map
- video
- resource
- rendered
- Prior art date
Links
- 238000009877 rendering Methods 0.000 title claims abstract description 478
- 238000000034 method Methods 0.000 title claims abstract description 120
- 238000004590 computer program Methods 0.000 title claims abstract description 35
- 238000003860 storage Methods 0.000 title claims abstract description 18
- 238000009826 distribution Methods 0.000 claims description 80
- 239000012634 fragment Substances 0.000 claims description 31
- 230000004044 response Effects 0.000 claims description 8
- 125000002015 acyclic group Chemical group 0.000 claims description 5
- 238000005516 engineering process Methods 0.000 abstract description 12
- 238000013473 artificial intelligence Methods 0.000 abstract description 3
- 238000010586 diagram Methods 0.000 description 36
- 230000008569 process Effects 0.000 description 28
- 230000011218 segmentation Effects 0.000 description 11
- 235000019580 granularity Nutrition 0.000 description 8
- 230000005540 biological transmission Effects 0.000 description 7
- 230000006870 function Effects 0.000 description 7
- 238000012545 processing Methods 0.000 description 5
- 230000002776 aggregation Effects 0.000 description 4
- 238000004220 aggregation Methods 0.000 description 4
- 238000004891 communication Methods 0.000 description 4
- 230000004927 fusion Effects 0.000 description 4
- 238000007726 management method Methods 0.000 description 4
- 230000001960 triggered effect Effects 0.000 description 4
- 230000000694 effects Effects 0.000 description 3
- 238000000605 extraction Methods 0.000 description 3
- 230000007704 transition Effects 0.000 description 3
- 230000006978 adaptation Effects 0.000 description 2
- 230000004931 aggregating effect Effects 0.000 description 2
- 230000018109 developmental process Effects 0.000 description 2
- 230000003287 optical effect Effects 0.000 description 2
- 230000001133 acceleration Effects 0.000 description 1
- 230000009286 beneficial effect Effects 0.000 description 1
- 230000008859 change Effects 0.000 description 1
- 238000012937 correction Methods 0.000 description 1
- 238000005520 cutting process Methods 0.000 description 1
- 238000001514 detection method Methods 0.000 description 1
- 238000011161 development Methods 0.000 description 1
- 238000007599 discharging Methods 0.000 description 1
- 230000003993 interaction Effects 0.000 description 1
- 238000013507 mapping Methods 0.000 description 1
- 239000000463 material Substances 0.000 description 1
- 230000008520 organization Effects 0.000 description 1
- 238000011160 research Methods 0.000 description 1
- 238000005070 sampling Methods 0.000 description 1
- 230000001932 seasonal effect Effects 0.000 description 1
- 230000009466 transformation Effects 0.000 description 1
- 230000000007 visual effect Effects 0.000 description 1
- 238000012800 visualization Methods 0.000 description 1
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F9/00—Arrangements for program control, e.g. control units
- G06F9/06—Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
- G06F9/46—Multiprogramming arrangements
- G06F9/50—Allocation of resources, e.g. of the central processing unit [CPU]
- G06F9/5061—Partitioning or combining of resources
- G06F9/5072—Grid computing
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F9/00—Arrangements for program control, e.g. control units
- G06F9/06—Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
- G06F9/46—Multiprogramming arrangements
- G06F9/50—Allocation of resources, e.g. of the central processing unit [CPU]
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F9/00—Arrangements for program control, e.g. control units
- G06F9/06—Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
- G06F9/46—Multiprogramming arrangements
- G06F9/50—Allocation of resources, e.g. of the central processing unit [CPU]
- G06F9/5005—Allocation of resources, e.g. of the central processing unit [CPU] to service a request
- G06F9/5027—Allocation of resources, e.g. of the central processing unit [CPU] to service a request the resource being a machine, e.g. CPUs, Servers, Terminals
-
- Y—GENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
- Y02—TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
- Y02D—CLIMATE CHANGE MITIGATION TECHNOLOGIES IN INFORMATION AND COMMUNICATION TECHNOLOGIES [ICT], I.E. INFORMATION AND COMMUNICATION TECHNOLOGIES AIMING AT THE REDUCTION OF THEIR OWN ENERGY USE
- Y02D10/00—Energy efficient computing, e.g. low power processors, power management or thermal management
Definitions
- This application relates to the field of Internet technology, and specifically to a map scene rendering method, device, server, terminal, computer-readable storage medium and computer program product.
- map products have been widely used, for example, in map navigation, smart cultural tourism, smart transportation and other scenarios.
- cloud rendering is mostly used to render the video of the map scene, and the rendered video is transmitted to the terminal to display the corresponding map scene in the terminal.
- Embodiments of the present application provide a map scene rendering method, device, server, terminal, computer-readable storage medium and computer program product, which can reduce the occupancy rate of cloud resources and thereby improve the rendering efficiency of map scenes.
- Embodiments of this application provide a map scene rendering method, which is suitable for servers.
- the method includes:
- the rendering instance node queue is obtained by associating M rendering instance nodes with the path information of the map to be rendered.
- M rendering instances are The instance node is used to render N resource slices.
- the N resource slices are obtained by dividing the map scene resources by the scene structure information of the map to be rendered.
- the map scene resources are used to render the map scene of the map to be rendered.
- M ⁇ N, M and N are positive integers;
- Embodiments of the present application also provide a map scene rendering method, which is suitable for terminals.
- the method includes:
- map rendering instruction In response to a map display operation for the map to be rendered, generate a map rendering instruction and send the map rendering instruction to the server, where the map rendering instruction includes path start and end information in the map to be rendered;
- the target video data is that the server determines at least one target instance node from the rendering instance node queue based on the path start and end information, And according to the data obtained by rendering the corresponding resource slice according to each target instance node, the rendering instance node queue is obtained by correlating the path information of the map to be rendered with M rendering instance nodes, and the M rendering instance nodes are used for Render N resource slices.
- the N resource slices are obtained by segmenting map scene resources through the scene structure information of the map to be rendered.
- the map scene resources are used to render the map scene of the map to be rendered, M ⁇ N, M and N are positive integers;
- map scene fragments are displayed.
- Embodiments of the present application also provide a video rendering method, which is suitable for servers.
- the method includes:
- the instance node queue is obtained by associating M video rendering instance nodes with the position information of the video resource slice in the video resource.
- M The video rendering instance node is used to render N video resource slices.
- the N video resource slices are obtained by segmenting video resources through the video structure information of the video.
- the video resources are used to construct the video, M ⁇ N , M and N are positive integers;
- Embodiments of the present application also provide a method for playing rendered video data, which is suitable for terminals.
- the method includes:
- Receive video data returned by the server for the rendering instruction where the video data is that the server determines at least one target video instance node from the instance node queue based on the video related information to be rendered, and based on each target video
- the instance node is obtained by rendering the corresponding video resource slice.
- the instance node queue is obtained by associating the position information of the video resource slice in the video resource with M video rendering instance nodes.
- the M video rendering instance nodes are used to render N videos.
- Resource slices, N video resource slices are obtained by segmenting video resources through the video structure information of the video, and the video resources are used to construct the video, M ⁇ N, M and N are positive integers;
- a video clip is played.
- An embodiment of the present application provides a first map scene rendering device, including:
- a receiving unit configured to receive a map rendering instruction for a map to be rendered sent by the terminal, the map rendering instruction including path start and end information in the map to be rendered receiving a map rendering instruction for a map scene sent by the terminal,
- the map rendering instructions include corresponding path start and end information in the map scene;
- a rendering unit configured to determine at least one target instance node corresponding to the path start and end information from a rendering instance node queue, which associates M rendering instance nodes through the path information of the map to be rendered. Obtained, M rendering instance nodes are used to render N resource slices, and the N resource slices are obtained by segmenting map scene resources through the scene structure information of the map to be rendered, and the map scene resources are used to render the The map scene of the map to be rendered, M ⁇ N, M and N are positive integers; render the resource slice according to each target instance node to obtain the target video data;
- a video sending unit configured to send the target video data to the terminal.
- An embodiment of the present application provides a second map scene rendering device, including:
- An instruction sending unit configured to respond to a map display operation for a map scene to be rendered, generate a map rendering instruction for the map scene, and send the map rendering instruction to the server, where the map rendering instruction includes the map scene to be rendered. Corresponding route start and end information in the map scene;
- a data receiving unit configured to receive target video data returned by the server for the map rendering instruction, where the target video data is the path start and end information included by the server based on the map rendering instruction, in the rendering instance node queue. Determine at least one target instance node, and render the data obtained by rendering the resource slice corresponding to the map scene according to each target instance node.
- the rendering instance node queue passes through the to-be-rendered
- the path information of the map is obtained by correlating M rendering instance nodes.
- the M rendering instance nodes are used to render N resource slices.
- the N resource slices are obtained by dividing the map scene resources by the scene structure information of the map to be rendered.
- the map scene resource is used to render the map scene of the map to be rendered, M ⁇ N, M and N are positive integers;
- a display unit configured to display map scene segments according to the target video data.
- An embodiment of the present application also provides a first video rendering device, including:
- a video resource acquisition unit configured to acquire video resources, which are used to construct videos
- the video resource segmentation unit is configured to segment the video resource based on the video structure information of the video, obtain N video resource slices, and assign each video resource slice to the corresponding video rendering instance node;
- the node association unit is configured to associate the M video rendering instance nodes corresponding to the N video resource slices according to the position information of the video resource slices in the video resources to obtain the instance node queue;
- An instruction receiving unit configured to receive a video-specific rendering instruction sent by the terminal, where the rendering instruction includes video-related information to be rendered;
- a video rendering unit configured to determine a target video instance node in the instance node queue based on the video related information to be rendered, and render the video resource slice according to the target video instance node to obtain video data; convert the video Data is sent to the terminal.
- An embodiment of the present application also provides a second video rendering device, including:
- a rendering instruction sending unit configured to respond to a video display operation for a video, generate a rendering instruction for the video, and send the rendering instruction to the server, where the rendering instruction includes video-related information to be rendered;
- a video data receiving unit configured to receive video data returned by the server for the rendering instruction, the video data being that the server determines at least one target video instance node from the instance node queue based on the video related information to be rendered. , and is obtained by rendering the corresponding video resource slice according to each target video instance node.
- the instance node queue is obtained by associating M video rendering instance nodes with the position information of the video resource slice in the video resource, and M video
- the rendering instance node is used to render N video resource slices.
- the N video resource slices are obtained by segmenting video resources through the video structure information of the video.
- the video resources are used to construct the video, M ⁇ N, M and N is a positive integer receiving the video data returned by the server for the rendering instruction.
- the video data is based on the video-related information to be rendered included in the rendering instruction.
- the server determines the target video instance node in the instance node queue, and determines the target video instance node according to the target video. Data obtained by the instance node rendering the video resource slice corresponding to the video-related information to be rendered;
- a parameter extraction unit configured to extract video header annotation information from the video data, and parse the video topology sorting parameters of the video data from the video header annotation information
- the rendered video data display unit is configured to aggregate the video data based on the video topological sorting parameter, and display the aggregated video data as rendered video data.
- Embodiments of the present application also provide a computer-readable storage medium that stores computer-executable instructions or computer programs, and the computer-executable instructions or computer programs are suitable for loading by the first processor, so as to Execute the method applicable to the server provided by the embodiment of the present application; alternatively, the computer-executable instructions or computer-executable instructions are suitable for loading by the second processor to execute the method applicable to the terminal provided by the embodiment of the present application.
- An embodiment of the present application also provides a server, including a first memory, a first processor, and computer executable instructions or computer programs stored in the first memory and capable of running on the first processor, so When the first processor executes the computer-executable instructions or computer programs, the method provided by the embodiment of the present application and applicable to the server is implemented.
- An embodiment of the present application provides a terminal, including a second memory, a second processor, and computer executable instructions or computer programs stored in the second memory and capable of running on the second processor,
- the second processor executes the computer executable instructions or computer programs, it implements the method provided by the embodiments of the present application and is applicable to the terminal. end method.
- Embodiments of the present application also provide a computer program product.
- the computer program product includes computer executable instructions or computer programs. When the computer executable instructions or computer programs are executed by the first processor, the methods provided by the embodiments of the present application are implemented. A method applicable to a server; or, when the computer-executable instructions or computer programs are executed by a second processor, the method applicable to a terminal provided by the embodiment of the present application is implemented.
- the embodiment of the present application divides the map scene resources according to the scene structure information of the map to be rendered, and constructs the rendering instance node queue corresponding to the resource slice according to the path information of the map to be rendered, thereby receiving the map rendering instruction for the map to be rendered.
- the corresponding target instance node is searched in the rendering instance node queue, and the resource slice corresponding to the path start and end information is rendered according to the target instance node; in this way, a method based on at least one target is implemented
- the process of rendering the map by the instance node refines the rendering granularity. Therefore, it can reduce the repeated rendering of map scene resources, reduce the occupancy rate of cloud resources, and improve resource utilization.
- the slicing resource rendering method can improve rendering concurrency. , thereby improving the rendering efficiency of map scenes.
- Figure 1 is a schematic diagram of an implementation scene of a map scene rendering method provided by an embodiment of the present application
- Figure 2a is a schematic flowchart of obtaining a target instance node provided by an embodiment of the present application
- Figure 2b is a schematic flowchart of a map scene rendering method provided by an embodiment of the present application.
- Figure 3a is a schematic topological structure diagram of a map scene rendering method provided by an embodiment of the present application.
- Figure 3b is another schematic flowchart of a map scene rendering method provided by an embodiment of the present application.
- Figure 4 is another schematic flowchart of a map scene rendering method provided by an embodiment of the present application.
- Figure 5 is a timing diagram of a map scene rendering method provided by an embodiment of the present application.
- Figure 6 is a schematic flowchart of a video rendering method provided by an embodiment of the present application.
- Figure 7 is a schematic flowchart of a method for playing rendered video data provided by an embodiment of the present application.
- Figure 8 is a schematic structural diagram of a first map scene rendering device provided by an embodiment of the present application.
- Figure 9 is a schematic structural diagram of a second map scene rendering device provided by an embodiment of the present application.
- Figure 10 is a schematic structural diagram of a first video rendering device provided by an embodiment of the present application.
- Figure 11 is a schematic structural diagram of a second video rendering device provided by an embodiment of the present application.
- Figure 12 is a schematic structural diagram of an electronic device provided by an embodiment of the present application.
- FIG. 13 is a schematic structural diagram of another electronic device provided by an embodiment of the present application.
- map rendering The complete map scene resources of the dyeing program are rendered by a rendering instance node, and the operation of the cloud rendering map on the terminal side has certain similarities. Similar to game levels, there is a certain probability of repeatability in the starting and ending paths of the rendering instance execution.
- the cloud needs to perform multiple cloud renderings of the same map scene respectively, thereby increasing the resource consumption of the cloud rendering instance running on the cloud and thus increasing the occupation of concurrent resources in the cloud. The amount affects the efficiency of map scene rendering, which also limits the interactivity and customization diversity of cloud rendering map products.
- embodiments of the present application provide a map scene rendering method, device, server, terminal, computer-readable storage medium and computer program product, which can reduce the occupancy rate of cloud resources and improve the rendering efficiency of map scenes.
- the first map scene rendering device can be integrated in an electronic device such as a terminal; the second map scene rendering device can be integrated in an electronic device such as a server.
- the server can be an independent physical server, or a server cluster or distributed system composed of multiple physical servers. It can also provide cloud services, cloud databases, cloud computing, cloud functions, cloud storage, network services, and cloud communications. , middleware services, domain name services, security services, network acceleration services (Content Delivery Network, CDN), and cloud servers for basic cloud computing services such as big data and artificial intelligence platforms.
- Terminals may include but are not limited to mobile phones, computers, intelligent voice interaction devices, smart home appliances, vehicle-mounted terminals, aircraft, etc.
- the terminal and the server can be connected directly or indirectly through wired or wireless communication methods, which are not limited in the embodiments of the present application.
- Figure 1 is a schematic diagram of an implementation scene of the map scene rendering method provided by the embodiment of the present application.
- the terminal 200 terminal 200-1 and terminal 200-2 are exemplarily shown
- the server 400 is connected through the network 300.
- the network 300 may be a wide area network or a local area network, or a combination of the two.
- the map scene rendering system 100 also includes a database 500 for providing data support to the server 400; and, what is shown in Figure 1 is a situation where the database 500 is independent of the server 400.
- the database 500 can also be integrated in In the server 400, the embodiment of the present application does not limit this.
- Terminal 200 configured to respond to a map display operation for a map to be rendered, generate a map rendering instruction, and send the map rendering instruction to the server 400 through the network 300, where the map rendering instruction includes path start and end information in the map to be rendered; receiving server 400 The target video data returned through the network 300 for the map rendering instruction.
- the target video data is the data obtained by the server determining at least one target instance node from the rendering instance node queue based on the path start and end information, and rendering the corresponding resource slice according to each target instance node.
- the rendering instance node queue is obtained by associating the path information of the map to be rendered with M rendering instance nodes.
- the M rendering instance nodes are used to render N resource slices, and the N resource slices are divided into map scene resources through the scene structure information of the map to be rendered.
- the map scene resource is used to render the map scene of the map to be rendered, M ⁇ N, M and N are positive integers; display map scene fragments according to the target video data (exemplarily showing the graphical interface 210-1 and the graphical interface 210 -2).
- the server 400 is configured to receive map rendering instructions for the map to be rendered sent by the terminal 200 through the network 300.
- the map rendering instructions include the path start and end information in the map to be rendered; and from the rendering instance node queue, determine at least one corresponding to the path start and end information.
- a target instance node render the resource slice according to each target instance node to obtain target video data; send the target video data to the terminal 200 through the network 300.
- the embodiments of this application can be applied to various scenarios, including but not limited to cloud technology, artificial intelligence, smart transportation, assisted driving, etc.
- the schematic diagram of the implementation environment scene of the map scene rendering method shown in Figure 1 is only an example.
- the implementation environment scene of the map scene rendering method described in the embodiment of the present application is to more clearly illustrate the technical solution of the embodiment of the present application and does not constitute Limitations on the technical solutions provided by the embodiments of this application.
- Persons of ordinary skill in the art will know that with the evolution of map scene rendering and the emergence of new business scenarios, the technical solutions provided by the embodiments of the present application are equally applicable to similar technical problems.
- map scene rendering is applied to cloud-rendered map products.
- it may include map products used in digital twin scenarios such as map navigation, smart cultural tourism, smart transportation, and scenic spots.
- This embodiment of the present application describes the map scene rendering provided by the embodiment of the present application from the perspective of the server and the terminal. method.
- Figure 2a is a schematic process diagram of obtaining a target instance node provided by an embodiment of the present application, in which the execution subject of the process of obtaining the target instance node is a server.
- the process of obtaining the target instance node includes steps 101 to 103. Each step is described separately below.
- step 101 map scene resources are obtained.
- the map scene resource can be used to construct a map scene of the map to be rendered, and the map scene can be a map screen displayed in a virtual scene.
- the map scene may be a virtual map scene displayed in the form of a three-dimensional animation.
- step 102 the map scene resources are segmented based on the scene structure information to obtain N resource slices, and each resource slice is assigned to the corresponding rendering instance node.
- the scene structure information may be information describing the structural distribution of the map to be rendered; for example, it may include level distribution information of the map to be rendered, and may also include information such as object distribution information in the map scene; the level distribution information may include a description Information about the hierarchical distribution of levels in a map scene. For example, it may include information such as the levels of the map to be rendered, the division of each level in the map scene, or the hierarchical structure of the floors in the map scene. The levels may represent the levels in the map scene. The process or the regional division results of the map to be rendered. For example, it can represent the floor division results, seasonal division results or territory division results in the map scene. For example, the map to be rendered of the digital twin scene type corresponding to the scenic area.
- levels can represent floor levels or area types in the map scene, for example, floor levels such as the first floor and second floor, or area types such as leisure areas, sightseeing areas, and dining areas.
- a level can also represent a task level or a virtual level in a map scene; for example, it can represent a map module, a task level, or a game level in a game-type map scene.
- the object distribution information can represent the distribution of map element objects in the map to be rendered in the map scene.
- the map element object can be an element object that constitutes the map scene, or it can be an element object distributed in the map scene.
- the element object can be a map scene.
- Visual elements such as virtual tables, virtual doors, virtual chairs, virtual cups, virtual plants, and virtual ponds.
- the resource slice can be a slice obtained by dividing the map scene resource.
- the rendering instance node can be an instance node used to render the resource slice.
- the instance node can be an instance deployed in the cloud.
- the map scene can be segmented based on the level distribution information corresponding to the map to be rendered.
- the resources are segmented in the level dimension, and the level resource slice corresponding to each level of the map to be rendered is obtained.
- the adjacent levels in the level are identified, and the adjacent levels are segmented in the map scene resources.
- Cross-level resource slicing of the level based on the level resource slicing and the cross-level resource slicing, determine multiple resource slices corresponding to the map scene.
- the level distribution information may be the distribution information of each level in the map scene including the map to be rendered, the level resource slice may be the slice of the map scene resource corresponding to each level, and the adjacent level may be the map scene resource belonging to For levels with adjacent relationships, the cross-level resource slices can be resource slices between adjacent levels in the map scene resources.
- level distribution information there can be many ways to obtain the level distribution information; for example, you can traverse the map scene resources, and obtain the level distribution information corresponding to the map to be rendered based on the traversal results, or you can pre-configure the level distribution information corresponding to the map to be rendered before rendering the map scene.
- Level distribution information, etc. are not limited in the embodiments of this application.
- the map scene resources can be divided into levels to obtain each level.
- Corresponding level resource fragments perform interest point identification on the level resource fragments, and obtain the interest point distribution corresponding to each level.
- the interest point distribution segment the level resource fragments to obtain the level resource slices corresponding to each level.
- the level resource fragments can be each segment obtained after segmenting the map scene resources according to each level.
- the point of interest distribution can be the distribution of the interest points of each level in the map scene.
- the point of interest (POI) can be a map element object in the map scene.
- it can be A virtual house, a virtual shop, a virtual mailbox, a virtual bus stop, a virtual chair, a virtual tree and other elements in the map scene; in the embodiment of this application, the points of interest can be determined according to actual business needs.
- Adjust the granularity for example, when performing map navigation, the points of interest can be elements of granularity such as virtual houses, virtual shops, and virtual mailboxes. For indoor points of interest, they can be elements of granularity such as virtual tables, virtual cups, and virtual chairs. element.
- each map element object in the level resource fragment can be identified, and at the same time, the emphasis program and the emphasis of each map element object can be determined according to actual business needs.
- Recognition granularity so that matching points of interest can be identified in level asset fragments based on the bias program for each map element object and the recognition granularity.
- the level resource fragments can be segmented according to the interest point distribution.
- the distribution of interest points there can be many ways to segment the level resource segments; for example, according to the interest point distribution, the path distribution of each interest point can be identified in the corresponding level resource segment, and each An interest point is used as a segmentation node. Based on the path distribution, the segmentation node is segmented to obtain multiple level resource slices. In other words, the resource corresponding to any reachable path between two points of interest is a resource slice.
- adjacent levels in the level can be identified based on the level distribution information.
- the level distribution information there can be many ways to identify adjacent levels in all the levels of the map to be rendered; for example, the topological arrangement order of each level of the map to be rendered can be determined based on the level publication information, and according to the level's The topological arrangement order can identify adjacent levels that have adjacent relationships among all levels of the map to be rendered.
- cross-level resource slices of adjacent levels can be segmented in the map scene resources.
- the connection of each candidate level connection path of the adjacent level can be calculated based on the level resource slice corresponding to each level.
- the candidate level connection path may be a path of an adjacent level, used to connect two levels with an adjacent relationship. Through this path, any level in the adjacent level can be entered into another level in the adjacent level.
- the connection distance can be the distance corresponding to each candidate level connection path
- the target connection path can be the optimal path selected from the candidate level connection paths according to the connection distance; wherein, the optimal path can be at least one of the following: shortest distance path , select the path with the highest frequency, the shortest path, and the path with the highest flatness.
- the level resource slice corresponding to each level there can be many ways to calculate the connection distance of each candidate level connection path of the adjacent level; for example, a reference point can be selected in the level resource slice, so that according to each level The reference point in the level resource slice is used to calculate the distance between two adjacent levels in the map scene to obtain the connection distance of each candidate level connection path.
- the target connection after calculating the connection distance of each candidate level connection path between adjacent levels based on the level resource slice corresponding to each level, the target connection can be screened out from the candidate level connection paths based on the connection distance. path.
- the connection distance there can be multiple ways to filter out the target connection path among the candidate level connection paths; for example, according to the shortest path distance algorithm, the candidate level connection path with the shortest connection distance can be used as the target connection path.
- multiple resource slices can be determined based on the level resource slices and the cross-level resource slices.
- level resource cutting There are many ways to determine multiple resource slices. For example, you can directly use level resource slices and cross-level resource slices as multiple resource slices obtained by dividing map scene resources. An indirect method may also be used to determine multiple resource slices based on level resource slicing and cross-level resource slicing, which is not limited in this embodiment of the present application.
- each resource slice can be assigned to the corresponding rendering instance node.
- there are many ways to assign each resource slice to the corresponding rendering instance node for example, at least one resource slice corresponding to each level can be assigned to the same rendering instance node, that is, one rendering instance node is used for Render at least one resource slice corresponding to a level; you can also assign a resource slice to a rendering instance node, that is, a rendering instance node is used to render a resource slice, and multiple resource slices can also be assigned to the same rendering instance node. , that is, one rendering instance node is used to render multiple resource slices; the corresponding relationship between resource slices and rendering instance nodes can be set according to the actual situation, and is not limited in the embodiments of this application.
- map scene resources are segmented according to the scene structure information of the map to be rendered, and each resource slice is associated with the rendering instance node.
- the corresponding process can be executed through the rendering instance node.
- Resource slicing rendering enables fine-grained slicing rendering of the map to be rendered in the form of resource slicing, improving rendering flexibility and reducing repeated rendering of resources; at the same time, it can reduce cloud resource usage and improve the rendering efficiency of map scenes. .
- step 103 M rendering instance nodes corresponding to N resource slices are associated according to the path information to obtain a rendering instance node queue.
- path information can represent the distribution information of paths in the map scene, and can describe the distribution of all road channels in the map scene.
- the rendering instance node queue may be a queue established after sorting the rendering instance nodes according to path information.
- the resource can be identified based on the path information corresponding to the map scene.
- the node connection sequence between the M rendering instance nodes is determined, and based on the node connection sequence, a rendering instance node queue corresponding to the map scene resource is constructed.
- connection path distribution can be the distribution of the connection path in the map scene, and the connection path is the path corresponding to the resource slice; for example, each resource slice can be regarded as a node, so that the scene corresponding to the resource slice described in the path information can be distribution in the map scene to identify the distribution of connection paths of resource slices in the map scene.
- the node connection order can be determined based on the distribution of scenes corresponding to resource slices in the map scene.
- mapping relationship between the rendering instance nodes and the resource slices in the map scene is constructed through the rendering instance node queue, so that the cloud can be controlled to implement fine-grained, sliced map scene resources based on the rendering instance nodes in the rendering instance node queue.
- the rendering reduces the repeated rendering of resources, reduces the resource usage in the cloud, and improves the rendering efficiency of map scenes.
- connection path distribution there can be many ways to determine the node connection sequence between the M rendering instance nodes; for example, based on the connection path distribution of the resource slice, a node relationship graph corresponding to the M rendering instance nodes can be constructed, according to The node relationship graph identifies the node connection sequence between M rendering instance nodes.
- the node relationship graph can be a directed acyclic graph (DAG) based on rendering instance nodes.
- DAG directed acyclic graph
- the directed acyclic graph is a directed graph without loops.
- the N resource slices can include level resource slices and cross-level resource slices, so that the N resource slices can be constructed according to the N resource slices.
- the level resource slicing and connection path distribution in the resource slicing are used to construct the node relationship subgraph corresponding to each level.
- the node relationship subgraph is spliced to obtain the rendering actual The node relationship diagram corresponding to the example node.
- any path corresponding to the level is determined as an edge of the node relationship subgraph, and the starting point of the path is determined as a node of the node relationship subgraph.
- the node relationship subgraph can be a directed acyclic topology graph based on the rendering instance nodes corresponding to each level; for example, assuming that there are 4 levels in the map scene, the map scene can have 4 corresponding node relationship subgraphs. .
- the level resource slices and connection path distribution in the resource slices there can be many ways to construct the node relationship subgraph corresponding to each level; for example, please refer to Figure 3a, which is provided by an embodiment of the present application.
- Topological structure diagram of the map scene rendering method as shown in Figure 3a, the map scene corresponding to the node relationship diagram 3-1 includes four levels a, b, c and d, according to the level resource slicing and connection path distribution of each level , the node relationship subgraph corresponding to each level can be constructed.
- the node relationship subgraph (subtopology structure A) corresponding to level a can include nodes 3-11 (called starting point A (POI A)), node 3 -12 (called intermediate node A1 (POI A1)), nodes 3-13 (called intermediate node A2 (POI A2)), and nodes 3-14 (called cross-level key nodes (cross-floor node A*)) , then for level a, you can start from the starting point A, pass through the intermediate node A1 and the intermediate node A2, and finally reach the cross-floor node A*. Therefore, the map scene corresponding to level a can be split into A-A1 and A-A2 , A1-A2, A1-A* and A2-A*, a total of 5 resource slices.
- node relationship subgraph (subtopology B) corresponding to level b it can include nodes 3-21 (called starting point B (POI B)), nodes 3-22 (called intermediate node B1 (POI B1)), nodes 3-23 (called intermediate node B2 (POI B2)), node 3-24 (called cross-level key node (cross-floor node B*)), and node 3-25 corresponding to level a (called cross-level key node Node (cross-floor node AB*)).
- node relationship subgraph (subtopology C) corresponding to level c including nodes 3-31 (called node C (POI C)).
- the node relationship subgraph (subtopology D) corresponding to level d includes nodes 3-41 (called node D (POI D)).
- node D POI D
- cross-level key nodes can be nodes connecting two levels in adjacent levels, can be rendering instance nodes corresponding to cross-level resource slicing, and can be used to splice node relationship subgraphs.
- the node relationship graph corresponding to the entire map scene can be split into several subdivided node relationship subgraphs.
- the association between the node relationship subgraphs is based on the cross-level key node association, so that the node relationship graph in the map scene can be divided into several subdivided node relationship subgraphs.
- the distribution of resource slices can obtain the node connection sequence of the rendering instance nodes, and then the rendering instance node queue corresponding to the map scene resource can be constructed according to the node connection sequence. In this way, the sliced rendering of the map scene resources can be realized based on the rendering instance node queue. Improve the rendering efficiency of map scenes and reduce resource usage.
- Figure 2b is a schematic flowchart of a map scene rendering method provided by an embodiment of the present application, in which the execution subject of the process of obtaining the target instance node is the server.
- the process of obtaining the target instance node includes step 104 and step 105. Each step will be described separately below.
- step 104 a map rendering instruction sent by the terminal for the map to be rendered is received, where the map rendering instruction includes path start and end information in the map to be rendered.
- the map rendering instruction may be an instruction for rendering a map to be rendered.
- the map rendering instruction may include path start and end information in the map to be rendered.
- the path start and end information may include the map scene fragment to be rendered indicated by the map rendering instruction. The starting and ending positions in the corresponding map scene; therefore, based on the path starting and ending information, the position range of the map scene fragment to be rendered in the corresponding map scene can be determined, and then the resource slice to be rendered can be determined.
- the map operation instruction can be obtained by receiving the user's click, move, and other operations in the client corresponding to the map scene.
- the map operation instruction indicates the path change from position e to position f, so that the map operation instruction can trigger the terminal.
- Generate map rendering instructions that instruct rendering of a map scene fragment from position e to position f, where the map scene fragment may be composed of at least one resource slice.
- step 105 determine at least one target instance node corresponding to the path start and end information from the rendering instance node queue, render the resource slice according to each target instance node, obtain the target video data, and convert the target view into Frequency data is sent to the terminal.
- the target instance node may be a rendering instance node corresponding to the resource slice to be rendered determined based on the map rendering instruction.
- the target instance node in the rendering instance node queue there can be multiple ways to determine the target instance node in the rendering instance node queue; for example, the starting position and ending position in the map to be rendered can be extracted from the path starting and ending information, and the starting position can be obtained and the end position, and identify at least one target resource slice whose position is in the target position interval among the N resource slices, and filter out the target instance node from the rendering instance node queue based on the target resource slice.
- the starting position may be the corresponding starting point in the map scene of the map scene fragment to be rendered; for example, it may be the first resource slice in the map scene fragment to be rendered.
- the end position may be the corresponding end position in the map scene of the map scene fragment to be rendered; for example, it may be the last resource slice in the map scene fragment to be rendered.
- the target position interval can be the interval between the starting position and the end position, which is the position interval corresponding to the map scene fragment to be rendered in the map scene; the target resource slice can be the corresponding position interval of the map scene fragment to be rendered.
- Resource slices are resource slices to be rendered.
- the resource slice can be rendered according to the target instance node.
- the target instance node there are many ways to render resource slices according to the target instance node; for example, instructions can be distributed according to the topological structure corresponding to the node relationship diagram, that is, the starting position to the end position in the map scene can be obtained through the gateway node
- the instance node renders the corresponding resource slice (called the target resource slice); for example, each target instance node can render the map of its respective area in the map three-dimensional (3D) engine in the cloud to generate a continuous base map element drawing Render frames, so that the rendered video data corresponding to the map scene can be obtained based on these rendered frames.
- 3D three-dimensional
- the topological sorting parameters of the rendered video data can also be obtained, the rendered video data can be annotated based on the topological sorting parameters, and the target video data can be obtained. Send to terminal.
- the rendering video data may be the data obtained by rendering the resource slice corresponding to the map scene based on a target instance node
- the topological sorting parameter may be the rendering video data determined based on the node relationship diagram corresponding to the map scene in the map scene.
- Distribution information may include information such as the level and rendering instance nodes corresponding to the rendering video data, the distribution of the rendering instance nodes corresponding to the rendering video data in the node relationship graph, and other information.
- the target video data may be data in which at least one rendering video data is annotated based on at least one topological sorting parameter.
- Table 1 is the header structure of a map scene rendering method provided by the embodiment of the present application.
- the rendered video data can be obtained The corresponding topological sorting linked list, the current rendering instance node, the camera parameters of the first and last frames corresponding to the current rendering instance, and the pixel stream size, pixel length and width, pixel stream content and other information corresponding to the rendered video data, and based on this information, the rendered video data is Mark the corresponding header.
- the topological sorting linked list can be a linked list determined according to the node relationship diagram corresponding to the map scene
- the pixel stream can be the pixel stream corresponding to the rendering video data
- the current rendering instance node can be the rendering instance node corresponding to the rendering video data.
- the map camera parameters can be the map camera parameters corresponding to the first and last key frames of the current rendering instance node, such as center point coordinates, map level, rotation and lodging angle, etc. Based on these parameters, the first and last frame fusion of the rendered video data across the rendering instance nodes can be realized. .
- Figure 3b is another schematic flow chart of a map scene rendering method provided by an embodiment of the present application.
- the rendering service 3-51 responds to the map rendering instruction and at least one target instance node obtained from the rendering instance node queue is the rendering instance node A and the rendering instance node B
- the instruction distribution is performed , to start rendering of rendering instance node A and rendering instance node B respectively, and then level A renders the corresponding resource slice, and level B renders the corresponding resource slice; after starting the rendering of rendering instance node A and rendering instance node B
- the streaming service 3-52 can also perform code rate control on the rendered video data obtained by rendering, and can also perform header annotation on the key frames generated during the rendering process, and append the topological sorting corresponding to the rendered video data when annotating.
- the rendering video data can also be adapted to different granularities according to the display effects on different terminals, thereby reducing the size of the transmission data stream and reducing the time-consuming decoding on the terminal; here, you can use examples to adjust the rendering on the terminal.
- Configuration parameters (such as width and height, pixel density, sampling granularity and other parameters) are used for corresponding resolution adaptation.
- target video data the generated plurality of pixel streams (called target video data) can be transmitted to the terminal 3-6 through the streaming service, so that the corresponding map scene can be displayed in the terminal 3-6.
- each rendering instance node in the rendering instance node queue has a topological arrangement sequence determined based on the node relationship diagram
- the terminal plays each rendering video data corresponding to each rendering instance node according to the topological arrangement sequence; therefore, it is possible Maintain the scheduling order of rendering instance nodes in the cloud to coordinate the order in which the rendering video data corresponding to each rendering instance node is sent to the terminal; for example, the playback order can be determined according to the scheduling order, and the rendering video data corresponding to the rendering instance can be sent according to the playback order. Group and send the group to the terminal. This can reduce the resource consumption of terminal reordering, thereby reducing the playback delay of map scenes on the terminal caused by reverse reordering, and improving playback efficiency.
- the embodiment of the present application segments the map scene resources according to the scene structure information of the map scene, and constructs the rendering instance node queue corresponding to the resource slice according to the path distribution of the map scene, so as to receive the map for the map scene.
- the target instance node corresponding to the map scene is searched in the rendering instance node queue, and the resource slice corresponding to the path start and end information is rendered according to the target instance node; the map scene is reduced Repeated rendering of resources reduces cloud resource occupancy; in addition, the slicing resource rendering method improves the rendering efficiency of map scenes, thereby improving resource utilization.
- Figure 4 is another schematic flowchart of a map scene rendering method provided by an embodiment of the present application.
- the process includes steps 201 to 203, and each step is described separately below.
- step 201 in response to a map display operation for the map to be rendered, a map rendering instruction is generated and sent to the server.
- the map display operation can be a request to display the corresponding map scene operation triggered by the user on the terminal, for example, click, move and other operations triggered on the terminal.
- the map rendering instructions include the start and end information of the path in the map to be rendered.
- the server may be a cloud server deployed in the cloud.
- map display operation triggers instruction distribution through real-time audio and video communication technology (Web Real-Time Communications Software Development Kit, WebRTC SDK ) sends map rendering instructions to the cloud server.
- WebRTC SDK Web Real-Time Communications Software Development Kit
- step 202 target video data returned by the server for the map rendering instruction is received.
- the target video data may be obtained by the server determining at least one target instance node from the rendering instance node queue based on the path start and end information in the map rendering instruction, and rendering the resource slice corresponding to the map scene according to each target instance node. data.
- the target video data can be rendered video data after the server renders it in the cloud, or it can also be obtained after the server renders it in the cloud and performs other video processing such as code rate control, header annotation, and resolution adaptation.
- the data obtained can be specifically set according to the actual situation, and the embodiments of this application are not limited here.
- multiple pixel streams (called target video data) returned by the server for the map rendering instruction can be received through the WebRTC SDK.
- target video data multiple pixel streams
- multiple rendering instance nodes may transmit videos concurrently, and concurrent transmissions will occupy input/output (IO) resources on the terminal. Therefore, in order to reduce the resource usage of concurrent transmissions, , to improve resource utilization, the multiplexing strategy of multiplexing the transmission IO channel (see Figure 3b) can be used on the terminal to receive the target video data returned by the server.
- Multiplexing technology means transmitting multiple signals on one channel. or data flow processes and techniques.
- multiplexing can integrate multiple low-speed (transmission speed is lower than the speed threshold) channels into a high-speed (transmission speed is higher than the speed threshold) channel for transmission, it can effectively utilize the high-speed channel and reduce the number of multiple lines. resource management consumption.
- step 203 map scene segments are displayed according to the target video data.
- the target video data there can be many ways to display the map scene fragments; for example, the header annotation information can be extracted from the target video data, and the topological sorting parameters of the target video data can be parsed from the header annotation information. Based on the topological sorting parameters, aggregate the target video data to obtain aggregated video data, and display the map scene fragments in the map scene based on the aggregated video data.
- the header annotation information can be the annotation information generated after header annotation of the key frames corresponding to the target video data, and can include the topological sorting linked list corresponding to the target video data, the current rendering instance node, and the camera parameters of the first and last frames corresponding to the current rendering instance.
- the topological sorting parameter can be the distribution information of the target video data in the map scene determined based on the node relationship diagram corresponding to the map scene. For example, it can include the level and rendering instance nodes corresponding to the target video data, and the rendering instance nodes corresponding to the target video data. Distribution and other information in the node relationship diagram.
- the aggregated video data may be video data obtained by aggregating target video data based on topological sorting parameters.
- the connection relationship between each video data in the target video data and other video data can be determined, and based on the topological sorting parameters, The connection relationship constructs a target node relationship diagram corresponding to the target video data.
- the target node relationship diagram at least one adjacent video data pair in the target video data is identified, and the adjacent video frames between the adjacent video data pairs are spliced. When completed When all pairs of adjacent video data are spliced, the aggregation of the target video data is completed.
- the target node relationship graph can be a directed acyclic topology graph based on the target video data.
- the association sequence of the target video data based on the rendering instance can be reconstructed according to the target node relationship graph, so as to facilitate subsequent splicing and organization of the target video data. to play.
- the adjacent video data pairs can be based on the distribution of each target video data in the map scene described in the target node relationship diagram.
- the video data belonging to the adjacent relationship determined in the target video data is the existence of the target node relationship diagram.
- the target video data includes multiple video frames, and adjacent video data pairs include adjacent video frames.
- the adjacent video frames may be video frames with an adjacent relationship between adjacent video data pairs.
- the last frame of the target video data and the first frame of the subsequent target video data (as shown in Figure 3b, called multi-channel video first and last frame splicing).
- the first frame and the last frame can be multiple Video frames.
- multi-channel video splicing technology can be used to connect, transition and connect adjacent video frames such as the first and last key frames of adjacent video data pairs.
- Fusion, multi-channel video splicing technology is a method of obtaining the model transformation parameters, color brightness gamma correction coefficients, optimal suture lines and corresponding weighted fusion matrices between multi-channel video images in the current scene, so that the final fusion Panoramic video images smoothly transition in overlapping areas, and the seam transition zone between two adjacent images in the real-time stage is smoother.
- the intersection of the current device perspective and the previous and subsequent user perspectives can be obtained.
- the device perspective can be the camera perspective currently set for the rendering instance, and the user perspective before and after can be the camera perspective set by the user through the terminal within a certain time range.
- the video data within the video data splicing and aggregation range can be determined based on these two perspectives. , so that the terminal can extract video data within the range of video data splicing and aggregation, and annotate the corresponding number, so that the video splicing technology can be used to aggregate the numbered video data.
- the corresponding map scene fragments can be displayed according to the aggregated video data to achieve map display (see Figure 3b), so that the user can see the rendering instance in the cloud rendering map on the terminal to connect the video scenes .
- the embodiment of the present application generates a map rendering instruction including the start and end information of the corresponding path in the map scene according to the map display operation, sends the map rendering instruction to the server, and then receives and displays the target video data returned by the server for the map rendering instruction.
- the map scene corresponding to the path start and end information reduces the repeated rendering of map scene resources, improves the rendering efficiency of the map scene, and thereby improves resource utilization.
- Figure 5 is a timing diagram of a map scene rendering method provided by an embodiment of the present application.
- the method flow may include steps S1 to S6, and each step will be described separately below.
- step S1 the server obtains the map scene resources, segments the map scene resources based on the scene structure information of the map to be rendered, obtains N resource slices, and assigns each resource slice to the corresponding rendering instance node.
- step S1 is similar to the implementation process of step 101 and step 102, and the embodiment of the present application will not be repeated here.
- step S2 the server associates M rendering instance nodes with N resource slices according to the path information of the map to be rendered, and obtains a rendering instance node queue.
- step S2 is similar to the implementation process of step 103, and the embodiment of the present application will not be repeated here.
- step S3 the terminal generates a map rendering instruction for the map scene in response to a map display operation for the map to be rendered, and sends the map rendering instruction to the server.
- step S3 is similar to the implementation process of step 201, and the embodiment of the present application will not be repeated here.
- step S4 the server receives the map rendering instruction for the map scene sent by the terminal, determines the target instance node in the rendering instance node queue based on the path start and end information, and renders the resource slice according to the target instance node.
- step S4 is similar to the implementation process of step 105, and the embodiment of the present application will not be repeated here.
- step S5 the terminal receives the target video data returned by the server for the map rendering instruction.
- step S5 is similar to the implementation process of step 202, and the embodiment of the present application will not be repeated here.
- step S6 the terminal displays map scene segments based on the target video data.
- step S6 is similar to the implementation process of step 203, and the embodiment of the present application will not be repeated here.
- This embodiment of the present application also provides a video rendering method, which is suitable for servers.
- Figure 6 is a schematic flow chart of a video rendering method provided by an embodiment of the present application.
- the execution subject of the video rendering method is a server, and the video rendering method includes steps 301 to 305. Each step will be described below.
- step 301 video resources are obtained.
- the video resources may be used to construct videos, and may be resources corresponding to videos, for example, may be videos to be rendered or materials used to construct videos to be rendered, etc.
- step 302 the video resources are segmented based on the video structure information of the video to obtain N video resources. Slice and assign each video resource slice to the corresponding video rendering instance node.
- the video structure information can be information that describes the structure distribution in the video; for example, it can describe the distribution of episodes in the video, for example, describe the position of the episode number in the video, and can also describe the distribution of plots in the video; for example, it can Segment the video according to the plot content in the video, so that the segment distribution of video resources can be described based on the plot content of the video.
- the video resource slice may be a slice obtained by segmenting the video resource according to the video structure information of the video.
- the video rendering instance node may be an instance node used to render video resource slices, and the instance node may be an instance deployed in the cloud.
- step 303 according to the position information of the video resource slices in the video resources, M video rendering instance nodes corresponding to the N video resource slices are associated to obtain an instance node queue.
- the position information may be the position of the video resource slice in the video resource, that is, the position of the video segment corresponding to the video resource slice in the video.
- the instance node queue may be a queue constructed based on the sorted video rendering instance nodes after sorting the video rendering instance nodes according to the position information of the video resource slices in the video resource.
- step 304 a video rendering instruction sent by the terminal is received.
- the rendering instruction may be an instruction for rendering a video, and the rendering instruction may include information related to the video to be rendered, that is, information related to the video to be rendered, and is used to indicate the content that needs to be rendered on the server side; for example, Indicates the video resources that currently need to be rendered and the content to be rendered on the server side; for example, the video-related information can include the video resources corresponding to the video to be rendered, or can also include information such as the index of the video. The server can find the video to be rendered based on the index. Video resources for videos.
- step 305 based on the video related information to be rendered, at least one target video instance node is determined in the instance node queue, and the video resource slice is rendered according to each target video instance node.
- the target video instance node may be a video rendering instance node corresponding to the video resource slice that needs to be rendered determined based on the rendering instruction.
- the embodiment of the present application segments video resources according to the video structure information of the video, and constructs an instance node queue corresponding to the video resource slice according to the position information of the video resource slice in the video resource, so that when the rendering instruction is received
- the target video instance node corresponding to the video is searched in the instance node queue, and the video resource slice corresponding to the video-related information to be rendered is rendered according to the target video instance node; reduce It eliminates repeated rendering of video resources and reduces the occupancy rate of cloud resources; in addition, the slicing resource rendering method improves the rendering efficiency of videos, thereby improving resource utilization.
- This embodiment also provides a method for playing rendered video data, which is suitable for terminals.
- FIG. 7 is a schematic flowchart of a method for playing rendered video data provided by an embodiment of the present application.
- the execution subject of the method of playing the rendered video data is a terminal, and the method of playing the rendered video data includes steps 401 to 404. Each step will be described below.
- step 401 in response to a video display operation for the video, a rendering instruction is generated and sent to the server.
- the video display operation may be an operation triggered by the user on the terminal to request display of the corresponding video on the terminal, such as click, move, and other operations triggered on the terminal.
- the rendering instructions may include information related to the video to be rendered.
- the server may be a cloud server deployed in the cloud.
- step 402 video data returned by the server for the rendering instruction is received.
- the video data can be obtained by the server determining the target video instance node in the instance node queue based on the video-related information to be rendered included in the rendering instruction, and rendering according to the video resource slice corresponding to the video-related information to be rendered by the target video instance node.
- the data can be obtained by the server determining the target video instance node in the instance node queue based on the video-related information to be rendered included in the rendering instruction, and rendering according to the video resource slice corresponding to the video-related information to be rendered by the target video instance node.
- step 403 the video header annotation information is extracted from the video data, and the video topological sorting parameters of the video data are parsed from the video header annotation information.
- the video header annotation information can be generated by performing header annotation on the key frames corresponding to the video data.
- Annotation information can include the topological sorting linked list corresponding to the video data, the current video rendering instance node, the camera parameters of the first and last frames corresponding to the current video rendering instance node, and the pixel stream size, pixel length and width, pixel stream content corresponding to the video data, and other information; For example, you can continue to refer to the header structure information shown in Table 1.
- the sorted linked list may be a linked list that represents the distribution of video data in the video and is determined based on the instance node queue corresponding to the video data.
- the frequency topological sorting parameter can be the distribution information of the video data in the video determined based on the instance node queue corresponding to the video, and can be determined based on the topological sorting linked list corresponding to the video data, the current video rendering instance node and other information, which can include video data Information such as the corresponding video rendering instance node and the distribution of the video rendering instance node corresponding to the video data in the instance node queue.
- step 404 the video data is aggregated based on the video topology sorting parameters, and the aggregated video data is displayed as rendered video data.
- the aggregated video data may be video data obtained by aggregating video data based on the topological sorting parameter, and the rendered video data may be video data obtained based on rendering instructions.
- the embodiment of the present application generates a rendering instruction including video-related information corresponding to the video to be rendered according to the video display operation, sends the rendering instruction to the server, and then receives the video data returned by the server in response to the rendering instruction, and displays the to-be-rendered video.
- the rendered video corresponding to the video-related information reduces the repeated rendering of video resources, improves the rendering efficiency of the video, and thereby improves resource utilization.
- Embodiments of the present application also provide a first map scene rendering device.
- the first map scene rendering device can be integrated in an electronic device, and the electronic device can be a server.
- FIG 8 is a schematic structural diagram of a first map scene rendering device provided by an embodiment of the present application.
- the first map scene rendering device may include an acquisition unit 501, a segmentation unit 502, an association unit 503, a receiving unit 504, a rendering unit 505 and a video Sending unit 506, each unit will be described separately below.
- the receiving unit 504 is configured to receive a map rendering instruction sent by the terminal for the map to be rendered, where the map rendering instruction includes the path start and end information in the map to be rendered;
- the rendering unit 505 is configured to determine at least one target instance node corresponding to the path start and end information from the rendering instance node queue, which is obtained by associating M rendering instance nodes with the path information of the map to be rendered.
- M rendering instance nodes are used to render N resource slices
- the N resource slices are obtained by segmenting map scene resources through the scene structure information of the map to be rendered
- the map scene resources are used to render the map scene resources to be rendered.
- the video sending unit 506 is configured to send the target video data to the terminal.
- the acquisition unit 501 is configured to acquire map scene resources;
- the segmentation unit 502 is configured to segment the map scene resources based on the scene structure information to obtain N resource slices, and Allocate each resource slice to the corresponding rendering instance node;
- the association unit 503 is configured to associate the M rendering instance nodes corresponding to the N resource slices according to the path information, to obtain The rendering instance node queue.
- the segmentation unit 502 is also configured to perform resource segmentation on the map scene resources in the level dimension based on the level distribution information, and obtain the resource corresponding to each level of the map to be rendered.
- Level resource slicing according to the level distribution information, identify adjacent levels in all levels of the map to be rendered, and segment cross-level resource slices of the adjacent levels from the map scene resources; based on the The level resource slices and the cross-level resource slices determine N number of the resource slices.
- the segmentation unit 502 is also configured to calculate the connection distance of each candidate level connection path of the adjacent level according to the level resource slice corresponding to each level;
- the candidate level connection path corresponding to the connection distance is determined as the target connection path;
- the resource slice corresponding to the target connection path will be cut from the map scene resource and determined as the cross-level resource of the adjacent level slice.
- the segmentation unit 502 is also configured to divide the map scene resources into levels based on the level distribution information to obtain level resource segments corresponding to each level;
- the resource fragments perform interest point identification to obtain the interest point distribution corresponding to each level; according to the interest point distribution, the level resource fragments are segmented to obtain the level resource slices corresponding to each level.
- the association unit 503 is further configured to identify the connection path distribution of N resource slices based on the path information; and determine the M rendering instance nodes based on the connection path distribution. The node connection sequence between them; according to the node connection sequence, the rendering instance node queue is constructed.
- the association unit 503 is further configured to construct a node relationship graph corresponding to the M rendering instance nodes based on the connection path distribution, and the node relationship graph is based on the M rendering instance nodes.
- the rendering unit 505 is configured to extract the starting position and the ending position corresponding to the map to be rendered from the path start and end information; obtain the starting position and the ending position. target position interval between the target position intervals, and identify at least one target resource slice whose position is in the target position interval among multiple resource slices; filter out the target resource slice that is related to at least one of the target position intervals from the rendering instance node queue. At least one target instance node corresponding to the slice.
- the rendering unit 505 is configured to render the resource slice according to each target instance node to obtain rendered video data; the rendered video rendered by each target instance node data, obtaining at least one rendering video data rendered with at least one target instance node; obtaining a topological sorting parameter of at least one rendering video data; and annotating at least one rendering video data based on the topological sorting parameter. , obtain the target video data.
- Embodiments of the present application also provide a second map scene rendering device, which can be integrated in the terminal.
- FIG. 9 is a schematic structural diagram of a second map scene rendering device provided by an embodiment of the present application.
- the second map scene rendering device may include an instruction sending unit 601, a data receiving unit 602 and a display unit 603. Each unit will be described separately below. .
- the instruction sending unit 601 is configured to respond to a map display operation for a map scene to be rendered, generate a map rendering instruction for the map scene, and send the map rendering instruction to the server, where the map rendering instruction includes the map scene to be rendered. Render the corresponding path start and end information in the map scene;
- the data receiving unit 602 is configured to receive the target video data returned by the server for the map rendering instruction.
- the target video data is the path start and end information included in the map rendering instruction from the server, in the rendering instance node queue. Determine at least one target instance node in the target instance node, and render the data obtained by rendering the resource slice corresponding to the map scene according to each target instance node.
- the rendering instance node queue is associated with M through the path information of the map to be rendered.
- Rendering instance nodes are obtained, and M rendering instance nodes are used to render N resource slices.
- the N resource slices are obtained by dividing the map scene resources by the scene structure information of the map to be rendered.
- the map scene resources are obtained by For rendering the map scene of the map to be rendered, M ⁇ N, M and N are positive integers;
- the display unit 603 is configured to display map scene segments according to the target video data.
- the display unit 603 is further configured to extract header annotation information from the target video data; parse at least one of the rendering video data in the target video data from the header annotation information.
- Topological sorting parameter wherein the rendering video data is the result obtained by rendering the resource slice by the target instance node; based on the topological sorting parameter, aggregate at least one of the rendering video data to obtain the aggregated video data, and display the map scene fragments based on the aggregated video data.
- the display unit 603 is also configured to construct the target view based on the topological sorting parameter.
- the target node relationship diagram corresponding to the frequency data is a directed acyclic topology diagram based on the target video data; according to the target node relationship diagram, identify at least one adjacent video data pair in the target video data , the adjacent video data pairs include adjacent video frames; the adjacent video frames between the adjacent video data pairs are spliced, and the target video data is aggregated based on the spliced adjacent video data pairs.
- each of the above units can be implemented as an independent entity, or can be combined in any way and implemented as the same or several entities, which is not limited in the embodiments of the present application.
- An embodiment of the present application also provides a first video rendering device, which can be integrated in a server.
- FIG 10 is a schematic structural diagram of a first video rendering device provided by an embodiment of the present application.
- the first video rendering device may include a video resource acquisition unit 701, a video resource segmentation unit 702, a node association unit 703, an instruction receiving unit 704 and a video Rendering unit 705, each unit will be described separately below.
- the video resource acquisition unit 701 is configured to acquire video resources, which are used to construct videos;
- the video resource segmentation unit 702 is configured to segment the video resource based on the video structure information of the video, obtain N video resource slices, and assign each video resource slice to the corresponding video rendering instance node;
- the node association unit 703 is configured to associate the M video rendering instance nodes corresponding to the N video resource slices according to the position information of the video resource slices in the video resources to obtain the instance node queue;
- the instruction receiving unit 704 is configured to receive a rendering instruction for a video sent by the terminal, where the rendering instruction includes video-related information to be rendered;
- the video rendering unit 705 is configured to determine a target video instance node in the instance node queue based on the video related information to be rendered, and render the video resource slice according to the target video instance node to obtain video data; Video data is sent to the terminal.
- Embodiments of the present application also provide a second video rendering device, which may be integrated in a terminal.
- FIG 11 is a schematic structural diagram of a second video rendering device provided by an embodiment of the present application.
- the second video rendering device may include a rendering instruction sending unit 801, a video data receiving unit 802, a parameter extraction unit 803, and a rendered video data display unit 804. , each unit is explained separately below.
- the rendering instruction sending unit 801 is configured to respond to a video display operation for a video, generate a rendering instruction for the video, and send the rendering instruction to the server, where the rendering instruction includes video-related information to be rendered;
- the video data receiving unit 802 is configured to receive video data returned by the server for the rendering instruction, where the video data is for the server to determine at least one target video instance node from the instance node queue based on the video related information to be rendered, And it is obtained by rendering the corresponding video resource slice according to each target video instance node.
- the instance node queue is obtained by correlating the position information of the video resource slice in the video resource with M video rendering instance nodes.
- M video rendering The instance node is used to render N video resource slices, and the N video resource slices are obtained by segmenting video resources through the video structure information of the video.
- the video resources are used to construct the video, M ⁇ N, M and N is a positive integer;
- the parameter extraction unit 803 is configured to extract video header annotation information from the video data, and parse the video topological sorting parameters of the video data from the video header annotation information;
- the rendered video data display unit 804 is configured to aggregate the video data based on the video topological sorting parameter, and display the aggregated video data as rendered video data.
- An embodiment of the present application also provides an electronic device, as shown in Figure 12, which shows a schematic structural diagram of the electronic device involved in the embodiment of the present application.
- the electronic device may be a server.
- the electronic device may include a first processor 901 of one or more processing cores, one or more A first memory 902, a power supply 903, an input unit 904 and other components on the computer-readable storage medium.
- a first processor 901 of one or more processing cores one or more A first memory 902, a power supply 903, an input unit 904 and other components on the computer-readable storage medium.
- FIG. 12 does not constitute a limitation of the electronic device, and may include more or fewer components than shown in the figure, or combine certain components, or arrange different components.
- the first processor 901 is the control center of the electronic device. It uses various interfaces and lines to connect various parts of the entire electronic device, runs or executes software programs and/or modules stored in the first memory 902, and calls stored in the first memory 902.
- the data in the first memory 902 performs various functions of the electronic device and processes data.
- the first processor 901 may include one or more processing cores; preferably, the first processor 901 may integrate an application processor and a modem processor, where the application processor mainly processes the operating system and user interface. and applications, etc.
- the modem processor primarily handles wireless communications. It can be understood that the above modem processor may not be integrated into the first processor 901.
- the first memory 902 can be used to store software programs and modules.
- the first processor 901 executes various functional applications and map scene rendering by running the software programs and modules stored in the first memory 902 .
- the first memory 902 may mainly include a storage program area and a storage data area, wherein the storage program area may store an operating system, an application program required for at least one function (such as a sound playback function, an image playback function, etc.), etc.; the storage data area may store Stores data created based on the use of electronic devices, etc.
- the first memory 902 may include high-speed random access memory, and may also include non-volatile memory, such as at least one magnetic disk storage device, flash memory device, or other volatile solid-state storage device.
- the first memory 902 may also include a memory controller to provide the first processor 901 with access to the first memory 902 .
- the electronic device also includes a power supply 903 that supplies power to various components.
- the power supply 903 can be logically connected to the first processor 901 through a power management system, so that functions such as charging, discharging, and power consumption management can be implemented through the power management system.
- the power supply 903 may also include one or more DC or AC power supplies, recharging systems, power failure detection circuits, power converters or inverters, power status indicators, and other arbitrary components.
- the electronic device may also include an input unit 904 that may be used to receive input numeric or character information and generate keyboard, mouse, joystick, optical or trackball signal input related to user settings and function control.
- an input unit 904 may be used to receive input numeric or character information and generate keyboard, mouse, joystick, optical or trackball signal input related to user settings and function control.
- the electronic device may also include a display unit and the like, which will not be described again here.
- the first processor 901 in the electronic device will load the executable files corresponding to the processes of one or more application programs into the first memory 902 according to the following instructions, and the first processor will The server 901 is used to run the application program stored in the first memory 902, thereby implementing the map scene rendering method suitable for the server provided by the embodiment of the present application.
- An embodiment of the present application also provides another electronic device, as shown in FIG. 13 , which shows a schematic structural diagram of the electronic device involved in the embodiment of the present application.
- the electronic device may be a terminal.
- the electronic device may include components such as a second processor 1301 of one or more processing cores, a second memory 1302 of one or more computer-readable storage media, a power supply 1303, and an input unit 1304.
- a second processor 1301 of one or more processing cores may include components such as a second processor 1301 of one or more processing cores, a second memory 1302 of one or more computer-readable storage media, a power supply 1303, and an input unit 1304.
- a second processor 1301 of one or more processing cores such as a second processor 1301 of one or more processing cores, a second memory 1302 of one or more computer-readable storage media, a power supply 1303, and an input unit 1304.
- FIG. 12 does not constitute a limitation of the electronic device, and may include more or fewer components than shown in the figure, or combine certain components, or arrange different components.
- the instructions can be stored in a computer-readable storage medium, and loaded and executed by the first processor or the second processor.
- embodiments of the present application provide a computer-readable storage medium in which computer-executable instructions or computer programs are stored, and the computer-executable instructions or computer programs are suitable for loading by the first processor to execute the server.
- the computer-executable instructions or computer-executable instructions are suitable for the second process Container is loaded to execute methods applied to the terminal.
- the computer-readable storage medium may include: read-only memory (Read Only Memory, ROM), random access memory (Random Access Memory, RAM), magnetic disk or optical disk, etc.
- Embodiments of the present application provide a computer program product.
- the computer program product includes computer executable instructions or computer programs. When the computer executable instructions or computer programs are executed by a first processor, a method suitable for a server is implemented; or , when the computer-executable instructions or computer programs are executed by the second processor, a method suitable for the terminal is implemented.
Landscapes
- Engineering & Computer Science (AREA)
- Software Systems (AREA)
- Theoretical Computer Science (AREA)
- Physics & Mathematics (AREA)
- General Engineering & Computer Science (AREA)
- General Physics & Mathematics (AREA)
- Mathematical Physics (AREA)
- Processing Or Creating Images (AREA)
Abstract
一种地图场景渲染方法、装置、服务器、终端、计算机可读存储介质及计算机程序产品,应用于云技术、人工智能、智慧交通、辅助驾驶等各种场景;接收终端发送的针对待渲染地图的地图渲染指令,地图渲染指令包括待渲染地图中的路径起止信息;从渲染实例节点队列中确定与路径起止信息对应的至少一个目标实例节点,渲染实例节点队列通过待渲染地图的路径信息关联M个渲染实例节点获得,M个渲染实例节点用于渲染N个资源切片,N个资源切片通过待渲染地图的场景结构信息切分地图场景资源获得,地图场景资源用于渲染待渲染地图的地图场景,M≤N,M和N为正整数;根据每个目标实例节点对资源切片进行渲染,得到目标视频数据;将目标视频数据发送至终端。
Description
相关申请的交叉引用
本申请基于申请号为202210928593.2、申请日为2022年08月03日的中国专利申请提出,并要求该中国专利申请的优先权,该中国专利申请的全部内容在此引入本申请作为参考。
本申请涉及互联网技术领域,具体涉及一种地图场景渲染方法、装置、服务器、终端、计算机可读存储介质和计算机程序产品。
近年来,随着互联网技术的快速发展,地图产品被广泛应用,例如,应用于地图导航、智慧文旅、智慧交通等场景。在相关技术中,大多采用云端渲染的方式将地图场景的视频进行渲染,并将渲染后视频传输到终端,以在终端中显示相应的地图场景。
在对相关技术的研究和实践过程中发现,当分发在同一计算节点的多个终端在查看同一地图场景时,云端需要分别进行多次同一地图场景的云渲染,增加了对资源的占用,进而影响了地图场景渲染的效率。
发明内容
本申请实施例提供一种地图场景渲染方法、装置、服务器、终端、计算机可读存储介质及计算机程序产品,可以降低云端资源的占用率,进而能够提升地图场景的渲染效率。
本申请实施例提供一种地图场景渲染方法,适用于服务器,所述方法包括:
接收终端发送的针对待渲染地图的地图渲染指令,所述地图渲染指令包括所述待渲染地图中的路径起止信息;
从渲染实例节点队列中,确定与所述路径起止信息对应的至少一个目标实例节点,所述渲染实例节点队列通过所述待渲染地图的路径信息关联M个渲染实例节点获得,M个所述渲染实例节点用于渲染N个资源切片,N个所述资源切片通过所述待渲染地图的场景结构信息切分地图场景资源获得,所述地图场景资源用于渲染所述待渲染地图的地图场景,M≤N,M和N为正整数;
根据每个所述目标实例节点对所述资源切片进行渲染,得到目标视频数据;
将所述目标视频数据发送至所述终端。
本申请实施例还提供一种地图场景渲染方法,适用于终端,所述方法包括:
响应于针对待渲染地图的地图展示操作,生成地图渲染指令,并将所述地图渲染指令发送至服务器,所述地图渲染指令包括所述待渲染地图中的路径起止信息;
接收所述服务器针对所述地图渲染指令返回的目标视频数据,所述目标视频数据为所述服务器基于所述路径起止信息从渲染实例节点队列中确定至少一个目标实例节点,
并根据每个所述目标实例节点渲染对应的资源切片得到的数据,所述渲染实例节点队列通过所述待渲染地图的路径信息关联M个渲染实例节点获得,M个所述渲染实例节点用于渲染N个资源切片,N个所述资源切片通过所述待渲染地图的场景结构信息切分地图场景资源获得,所述地图场景资源用于渲染所述待渲染地图的地图场景,M≤N,M和N为正整数;
根据所述目标视频数据,展示地图场景片段。
本申请实施例还提供一种视频渲染方法,适用于服务器,所述方法包括:
接收终端发送的针对视频的渲染指令,所述渲染指令包括待渲染的视频相关信息;
从所述实例节点队列中,确定与所述渲染指令对应的至少一个目标视频实例节点,所述实例节点队列通过视频资源切片在视频资源中的位置信息关联M个视频渲染实例节点获得,M个所述视频渲染实例节点用于渲染N个视频资源切片,N个所述视频资源切片通过所述视频的视频结构信息切分视频资源获得,所述视频资源用于构建所述视频,M≤N,M和N为正整数;
根据每个所述目标视频实例节点对所述视频资源切片进行渲染,得到视频数据;
将所述视频数据发送至所述终端。
本申请实施例还提供一种播放渲染后视频数据的方法,适用于终端,所述方法包括:
响应于针对视频的视频展示操作,生成针对所述视频的渲染指令,并将所述渲染指令发送至服务器,所述渲染指令包括待渲染的视频相关信息;
接收所述服务器针对所述渲染指令返回的视频数据,所述视频数据为所述服务器基于待渲染的视频相关信息从实例节点队列中确定至少一个目标视频实例节点,并根据每个所述目标视频实例节点渲染对应的视频资源切片得到的,所述实例节点队列通过视频资源切片在视频资源中的位置信息关联M个视频渲染实例节点获得,M个所述视频渲染实例节点用于渲染N个视频资源切片,N个所述视频资源切片通过所述视频的视频结构信息切分视频资源获得,所述视频资源用于构建所述视频,M≤N,M和N为正整数;
根据所述视频数据,播放视频片段。
本申请实施例提供一种第一地图场景渲染装置,包括:
接收单元,配置为用于接收终端发送的针对待渲染地图的地图渲染指令,所述地图渲染指令包括所述待渲染地图中的路径起止信息接收终端发送的针对地图场景的地图渲染指令,所述地图渲染指令包括所述地图场景中对应的路径起止信息;
渲染单元,配置为用于从渲染实例节点队列中,确定与所述路径起止信息对应的至少一个目标实例节点,所述渲染实例节点队列通过所述待渲染地图的路径信息关联M个渲染实例节点获得,M个所述渲染实例节点用于渲染N个资源切片,N个所述资源切片通过所述待渲染地图的场景结构信息切分地图场景资源获得,所述地图场景资源用于渲染所述待渲染地图的地图场景,M≤N,M和N为正整数;根据每个所述目标实例节点对所述资源切片进行渲染,得到目标视频数据;
视频发送单元,配置为将所述目标视频数据发送至所述终端。
本申请实施例提供一种第二地图场景渲染装置,包括:
指令发送单元,配置为响应于针对待渲染地图场景的地图展示操作,生成针对所述地图场景的地图渲染指令,并将所述地图渲染指令发送至服务器,所述地图渲染指令包括所述待渲染地图场景中对应的路径起止信息;
数据接收单元,配置为接收所述服务器针对所述地图渲染指令返回的目标视频数据,所述目标视频数据为所述服务器基于所述地图渲染指令包括的路径起止信息从,在渲染实例节点队列中确定至少一个目标实例节点,并根据每个所述目标实例节点渲染对所述地图场景对应的资源切片进行渲染得到的数据,所述渲染实例节点队列通过所述待渲染
地图的路径信息关联M个渲染实例节点获得,M个所述渲染实例节点用于渲染N个资源切片,N个所述资源切片通过所述待渲染地图的场景结构信息切分地图场景资源获得,所述地图场景资源用于渲染所述待渲染地图的地图场景,M≤N,M和N为正整数;
展示单元,配置为根据所述目标视频数据,展示地图场景片段。
本申请实施例还提供一种第一视频渲染装置,包括:
视频资源获取单元,配置为获取视频资源,该视频资源用于构建视频;
视频资源切分单元,配置为基于该视频的视频结构信息对该视频资源进行切分,得到N个视频资源切片,并将每个视频资源切片分配给对应的视频渲染实例节点;
节点关联单元,配置为根据视频资源切片在视频资源中的位置信息,将与N个视频资源切片对应的M个视频渲染实例节点进行关联,得到实例节点队列;
指令接收单元,配置为接收终端发送的针对视频的渲染指令,该渲染指令包括待渲染的视频相关信息;
视频渲染单元,配置为基于该待渲染的视频相关信息,在该实例节点队列中确定目标视频实例节点,并根据该目标视频实例节点对该视频资源切片进行渲染,得到视频数据;将所述视频数据发送至所述终端。
本申请实施例还提供一种第二视频渲染装置,包括:
渲染指令发送单元,配置为用于响应于针对视频的视频展示操作,生成针对该视频的渲染指令,并将该渲染指令发送至服务器,该渲染指令包括待渲染的视频相关信息;
视频数据接收单元,配置为用于接收所述服务器针对所述渲染指令返回的视频数据,所述视频数据为所述服务器基于待渲染的视频相关信息从实例节点队列中确定至少一个目标视频实例节点,并根据每个所述目标视频实例节点渲染对应的视频资源切片得到的,所述实例节点队列通过视频资源切片在视频资源中的位置信息关联M个视频渲染实例节点获得,M个所述视频渲染实例节点用于渲染N个视频资源切片,N个所述视频资源切片通过所述视频的视频结构信息切分视频资源获得,所述视频资源用于构建所述视频,M≤N,M和N为正整数接收服务器针对该渲染指令返回的视频数据,该视频数据为该服务器基于该渲染指令包括的待渲染的视频相关信息,在实例节点队列中确定目标视频实例节点,并根据该目标视频实例节点对该待渲染的视频相关信息对应的视频资源切片进行渲染得到的数据;
参数提取单元,配置为用于在该视频数据中提取出视频包头标注信息,并在该视频包头标注信息中解析出该视频数据的视频拓扑排序参数;
渲染后视频数据展示单元,配置为用于基于该视频拓扑排序参数,对该视频数据进行聚合,并根据将聚合后的视频数据,作为渲染后视频数据进行展示。
本申请实施例还提供一种计算机可读存储介质,所述计算机可读存储介质存储有计算机可执行指令或计算机程序,所述计算机可执行指令或计算机程序适于第一处理器进行加载,以执行本申请实施例提供的适用于服务器的方法;或者,所述计算机可执行指令或计算机可执行指令适于第二处理器进行加载,以执行本申请实施例提供的适用于终端的方法。
本申请实施例还提供一种服务器,包括第一存储器,第一处理器,以及存储在所述第一存储器中并可以在所述第一处理器上运行的计算机可执行指令或计算机程序,所述第一处理器执行所述计算机可执行指令或计算机程序时,实现本申请实施例提供的适用于服务器的方法。
本申请实施例提供一种终端,包括第二存储器,第二处理器,以及存储在所述第二存储器中并可以在所述第二处理器上运行的计算机可执行指令或计算机程序,所述第二处理器执行所述计算机可执行指令或计算机程序时,实现本申请实施例提供的适用于终
端的方法。
本申请实施例还提供一种计算机程序产品,所述计算机程序产品包括计算机可执行指令或计算机程序,所述计算机可执行指令或计算机程序由第一处理器执行时,实现本申请实施例提供的适用于服务器的方法;或者,所述计算机可执行指令或计算机程序由第二处理器执行时,实现本申请实施例提供的适用于终端的方法。
本申请实施例根据待渲染地图的场景结构信息对地图场景资源进行切分,并根据待渲染地图的路径信息构建资源切片对应的渲染实例节点队列,从而在接收到针对待渲染地图的地图渲染指令时,根据地图渲染指令携带的路径起止信息,在渲染实例节点队列中查找对应的目标实例节点,根据目标实例节点对路径起止信息对应的资源切片进行渲染;如此,实现了一种基于至少一个目标实例节点渲染地图的过程,细化了渲染粒度,因此,能够减少地图场景资源的重复渲染,降低对云端资源的占用率,提升资源利用率;另外,切片化的资源渲染方式能够提升渲染并发性,从而,能够提高地图场景的渲染效率。
为了更清楚地说明本申请实施例中的技术方案,下面将对实施例描述中所需要使用的附图作简单地介绍,显而易见地,下面描述中的附图仅仅是本申请的一些实施例,对于本领域技术人员来讲,在不付出创造性劳动的前提下,还可以根据这些附图获得其他的附图。
图1是本申请实施例提供的一种地图场景渲染方法实施场景示意图;
图2a是本申请实施例提供的一种获取目标实例节点的流程示意图;
图2b是本申请实施例提供的地图场景渲染方法的流程示意图;
图3a是本申请实施例提供的一种地图场景渲染方法的拓扑结构示意图;
图3b是本申请实施例提供的一种地图场景渲染方法的又一流程示意图;
图4是本申请实施例提供的一种地图场景渲染方法的另一流程示意图;
图5是本申请实施例提供的一种地图场景渲染方法的时序示意图;
图6是本申请实施例提供的一种视频渲染方法的流程示意图;
图7是本申请实施例提供的一种播放渲染后视频数据的方法的流程示意图;
图8是本申请实施例提供的第一地图场景渲染装置的结构示意图;
图9是本申请实施例提供的第二地图场景渲染装置的结构示意图;
图10是本申请实施例提供的第一视频渲染装置的结构示意图;
图11是本申请实施例提供的第二视频渲染装置的结构示意图;
图12是本申请实施例提供的电子设备的结构示意图;
图13是本申请实施例提供的另一电子设备的结构示意图。
下面将结合本申请实施例中的附图,对本申请实施例中的技术方案进行清楚、完整地描述,显然,所描述的实施例仅仅是本申请的一部分实施例,而不是全部的实施例。基于本申请中的实施例,本领域技术人员在没有作出创造性劳动前提下所获得的所有其他实施例,都属于本申请保护的范围。
需要说明的是,对于采用云端渲染并将渲染后的视频流传输到终端进行展示的云渲染地图产品,能够提升渲染效果以及可视化效果。在相关地图场景渲染方法中,地图渲
染程序的完整地图场景资源由一个渲染实例节点渲染,而终端侧对云渲染地图的操作都有一定的相似性,类似于游戏关卡,渲染实例执行的起点、终点路径存在一定概率的重复性,当分发在同一计算节点的多个终端在查看同一地图场景时,云端需要分别进行多次同一地图场景的云渲染,从而增加了云端运行的云渲染实例资源消耗,因而增加了云端并发资源的占用量,影响了地图场景渲染的效率,也以此限制了云渲染地图产品的交互性以及自定义多样性。
基于此,本申请实施例提供一种地图场景渲染方法、装置、服务器、终端、计算机可读存储介质及计算机程序产品,能够降低云端资源的占用率,提升地图场景的渲染效率。其中,第一地图场景渲染装置可以集成在终端等电子设备中;第二地图场景渲染装置可以集成在服务器等电子设备中。
其中,服务器可以是独立的物理服务器,也可以是多个物理服务器构成的服务器集群或者分布式***,还可以是提供云服务、云数据库、云计算、云函数、云存储、网络服务、云通信、中间件服务、域名服务、安全服务、网络加速服务(Content Delivery Network,CDN)、以及大数据和人工智能平台等基础云计算服务的云服务器。终端可以包括但不限于手机、电脑、智能语音交互设备、智能家电、车载终端、飞行器等。终端以及服务器可以通过有线或无线通信方式进行直接或间接地连接,本申请实施例在此不做限制。
请参阅图1,图1为本申请实施例所提供的地图场景渲染方法的实施场景示意图,在地图场景渲染***100中,终端200(示例性示出了终端200-1和终端200-2)通过网络300与服务器400连接,网络300可以是广域网或者局域网,又或者是二者的组合。另外,地图场景渲染***100中还包括数据库500,用于向服务器400提供数据支持;并且,图1中示出的为数据库500独立于服务器400的一种情况,此外,数据库500还可以集成在服务器400中,本申请实施例对此不作限定。
终端200,用于响应于针对待渲染地图的地图展示操作,生成地图渲染指令,并将地图渲染指令通过网络300发送至服务器400,地图渲染指令包括待渲染地图中的路径起止信息;接收服务器400通过网络300针对地图渲染指令返回的目标视频数据,目标视频数据为服务器基于路径起止信息从渲染实例节点队列中确定至少一个目标实例节点,并根据每个目标实例节点渲染对应的资源切片得到的数据,渲染实例节点队列通过待渲染地图的路径信息关联M个渲染实例节点获得,M个渲染实例节点用于渲染N个资源切片,N个资源切片通过待渲染地图的场景结构信息切分地图场景资源获得,地图场景资源用于渲染待渲染地图的地图场景,M≤N,M和N为正整数;根据目标视频数据,展示地图场景片段(示例性示出了图形界面210-1和图形界面210-2)。
服务器400,用于接收终端200通过网络300发送的针对待渲染地图的地图渲染指令,地图渲染指令包括待渲染地图中的路径起止信息;从渲染实例节点队列中,确定与路径起止信息对应的至少一个目标实例节点;根据每个目标实例节点对资源切片进行渲染,得到目标视频数据;通过网络300将目标视频数据发送至终端200。
需要说明的是,本申请实施例可应用于各种场景,包括但不限于云技术、人工智能、智慧交通、辅助驾驶等。图1所示的地图场景渲染方法的实施环境场景示意图仅仅是一个示例,本申请实施例描述的地图场景渲染方法的实施环境场景是为了更加清楚的说明本申请实施例的技术方案,并不构成对于本申请实施例提供的技术方案的限定。本领域普通技术人员可知,随着地图场景渲染的演变和新业务场景的出现,本申请实施例提供的技术方案对于类似的技术问题,同样适用。
需要说明的是,本申请实施例提供的地图场景渲染应用于云渲染地图产品,例如,可以包括应用于地图导航、智慧文旅、智慧交通、景区等数字孪生场景中的地图产品。
本申请实施例从服务器和终端的角度进行描述本申请实施例提供的地图场景渲染
方法。
请参阅图2a,图2a是本申请实施例提供的获取目标实例节点的流程示意图,其中,该获取目标实例节点流程的执行主体为服务器。该获取目标实例节点流程包括步骤101至步骤103,下面对各步骤分别进行说明。
在步骤101中,获取地图场景资源。
其中,地图场景资源可以用于构建待渲染地图的地图场景,该地图场景可以为在虚拟场景中展示的地图画面。在本申请实施例中,地图场景可以为以三维动画形式展示的虚拟地图场景。
在步骤102中,基于场景结构信息对地图场景资源进行切分,得到N个资源切片,并将每个资源切片分配给对应的渲染实例节点。
其中,场景结构信息可以为描述该待渲染地图的结构分布的信息;例如,可以包括该待渲染地图的关卡分布信息,还可以包括地图场景中的对象分布信息等信息;关卡分布信息可以包括描述地图场景中关卡的层级分布的信息,比如,可以包括待渲染地图的关卡、以及每一关卡在地图场景中的划分或者地图场景的楼层的等级结构等信息,其中,关卡可以表征地图场景中的进程或者待渲染地图的区域划分结果,比如,可以表示地图场景中的楼层划分结果、季节划分结果或者领地划分结果等类型的区域划分结果;例如,在景区对应的数字孪生场景类型的待渲染地图中,关卡可以表示地图场景中的楼层层级或者区域类型,譬如,一楼、二楼等楼层层级,或者休闲区、观光区、饮食区等区域类型。关卡还可以表示地图场景中的任务等级或者虚拟关卡级别;例如,可以表示游戏类型的地图场景中的地图模块、任务等级或者是游戏等级等。对象分布信息可以表征待渲染地图的地图元素对象在地图场景中的分布,该地图元素对象可以为构成地图场景的元素对象,也可以为地图场景中分布的元素对象,该元素对象可以为地图场景中的虚拟桌子、虚拟门、虚拟椅子、虚拟杯子、虚拟植物、虚拟池塘等可视化元素。该资源切片可以为对地图场景资源进行切分后得到的切片,该渲染实例节点可以为用于对资源切片进行渲染的实例节点,该实例节点可以为云端部署的实例。
其中,基于待渲染地图的场景结构信息对地图场景资源进行切分的方式可以有多种;例如,当场景结构信息包括关卡分布信息时,可以基于待渲染地图对应的关卡分布信息,对地图场景资源进行关卡维度的资源切分,得到该待渲染地图的每一关卡对应的关卡资源切片,根据关卡分布信息,识别出该关卡中的邻接关卡,并在该地图场景资源中切分出该邻接关卡的跨关卡资源切片,基于该关卡资源切片和该跨关卡资源切片,确定该地图场景对应的多个资源切片。
其中,关卡分布信息可以为包括待渲染地图的每一关卡在地图场景中的分布信息,该关卡资源切片可以为每一关卡对应的地图场景资源的切片,该邻接关卡可以为在地图场景中属于相邻关系的关卡,该跨关卡资源切片可以为地图场景资源中处于邻接关卡之间的资源切片。
其中,获取关卡分布信息的方式可以有多种;例如,可以对地图场景资源进行遍历,根据遍历结果获取待渲染地图对应的关卡分布信息,也可以在渲染地图场景之前预先配置待渲染地图对应的关卡分布信息,等等,本申请实施例对此不作限定。
其中,基于待渲染地图对应的关卡分布信息,对地图场景资源进行关卡维度的资源切分的方式可以有多种;例如,可以基于关卡分布信息,对地图场景资源进行关卡划分,得到每一关卡对应的关卡资源片段,对关卡资源片段进行兴趣点识别,得到每一关卡对应的兴趣点分布,根据兴趣点分布,对该关卡资源片段进行切分,得到每一关卡对应的关卡资源切片。
其中,关卡资源片段可以为根据每一关卡对地图场景资源进行切分后,得到的每一
关卡对应的地图资源片段,该兴趣点分布可以为每一关卡的兴趣点在地图场景中的分布,该兴趣点(Point of Interest,POI)可以为地图场景中的地图元素对象,例如,可以为地图场景中的一栋虚拟房子、一个虚拟商铺、一个虚拟邮筒、一个虚拟公交站、一个虚拟椅子、一棵虚拟树等元素;在本申请实施例中,可以根据实际的业务需求对兴趣点的粒度进行调节;例如,在进行地图导航时,该兴趣点可以为虚拟房子、虚拟商铺、虚拟邮筒等粒度的元素,对于室内的兴趣点,则可以为虚拟桌子、虚拟杯子、虚拟椅子等粒度的元素。
其中,对关卡资源片段进行兴趣点识别的方式可以有多种;例如,可以识别出关卡资源片段中的每一地图元素对象,同时可以根据实际的业务需求确定每一地图元素对象的偏重程序以及识别粒度,从而可以根据每一地图元素对象的偏重程序以及识别粒度,在关卡资源片段中识别匹配的兴趣点。
在本申请实施例中,在对关卡资源片段进行兴趣点识别之后,便可以根据该兴趣点分布,对该关卡资源片段进行切分。其中,根据兴趣点分布,对关卡资源片段进行切分的方式可以有多种;例如,可以根据该兴趣点分布,在对应的关卡资源片段中识别出每一兴趣点的路径分布,并将每一兴趣点作为切分节点,基于路径分布,对切分节点进行切分,得到多个关卡资源切片。也就是说,任一可达的两兴趣点之间的路径所对应的资源为一个资源切片。
在本申请实施例中,在基于地图场景对应的关卡分布信息,对地图场景资源进行关卡维度的资源切分之后,便可以根据关卡分布信息,识别出该关卡中的邻接关卡。其中,根据关卡分布信息,识别出待渲染地图的全量关卡中的邻接关卡的方式可以有多种;例如,可以根据关卡公布信息,确定待渲染地图的每一关卡的拓扑排列顺序,根据关卡的拓扑排列顺序可以识别出待渲染地图的全量关卡中存在相邻关系的邻接关卡。
在本申请实施例中,在根据关卡分布信息,识别出待渲染地图的全量关卡中的邻接关卡之后,便可以在地图场景资源中切分出邻接关卡的跨关卡资源切片。其中,在地图场景资源中切分出邻接关卡的跨关卡资源切片的方式可以有多种;例如,可以根据每一关卡对应的关卡资源切片,计算该邻接关卡的每一候选关卡连接路径的连接距离,基于该连接距离,在该候选关卡连接路径中筛选出目标连接路径,根据该目标连接路径,在该地图场景资源中切分出该邻接关卡的跨关卡资源切片。
其中,候选关卡连接路径可以为邻接关卡的一条路径,用于连接存在邻接关系的两个关卡,通过该路径,可以由邻接关卡中的任意关卡进入到邻接关卡中的另一关卡中。连接距离可以为每一候选关卡连接路径对应的距离,目标连接路径可以为根据连接距离在候选关卡连接路径中筛选出来的最优路径;其中,最优路径可以为以下至少一种:距离最短路径,选择频次最大路径,用时最短路径,平坦度最高路径。
其中,根据每一关卡对应的关卡资源切片,计算邻接关卡的每一候选关卡连接路径的连接距离的方式可以有多种;例如,可以在关卡资源切片中选中一个参考点,从而可以根据每一关卡资源切片中的参考点,计算地图场景中邻接关卡中两关卡之间的距离,以此得到每一候选关卡连接路径的连接距离。
在本申请实施例中,在根据每一关卡对应的关卡资源切片,计算邻接关卡之间每一候选关卡连接路径的连接距离之后,便可以基于连接距离,在候选关卡连接路径中筛选出目标连接路径。其中,基于连接距离,在该候选关卡连接路径中筛选出目标连接路径的方式可以有多种;例如,可以根据最短路径距离算法,将连接距离最短的候选关卡连接路径作为目标连接路径。
在本申请实施例中,从地图场景资源中切分出邻接关卡的跨关卡资源切片之后,便可以基于关卡资源切片和跨关卡资源切片,确定多个资源切片。其中,基于关卡资源切
片和跨关卡资源切片,确定多个资源切片的方式可以有多种,例如,可以直接将关卡资源切片和跨关卡资源切片作为对地图场景资源进行切分后得到的多个资源切片。也可以采用间接的方式来根据关卡资源切片和跨关卡资源切片确定多个资源切片,本申请实施例在此不做限定。
在本申请实施例中,在基于待渲染地图的场景结构信息对地图场景资源进行切分之后,便可以将每个资源切片分配给对应的渲染实例节点。其中,将每个资源切片分配给对应的渲染实例节点的方式可以有多种;例如,可以将每一关卡对应的至少一个资源切片分配给同一个渲染实例节点,即为一个渲染实例节点用于渲染一个关卡对应的至少一个资源切片;也可以将一个资源切片分配给一个渲染实例节点,即为一个渲染实例节点用于渲染一个资源切片,还可以将多个资源切片分配给同一个渲染实例节点,即为一个渲染实例节点用于渲染多个资源切片;资源切片与渲染实例节点的对应关系,可以根据实际情况进行设定,本申请实施例在此不做限定。
可以理解的是,根据待渲染地图的场景结构信息对地图场景资源进行切分,并将每个资源切片与渲染实例节点进行关联,在接收到地图渲染请求时,可以通过渲染实例节点执行对应的资源切片的渲染,从而可以实现以资源切片的形式对待渲染地图进行细粒度的切片化渲染,提升渲染的灵活度,减少资源的重复渲染;同时能够减少云端的资源占用,提高地图场景的渲染效率。
在步骤103中,根据路径信息,将与N个资源切片对应的M个渲染实例节点进行关联,得到渲染实例节点队列。
其中,路径信息可以表征地图场景中路径的分布信息,可以描述地图场景中所有道路通道的分布。渲染实例节点队列可以为根据路径信息对渲染实例节点进行排序后建立的队列。
其中,根据待渲染地图的路径信息,将M个渲染实例节点进行关联,得到地图场景资源对应的渲染实例节点队列的方式可以有多种;例如,可以根据地图场景对应的路径信息,识别出资源切片在地图场景中的连接路径分布,基于连接路径分布,确定M个渲染实例节点之间的节点连接顺序,根据该节点连接顺序,构建该地图场景资源对应的渲染实例节点队列。
其中,连接路径分布可以为连接路径在地图场景中的分布,连接路径为资源切片对应的路径;例如,可以将每一资源切片作为一个节点,从而可以根据路径信息中描述的资源切片对应的场景在地图场景中的分布,来识别出资源切片在该地图场景中的连接路径分布。节点连接顺序可以为基于资源切片对应的场景在地图场景中的分布确定的。
可以理解的是,通过渲染实例节点队列构建渲染实例节点与地图场景中的资源切片的映射关系,从而可以根据渲染实例节点队列中渲染实例节点来控制云端实现细粒度的、切片化的地图场景资源的渲染,减少了资源的重复渲染,同时减少了云端的资源占用,提高了地图场景的渲染效率。
其中,基于连接路径分布,确定M个渲染实例节点之间的节点连接顺序的方式可以有多种;例如,可以基于资源切片的连接路径分布,构建M个渲染实例节点对应的节点关系图,根据节点关系图,识别出M个渲染实例节点之间的节点连接顺序。
其中,节点关系图可以为基于渲染实例节点构成的有向无环拓扑图(Directed Acyclic Graph,DAG),该有向无环拓扑图是一个没有回路的有向图。
其中,基于N个资源切片的连接路径分布,构建渲染实例节点对应的节点关系图的方式可以有多种;例如,N个资源切片可以包括关卡资源切片和跨关卡资源切片,从而可以根据N个资源切片中的关卡资源切片以及连接路径分布,构建每一关卡对应的节点关系子图,基于资源切片中的跨关卡资源切片,对节点关系子图进行拼接,得到渲染实
例节点对应的节点关系图。
需要说明的是,在构建每一关卡对应的节点关系子图时,将关卡对应的任一路径确定为节点关系子图的边,将路径的起始点确定为节点关系子图的节点。
其中,节点关系子图可以为基于每一关卡对应的渲染实例节点构成的有向无环拓扑图;例如,假设地图场景中存在4个关卡,则地图场景可以存在对应的4个节点关系子图。
其中,根据资源切片中的关卡资源切片以及连接路径分布,构建每一关卡对应的节点关系子图的方式可以有多种;例如,请参考图3a,图3a是本申请实施例提供的一种地图场景渲染方法的拓扑结构示意图;如图3a所示,节点关系图3-1对应的地图场景包括a、b、c以及d这四个关卡,根据每一关卡的关卡资源切片以及连接路径分布,可以构建每一关卡对应的节点关系子图,其中,对于关卡a对应的节点关系子图(子拓扑结构A),可以包括节点3-11(称为起点A(POI A))、节点3-12(称为中间节点A1(POI A1))、节点3-13(称为中间节点A2(POI A2))、以及节点3-14(称为跨关卡关键节点(跨楼层节点A*)),则对于关卡a,可以由起点A出发,途径中间节点A1以及中间节点A2,最终可以到达跨楼层节点A*,因此,可以对关卡a对应的地图场景拆分为A-A1、A-A2、A1-A2、A1-A*以及A2-A*共5段的资源切片。对于关卡b对应的节点关系子图(子拓扑结构B),可以包括节点3-21(称为起点B(POI B))、节点3-22(称为中间节点B1(POI B1))、节点3-23(称为中间节点B2(POI B2))、节点3-24(称为跨关卡关键节点(跨楼层节点B*))以及与关卡a对应的节点3-25(称为跨关卡关键节点(跨楼层节点AB*))。还有关卡c对应的节点关系子图(子拓扑结构C),包括节点3-31(称为节点C(POI C))。以及,关卡d对应的节点关系子图(子拓扑结构D),包括节点3-41(称为节点D(POI D))。其中,跨关卡关键节点可以为连接邻接关卡中两关卡之间的节点,可以为跨关卡资源切片对应的渲染实例节点,可以用于对节点关系子图进行拼接。以此,可以将整个地图场景对应的节点关系图,拆分为若干个细分的节点关系子图,其中,节点关系子图之间的关联依据跨关卡关键节点关联,从而可以根据地图场景中资源切片的分布,得到渲染实例节点的节点连接顺序,进而可以根据节点连接顺序构建该地图场景资源对应的渲染实例节点队列,以此可以基于渲染实例节点队列实现对地图场景资源的切片化渲染,提高地图场景的渲染效率,减少资源占用。
请参阅图2b,图2b是本申请实施例提供的地图场景渲染方法的流程示意图,其中,该获取目标实例节点流程的执行主体为服务器。该获取目标实例节点流程包括步骤104和步骤105,下面对各步骤分别进行说明。
在步骤104中,接收终端发送的针对待渲染地图的地图渲染指令,地图渲染指令包括待渲染地图中的路径起止信息。
其中,地图渲染指令可以为用于渲染待渲染地图的指令,该地图渲染指令可以包括待渲染地图中的路径起止信息,路径起止信息可以为包括地图渲染指令指示的待进行渲染的地图场景片段在对应的地图场景中的起止位置;从而,基于该路径起止信息可以确定待进行渲染的地图场景片段在对应的地图场景中的位置范围,进而可以确定待进行渲染的资源切片。
例如,可以通过接收用户在地图场景对应的客户端中的点击、移动等操作,来获得地图操作指令,该地图操作指令指示由e位置移动到f位置的路径变化,从而地图操作指令可以触发终端生成指示渲染e位置到f位置的地图场景片段的地图渲染指令,该地图场景片段可以由至少一个资源切片组成。
在步骤105中,从渲染实例节点队列中,确定与路径起止信息对应的至少一个目标实例节点,根据每个目标实例节点对资源切片进行渲染,得到目标视频数据,将目标视
频数据发送至终端。
其中,目标实例节点可以为基于地图渲染指令确定的待进行渲染的资源切片对应的渲染实例节点。
其中,基于路径起止信息,在渲染实例节点队列中确定目标实例节点的方式可以有多种;例如,可以从路径起止信息中提取出待渲染地图中的起始位置和终止位置,获取起始位置和终止位置之间的目标位置区间,并在N个资源切片中识别出位置处于该目标位置区间中的至少一个目标资源切片,根据该目标资源切片,从渲染实例节点队列中筛选出目标实例节点。
其中,起始位置可以为待进行渲染的地图场景片段在地图场景中对应的起点位置;例如,可以为待进行渲染的地图场景片段中的第一个资源切片。终止位置可以为待需要进行渲染的地图场景片段在地图场景中对应的终点位置;例如,可以为待进行渲染的地图场景片段中的最后一个资源切片。目标位置区间可以为该起始位置和终止位置之间构成的区间,即为待进行渲染的地图场景片段在地图场景中对应的位置区间;目标资源切片可以为待进行渲染的地图场景片段对应的资源切片,即为待进行渲染的资源切片。
在基于路径起止信息,从渲染实例节点队列中确定目标实例节点之后,便可以根据目标实例节点对资源切片进行渲染。其中,根据目标实例节点对资源切片进行渲染的方式可以有多种;比如,可以按照节点关系图对应的拓扑结构进行指令的分发,即为可以通过网关节点获取地图场景中起始位置到终点位置的路径中间的所有资源切片对应的每个渲染实例节点的地址,然后可以根据该地址将地图渲染指令进行拆分并下发至对应的渲染实例节点(称为目标实例节点),从而可以基于目标实例节点对所对应的资源切片(称为目标资源切片)进行渲染;例如,每一目标实例节点可以在云端的地图三维(3D)引擎中进行各自区域的地图渲染,生成连续底图元素绘制的渲染帧,从而可以基于这些渲染帧得到地图场景对应的渲染视频数据。
在本申请实施例中,在根据目标实例节点对资源切片进行渲染之后,还可以获取渲染视频数据的拓扑排序参数,基于拓扑排序参数对渲染视频数据进行标注,得到目标视频数据,将目标视频数据发送至终端。
其中,渲染视频数据可以为基于一目标实例节点对该地图场景对应的资源切片进行渲染后得到的数据,拓扑排序参数可以为基于地图场景对应的节点关系图确定的渲染视频数据在地图场景中的分布信息;例如,可以包括渲染视频数据对应的关卡和渲染实例节点、渲染视频数据对应的渲染实例节点在节点关系图中的分布等信息。目标视频数据可以为基于至少一个拓扑排序参数对至少一个渲染视频数据进行标注后的数据。
其中,基于拓扑排序参数对渲染视频数据进行标注的方式可以有多种;例如,请参考表1,表1为本申请实施例提供的一种地图场景渲染方法的包头结构,可以获取渲染视频数据对应的拓扑排序链表、当前渲染实例节点、当前渲染实例对应的首尾帧的相机参数、以及渲染视频数据对应的像素流大小、像素长宽、像素流内容等信息,并根据这些信息对渲染视频数据对应的包头进行标注。其中,拓扑排序链表可以为根据地图场景对应的节点关系图确定的链表,像素流可以为渲染视频数据对应的像素流,当前渲染实例节点可以为渲染视频数据对应的渲染实例节点。地图相机参数可以为当前渲染实例节点的首尾关键帧对应的地图相机参数,如中心点坐标、地图级别、旋转倒伏角等参数,基于这些参数可以实现跨渲染实例节点的渲染视频数据的首尾帧融合。
表1
请参考图3b,图3b是本申请实施例提供的一种地图场景渲染方法的又一流程示意图。其中,在云端服务器3-5中,当渲染服务3-51响应于地图渲染指令,从渲染实例节点队列中获得的至少一个目标实例节点为渲染实例节点甲和渲染实例节点乙时,进行指令分发,以对渲染实例节点甲和渲染实例节点乙分别进行渲染启动,进而以由关卡甲渲染对应的资源切片,由关卡乙渲染对应的资源切片;在启动对渲染实例节点甲和渲染实例节点乙的渲染操作之后,推流服务3-52还可以对渲染得到的渲染视频数据进行码率控制,又可以对渲染过程中产生的关键帧进行包头标注,并在标注时附加渲染视频数据对应的拓扑排序参数等信息。此外,还可以根据不同终端上的展示效果给予渲染视频数据不同粒度的适配,以此可以减少传输数据流的大小,同时可以减少终端上解码的耗时;这里,可以通过实例对终端上的配置参数(例如宽高、像素密度、采样粒度等参数)做对应的分辨率适配。以此,可以通过推流服务将生成的多个像素流(称为目标视频数据)传输给终端3-6,以在终端3-6中进行对应的地图场景的展示。
在本申请实施例中,由于渲染实例节点队列中各个渲染实例节点存在基于节点关系图确定的拓扑排列顺序,终端中根据该拓扑排列顺序播放各个渲染实例节点对应的各个渲染视频数据;因此,可以在云端维护渲染实例节点的调度顺序,以协调各个渲染实例节点对应的渲染视频数据发送到终端的次序;例如,可以根据调度顺序确定播放顺序,并根据播放顺序将渲染实例对应的渲染视频数据进行分组,并分组发送给终端。从而可以减少终端重排序的资源消耗,进而降低地图场景在终端因反解重排序造成的播放延迟,提高播放效率。
由以上可知,本申请实施例根据地图场景的场景结构信息对地图场景资源进行切分,并根据地图场景的路径分布,构建资源切片对应的渲染实例节点队列,从而在接收到针对地图场景的地图渲染指令时,根据地图渲染指令携带的路径起止信息,在渲染实例节点队列中查找地图场景对应的目标实例节点,根据目标实例节点对该路径起止信息对应的资源切片进行渲染;减少了的地图场景资源的重复渲染,降低了云端资源的占用率;另外,切片化的资源渲染方式提高了地图场景的渲染效率,进而提升了资源利用率。
如图4所示,图4为本申请实施例提供的地图场景渲染方法的另一流程示意图。该流程包括步骤201至步骤203,下面对各步骤分别进行说明。
在步骤201中、响应于针对待渲染地图的地图展示操作,生成地图渲染指令,并将地图渲染指令发送至服务器。
其中,地图展示操作可以为用户在终端上触发的请求展示相应的地图场景的操作,比如,在终端上触发的点击、移动等操作。地图渲染指令包括待渲染地图中的路径起止信息。在本申请实施例中,服务器可以为云端部署的云服务器。
其中,将地图渲染指令发送至服务器的方式可以有多种;例如,请继续参考图3b,地图展示操作触发指令分发,可以通过即时音视频通讯技术(Web Real-Time Communications Software Development Kit,WebRTC SDK)将地图渲染指令发送到云端服务器中。
在步骤202中、接收服务器针对地图渲染指令返回的目标视频数据。
其中,目标视频数据可以为服务器基于地图渲染指令中的路径起止信息,从渲染实例节点队列中确定至少一个目标实例节点,并根据每个目标实例节点对该地图场景对应的资源切片进行渲染得到的数据。
需要说明的是,目标视频数据可以为服务器在云端渲染后的渲染视频数据,也可以为服务器在云端渲染后并进行码率控制、包头标注、分辨率适配等其他视频处理之后得
到的数据,具体可以根据实际情况进行设定,本申请实施例在此不做限定。
其中,接收服务器针对地图渲染指令返回的目标视频数据的方式可以有多种;例如,可以通过WebRTC SDK接收服务器针对地图渲染指令返回的多个像素流(称为目标视频数据)。此外,由于在地图场景渲染过程中,存在多个渲染实例节点并发传输视频的情况,而并发传输很会占用终端上的输入/输出(IO)资源,因此,为了降低并发传输对资源的占用量,提高资源利用率,可以在终端上采用复用传输IO信道的多路复用(参见图3b)策略来接收服务器返回的目标视频数据,多路复用技术表示在一个信道上传输多路信号或数据流的过程和技术。因为多路复用能够将多个低速(传输速度低于速度阈值)信道整合到一个高速(传输速度高于速度阈值)信道进行传输,进而可以有效地利用了高速信道,从而可以降低多条线路的资源管理消耗。
在步骤203中、根据目标视频数据,展示地图场景片段。
其中,根据目标视频数据,展示地图场景片段的方式可以有多种;例如,可以在目标视频数据中提取出包头标注信息,从包头标注信息中解析出目标视频数据的拓扑排序参数,基于拓扑排序参数,对该目标视频数据进行聚合,得到聚合后视频数据,并根据聚合后视频数据,展示该地图场景中的地图场景片段。
其中,包头标注信息可以为对目标视频数据对应的关键帧进行包头标注后产生的标注信息,可以包括目标视频数据对应的拓扑排序链表、当前渲染实例节点、当前渲染实例对应的首尾帧的相机参数以及目标视频数据对应的像素流大小、像素长宽、像素流内容等信息;例如,可以继续参考表1所示的包头结构信息。拓扑排序参数可以为基于地图场景对应的节点关系图确定的目标视频数据在地图场景中的分布信息,例如,可以包括目标视频数据对应的关卡和渲染实例节点、目标视频数据对应的渲染实例节点在节点关系图中的分布等信息。该聚合后视频数据可以为基于拓扑排序参数对目标视频数据进行聚合后的视频数据。
其中,基于拓扑排序参数,对目标视频数据进行聚合的方式可以有多种;例如,可以基于拓扑排序参数,确定目标视频数据中每个视频数据与其他视频数据之间的连接关系,并基于该连接关系构建目标视频数据对应的目标节点关系图,根据目标节点关系图,识别出目标视频数据中的至少一个邻接视频数据对,对该邻接视频数据对之间的邻接视频帧进行拼接,当完成所有邻接视频数据对的拼接时,也就完成了对目标视频数据进行聚合。
其中,目标节点关系图可以为基于目标视频数据构成的有向无环拓扑图,可以根据目标节点关系图重新构建目标视频数据基于渲染实例对应的关联顺序,以便于后续目标视频数据的拼接组织并进行播放。邻接视频数据对可以为基于目标节点关系图中描述的每一目标视频数据在地图场景中的分布,在目标视频数据中确定的属于相邻关系的视频数据,即为目标节点关系图中的存在连接关系的相邻节点对应的视频数据。目标视频数据包括多个视频帧,邻接视频数据对之间包括邻接视频帧,邻接视频帧可以为邻接视频数据对之间存在相邻关系的视频帧,例如,可以为邻接视频数据对中处于前面的目标视频数据的尾帧以及处于后面的目标视频数据的首帧(如图3b所示,称为多路视频首尾帧拼接),在本申请实施例中,首帧和尾帧可以为多个视频帧。
其中,对邻接视频数据对之间的邻接视频帧进行拼接的方式可以有多种;例如,可以采用多路视频拼接技术,对邻接视频数据对的首尾关键帧等邻接视频帧进行衔接、过渡以及融合,多路视频拼接技术是一种通过求取当前场景下的多路视频图像之间的模型变换参数、颜色亮度伽马校正系数、最佳缝合线以及对应的加权融合矩阵,使得最终融合的全景视频图像在重叠区域平滑过渡,在实时阶段相邻两图像间的缝合线过渡带更加平滑的技术。在本申请实施例中,可以获取当前的装置视角以及前后的用户视角的交集
作为实际视频数据拼接聚合的范围。其中,装置视角可以为渲染实例当前设置的相机视角,前后的用户视角可以为用户在一定时间范围内通过终端设置的相机视角,可以根据这两个视角来确定视频数据拼接聚合范围内的视频数据,从而终端可以抽取视频数据拼接聚合范围内的视频数据,并进行对应编号标注,从而可以利用视频拼接技术对编号标注后的视频数据进行聚合处理。在对目标视频数据进行聚合之后,可以根据聚合后视频数据展示对应的地图场景片段,以实现地图展示(参见图3b),从而用户可以在终端上看到云渲染地图中的渲染实例串联视频场景。
由以上可知,本申请实施例根据地图展示操作生成针对包括地图场景中对应路径起止信息的地图渲染指令,并将地图渲染指令发送至服务器,然后接收服务器针对地图渲染指令返回的目标视频数据并展示该路径起止信息对应的地图场景,减少了地图场景资源的重复渲染,提高了地图场景的渲染效率,进而提升了资源利用率。
请参阅图5,图5为本申请实施例提供的地图场景渲染方法的时序示意图。该方法流程可以包括步骤S1至步骤S6,下面对各步骤分别进行说明。
在步骤S1中,服务器获取地图场景资源,基于待渲染地图的场景结构信息对地图场景资源进行切分,得到N个资源切片,将每个资源切片分配给对应的渲染实例节点。
需要说明的是,步骤S1的实现过程与步骤101和步骤102的实现过程类似,本申请实施例在此不再重复描述。
在步骤S2中,服务器根据待渲染地图的路径信息,将与N个资源切片的M个渲染实例节点进行关联,得到渲染实例节点队列。
需要说明的是,步骤S2的实现过程与步骤103的实现过程类似,本申请实施例在此不再重复描述。
在步骤S3中,终端响应于针对待渲染地图的地图展示操作,生成针对地图场景的地图渲染指令,并将地图渲染指令发送至服务器。
需要说明的是,步骤S3的实现过程与步骤201的实现过程类似,本申请实施例在此不再重复描述。
在步骤S4中,服务器接收终端发送的针对地图场景的地图渲染指令,基于路径起止信息,在渲染实例节点队列中确定目标实例节点,并根据目标实例节点对资源切片进行渲染。
需要说明的是,步骤S4的实现过程与步骤105的实现过程类似,本申请实施例在此不再重复描述。
在步骤S5中,终端接收服务器针对地图渲染指令返回的目标视频数据。
需要说明的是,步骤S5的实现过程与步骤202的实现过程类似,本申请实施例在此不再重复描述。
在步骤S6中,终端根据目标视频数据,展示地图场景片段。
需要说明的是,步骤S6的实现过程与步骤203的实现过程类似,本申请实施例在此不再重复描述。
本申实施例还提供一种视频渲染方法,适用于服务器。
如图6所示,图6为本申请实施例提供的视频渲染方法的流程示意图。该视频渲染方法的执行主体为服务器,且该视频渲染方法包括步骤301至步骤305,下面对各步骤分别进行说明。
在步骤301中、获取视频资源。
其中,视频资源可以用于构建视频,可以为视频对应的资源,例如,可以为待渲染的视频或者用于构建待渲染的视频的素材等。
在步骤302中、基于视频的视频结构信息对视频资源进行切分,得到N个视频资源
切片,并将每个视频资源切片分配给对应的视频渲染实例节点。
其中,视频结构信息可以为描述视频中结构分布的信息;比如,可以描述视频中的集数分布,例如,描述视频中处于集数划分的位置,还可以描述视频中的情节分布;例如,可以根据视频中情节内容来对视频进行分段,从而可以根据视频的情节内容描述视频资源的片段分布等。视频资源切片可以为根据视频的视频结构信息对视频资源进行切分后得到的切片。视频渲染实例节点可以为用于对视频资源切片进行渲染的实例节点,该实例节点可以为云端部署的实例。
在步骤303中、根据视频资源切片在视频资源中的位置信息,将与N个视频资源切片对应的M个视频渲染实例节点进行关联,得到实例节点队列。
其中,位置信息可以为视频资源切片在视频资源中的位置,即为视频资源切片对应的视频片段在视频中的位置。实例节点队列可以为根据视频资源切片在视频资源中的位置信息对视频渲染实例节点进行排序后,根据排序后的视频渲染实例节点构建的队列。
在步骤304中、接收终端发送的针对视频的渲染指令。
其中,渲染指令可以为用于渲染视频的指令,该渲染指令可以包括待渲染的视频相关信息,即为待进行渲染的视频的相关信息,用于指示服务器端需要进行渲染的内容;比如,可以指示服务器端当前需要渲染的视频资源以及待渲染的内容等;例如,该视频相关信息可以包括待渲染的视频对应的视频资源,也可以包括视频的索引等信息,服务端可以根据索引找到待渲染的视频的视频资源。
在步骤305中、基于待渲染的视频相关信息,在实例节点队列中确定至少一个目标视频实例节点,并根据每个目标视频实例节点对视频资源切片进行渲染。
其中,目标视频实例节点可以为基于该渲染指令确定的需要进行渲染的视频资源切片对应的视频渲染实例节点。
由以上可知,本申请实施例根据视频的视频结构信息对视频资源进行切分,并根据视频资源切片在视频资源中的位置信息,构建视频资源切片对应的实例节点队列,从而在接收到渲染指令时,根据渲染指令携带的待渲染的视频相关信息,在实例节点队列中查找视频对应的目标视频实例节点,根据目标视频实例节点对该待渲染的视频相关信息对应的视频资源切片进行渲染;减少了视频资源的重复渲染,降低了云端资源的占用率;另外,切片化的资源渲染方式提高了视频的渲染效率,进而提升了资源利用率。
本申实施例还提供一种播放渲染后视频数据的方法,适用于终端。
如图7所示,图7为本申请实施例提供的播放渲染后视频数据的方法的流程示意图。该播放渲染后视频数据的方法的执行主体为终端,且该播放渲染后视频数据的方法包括步骤401至步骤404,下面对各步骤分别进行说明。
在步骤401中、响应于针对视频的视频展示操作,生成渲染指令,并将渲染指令发送至服务器。
其中,视频展示操作可以为用户在终端上触发的请求在终端展示相应的视频的操作,比如,在终端上触发的点击、移动等操作。渲染指令可以包括待渲染的视频相关信息。在本申请实施例中,服务器可以为云端部署的云服务器。
在步骤402中、接收服务器针对渲染指令返回的视频数据。
其中,视频数据可以为服务器基于渲染指令包括的待渲染的视频相关信息,在实例节点队列中确定目标视频实例节点,并根据目标视频实例节点对待渲染的视频相关信息对应的视频资源切片进行渲染得到的数据。
在步骤403中、在视频数据中提取出视频包头标注信息,并在视频包头标注信息中解析出视频数据的视频拓扑排序参数。
其中,视频包头标注信息可以为对该视频数据对应的关键帧进行包头标注后产生的
标注信息,可以包括视频数据对应的拓扑排序链表、当前视频渲染实例节点、当前视频渲染实例节点对应的首尾帧的相机参数以及视频数据对应的像素流大小、像素长宽、像素流内容等信息;例如,可以继续参考表1所示的包头结构信息。该扑排序链表可以为基于视频数据对应的实例节点队列确定的表征视频数据在视频中的分布的链表。该频拓扑排序参数可以为基于视频对应的实例节点队列确定的视频数据在视频中的分布信息,可以基于视频数据对应的拓扑排序链表、当前视频渲染实例节点等信息确定,其中,可以包括视频数据对应的视频渲染实例节点、视频数据对应的视频渲染实例节点在实例节点队列中的分布等信息。
在步骤404中、基于视频拓扑排序参数,对视频数据进行聚合,并将聚合后的视频数据,作为渲染后视频数据进行展示。
其中,聚合后的视频数据可以为基于该拓扑排序参数对视频数据进行聚合后的视频数据,该渲染后视频数据可以为基于渲染指令获取到的视频数据。
由以上可知,本申请实施例根据视频展示操作生成针对包括待渲染视频对应的视频相关信息的渲染指令,并将渲染指令发送至服务器,然后接收服务器针对渲染指令返回的视频数据,并展示该待渲染的视频相关信息对应的视频,减少了视频资源的重复渲染,提高了视频的渲染效率,进而提升了资源利用率。
本申请实施例还提供一种第一地图场景渲染装置,该第一地图场景渲染装置可以集成在电子设备中,该电子设备可以为服务器。
图8为本申请实施例提供的第一地图场景渲染装置的结构示意图,该第一地图场景渲染装置可以包括获取单元501、切分单元502、关联单元503、接收单元504、渲染单元505和视频发送单元506,下面对各单元分别进行说明。
接收单元504,配置为接收终端发送的针对待渲染地图的地图渲染指令,所述地图渲染指令包括所述待渲染地图中的路径起止信息;
渲染单元505,配置为从渲染实例节点队列中,确定与所述路径起止信息对应的至少一个目标实例节点,所述渲染实例节点队列通过所述待渲染地图的路径信息关联M个渲染实例节点获得,M个所述渲染实例节点用于渲染N个资源切片,N个所述资源切片通过所述待渲染地图的场景结构信息切分地图场景资源获得,所述地图场景资源用于渲染所述待渲染地图的地图场景,M≤N,M和N为正整数;根据每个所述目标实例节点对所述资源切片进行渲染,得到目标视频数据;
视频发送单元506,配置为将所述目标视频数据发送至所述终端。
在本申请实施例中,获取单元501,配置为获取地图场景资源;切分单元502,配置为基于所述场景结构信息对所述地图场景资源进行切分,得到N个所述资源切片,并将每个所述资源切片分配给对应的所述渲染实例节点;关联单元503,配置为根据所述路径信息,将与N个所述资源切片对应的M个所述渲染实例节点进行关联,得到所述渲染实例节点队列。
在本申请实施例中,所述切分单元502,还配置为基于所述关卡分布信息,对所述地图场景资源进行关卡维度的资源切分,得到所述待渲染地图的每一关卡对应的关卡资源切片;根据所述关卡分布信息,识别出所述待渲染地图的全量关卡中的邻接关卡,并从所述地图场景资源中切分出所述邻接关卡的跨关卡资源切片;基于所述关卡资源切片和所述跨关卡资源切片,确定N个所述资源切片。
在本申请实施例中,所述切分单元502,还配置为根据每一所述关卡对应的所述关卡资源切片,计算所述邻接关卡的每一候选关卡连接路径的连接距离;将最短所述连接距离对应的候选关卡连接路径,确定为目标连接路径;将从所述地图场景资源中切分出与所述目标连接路径对应的资源切片,确定为所述邻接关卡的所述跨关卡资源切片。
在本申请实施例中,所述切分单元502,还配置为基于所述关卡分布信息,对所述地图场景资源进行关卡划分,得到每一所述关卡对应的关卡资源片段;对所述关卡资源片段进行兴趣点识别,得到每一所述关卡对应的兴趣点分布;根据所述兴趣点分布,对所述关卡资源片段进行切分,得到每一所述关卡对应的所述关卡资源切片。
在本申请实施例中,所述关联单元503,还配置为根据所述路径信息,识别出N个所述资源切片的连接路径分布;基于所述连接路径分布,确定M个所述渲染实例节点之间的节点连接顺序;根据所述节点连接顺序,构建所述渲染实例节点队列。
在本申请实施例中,所述关联单元503,还配置为基于所述连接路径分布,构建M个所述渲染实例节点对应的节点关系图,所述节点关系图为基于M个所述渲染实例节点构成的有向无环拓扑图;根据所述节点关系图,识别出M个所述渲染实例节点之间的所述节点连接顺序。
在本申请实施例中,所述渲染单元505,配置为从所述路径起止信息中提取出所述待渲染地图对应的起始位置和终止位置;获取所述起始位置和所述终止位置之间的目标位置区间,并在多个所述资源切片中识别出位置处于所述目标位置区间中的至少一个目标资源切片;从所述渲染实例节点队列中,筛选出与至少一个所述目标资源切片对应的至少一个所述目标实例节点。
在本申请实施例中,所述渲染单元505,配置为根据每个所述目标实例节点对所述资源切片进行渲染,得到渲染视频数据;由每个所述目标实例节点渲染的所述渲染视频数据,得到与至少一个所述目标实例节点渲染的至少一个所述渲染视频数据;获取至少一个所述渲染视频数据的拓扑排序参数;基于所述拓扑排序参数对至少一个所述渲染视频数据进行标注,得到所述目标视频数据。
本申请实施例还提供一种第二地图场景渲染装置,该第二地图场景渲染装置可以集成在终端中。
图9为本申请实施例提供的第二地图场景渲染装置的结构示意图,该第二地图场景渲染装置可以包括指令发送单元601、数据接收单元602和展示单元603,下面对各单元分别进行说明。
指令发送单元601,配置为响应于针对待渲染地图场景的地图展示操作,生成针对所述地图场景的地图渲染指令,并将所述地图渲染指令发送至服务器,所述地图渲染指令包括所述待渲染地图场景中对应的路径起止信息;
数据接收单元602,配置为接收所述服务器针对所述地图渲染指令返回的目标视频数据,所述目标视频数据为所述服务器基于所述地图渲染指令包括的路径起止信息从,在渲染实例节点队列中确定至少一个目标实例节点,并根据每个所述目标实例节点渲染对所述地图场景对应的资源切片进行渲染得到的数据,所述渲染实例节点队列通过所述待渲染地图的路径信息关联M个渲染实例节点获得,M个所述渲染实例节点用于渲染N个资源切片,N个所述资源切片通过所述待渲染地图的场景结构信息切分地图场景资源获得,所述地图场景资源用于渲染所述待渲染地图的地图场景,M≤N,M和N为正整数;
展示单元603,配置为根据所述目标视频数据,展示地图场景片段。
在本申请实施例中,展示单元603,还配置为从所述目标视频数据中提取出包头标注信息;从所述包头标注信息中,解析出所述目标视频数据中的至少一个渲染视频数据的拓扑排序参数,其中,所述渲染视频数据为所述目标实例节点对所述资源切片进行渲染所获得的结果;基于所述拓扑排序参数,对至少一个所述渲染视频数据进行聚合,得到聚合后视频数据,并根据所述聚合后视频数据,展示所述地图场景片段。
在本申请实施例中,展示单元603,还配置为基于该拓扑排序参数,构建该目标视
频数据对应的目标节点关系图,该目标节点关系图为基于该目标视频数据构成的有向无环拓扑图;根据该目标节点关系图,识别出该目标视频数据中的至少一个邻接视频数据对,该邻接视频数据对之间包括邻接视频帧;对该邻接视频数据对之间的邻接视频帧进行拼接,并基于拼接后的邻接视频数据对,对该目标视频数据进行聚合。
需要说明的是,以上各个单元可以作为独立的实体来实现,也可以进行任意组合,作为同一或若干个实体来实现,本申请实施例对此不作限定。
本申请实施例还提供一种第一视频渲染装置,该第一视频渲染装置可以集成在服务器中。
图10为本申请实施例提供的第一视频渲染装置的结构示意图,该第一视频渲染装置可以包括视频资源获取单元701、视频资源切分单元702、节点关联单元703、指令接收单元704和视频渲染单元705,下面对各单元分别进行说明。
视频资源获取单元701,配置为获取视频资源,该视频资源用于构建视频;
视频资源切分单元702,配置为基于该视频的视频结构信息对该视频资源进行切分,得到N个视频资源切片,并将每个视频资源切片分配给对应的视频渲染实例节点;
节点关联单元703,配置为根据视频资源切片在视频资源中的位置信息,将与N个视频资源切片对应的M个视频渲染实例节点进行关联,得到实例节点队列;
指令接收单元704,配置为接收终端发送的针对视频的渲染指令,该渲染指令包括待渲染的视频相关信息;
视频渲染单元705,配置为基于该待渲染的视频相关信息,在该实例节点队列中确定目标视频实例节点,并根据该目标视频实例节点对该视频资源切片进行渲染,得到视频数据;将所述视频数据发送至所述终端。
本申请实施例还提供一种第二视频渲染装置,该第二视频渲染装置具体可以集成在终端中。
图11为本申请实施例提供的第二视频渲染装置的结构示意图,该第二视频渲染装置可以包括渲染指令发送单元801、视频数据接收单元802、参数提取单元803和渲染后视频数据展示单元804,下面对各单元分别进行说明。
渲染指令发送单元801,配置为响应于针对视频的视频展示操作,生成针对该视频的渲染指令,并将该渲染指令发送至服务器,该渲染指令包括待渲染的视频相关信息;
视频数据接收单元802,配置为接收所述服务器针对所述渲染指令返回的视频数据,所述视频数据为所述服务器基于待渲染的视频相关信息从实例节点队列中确定至少一个目标视频实例节点,并根据每个所述目标视频实例节点渲染对应的视频资源切片得到的,所述实例节点队列通过视频资源切片在视频资源中的位置信息关联M个视频渲染实例节点获得,M个所述视频渲染实例节点用于渲染N个视频资源切片,N个所述视频资源切片通过所述视频的视频结构信息切分视频资源获得,所述视频资源用于构建所述视频,M≤N,M和N为正整数;
参数提取单元803,配置为在该视频数据中提取出视频包头标注信息,并在该视频包头标注信息中解析出该视频数据的视频拓扑排序参数;
渲染后视频数据展示单元804,配置为基于该视频拓扑排序参数,对该视频数据进行聚合,并将聚合后的视频数据,作为渲染后视频数据进行展示。
需要说明的是,以上各个单元可以作为独立的实体来实现,也可以进行任意组合,作为同一或若干个实体来实现,下面对各单元分别进行说明。
本申请实施例还提供一种电子设备,如图12所示,其示出了本申请实施例所涉及的电子设备的结构示意图,该电子设备可以是服务器。
该电子设备可以包括一个或者一个以上处理核心的第一处理器901、一个或一个以
上计算机可读存储介质的第一存储器902、电源903和输入单元904等部件。本领域技术人员可以理解,图12中示出的电子设备结构并不构成对电子设备的限定,可以包括比图示更多或更少的部件,或者组合某些部件,或者不同的部件布置。
第一处理器901是该电子设备的控制中心,利用各种接口和线路连接整个电子设备的各个部分,通过运行或执行存储在第一存储器902内的软件程序和/或模块,以及调用存储在第一存储器902内的数据,执行电子设备的各种功能和处理数据。可选的,第一处理器901可包括一个或多个处理核心;优选的,第一处理器901可集成应用处理器和调制解调处理器,其中,应用处理器主要处理操作***、用户界面和应用程序等,调制解调处理器主要处理无线通信。可以理解的是,上述调制解调处理器也可以不集成到第一处理器901中。
第一存储器902可用于存储软件程序以及模块,第一处理器901通过运行存储在第一存储器902的软件程序以及模块,从而执行各种功能应用以及地图场景渲染。第一存储器902可主要包括存储程序区和存储数据区,其中,存储程序区可存储操作***、至少一个功能所需的应用程序(比如声音播放功能、图像播放功能等)等;存储数据区可存储根据电子设备的使用所创建的数据等。此外,第一存储器902可以包括高速随机存取存储器,还可以包括非易失性存储器,例如至少一个磁盘存储器件、闪存器件、或其他易失性固态存储器件。相应地,第一存储器902还可以包括存储器控制器,以提供第一处理器901对第一存储器902的访问。
电子设备还包括给各个部件供电的电源903,优选的,电源903可以通过电源管理***与第一处理器901逻辑相连,从而通过电源管理***实现管理充电、放电、以及功耗管理等功能。电源903还可以包括一个或一个以上的直流或交流电源、再充电***、电源故障检测电路、电源转换器或者逆变器、电源状态指示器等任意组件。
该电子设备还可包括输入单元904,该输入单元904可用于接收输入的数字或字符信息,以及产生与用户设置以及功能控制有关的键盘、鼠标、操作杆、光学或者轨迹球信号输入。
尽管未示出,电子设备还可以包括显示单元等,在此不再赘述。具体在本实施例中,电子设备中的第一处理器901会按照如下的指令,将一个或一个以上的应用程序的进程对应的可执行文件加载到第一存储器902中,并由第一处理器901来运行存储在第一存储器902中的应用程序,从而实现本申请实施例提供的适用于服务器的地图场景渲染方法。
应当说明的是,本申请实施例提供的电子设备与本申请实施例中的适用于服务器的地图场景渲染方法属于同一构思,此处不再赘述。
本申请实施例还提供另一种电子设备,如图13所示,其示出了本申请实施例所涉及的电子设备的结构示意图,该电子设备可以是终端。
该电子设备可以包括一个或者一个以上处理核心的第二处理器1301、一个或一个以上计算机可读存储介质的第二存储器1302、电源1303和输入单元1304等部件。本领域技术人员可以理解,图12中示出的电子设备结构并不构成对电子设备的限定,可以包括比图示更多或更少的部件,或者组合某些部件,或者不同的部件布置。
本领域普通技术人员可以理解,上述实施例的各种方法中的全部或部分步骤可以通过指令来完成,或通过指令控制相关的硬件来完成,该指令可以存储于一计算机可读存储介质中,并由第一处理器或第二处理器进行加载和执行。
为此,本申请实施例提供一种计算机可读存储介质,其中存储有计算机可执行指令或计算机程序,所述计算机可执行指令或计算机程序适于第一处理器进行加载,以执行适用于服务器的方法;或者,所述计算机可执行指令或计算机可执行指令适于第二处理
器进行加载,以执行应用于终端的方法。
其中,该计算机可读存储介质可以包括:只读存储器(Read Only Memory,ROM)、随机存取记忆体(Random Access Memory,RAM)、磁盘或光盘等。
由于该计算机可读存储介质中所存储的指令,可以执行本申请实施例所提供的任一种地图场景渲染方法中的步骤,因此,可以实现本申请实施例所提供的任一种地图场景渲染方法所能实现的有益效果,在此不再赘述。
本申请实施例提供一种计算机程序产品,所述计算机程序产品包括计算机可执行指令或计算机程序,所述计算机可执行指令或计算机程序由第一处理器执行时,实现适用于服务器的方法;或者,所述计算机可执行指令或计算机程序由第二处理器执行时,实现适用于终端的方法。
可以理解的是,在本申请实施例中,涉及到操作等相关的数据,当本申请实施例运用到具体产品或技术中时,需要获得用户许可或者同意,且相关数据的收集、使用和处理需要遵守相关国家和地区的相关法律法规和标准。
本申请实施例的说明只是用于帮助理解本申请的方法及其核心思想;同时,对于本领域的技术人员,依据本申请的思想,在具体实施方式及应用范围上均会有改变之处,综上所述,本说明书内容不应理解为对本申请的限制。
Claims (19)
- 一种地图场景渲染方法,适用于服务器,所述方法包括:接收终端发送的针对待渲染地图的地图渲染指令,所述地图渲染指令包括所述待渲染地图中的路径起止信息;从渲染实例节点队列中,确定与所述路径起止信息对应的至少一个目标实例节点,所述渲染实例节点队列通过所述待渲染地图的路径信息关联M个渲染实例节点获得,M个所述渲染实例节点用于渲染N个资源切片,N个所述资源切片通过所述待渲染地图的场景结构信息切分地图场景资源获得,所述地图场景资源用于渲染所述待渲染地图的地图场景,M≤N,M和N为正整数;根据每个所述目标实例节点对所述资源切片进行渲染,得到目标视频数据;将所述目标视频数据发送至所述终端。
- 如权利要求1所述的地图场景渲染方法,其中,所述从渲染实例节点队列中,确定与所述路径起止信息对应的至少一个目标实例节点之前,所述方法还包括:获取地图场景资源;基于所述场景结构信息对所述地图场景资源进行切分,得到N个所述资源切片,并将每个所述资源切片分配给对应的所述渲染实例节点;根据所述路径信息,将与N个所述资源切片对应的M个所述渲染实例节点进行关联,得到所述渲染实例节点队列。
- 如权利要求2所述的地图场景渲染方法,其中,所述场景结构信息包括关卡分布信息,所述基于所述场景结构信息对所述地图场景资源进行切分,得到N个所述资源切片,包括:基于所述关卡分布信息,对所述地图场景资源进行关卡维度的资源切分,得到所述待渲染地图的每一关卡对应的关卡资源切片;根据所述关卡分布信息,识别出所述待渲染地图的全量关卡中的邻接关卡,并从所述地图场景资源中切分出所述邻接关卡的跨关卡资源切片;基于所述关卡资源切片和所述跨关卡资源切片,确定N个所述资源切片。
- 如权利要求3所述的地图场景渲染方法,其中,所述从所述地图场景资源中切分出所述邻接关卡的跨关卡资源切片,包括:根据每一所述关卡对应的所述关卡资源切片,计算所述邻接关卡的每一候选关卡连接路径的连接距离;将最短所述连接距离对应的候选关卡连接路径,确定为目标连接路径;将从所述地图场景资源中切分出与所述目标连接路径对应的资源切片,确定为所述邻接关卡的所述跨关卡资源切片。
- 如权利要求3所述的地图场景渲染方法,其中,所述基于所述关卡分布信息,对所述地图场景资源进行关卡维度的资源切分,得到所述待渲染地图的每一关卡对应的关卡资源切片,包括:基于所述关卡分布信息,对所述地图场景资源进行关卡划分,得到每一所述关卡对应的关卡资源片段;对所述关卡资源片段进行兴趣点识别,得到每一所述关卡对应的兴趣点分布;根据所述兴趣点分布,对所述关卡资源片段进行切分,得到每一所述关卡对应的所述关卡资源切片。
- 如权利要求2所述的地图场景渲染方法,其中,所述根据所述路径信息,将与N个所述资源切片对应的M个所述渲染实例节点进行关联,得到所述渲染实例节点队列,包括:根据所述路径信息,识别出N个所述资源切片的连接路径分布;基于所述连接路径分布,确定M个所述渲染实例节点之间的节点连接顺序;根据所述节点连接顺序,构建所述渲染实例节点队列。
- 如权利要求6所述的地图场景渲染方法,其中,所述基于所述连接路径分布,确定M个所述渲染实例节点之间的节点连接顺序,包括:基于所述连接路径分布,构建M个所述渲染实例节点对应的节点关系图,所述节点关系图为基于M个所述渲染实例节点构成的有向无环拓扑图;根据所述节点关系图,识别出M个所述渲染实例节点之间的所述节点连接顺序。
- 如权利要求1所述的地图场景渲染方法,其中,所述从渲染实例节点队列中,确定与所述路径起止信息对应的至少一个目标实例节点,包括:从所述路径起止信息中提取出所述待渲染地图对应的起始位置和终止位置;获取所述起始位置和所述终止位置之间的目标位置区间,并在多个所述资源切片中识别出位置处于所述目标位置区间中的至少一个目标资源切片;从所述渲染实例节点队列中,筛选出与至少一个所述目标资源切片对应的至少一个所述目标实例节点。
- 如权利要求1至8中任一项所述的地图场景渲染方法,其中,所述根据每个所述目标实例节点对所述资源切片进行渲染,得到目标视频数据,包括:根据每个所述目标实例节点对所述资源切片进行渲染,得到渲染视频数据;由每个所述目标实例节点渲染的所述渲染视频数据,得到与至少一个所述目标实例节点渲染的至少一个所述渲染视频数据;获取至少一个所述渲染视频数据的拓扑排序参数;基于所述拓扑排序参数对至少一个所述渲染视频数据进行标注,得到所述目标视频数据。
- 一种地图场景渲染方法,适用于终端,所述方法包括:响应于针对待渲染地图的地图展示操作,生成地图渲染指令,并将所述地图渲染指令发送至服务器,所述地图渲染指令包括所述待渲染地图中的路径起止信息;接收所述服务器针对所述地图渲染指令返回的目标视频数据,所述目标视频数据为所述服务器基于所述路径起止信息从渲染实例节点队列中确定至少一个目标实例节点,并根据每个所述目标实例节点渲染对应的资源切片得到的数据,所述渲染实例节点队列通过所述待渲染地图的路径信息关联M个渲染实例节点获得,M个所述渲染实例节点用于渲染N个资源切片,N个所述资源切片通过所述待渲染地图的场景结构信息切分地图场景资源获得,所述地图场景资源用于渲染所述待渲染地图的地图场景,M≤N,M和N为正整数;根据所述目标视频数据,展示地图场景片段。
- 如权利要求10所述的地图场景渲染方法,其中,所述根据所述目标视频数据,展示地图场景片段,包括:从所述目标视频数据中提取出包头标注信息;从所述包头标注信息中,解析出所述目标视频数据中的至少一个渲染视频数据的拓扑排序参数,所述渲染视频数据为所述目标实例节点对所述资源切片进行渲染所获得的结果;基于所述拓扑排序参数,对至少一个所述渲染视频数据进行聚合,得到聚合后视频数据,并根据所述聚合后视频数据,展示所述地图场景片段。
- 一种视频渲染的方法,适用于服务器,所述方法包括:接收终端发送的针对视频的渲染指令,所述渲染指令包括待渲染的视频相关信息;从实例节点队列中,确定与所述渲染指令对应的至少一个目标视频实例节点,所述实例节点队列通过视频资源切片在视频资源中的位置信息关联M个视频渲染实例节点获得,M个所述视频渲染实例节点用于渲染N个视频资源切片,N个所述视频资源切片通过所述视频的视频结构信息切分视频资源获得,所述视频资源用于构建所述视频,M≤N,M和N为正整数;根据每个所述目标视频实例节点对所述视频资源切片进行渲染,得到视频数据;将所述视频数据发送至所述终端。
- 一种播放渲染后视频数据的方法,适用于终端,所述方法包括:响应于针对视频的视频展示操作,生成针对所述视频的渲染指令,并将所述渲染指令发送至服务器,所述渲染指令包括待渲染的视频相关信息;接收所述服务器针对所述渲染指令返回的视频数据,所述视频数据为所述服务器基于待渲染的视频相关信息从实例节点队列中确定至少一个目标视频实例节点,并根据每个所述目标视频实例节点渲染对应的视频资源切片得到的,所述实例节点队列通过视频资源切片在视频资源中的位置信息关联M个视频渲染实例节点获得,M个所述视频渲染实例节点用于渲染N个视频资源切片,N个所述视频资源切片通过所述视频的视频结构信息切分视频资源获得,所述视频资源用于构建所述视频,M≤N,M和N为正整数;根据所述视频数据,播放视频片段。
- 一种第一地图场景渲染装置,包括:接收单元,配置为接收终端发送的针对待渲染地图的地图渲染指令,所述地图渲染指令包括所述待渲染地图中的路径起止信息;渲染单元,配置为从渲染实例节点队列中,确定与所述路径起止信息对应的至少一个目标实例节点,所述渲染实例节点队列通过所述待渲染地图的路径信息关联M个渲染实例节点获得,M个所述渲染实例节点用于渲染N个资源切片,N个所述资源切片通过所述待渲染地图的场景结构信息切分地图场景资源获得,所述地图场景资源用于渲染所述待渲染地图的地图场景,M≤N,M和N为正整数;根据每个所述目标实例节点对所述资源切片进行渲染,得到目标视频数据;视频发送单元,配置为将所述目标视频数据发送至所述终端。
- 一种第二地图场景渲染装置,包括:指令发送单元,配置为响应于针对待渲染地图场景的地图展示操作,生成针对所述地图场景的地图渲染指令,并将所述地图渲染指令发送至服务器,所述地图渲染指令包括所述待渲染地图场景中对应的路径起止信息;数据接收单元,配置为接收所述服务器针对所述地图渲染指令返回的目标视频数据,所述目标视频数据为所述服务器基于所述地图渲染指令包括的路径起止信息从,在渲染实例节点队列中确定至少一个目标实例节点,并根据每个所述目标实例节点渲染对所述地图场景对应的资源切片进行渲染得到的数据,所述渲染实例节点队列通过所述待渲染地图的路径信息关联M个渲染实例节点获得,M个所述渲染实例节点用于渲染N个资源切片,N个所述资源切片通过所述待渲染地图的场景结构信息切分地图场景资源获得,所述地图场景资源用于渲染所述待渲染地图的地图场景,M≤N,M和N为正整数;展示单元,配置为根据所述目标视频数据,展示地图场景片段。
- 一种计算机可读存储介质,所述计算机可读存储介质存储有计算机可执行指令或计算机程序,所述计算机可执行指令或计算机程序适于第一处理器进行加载,以执行权利要求1至9、12中任一项所述的方法;或者,所述计算机可执行指令或计算机可执行指令适于第二处理器进行加载,以执行权利要求10或11或13所述的方法。
- 一种服务器,包括第一存储器,第一处理器,以及存储在所述第一存储器中并可以在所述第一处理器上运行的计算机可执行指令或计算机程序,所述第一处理器执行所述计算机可执行指令或计算机程序时,实现权利要求1至9、12中任一项所述的方法。
- 一种终端,包括第二存储器,第二处理器,以及存储在所述第二存储器中并可以在所述第二处理器上运行的计算机可执行指令或计算机程序,所述第二处理器执行所述计算机可执行指令或计算机程序时,实现权利要求10或11或13所述的方法。
- 一种计算机程序产品,所述计算机程序产品包括计算机可执行指令或计算机程序,所述计算机可执行指令或计算机程序由第一处理器执行时,实现权利要求1至9、12中任一项所述的方法;或者,所述计算机可执行指令或计算机程序由第二处理器执行时,实现权利要求10或11或13所述的方法。
Applications Claiming Priority (2)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202210928593.2 | 2022-08-03 | ||
CN202210928593.2A CN117555667A (zh) | 2022-08-03 | 2022-08-03 | 地图场景渲染方法、装置和计算机可读存储介质 |
Related Child Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
US18/629,175 Continuation US20240259651A1 (en) | 2022-08-03 | 2024-04-08 | Map scene rendering method and apparatus, server, terminal, computer-readable storage medium, and computer program product |
Publications (1)
Publication Number | Publication Date |
---|---|
WO2024027274A1 true WO2024027274A1 (zh) | 2024-02-08 |
Family
ID=89820988
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
PCT/CN2023/094191 WO2024027274A1 (zh) | 2022-08-03 | 2023-05-15 | 一种地图场景渲染方法、装置、服务器、终端、计算机可读存储介质及计算机程序产品 |
Country Status (2)
Country | Link |
---|---|
CN (1) | CN117555667A (zh) |
WO (1) | WO2024027274A1 (zh) |
Citations (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN111798364A (zh) * | 2020-09-09 | 2020-10-20 | 江苏普旭软件信息技术有限公司 | 一种基于全景预烘焙的快速渲染方法及视景成像*** |
CN114119818A (zh) * | 2021-11-18 | 2022-03-01 | 洪恩完美(北京)教育科技发展有限公司 | 场景模型的渲染方法、装置及设备 |
CN114461742A (zh) * | 2022-02-11 | 2022-05-10 | 阿里巴巴(中国)有限公司 | 电子地图的比例尺确定方法、装置、电子设备和存储介质 |
-
2022
- 2022-08-03 CN CN202210928593.2A patent/CN117555667A/zh active Pending
-
2023
- 2023-05-15 WO PCT/CN2023/094191 patent/WO2024027274A1/zh unknown
Patent Citations (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN111798364A (zh) * | 2020-09-09 | 2020-10-20 | 江苏普旭软件信息技术有限公司 | 一种基于全景预烘焙的快速渲染方法及视景成像*** |
CN114119818A (zh) * | 2021-11-18 | 2022-03-01 | 洪恩完美(北京)教育科技发展有限公司 | 场景模型的渲染方法、装置及设备 |
CN114461742A (zh) * | 2022-02-11 | 2022-05-10 | 阿里巴巴(中国)有限公司 | 电子地图的比例尺确定方法、装置、电子设备和存储介质 |
Also Published As
Publication number | Publication date |
---|---|
CN117555667A (zh) | 2024-02-13 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
US8972861B2 (en) | Interactive point-of-view authoring of digital video content using a resizable overlay window and a cylindrical layout | |
US7082572B2 (en) | Methods and apparatus for interactive map-based analysis of digital video content | |
US20230360304A1 (en) | Point cloud data processing method and apparatus, and storage medium and electronic apparatus | |
US20110285715A1 (en) | Method and System for Providing Scene Data of Virtual World | |
WO2022121648A1 (zh) | 点云数据编码方法、解码方法、设备、介质及程序产品 | |
CN110324672A (zh) | 一种视频数据处理方法、装置、***及介质 | |
JP2023510822A (ja) | 点群データのカプセル化方法及び伝送方法 | |
CN111935663B (zh) | 传感器数据流的处理方法、装置、介质及电子设备 | |
CN103152429B (zh) | 基于web跨平台与拼墙互动的方法及装置 | |
CN113365090B (zh) | 对象推荐方法、对象推荐装置、电子设备及可读存储介质 | |
WO2024027274A1 (zh) | 一种地图场景渲染方法、装置、服务器、终端、计算机可读存储介质及计算机程序产品 | |
JP2007318688A (ja) | 映像情報交換方法、サーバ装置、及びクライアント装置 | |
CN105608128B (zh) | 基于路径规划的街景视频生成方法和装置 | |
Nahrstedt et al. | Hourglass multimedia content and service composition framework for smart room environments | |
US20240259651A1 (en) | Map scene rendering method and apparatus, server, terminal, computer-readable storage medium, and computer program product | |
CN117560369A (zh) | 资源渲染方法、装置和计算机可读存储介质 | |
US8467443B2 (en) | Object priority order compositor for MPEG-4 player | |
CN118042181B (zh) | 视频渲染方法、装置、电子设备、计算机可读存储介质及计算机程序产品 | |
CN105653719A (zh) | 快速获取外接存储设备的文件的方法、***及路由器 | |
WO2023023914A1 (zh) | 帧内预测、编解码方法及装置、编解码器、设备、介质 | |
Jinjia et al. | Networked VR: State of the Art | |
US20230403383A1 (en) | Data processing method and apparatus, computer and readable storage medium | |
CN109344265A (zh) | 一种资源管理方法及装置 | |
CN113891102B (zh) | 直播间处理方法、装置、服务器及存储介质 | |
CN117112640B (zh) | 一种内容排序方法以及相关设备 |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
121 | Ep: the epo has been informed by wipo that ep was designated in this application |
Ref document number: 23848984 Country of ref document: EP Kind code of ref document: A1 |