Resource rendering method, apparatus and computer readable storage medium
Patent Information
- Application Number
- CN202210925137.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-08-03
- Publication Date
- 2026-10-20
- Estimated Expiration
- 2042-08-03
AI Technical Summary
[0003]在对现有技术的研究和实践过程中发现,云端运行的云渲染实例成本开销较大,而用户触发的云渲染操作大多存在一定的重复性,在现有的资源渲染方法中,当处于同一渲染节点的多个用户触发针对相同内容的资源渲染请求时,云端仍会分别为这多个资源渲染请求分配不同的云渲染实例进行资源渲染,资源的重复渲染使得资源渲染的效率较低,进而导致资源利用率较低
[0056]本申请实施例通过获取地理区域内针对目标对象的资源渲染请求;基于资源渲染请求,获取地理区域对应的节点关系图,其中,节点关系图中包括存在连接关系的至少一个节点,节点与地理区域中的终端对应,节点包括地理区域内节点共同的渲染执行节点;在节点关系图中,识别出由节点至渲染执行节点的节点路径;根据节点路径,将资源渲染请求传递至渲染执行节点,该资源渲染请求指示渲染执行节点通过云端对目标对象进行渲染;接收渲染执行节点返回的目标对象对应的渲染资源,并展示渲染资源。以此,通过根据地理区域中节点对应的节点关系图来对资源渲染请求进行传递,以此实现渲染执行节点来统一管理地理区域内所有节点的资源渲染请求,从而地理区域中节点可以接收渲染执行节点返回的目标对象对应的渲染资源进行展示,实现了同一地理区域内请求的渲染资源在地理区域内的复用,减少了地理区域内产生的资源渲染请求,减少了云端对同一对象的重复渲染,提升了资源渲染的效率,进而提升了资源利用率。
Smart Images

Figure CN117560369B_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of Internet technology, specifically to a resource rendering method, apparatus, and computer-readable storage medium. Background Technology
[0002] In recent years, with the rapid development of internet technology, cloud rendering products have been widely used, for example in scenarios such as map navigation, smart tourism, smart transportation, and games. In existing technologies, the cloud allocates a corresponding cloud rendering instance for each resource rendering request to render the resource, and then transmits the rendered resource to the corresponding terminal to display the content on the terminal.
[0003] Research and practice on existing technologies have revealed that cloud rendering instances running in the cloud are costly, and most user-triggered cloud rendering operations are repetitive. In existing resource rendering methods, when multiple users on the same rendering node trigger resource rendering requests for the same content, the cloud will still allocate different cloud rendering instances for these multiple resource rendering requests. This repetitive rendering of resources results in low resource rendering efficiency, which in turn leads to low resource utilization. Summary of the Invention
[0004] This application provides a resource rendering method, apparatus, and computer-readable storage medium, which can improve the efficiency of resource rendering and thus improve resource utilization.
[0005] This application provides a resource rendering method, including:
[0006] Obtain resource rendering requests for the target object within the geographic region;
[0007] Based on the resource rendering request, a node relationship graph corresponding to the geographical region is obtained. The node relationship graph includes at least one node with a connection relationship. The node corresponds to a terminal in the geographical region. The node includes a common rendering execution node for nodes in the geographical region.
[0008] In the node relationship graph, the node path from the node to the rendering execution node is identified;
[0009] Based on the node path, the resource rendering request is passed to the rendering execution node, and the resource rendering request instructs the rendering execution node to render the target object through the cloud;
[0010] Receive the rendering resources corresponding to the target object returned by the rendering execution node, and display the rendering resources.
[0011] Accordingly, embodiments of this application provide a resource rendering apparatus, including:
[0012] The request retrieval unit is used to retrieve resource rendering requests for a target object within a geographic area;
[0013] The node relationship graph acquisition unit is used to acquire the node relationship graph corresponding to the geographical region based on the resource rendering request. The node relationship graph includes at least one node with a connection relationship. The node corresponds to a terminal in the geographical region. The node includes a common rendering execution node of the nodes in the geographical region.
[0014] The path identification unit is used to identify the node path from the node to the rendering execution node in the node relationship graph;
[0015] The request transmission unit is used to transmit the resource rendering request to the rendering execution node according to the node path, wherein the resource rendering request instructs the rendering execution node to render the target object through the cloud;
[0016] The resource display unit is used to receive the rendering resources corresponding to the target object returned by the rendering execution node and display the rendering resources.
[0017] In one embodiment, the resource display unit includes:
[0018] The resource transmission path identification subunit is used to identify the resource transmission path from the rendering execution node to the node based on the node relationship graph;
[0019] The resource receiving subunit is used to receive the rendering resources corresponding to the target object returned by the rendering execution node through the resource transmission path;
[0020] The resource transmission subunit is used to transmit the rendering resource to a target node for display according to the resource transmission path, wherein the target node is the node that displays the rendering resource.
[0021] In one embodiment, the resource transmission subunit includes:
[0022] The status acquisition module is used to acquire the resource rendering request status corresponding to the node.
[0023] The target node determination module is used to determine the target node among the nodes based on the resource rendering request status.
[0024] The resource transmission module is used to transmit the rendering resources to the target node for display based on the resource transmission path.
[0025] In one embodiment, the node relationship graph acquisition unit includes:
[0026] The resource search subunit is used to search for target rendering resources that match the resource rendering request in the resource cache pool corresponding to the geographical region based on the target object.
[0027] The relationship graph acquisition subunit is used to acquire the node relationship graph corresponding to the geographical region when the target rendering resource is not found.
[0028] In one embodiment, the resource rendering apparatus further includes:
[0029] The node connection relationship acquisition unit is used to acquire the node connection relationship between each node in a geographic region.
[0030] The node relationship graph construction unit is used to construct a node relationship graph corresponding to the geographical region based on the node connection relationship.
[0031] In one embodiment, the resource rendering apparatus further includes:
[0032] The state detection unit is used to detect the node state of the parent node corresponding to the current node;
[0033] A node search unit is used to search for neighboring nodes in a geographical area based on the node relationship graph when the node is in a heartbeat circuit breaker state.
[0034] A connection unit is used to take the neighboring node as the new parent node of the current node and establish a connection with the new parent node;
[0035] The update unit is used to update the node relationship graph based on the connection relationship between the current node and the new parent node.
[0036] In one embodiment, the path identification unit includes:
[0037] The resource occupancy status subunit is used to obtain the resource occupancy status of the candidate rendering execution nodes when multiple candidate rendering execution nodes are detected in the geographical area according to the node relationship graph.
[0038] The path distribution identification subunit is used to identify the path distribution corresponding to the candidate rendering execution node based on the node relationship graph when the resource occupancy status is sufficient.
[0039] The node merging subunit is used to filter out rendering execution nodes from the candidate rendering execution nodes based on the path distribution, and merge the rendering execution permissions corresponding to the candidate rendering execution nodes into the rendering execution nodes.
[0040] The node path identification subunit is used to identify the node path from the node to the rendering execution node based on the node relationship graph.
[0041] In one embodiment, the resource rendering apparatus further includes:
[0042] The parameter acquisition unit is used to acquire the rendering request parameters corresponding to the rendering requests of the resources to be uploaded when multiple rendering requests of resources to be uploaded are received.
[0043] The request merging unit is used to merge the rendering requests of the resource to be uploaded based on the rendering request parameters to obtain at least one target resource rendering request.
[0044] The upload request unit is used to upload the target resource rendering request to the cloud.
[0045] In one embodiment, the request upload unit includes:
[0046] The sorting subunit is used to obtain the request time corresponding to the target resource rendering request, and sort the target resource rendering request based on the request time to obtain the sorted resource rendering request.
[0047] The grouping subunit is used to obtain request grouping parameters and group the sorted resource rendering requests according to the request grouping parameters to obtain grouped resource rendering requests.
[0048] The upload subunit is used to upload the grouped resource rendering requests to the cloud.
[0049] In one embodiment, the resource rendering apparatus further includes:
[0050] A rendering resource group receiving unit is used to receive a rendering resource group returned by the cloud in response to the grouped resource rendering request, wherein the rendering resource group includes at least one candidate rendering resource.
[0051] The resource display parameter determination unit is used to extract the packet header information of the candidate rendering resource and determine the resource display parameters corresponding to the candidate rendering resource based on the packet header information.
[0052] The candidate rendering resource parameter unit is used to transmit the candidate rendering resource to the corresponding node through the node relationship graph according to the resource display parameters.
[0053] Furthermore, embodiments of this application also provide a computer-readable storage medium storing a plurality of instructions adapted for loading by a processor to execute steps in any of the resource rendering methods provided in embodiments of this application.
[0054] Furthermore, this application also provides a computer device, including a processor and a memory, wherein the memory stores an application program, and the processor is used to run the application program in the memory to implement the resource rendering method provided in this application.
[0055] This application also provides a computer program product or computer program, which includes computer instructions stored in a computer-readable storage medium. A processor of a computer device reads the computer instructions from the computer-readable storage medium and executes the computer instructions, causing the computer device to perform the steps in the resource rendering method provided in this application.
[0056] This application embodiment obtains resource rendering requests for a target object within a geographical region; based on the resource rendering requests, it obtains a node relationship graph corresponding to the geographical region, wherein the node relationship graph includes at least one node with a connection relationship, the node corresponds to a terminal in the geographical region, and the node includes a common rendering execution node for nodes within the geographical region; in the node relationship graph, it identifies the node path from the node to the rendering execution node; according to the node path, it transmits the resource rendering request to the rendering execution node, which instructs the rendering execution node to render the target object through the cloud; it receives the rendering resources corresponding to the target object returned by the rendering execution node and displays the rendering resources. Thus, by transmitting resource rendering requests according to the node relationship graph corresponding to nodes in the geographical region, the rendering execution node can uniformly manage the resource rendering requests of all nodes within the geographical region. This allows nodes in the geographical region to receive and display the rendering resources corresponding to the target object returned by the rendering execution node, achieving the reuse of rendering resources requested within the same geographical region, reducing the number of resource rendering requests generated within the geographical region, reducing repeated rendering of the same object in the cloud, improving resource rendering efficiency, and thus improving resource utilization. Attached Figure Description
[0057] To more clearly illustrate the technical solutions in the embodiments of this application, the accompanying drawings used in the description of the embodiments will be briefly introduced below. Obviously, the accompanying drawings described below are only some embodiments of this application. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0058] Figure 1 This is a schematic diagram illustrating an implementation scenario of a resource rendering method provided in an embodiment of this application;
[0059] Figure 2 This is a flowchart illustrating a resource rendering method provided in an embodiment of this application;
[0060] Figure 3a This is a schematic diagram of the node relationship of a resource rendering method provided in an embodiment of this application;
[0061] Figure 3b This is a schematic diagram illustrating the specific process of a resource rendering method provided in an embodiment of this application;
[0062] Figure 3c This is another specific flowchart illustrating a resource rendering method provided in an embodiment of this application;
[0063] Figure 4 This is another schematic diagram of a resource rendering method provided in an embodiment of this application;
[0064] Figure 5 This is a schematic diagram of the structure of the resource rendering apparatus provided in the embodiments of this application;
[0065] Figure 6 This is a schematic diagram of the structure of the computer device provided in the embodiments of this application. Detailed Implementation
[0066] The technical solutions of the embodiments of this application will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of this application, and not all embodiments. Based on the embodiments of this application, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of this application.
[0067] This application provides a resource rendering method, apparatus, and computer-readable storage medium. The resource rendering apparatus can be integrated into a computer device, which may be a server or a terminal, etc.
[0068] The server can be a standalone physical server, a server cluster or distributed system composed of multiple physical servers, or a cloud server providing basic cloud computing services such as cloud services, cloud databases, cloud computing, cloud functions, cloud storage, network services, cloud communication, middleware services, domain name services, security services, content delivery network (CDN) acceleration services, and big data and artificial intelligence platforms. The terminal can include, but is not limited to, mobile phones, computers, smart voice interaction devices, smart home appliances, vehicle terminals, and aircraft. The terminal and server can be directly or indirectly connected via wired or wireless communication, which is not limited herein.
[0069] Please see Figure 1 Taking the integration of resource rendering devices into computer equipment as an example, Figure 1This is a schematic diagram illustrating an implementation scenario of the resource rendering method provided in this application. The computer device can be a terminal, which can acquire resource rendering requests for a target object within a geographical area; based on the resource rendering requests, acquire a node relationship graph corresponding to the geographical area, wherein the node relationship graph includes at least one node with a connection relationship, the node corresponds to a terminal in the geographical area, and the node includes a common rendering execution node shared by nodes within the geographical area; in the node relationship graph, identify the node path from the node to the rendering execution node; according to the node path, transmit the resource rendering request to the rendering execution node, which instructs the rendering execution node to render the target object through the cloud; receive the rendering resources corresponding to the target object returned by the rendering execution node, and display the rendering resources.
[0070] It should be noted that the embodiments of the present invention can be applied to various scenarios, including but not limited to cloud technology, artificial intelligence, smart transportation, and assisted driving. Figure 1 The illustrated scenario of the resource rendering method is merely an example. The implementation environment of the resource rendering method described in this application is intended to more clearly illustrate the technical solution of this application and does not constitute a limitation on the technical solution provided in this application. Those skilled in the art will understand that with the evolution of resource rendering and the emergence of new business scenarios, the technical solution provided in this application is also applicable to similar technical problems.
[0071] The solutions provided in this application are specifically illustrated through the following embodiments. It should be noted that the order of description of the following embodiments is not intended to limit the preferred order of the embodiments.
[0072] This embodiment will be described from the perspective of a resource rendering device, which can be integrated into a computer device, which can be a terminal, and this application does not limit it.
[0073] Please see Figure 2 , Figure 2 This is a flowchart illustrating the resource rendering method provided in an embodiment of this application. The resource rendering method includes:
[0074] In step 101, resource rendering requests for the target object within the geographic region are obtained.
[0075] The geographical region can be a pre-defined area with certain boundaries. For example, it can be a virtual geographical boundary enclosed by virtual fences. Geo-fencing technology can be used to create multiple virtual geographical boundaries within a certain area, thus obtaining multiple geographical regions within that area. The target object can be a map scene, video, image, or other renderable objects. The map scene can be a map displayed in a virtual scene. The resource rendering request can be an instruction to request cloud rendering of the target object. For example, a resource rendering request can be triggered when a user performs a click, moves forward, or rotates the current map scene.
[0076] In one embodiment, when too many resource rendering requests are generated within a geographical area, to avoid duplicate requests and repeated rendering of resources caused by identical resource rendering requests, which would lead to a significant increase in the occupation and consumption of cloud resources, the obtained resource rendering requests can be merged before being uploaded to the cloud. Optionally, resource rendering requests generated in a geographical area can be merged based on the rendering object corresponding to each resource rendering request in the geographical area. For example, assuming three resource rendering requests for target object A are obtained in the same geographical area, these three resource rendering requests for target object A can be merged into one request. Based on this one request, the rendering resources corresponding to target object A can be requested from the cloud, and then the rendering resources can be distributed and displayed according to these three resource rendering requests. As another example, assuming two forward movement operations triggered for the same map scene are generated in the geographical area at the same time, two resource rendering requests for forward movement operations for the same map scene can be generated. Since the rendering objects corresponding to these two resource rendering requests are the same, these two resource rendering requests can be merged into one request. This single resource rendering request can then request the rendering resources for forward movement operations for the same map scene from the cloud.
[0077] In one embodiment, a randomly selected rendering execution node can receive geofence parameters corresponding to the current geographical region from the cloud. Based on these geofence parameters, the geofence range of the current geographical region can be determined. The rendering execution node can then send heartbeat information to nodes within that geographical region to establish connections between nodes within the region. The geofence parameters can be parameters used to determine the range of the geographical region.
[0078] In step 102, a node relationship graph corresponding to the geographical region is obtained based on the resource rendering request.
[0079] The node relationship graph can include at least one node with connections to each other. Each node corresponds to a terminal in a geographical region; that is, each node can correspond to a terminal in that geographical region. The node can include a common rendering execution node shared by nodes within the geographical region. This rendering execution node can be a node that executes resource rendering requests in the geographical region, manages resource rendering requests generated in the geographical region, and interacts with the cloud based on these requests. For example, the rendering execution node can receive resource rendering requests generated in the geographical region, upload the received resource rendering requests to the cloud, and receive rendering resources returned from the cloud to distribute to the corresponding nodes. The rendering resources can be resources rendered by the cloud based on the resource rendering requests and distributed to the geographical region. The node relationship graph can be a data structure representing the connection relationships between nodes in the geographical region. For example, it can be a Directed Acyclic Graph (DAG), where the direction of edges in the node relationship graph can be from a parent node to its child node. An edge between two nodes in the node relationship graph indicates that a connection can be established between the two nodes. For example, please refer to [reference needed]. Figure 3a , Figure 3a This is a schematic diagram of a node relationship diagram for a resource rendering method provided in this application embodiment. The node relationship diagram includes nodes 1, 2, 3, 4, 5, 6, and 7 within a geographical area. It is assumed that node 1 is the rendering execution node, nodes 2 and 3 are child nodes of node 1, nodes 4 and 5 are child nodes of node 2, node 6 is a child node of node 3, node 5 is the parent node of node 7, and node 7 is a child node of node 5. Furthermore, this node relationship diagram can also be a data structure of the blockchain type, etc.
[0080] There are several ways to obtain the node relationship graph corresponding to a geographic region based on a resource rendering request. For example, the target rendering resource matching the resource rendering request can be searched in the resource cache pool corresponding to the geographic region based on the target object. When the target rendering resource is not found, the node relationship graph corresponding to the geographic region can be obtained.
[0081] The resource cache pool can be a cache pool used to store rendering resources corresponding to the geographic region, and the target rendering resource can be the rendering resource corresponding to the target object, that is, the rendering resource in the resource cache pool corresponding to the target object.
[0082] In one embodiment, when the target rendering resource is found, the target rendering resource can be used as the rendering resource corresponding to the resource rendering request and distributed to the node that needs to display the target rendering resource for display.
[0083] Optionally, after obtaining rendering resources from the cloud based on a resource rendering request, the rendering resources can be stored in a resource cache pool corresponding to the geographical region. When any node in the geographical region generates a resource rendering request for a certain object, the resource cache pool can be searched to see if a corresponding rendering resource exists based on the object corresponding to the resource rendering request. This enables the reuse of the same rendering resource within the geographical region, improving resource rendering efficiency while reducing cloud resource consumption and resource occupation, thereby improving resource utilization.
[0084] Optionally, before obtaining the node relationship graph corresponding to a geographic region based on the resource rendering request, a node relationship graph corresponding to the nodes in that geographic region can also be constructed. There are several ways to construct this node relationship graph; for example, the node connection relationships between each node in the geographic region can be obtained, and the node relationship graph corresponding to that geographic region can be constructed based on these connections.
[0085] The node connection relationship can be the connection relationship between each node in the geographical area, such as the established connection relationship and the non-established connection relationship.
[0086] There are various ways to obtain the node connection relationships between each node in a geographic area. For example, the resource rendering method provided in this application embodiment can be integrated into a resource rendering system or resource rendering device. The resource rendering system can include rendering execution nodes and other nodes, and the resource rendering device can integrate rendering execution nodes and other nodes. Based on the resource rendering system or resource rendering device, the rendering execution node can send heartbeat information to other nodes in the geographic area and receive response information returned by other nodes in response to the heartbeat information. According to the response information, at least one child node corresponding to the rendering execution node is determined among the other nodes. Each child node can send heartbeat information to other nodes in the geographic area. Then, according to the response information returned by other nodes in response to the heartbeat information sent by the child node, the next-level child node corresponding to each child node is determined, and so on. Thus, after the connection transmission of nodes in the current geographic area is stable, the connection relationship between each node and other nodes in the geographic area can be obtained, and a node relationship graph corresponding to the geographic area can be constructed based on the connection relationship between nodes. The heartbeat information can be a heartbeat packet sent by a node.
[0087] When a node's mobile terminal device is about to enter the fenced area of a geographic region, it will receive heartbeat packets from other nodes near the edge. Since it may receive heartbeat packets from multiple nodes, to avoid excessive resource consumption, heartbeat registration can be performed only on all nodes. Optionally, a list can be maintained for each node to be registered to store the order in which heartbeat packets were received, and bidirectional registration starts from the head of the list. If a heartbeat times out, subsequent heartbeat packets are retrieved from the list in turn to attempt to establish a heartbeat connection with the next node. If no connection can be established with any heartbeat packets in the list, it can be determined whether the mobile terminal device corresponding to the current node is within the geographic region. If the node is within the geographic region, it can be designated as an isolated node and sent directly to the cloud for unified allocation of instance resources and handling of resource rendering requests for these isolated nodes. If the node is not within the geographic region, for the node's parent node, a heartbeat timeout indicates a heartbeat circuit breaker has occurred, meaning the node is considered abandoned. For example, please refer to [reference needed]. Figure 3a , Figure 3a This is a schematic diagram of a specific process of a resource rendering method provided in an embodiment of this application. In step S101, the consensus node B in the geographical area can receive the geofence parameters sent by the cloud, thereby determining the range of the geographical area. When the node enters the geofence corresponding to the geographical area, it can receive heartbeat packets sent by other nodes, thereby enabling heartbeat registration.
[0088] Optionally, the node relationship graph can be updated based on changes in the connection relationships between nodes in the geographical region. For example, the node relationship graph can include parent nodes and child nodes, where the parent node can be a node one level above the child node. If a heartbeat failure occurs at an intermediate parent node in the node relationship graph during transmission, all child nodes under that parent node need to readjust the structure of the node relationship graph. Based on the original structure of the node relationship graph, a new neighboring node is selected as the parent node to complete the heartbeat connection. Specifically, the node state of the parent node corresponding to the current node can be detected. When the node state is in a heartbeat failure state, a neighboring node is searched in the geographical region based on the node relationship graph. This neighboring node is selected as the new parent node of the current node, and a connection is established with the new parent node. Based on the connection relationship between the current node and the new parent node, the node relationship graph is updated.
[0089] The node status can be the node's state during operation, including normal state and heartbeat circuit breaker state, etc. The heartbeat circuit breaker state can be the state corresponding to the node's heartbeat timeout. The neighboring nodes can be nodes in the geographical area that are close to the current node. The new parent node can be the updated parent node of the current node.
[0090] There are several ways to determine the rendering execution node in a geographical region. For example, a consensus algorithm can be used to determine the node to be the rendering execution node among the nodes in the geographical region. Optionally, a distributed consensus algorithm such as Raft can be used. The rendering execution node can be the consensus node in the geographical region, i.e., the leader. Other nodes in the geographical region can be ordinary nodes, i.e., followers of the rendering execution node, or candidates in certain election situations (e.g., when there is no leader). If a node in the geographical region does not receive a heartbeat packet from the leader for a period of time, the leader may have failed. The node can then switch from follower to candidate and initiate a consensus node election. If a node in the geographical region receives a majority of votes, it can switch its state to leader and become the rendering execution node. Optionally, when it detects that other nodes in the geographical region are updating themselves, the current rendering execution node can proactively switch to follower to update the node to be updated. In this way, the validity of rendering execution nodes within a geographical area can be guaranteed periodically through consensus algorithms. This avoids situations where rendering execution node failures force other nodes in the geographical area to initiate cloud connection requests on their own end, resulting in resource rendering delays and the accumulation of instructions transmitted by multiple nodes, thereby improving resource rendering efficiency.
[0091] For example, please continue to refer to Figure 3bWithin a geographical region, nodes establish connections by periodically sending heartbeat packets, thereby updating the node relationship graph corresponding to the geographical region. This geographical region includes consensus node A and consensus node B. In step S102, consensus node A receives cloud rendering pixel streams from the cloud. In step S103, consensus node A sends heartbeat packets to its child nodes to periodically indicate its node status. In step S104, when a node generates a resource rendering request, it can encrypt the request before transmitting it to its parent node. For example, symmetric encryption coordinates and asymmetric encryption private keys can be used to encrypt the operation instructions corresponding to the resource rendering request. In step S105, the consensus node can process the collected data... The rendering operation instructions such as source rendering requests are decrypted. In step S106, the consensus node can collect rendering operation instructions such as resource rendering requests in the geographical area according to the node relationship graph. In step S107, the consensus node B sends the instructions corresponding to the collected resource rendering requests to the cloud so that the cloud rendering computing node can operate the cloud rendering instance. In step S108, when a node leaves the geofence, its parent node can determine that its heartbeat has been broken due to the timeout of the heartbeat packet. The nodes in the geographical area can adjust the consensus nodes in the geographical area according to the status of the parent node using the Raft consensus algorithm.
[0092] In step 103, the node path from the node to the rendering execution node is identified in the node relationship graph.
[0093] Here, the node path can be the path connecting nodes within a geographic area to the rendering execution node. For example, please refer to [link / reference needed]. Figure 3a Assuming node 1 is the rendering execution node, the node path from node 4 to the rendering execution node can be node 4 to node 2 to node 1, and the node path from node 7 to the rendering execution node can be node 7 to node 5 to node 2 to node 1.
[0094] In the node relationship graph, there are multiple ways to identify the node path from a node to the rendering execution node. For example, when multiple candidate rendering execution nodes are detected in the geographical area according to the node relationship graph, the resource occupancy status of the candidate rendering execution node can be obtained. When the resource occupancy status is sufficient, the path distribution corresponding to the candidate rendering execution node can be identified according to the node relationship graph. Based on the path distribution, the rendering execution node can be selected from the candidate rendering execution nodes, and the rendering execution permissions corresponding to the candidate rendering execution node can be merged into the rendering execution node. Based on the node relationship graph, the node path from the node to the rendering execution node can be identified.
[0095] Among them, the candidate rendering execution node can be multiple rendering execution nodes existing in the geographical area, the resource occupancy status can be information representing the resource occupancy of the candidate rendering execution node, which can include resource status such as sufficient status and scarce status, the path distribution can be information representing the connection relationship between the rendering execution node and other nodes in the geographical area, and the rendering execution permission can be the permission of the candidate rendering execution node to execute and manage resource rendering requests in the geographical area. After the rendering execution permission is transferred to the rendering execution node, the candidate rendering execution node will become an ordinary node.
[0096] Based on this path distribution, there are several ways to select rendering execution nodes from the candidate rendering execution nodes. For example, the path complexity of each candidate rendering execution node can be identified according to its corresponding path distribution, allowing the candidate rendering execution node with the highest path complexity to be selected as the rendering execution node corresponding to the geographic region. This path complexity can represent the complexity of the connection relationship between each candidate execution node and nodes in the geographic region. For example, it can include path length, the number of path nodes, etc. The path length can be the number of nodes in the path connecting the candidate rendering execution node to other nodes. For example, please refer to [further details omitted]. Figure 3a The path length from node 1 to node 7 is 4 nodes, and the path length from node 1 to node 7 is 3 nodes. The number of nodes in this path can be the number of child nodes corresponding to the candidate execution node. For example, the path corresponding to node 1 has 6 nodes, and the path corresponding to node 2 has 3 nodes, etc. Therefore, the candidate rendering execution node with the longest path length can be determined as the rendering execution node, or the candidate rendering execution node with the most path nodes can be determined as the rendering execution node, etc.
[0097] There are several ways to identify the node path from the node to the rendering execution node based on the node relationship graph. For example, the candidate rendering execution node can be treated as a child node of the rendering execution node, while maintaining the connection relationship between the candidate rendering execution node and its child nodes. This allows the node relationship graph to be updated, and the node path from the node to the rendering execution node can be identified in the updated node relationship graph.
[0098] Optionally, when a rendering execution node in a geographic region experiences a circuit breaker failure, other nodes in the region will elect a new rendering execution node to handle resource rendering requests within the region and immediately establish a pixel stream transmission connection with the cloud. At this time, multiple rendering execution nodes are highly likely to exist within the geographic region, which will launch multiple cloud rendering instances, increasing cloud resource utilization. After the connection transmission between nodes in the current geographic region stabilizes, rendering execution nodes will be dynamically batched based on their distribution within the region, merging their structures. This reduces the number of rendering execution nodes while lowering the resource consumption of cloud rendering instances. For example, multiple rendering execution nodes can be merged based on their resource utilization. For instance, if the resource utilization of a rendering node is low, it indicates that the rendering execution nodes in the geographic region are providing excessive resources for managing resource rendering requests within the region. In this case, multiple rendering execution nodes can be merged based on the resource rendering needs of the geographic region to obtain the target rendering node corresponding to the geographic region, thereby reducing the number of rendering execution nodes and thus lowering the startup rate and utilization rate of cloud resources. The target rendering execution node can be a rendering execution node that is merged from the rendering execution nodes according to the resource rendering requirements of the geographical region.
[0099] There are several ways to merge multiple rendering execution nodes based on the resource rendering needs of a geographical region. For example, the number of rendering execution nodes required in a geographical region can be determined based on the resource rendering needs of the geographical region and the resource usage of each rendering execution node. Based on this number of rendering execution nodes, multiple rendering execution nodes can be merged.
[0100] There are several ways to merge multiple rendering execution nodes based on the number of nodes. For example, among the rendering execution nodes with lower resource consumption, one option is to sort the rendering execution nodes from low to high resource consumption. Then, the rendering execution node whose ranking corresponds to the number of nodes can be identified as the target rendering execution node. This allows the rendering execution permissions of other nodes to be transferred to the target node, thus achieving the merging operation. For instance, assuming there are 3 rendering execution nodes, after sorting them from low to high resource consumption, the top three nodes can be identified as the target rendering execution nodes.
[0101] In step 104, the resource rendering request is passed to the rendering execution node according to the node path.
[0102] The resource rendering request can instruct the rendering execution node to render the target object through the cloud.
[0103] For example, please continue to refer to Figure 3a If the resource rendering request generated by node 7 is passed to rendering execution node 1, then the resource rendering request can be transmitted from node 7 to node 5 to node 2 to rendering execution node 1 according to the node path from node 7 to rendering execution node 1.
[0104] In one embodiment, when a node triggers the generation of a resource rendering request, the resource rendering request can be encrypted, and when it is passed to the rendering execution node according to the node path, the rendering execution node can decrypt the resource rendering request to ensure the security of the resource rendering request during transmission.
[0105] In step 105, the rendering resources corresponding to the target object returned by the rendering execution node are received and the rendering resources are displayed.
[0106] The rendering resource can be the resource obtained by rendering the target object in the cloud.
[0107] There are several ways to receive and display the rendering resources corresponding to the target object returned by the rendering execution node. For example, the resource transmission path from the rendering execution node to the node can be identified based on the node relationship graph. The rendering resources corresponding to the target object returned by the rendering execution node can be received through the resource transmission path, and the rendering resources can be transmitted to the target node for display according to the resource transmission path.
[0108] The resource transfer path can be the path that transfers the rendered resource from the rendering execution node to a target node in the geographic region. The target node can be a node in the geographic region that needs to display the rendered resource.
[0109] There are several ways to transmit the rendering resource to the target node for display based on the resource transmission path. For example, the rendering resource can be transmitted in the geographical area based on whether the node in the geographical area needs to obtain the rendering resource for display. Alternatively, the resource rendering request status corresponding to the node can be obtained, and the target node can be determined in the node based on the resource rendering request status. Based on the resource transmission path, the rendering resource can be transmitted to the target node for display.
[0110] The resource rendering request status can represent the status of each node's resource rendering request. For example, it can include whether a resource rendering request is being processed, the rendering object targeted by the currently processed request, and whether rendering resources from other nodes are being received. Therefore, based on the resource rendering request status of each node in the geographic region, rendering resources can be transmitted to the corresponding nodes in the geographic region for display, improving resource rendering efficiency.
[0111] In one embodiment, after receiving the rendering resource returned by the resource rendering request triggered for any node in the geographic region, the rendering resource can be transmitted to the nodes in the geographic region for display according to the node relationship graph. In this way, the interactivity requirements of real-time interactive cloud rendering scenarios can be met, such as the interaction between teammates in the same game level. This realizes the reuse of rendering resources requested by any node in the geographic region, greatly saving the overhead of cloud rendering instances. At the same time, nodes in the geographic region can synchronously operate the same cloud rendering instance, realizing stronger interactivity of cloud rendering and improving the efficiency of resource rendering.
[0112] In one embodiment, the resource rendering method provided in this application can be integrated into a resource rendering system or a resource rendering device. The resource rendering system and the resource rendering device can integrate rendering execution nodes and other nodes in a geographical area. When multiple resource rendering requests are generated simultaneously in a geographical area, in order to ensure that the resource rendering requests of each node can be processed in a timely manner, and to ensure that the rendering execution node does not experience performance bottlenecks or crashes due to caching multiple pixel video streams corresponding to rendering resources, optionally, when the rendering execution node receives multiple resource rendering requests to be uploaded, it can obtain the rendering request parameters corresponding to the resource rendering requests to be uploaded, and based on the rendering request parameters, merge the resource rendering requests to be uploaded to obtain at least one target resource rendering request, and upload the target resource rendering request to the cloud.
[0113] The resource rendering request to be uploaded can be a resource rendering request triggered by a node in the geographic region received by the rendering execution node. The rendering request parameters can be parameters corresponding to the resource rendering request to be uploaded, such as the rendering object and rendering type corresponding to the resource rendering request. The rendering object can be the object to be rendered, and the rendering type can be the type of rendering performed on the rendering object. For example, for a resource rendering request of a map scene, the rendering type can include rendering types such as moving the rendering object forward or rotating it. The target resource rendering request can be the resource rendering request after merging the resource rendering requests to be uploaded.
[0114] Based on the rendering request parameters, there are several ways to merge the rendering requests for the resource to be uploaded. For example, the rendering requests can be categorized according to their respective parameters, and those belonging to the same category can be merged to obtain at least one category of target resource rendering requests. Alternatively, based on the rendering object corresponding to each request, rendering requests for the same object can be merged into a single target resource rendering request. Thus, when the rendering execution node receives the rendering resource returned from the cloud for the target resource rendering request, it can transmit the rendering resource along the path in the node relationship graph to the corresponding node for display. This reduces the number of resource rendering requests, thereby reducing cloud resource consumption, improving the reuse of rendering resources in a geographical area, and ultimately improving resource rendering efficiency.
[0115] When there are many target resource rendering requests triggered in a geographical area, the target resource rendering requests can be grouped and uploaded to the cloud to maintain the normal operation of the rendering execution nodes. Optionally, the request time corresponding to the target resource rendering request can be obtained, and the target resource rendering requests can be sorted based on the request time to obtain the sorted resource rendering requests. The request grouping parameters can be obtained, and the sorted resource rendering requests can be grouped according to the request grouping parameters to obtain the grouped resource rendering requests. The grouped resource rendering requests can then be uploaded to the cloud.
[0116] The request time can be the time when the resource rendering request was generated. Optionally, for a target resource rendering request obtained by merging multiple resource rendering requests to be uploaded, its corresponding request time can be obtained by averaging the request times of the multiple resource rendering requests to be uploaded, and the request time corresponding to the target resource rendering request can be obtained based on the time average. The sorted resource rendering requests can be the result of sorting the target resource rendering requests according to the request time. The request grouping parameter can include the capacity of each group, that is, the maximum number of resource rendering requests that each group can hold. The grouped resource rendering requests can be the result of grouping the sorted resource rendering requests based on the request grouping parameter. Optionally, the sorted resource rendering requests can be uniformly placed in a message queue, and the sorted resource rendering requests can be grouped through a fixed-size message queue. This message queue can be a message queue used to cache resource rendering requests, and the size of the message queue can be determined according to the performance of the current rendering execution node device's central processing unit (CPU), memory, etc. In this way, the order in which each target resource rendering request is uploaded to the cloud can be arranged according to the request time corresponding to each target resource rendering request. At the same time, the sorted target resource rendering requests can be uploaded to the cloud in the form of groups, and the target resource rendering requests in each group can be uploaded to the cloud at the same time, which can improve the upload efficiency.
[0117] Optionally, when the number of resource rendering requests generated within a geographical area is large, the number of rendering execution nodes in the geographical area can be increased to alleviate the resource pressure on the rendering execution nodes in the geographical area.
[0118] There are several ways for the rendering execution node to upload the grouped resource rendering requests in the geographical region to the cloud. For example, Web Real-Time Communications (WebRTC) can be used to upload the grouped resource rendering requests to the cloud. At the same time, Web Real-Time Communications can also be used to receive the rendering resources returned by the cloud.
[0119] For example, please refer to Figure 3c , Figure 3cThis is another specific flowchart illustrating a resource rendering method provided in this application embodiment. In this method, the rendering execution node decrypts resource rendering requests collected from nodes along the node relationship graph in the geographical region and places all resource rendering requests to be uploaded into a message queue. After merging, sorting, and grouping the resource rendering requests to be uploaded, the grouped resource rendering requests and other interactive instructions are uploaded to the corresponding cloud rendering computing node in the cloud via the WebRTC SDK in the order of the grouped resource rendering requests. Then, the rendering service of the cloud rendering node creates a rendering instance and renders the pixel frames corresponding to each resource rendering request. The generated pixel stream (i.e., rendering resource) of the cloud rendering instance is then transmitted to the WebRTC SDK corresponding to the rendering execution node via a push streaming service for reception. This allows the rendering resources to be distributed to nodes in the geographical region according to the topology in the node relationship graph. Optionally, multiplexing can be used to receive the pixel stream corresponding to the rendering resources. Correspondingly, for ordinary nodes in the geographical region, the rendering resources can be transmitted along the node relationship graph within the geographical region, allowing for decoding and display at the corresponding nodes.
[0120] Optionally, after uploading the grouped resource rendering request to the cloud, since the cloud returns rendering resources in group form, it is necessary to distribute the rendering resources within the group to the corresponding nodes. For example, the system can receive the rendering resource group returned by the cloud for the grouped resource rendering request, extract the packet header information of the candidate rendering resource, determine the resource display parameters corresponding to the candidate rendering resource based on the packet header information, and transmit the candidate rendering resource to the corresponding node through the node relationship graph according to the resource display parameters.
[0121] The rendering resource group can include at least one candidate rendering resource. This candidate rendering resource can be a rendering resource returned by the cloud in response to a grouped resource rendering request. The packet header information can be the information marked in the packet header of the data packet corresponding to the candidate rendering resource. The resource display parameters can be parameters describing the display of the candidate rendering resource in a geographical area, which can include the display range and display time of the candidate rendering resource. For example, it can include information such as which node the candidate rendering resource is displayed on or whether it is displayed in real time on all nodes in the geographical area. In this way, the display node corresponding to each candidate display resource can be determined according to the resource display parameters, and the candidate rendering resource can be transmitted to the corresponding display node through the node relationship graph.
[0122] In existing cloud rendering products, such as cloud-rendered map products, the cost of running cloud rendering instances in the cloud is high. When multiple user terminals distributed on the same computing node view the same map scene information, they are assigned to different cloud rendering instances, and these instances cannot be reused. This leads to excessive cloud concurrency resource consumption, and the excessive resource consumption of a single instance affects the overall scalability of service resources. The resource rendering method provided in this application adopts an edge computing-based approach to achieve distributed and trusted transmission between mobile terminal devices while ensuring user privacy and security. It transmits and reuses pixel streams of cloud rendering instances within a geographical area on mobile terminal devices. Simultaneously, a rendering execution node is selected from the nodes within the geographical area. The rendering interaction between nodes within the geographical area and the cloud is uniformly grouped through the rendering execution node. The rendering resources are then transmitted to the nodes within the geographical area through a node relationship graph. This enables the reuse of cloud-rendered video streams within the geographical area, while improving the interactivity and rendering efficiency of cloud rendering.
[0123] As described above, this embodiment of the application obtains resource rendering requests for a target object within a geographical region; based on the resource rendering requests, it obtains a node relationship graph corresponding to the geographical region, wherein the node relationship graph includes at least one node with a connection relationship, the node corresponds to a terminal in the geographical region, and the node includes a common rendering execution node for nodes within the geographical region; in the node relationship graph, it identifies the node path from the node to the rendering execution node; according to the node path, it transmits the resource rendering request to the rendering execution node, which instructs the rendering execution node to render the target object through the cloud; it receives the rendering resources corresponding to the target object returned by the rendering execution node and displays the rendering resources. Thus, by transmitting resource rendering requests according to the node relationship graph corresponding to nodes in the geographical region, the rendering execution node can uniformly manage the resource rendering requests of all nodes within the geographical region. This allows nodes in the geographical region to receive and display the rendering resources corresponding to the target object returned by the rendering execution node, achieving the reuse of rendering resources requested within the same geographical region, reducing resource rendering requests generated within the geographical region, reducing repeated rendering of the same object in the cloud, improving resource rendering efficiency, and thus improving resource utilization.
[0124] Based on the method described in the above embodiments, the following examples will provide further detailed explanations.
[0125] In this embodiment, the resource rendering device will be specifically integrated into a computer device as an example for explanation. The resource rendering method will be specifically described using a terminal as the execution subject.
[0126] For a better description of the embodiments of this application, please refer to Figure 4 , Figure 4Another flowchart illustrating the resource rendering method provided in this application embodiment is shown below.
[0127] In step 201, the terminal obtains the node connection relationship between each node in the geographic region, and constructs a node relationship graph corresponding to the geographic region based on the node connection relationship.
[0128] There are several ways for a terminal to obtain the node connection relationships between each node in a geographic area. For example, the terminal corresponding to the rendering execution node sends heartbeat information to other nodes in the geographic area and receives response information from other nodes in response to the heartbeat information. Based on the response information, at least one child node corresponding to the rendering execution node is determined among the other nodes. Each child node can send heartbeat information to other nodes in the geographic area. Then, based on the response information returned by other nodes in response to the heartbeat information sent by the child node, the next-level child node corresponding to each child node is determined, and so on. In this way, after the connection transmission of nodes in the current geographic area is stable, the connection relationship between each node in the geographic area and other nodes can be obtained. Thus, the terminal can construct a node relationship graph corresponding to the geographic area based on the connection relationship between nodes.
[0129] In step 202, the terminal obtains a resource rendering request for a target object within a geographical region, searches for a target rendering resource that matches the resource rendering request in the resource cache pool corresponding to the geographical region based on the target object, and obtains a node relationship graph corresponding to the geographical region when no target rendering resource is found.
[0130] In one embodiment, when too many resource rendering requests are generated within a geographical area, to avoid duplicate requests and repeated rendering of resources caused by identical resource rendering requests, which would lead to a significant increase in the occupation and consumption of cloud resources, the terminal can merge the acquired resource rendering requests before uploading them to the cloud. Optionally, the terminal can merge resource rendering requests generated in a geographical area based on the rendering object corresponding to each resource rendering request. For example, assuming three resource rendering requests for target object A are acquired in the same geographical area, the terminal can merge these three resource rendering requests for target object A into one request, and then request the rendering resources corresponding to target object A from the cloud based on this one request. The terminal can then distribute and display the rendering resources based on these three resource rendering requests. As another example, assuming two forward movement operations triggered for the same map scene are generated simultaneously in a geographical area, two resource rendering requests for performing forward movement operations on the same map scene can be generated. Since the rendering objects corresponding to these two resource rendering requests are the same, the terminal can merge these two resource rendering requests into one request, and then request the rendering resources for performing forward movement operations on the same map scene from the cloud through this one resource rendering request.
[0131] In one embodiment, the terminal can receive geofence parameters corresponding to the current geographical region from the cloud through a randomly selected rendering execution node. Based on these geofence parameters, the geofence range of the current geographical region can be determined. The terminal can then send heartbeat information to nodes within that geographical region through the rendering execution node to establish connections between nodes within the geographical region. The geofence parameters can be parameters used to determine the range of the geographical region.
[0132] In one embodiment, when the target rendering resource is found, the terminal can use the target rendering resource as the rendering resource corresponding to the resource rendering request and distribute it to the corresponding node for display.
[0133] Optionally, after the terminal obtains rendering resources from the cloud based on a resource rendering request, the terminal can store the rendering resources in a resource cache pool corresponding to the geographical region. When any node in the geographical region generates a resource rendering request for a certain object, the terminal can search the resource cache pool for the object corresponding to the resource rendering request to see if the corresponding rendering resource exists. This enables the reuse of the same rendering resource within the geographical region, improving resource rendering efficiency while reducing cloud resource consumption and resource occupation, thereby improving resource utilization.
[0134] In step 203, when multiple candidate rendering execution nodes are detected in the geographical area according to the node relationship graph, the terminal obtains the resource occupancy status of the candidate rendering execution nodes. When the resource occupancy status is sufficient, the path distribution corresponding to the candidate rendering execution nodes is identified according to the node relationship graph.
[0135] Among them, the candidate rendering execution node can be multiple rendering execution nodes existing in the geographical area, the resource occupancy status can be information representing the resource occupancy of the candidate rendering execution node, which can include resource status such as sufficient status and scarce status, and the path distribution can be information representing the connection relationship between the rendering execution node and other nodes in the geographical area.
[0136] There are several ways for the terminal to identify the path distribution corresponding to the candidate rendering execution node based on the node relationship graph. For example, the node relationship graph can be traversed, and the path distribution corresponding to the candidate rendering execution node can be obtained based on the traversal results.
[0137] In step 204, the terminal selects rendering execution nodes from the candidate rendering execution nodes based on the path distribution, and merges the rendering execution permissions corresponding to the candidate rendering execution nodes into the rendering execution nodes.
[0138] There are several ways for the terminal to select rendering execution nodes from the candidate rendering execution nodes based on the path distribution. For example, the terminal can identify the path complexity of each candidate rendering execution node based on the path distribution corresponding to each candidate rendering execution node, and then select the candidate rendering execution node with the highest path complexity as the rendering execution node corresponding to the geographical region.
[0139] Optionally, when a rendering execution node in a geographic region experiences a circuit breaker failure, other nodes in the region will select a new rendering execution node to handle resource rendering requests within the region and immediately establish a pixel stream transmission connection with the cloud. At this time, multiple rendering execution nodes are highly likely to exist within the geographic region, which will launch multiple cloud rendering instances, increasing cloud resource utilization. After the connection transmission between nodes in the current geographic region stabilizes, the terminal can dynamically perform batch operations on rendering execution nodes based on their distribution within the region, merging the structure of the rendering execution nodes. This reduces the number of rendering execution nodes while lowering the resource consumption of cloud rendering instances. For example, the terminal can merge multiple rendering execution nodes based on their resource utilization. For instance, when the resource utilization of a rendering node is low, it indicates that the rendering execution nodes in the geographic region provide excessive resources for managing resource rendering requests within the region. In this case, multiple rendering execution nodes can be merged according to the resource rendering needs of the geographic region to obtain the target rendering node corresponding to the geographic region, thereby reducing the number of rendering execution nodes and thus lowering the startup rate and utilization rate of cloud resources.
[0140] There are several ways for the terminal to merge multiple rendering execution nodes based on the resource rendering needs in a geographical area. For example, the terminal can determine the number of rendering execution nodes required in a geographical area based on the resource rendering needs in the geographical area and the resource usage of each rendering execution node, and then merge multiple rendering execution nodes based on the number of rendering execution nodes.
[0141] The terminal can merge multiple rendering execution nodes based on the number of rendering execution nodes in several ways. For example, it can select rendering execution nodes with lower rendering execution resource consumption. Optionally, it can sort the rendering execution nodes from low to high resource consumption. Then, it can identify the rendering execution node whose ranking corresponds to the number of rendering execution nodes as the target rendering execution node. This allows the rendering execution permissions of other rendering execution nodes to be transferred to the target rendering execution node, thus achieving the rendering execution node merging operation. For example, assuming there are 3 rendering execution nodes, after sorting them from low to high resource consumption, the terminal can identify the top three rendering execution nodes as the target rendering execution nodes.
[0142] In step 205, the terminal identifies the node path from the node to the rendering execution node based on the node relationship graph, and passes the resource rendering request to the rendering execution node according to the node path.
[0143] There are several ways for the terminal to identify the node path from a node to the rendering execution node based on the node relationship graph. For example, the terminal can treat the candidate rendering execution node as a child node of the rendering execution node, while maintaining the connection relationship between the candidate rendering execution node and its child nodes. This allows the terminal to update the node relationship graph, and then identify the node path from the node to the rendering execution node in the updated node relationship graph.
[0144] For example, please continue to refer to Figure 3a If the resource rendering request generated by node 7 is passed to rendering execution node 1, the terminal can transmit the resource rendering request from node 7 to node 5 to node 2 to rendering execution node 1 according to the node path from node 7 to rendering execution node 1.
[0145] In one embodiment, when a node triggers a resource rendering request, the terminal can encrypt the resource rendering request, and when it is passed to the rendering execution node according to the node path, the rendering execution node can decrypt the resource rendering request to ensure the security of the resource rendering request during transmission.
[0146] In step 206, the terminal identifies the resource transmission path from the rendering execution node to the node based on the node relationship graph, and receives the rendering resources corresponding to the target object returned by the rendering execution node through the resource transmission path.
[0147] The resource transmission path can be the path that transmits rendering resources from the rendering execution node to the target node in the geographic region.
[0148] In step 207, the terminal obtains the resource rendering request status corresponding to the node, determines the target node in the node according to the resource rendering request status, and transmits the rendering resources to the target node for display based on the resource transmission path.
[0149] The resource rendering request status can represent the status of each node's resource rendering request. For example, it can include whether a resource rendering request is being processed, the rendering object targeted by the currently processed request, and whether rendering resources from other nodes are being received. Therefore, based on the resource rendering request status of each node in the geographic region, rendering resources can be transmitted to the corresponding nodes in the geographic region for display, improving resource rendering efficiency.
[0150] In one embodiment, after receiving a rendering resource returned by a resource rendering request triggered for any node in a geographic area, the terminal can transmit the rendering resource to the nodes in the geographic area for display according to the node relationship graph. This can meet the interactivity requirements of real-time interactive cloud rendering scenarios, such as the interaction between teammates in the same game level. This enables the reuse of rendering resources requested by any node in the geographic area, greatly saving the overhead of cloud rendering instances. At the same time, nodes in the geographic area can synchronously operate the same cloud rendering instance, achieving stronger interactivity in cloud rendering and improving the efficiency of resource rendering.
[0151] As described above, this embodiment of the application obtains the node connection relationship between each node in a geographical area through the terminal, and constructs a node relationship graph corresponding to the geographical area based on the node connection relationship; the terminal obtains resource rendering requests for target objects within the geographical area, searches for target rendering resources matching the resource rendering requests in the resource cache pool corresponding to the geographical area based on the target objects, and obtains the node relationship graph corresponding to the geographical area when no target rendering resources are found; when multiple candidate rendering execution nodes are detected in the geographical area according to the node relationship graph, the terminal obtains the resource occupancy status of the candidate rendering execution nodes, and when the resource occupancy status is sufficient, identifies the path distribution corresponding to the candidate rendering execution nodes according to the node relationship graph. The terminal selects rendering execution nodes from candidate rendering execution nodes based on path distribution and merges the rendering execution permissions corresponding to the candidate rendering execution nodes into the rendering execution node. Based on the node relationship graph, the terminal identifies the node path from the node to the rendering execution node and transmits the resource rendering request to the rendering execution node according to the node path. Based on the node relationship graph, the terminal identifies the resource transmission path from the rendering execution node to the node and receives the rendering resources corresponding to the target object returned by the rendering execution node through the resource transmission path. The terminal obtains the resource rendering request status corresponding to the node, determines the target node among the nodes according to the resource rendering request status, and transmits the rendering resources to the target node for display based on the resource transmission path. Therefore, by constructing a node relationship graph corresponding to a geographic region based on the connection relationships of nodes in the geographic region, when a resource rendering request is obtained, the resource rendering request is passed to the rendering execution node according to the node relationship graph. This enables the rendering execution node to uniformly manage the resource rendering requests of all nodes in the geographic region. As a result, nodes in the geographic region can receive the rendering resources corresponding to the target objects returned by the rendering execution node for display. This realizes the reuse of rendering resources requested in the same geographic region, reduces the number of resource rendering requests generated in the geographic region, reduces the repeated rendering of the same object in the cloud, improves the efficiency of resource rendering, and thus improves resource utilization.
[0152] To better implement the above methods, embodiments of the present invention also provide a resource rendering device, which can be integrated into a computer device, which can be a terminal.
[0153] For example, such as Figure 5 The diagram shown is a structural schematic of a resource rendering apparatus provided in an embodiment of this application. The resource rendering apparatus may include a request acquisition unit 301, a node relationship graph acquisition unit 302, a path identification unit 303, a request transmission unit 304, and a resource display unit 305, as follows:
[0154] The request acquisition unit 301 is used to acquire resource rendering requests for a target object within a geographical area.
[0155] The node relationship graph acquisition unit 302 is used to acquire the node relationship graph corresponding to the geographical region based on the resource rendering request. The node relationship graph includes at least one node with a connection relationship, the node corresponds to the terminal in the geographical region, and the node includes the common rendering execution node of the nodes in the geographical region.
[0156] The path identification unit 303 is used to identify the node path from the node to the rendering execution node in the node relationship graph;
[0157] The request transmission unit 304 is used to transmit the resource rendering request to the rendering execution node according to the node path. The resource rendering request instructs the rendering execution node to render the target object through the cloud.
[0158] The resource display unit 305 is configured to receive the rendering resources corresponding to the target object returned by the rendering execution node and display the rendering resources. In one embodiment, the resource display unit 305 includes:
[0159] The resource transmission path identification subunit is used to identify the resource transmission path from the rendering execution node to the node based on the node relationship graph;
[0160] The resource receiving subunit is used to receive the rendering resources corresponding to the target object returned by the rendering execution node through the resource transmission path;
[0161] The resource transmission subunit is used to transmit the rendering resource to the target node for display according to the resource transmission path. The target node is the node that displays the rendering resource.
[0162] In one embodiment, the resource transmission subunit includes:
[0163] The status acquisition module is used to obtain the resource rendering request status corresponding to the node;
[0164] The target node determination module is used to determine the target node from the nodes based on the rendering request status of the resource;
[0165] The resource transfer module is used to transfer the rendering resource to the target node for display based on the resource transfer path.
[0166] In one embodiment, the node relationship graph acquisition unit 302 includes:
[0167] The resource search subunit is used to search for target rendering resources that match the resource rendering request in the resource cache pool corresponding to the target object in the geographical region.
[0168] The relationship graph acquisition sub-unit is used to obtain the node relationship graph corresponding to the geographic region when the target rendering resource is not found.
[0169] In one embodiment, the resource rendering apparatus further includes:
[0170] The node connection relationship acquisition unit is used to acquire the node connection relationship between each node in a geographic region.
[0171] The node relationship graph construction unit is used to construct the node relationship graph corresponding to the geographical region based on the node connection relationship.
[0172] In one embodiment, the resource rendering apparatus further includes:
[0173] The state detection unit is used to detect the node state of the parent node corresponding to the current node;
[0174] The node search unit is used to search for neighboring nodes in a geographical area based on the node relationship graph when the node is in a heartbeat circuit breaker state.
[0175] A connection unit is used to take the neighboring node as the new parent node of the current node and establish a connection with the new parent node;
[0176] The update unit is used to update the node relationship graph based on the connection relationship between the current node and the new parent node.
[0177] In one embodiment, the path identification unit 303 includes:
[0178] The resource occupancy status subunit is used to obtain the resource occupancy status of a candidate rendering execution node when multiple candidate rendering execution nodes are detected in the geographic region based on the node relationship graph.
[0179] The path distribution identification subunit is used to identify the path distribution corresponding to the candidate rendering execution node based on the node relationship graph when the resource occupancy status is sufficient.
[0180] The node merging subunit is used to filter out rendering execution nodes from the candidate rendering execution nodes based on the path distribution, and merge the rendering execution permissions corresponding to the candidate rendering execution nodes into the rendering execution nodes.
[0181] The node path identification subunit is used to identify the node path from the node to the rendering execution node based on the node relationship graph.
[0182] In one embodiment, the resource rendering apparatus further includes:
[0183] The parameter acquisition unit is used to obtain the rendering request parameters corresponding to the rendering request of the resource to be uploaded when multiple rendering requests of the resource to be uploaded are received.
[0184] The request merging unit is used to merge the rendering requests of the resource to be uploaded based on the rendering request parameters to obtain at least one target resource rendering request.
[0185] The upload request unit is used to upload the rendering request for the target resource to the cloud.
[0186] In one embodiment, the request upload unit includes:
[0187] The sorting subunit is used to obtain the request time corresponding to the target resource rendering request, and sort the target resource rendering requests based on the request time to obtain the sorted resource rendering requests.
[0188] The grouping subunit is used to obtain the request grouping parameters and, based on these parameters, group the sorted resource rendering requests to obtain the grouped resource rendering requests.
[0189] The upload sub-unit is used to upload the resource rendering request after grouping to the cloud.
[0190] In one embodiment, the resource rendering apparatus further includes:
[0191] The rendering resource group receiving unit is used to receive the rendering resource group returned by the cloud for the resource rendering request after the grouping, and the rendering resource group includes at least one candidate rendering resource.
[0192] The resource display parameter determination unit is used to extract the packet header information of the candidate rendering resource and determine the resource display parameters corresponding to the candidate rendering resource based on the packet header information.
[0193] The candidate rendering resource parameter unit is used to transfer the candidate rendering resource to the corresponding node through the node relationship graph based on the resource display parameters.
[0194] In practice, each of the above units can be implemented as an independent entity or can be arbitrarily combined to be implemented as the same or several entities. For the specific implementation of each of the above units, please refer to the previous method embodiments, which will not be repeated here.
[0195] As can be seen from the above, in this embodiment of the application, the request acquisition unit 301 acquires resource rendering requests for a target object within a geographical area; the node relationship graph acquisition unit 302 acquires a node relationship graph corresponding to the geographical area based on the resource rendering requests, wherein the node relationship graph includes at least one node with a connection relationship, the node corresponds to a terminal in the geographical area, and the node includes a common rendering execution node for nodes within the geographical area; the path identification unit 303 identifies the node path from the node to the rendering execution node in the node relationship graph; the request transmission unit 304 transmits the resource rendering request to the rendering execution node according to the node path, the resource rendering request instructing the rendering execution node to render the target object through the cloud; and the resource display unit 305 receives the rendering resources corresponding to the target object returned by the rendering execution node and displays the rendering resources. In this way, resource rendering requests are transmitted according to the node relationship graph corresponding to the nodes in the geographic region. This enables the rendering execution node to uniformly manage the resource rendering requests of all nodes in the geographic region. As a result, nodes in the geographic region can receive the rendering resources corresponding to the target objects returned by the rendering execution node and display them. This realizes the reuse of rendering resources requested in the same geographic region, reduces the number of resource rendering requests generated in the geographic region, reduces the repeated rendering of the same object in the cloud, improves the efficiency of resource rendering, and thus improves resource utilization.
[0196] This application also provides a computer device, such as... Figure 6 The diagram illustrates the structure of a computer device according to an embodiment of this application. This computer device can be a terminal; specifically:
[0197] The computer device may include components such as a processor 401 with one or more processing cores, a memory 402 with one or more computer-readable storage media, a power supply 403, and an input unit 404. Those skilled in the art will understand that... Figure 6 The computer device structure shown does not constitute a limitation on the computer device and may include more or fewer components than shown, or combine certain components, or have different component arrangements. Wherein:
[0198] Processor 401 is the control center of the computer device, connecting various parts of the computer device through various interfaces and lines. It performs various functions and processes data by running or executing software programs and / or modules stored in memory 402, and by calling data stored in memory 402. Optionally, processor 401 may include one or more processing cores; preferably, processor 401 may integrate an application processor and a modem processor, wherein the application processor mainly handles the operating system, user interface, and applications, and the modem processor mainly handles wireless communication. It is understood that the modem processor may not be integrated into processor 401.
[0199] The memory 402 can be used to store software programs and modules. The processor 401 executes various functional applications and resource rendering by running the software programs and modules stored in the memory 402. The memory 402 may mainly include a program storage area and a data storage area. The program storage area may store the operating system, at least one application program required for a function (such as sound playback function, image playback function, etc.), etc.; the data storage area may store data created according to the use of the computer device, etc. In addition, the memory 402 may include high-speed random access memory, and may also include non-volatile memory, such as at least one disk storage device, flash memory device, or other volatile solid-state storage device. Accordingly, the memory 402 may also include a memory controller to provide the processor 401 with access to the memory 402.
[0200] The computer device also includes a power supply 403 that supplies power to the various components. Preferably, the power supply 403 can be logically connected to the processor 401 through a power management system, thereby enabling functions such as charging, discharging, and power consumption management through the power management system. The power supply 403 may also include one or more DC or AC power supplies, recharging systems, power fault detection circuits, power converters or inverters, power status indicators, and other arbitrary components.
[0201] The computer device may also include an input unit 404, which can be used to receive input digital or character information and generate keyboard, mouse, joystick, optical or trackball signal inputs related to user settings and function control.
[0202] Although not shown, the computer device may also include a display unit, etc., which will not be described in detail here. Specifically, in this embodiment, the processor 401 in the computer device loads the executable files corresponding to the processes of one or more applications into the memory 402 according to the following instructions, and the processor 401 runs the applications stored in the memory 402 to realize various functions, as follows:
[0203] Obtain resource rendering requests for a target object within a geographic region; based on the resource rendering requests, obtain a node relationship graph corresponding to the geographic region, wherein the node relationship graph includes at least one node with a connection relationship, the node corresponds to a terminal in the geographic region, and the node includes a common rendering execution node for nodes within the geographic region; identify the node path from the node to the rendering execution node in the node relationship graph; according to the node path, pass the resource rendering request to the rendering execution node, which instructs the rendering execution node to render the target object through the cloud; receive the rendering resources corresponding to the target object returned by the rendering execution node, and display the rendering resources.
[0204] The specific implementation of each of the above operations can be found in the preceding embodiments, and will not be repeated here. It should be noted that the computer device provided in this application embodiment and the resource rendering method in the above embodiments belong to the same concept, and its specific implementation process can be found in the above method embodiments, and will not be repeated here.
[0205] Those skilled in the art will understand that all or part of the steps in the various methods of the above embodiments can be performed by instructions, or by instructions controlling related hardware. These instructions can be stored in a computer-readable storage medium and loaded and executed by a processor.
[0206] Therefore, embodiments of this application provide a computer-readable storage medium storing a plurality of instructions that can be loaded by a processor to execute steps in any of the resource rendering methods provided in embodiments of this application. For example, the instructions can execute the following steps:
[0207] Obtain resource rendering requests for a target object within a geographic region; based on the resource rendering requests, obtain a node relationship graph corresponding to the geographic region, wherein the node relationship graph includes at least one node with a connection relationship, the node corresponds to a terminal in the geographic region, and the node includes a common rendering execution node for nodes within the geographic region; identify the node path from the node to the rendering execution node in the node relationship graph; according to the node path, pass the resource rendering request to the rendering execution node, which instructs the rendering execution node to render the target object through the cloud; receive the rendering resources corresponding to the target object returned by the rendering execution node, and display the rendering resources.
[0208] The computer-readable storage medium may include: read-only memory (ROM), random access memory (RAM), disk or optical disk, etc.
[0209] Since the instructions stored in the computer-readable storage medium can execute the steps in any of the resource rendering methods provided in the embodiments of this application, the beneficial effects that any of the resource rendering methods provided in the embodiments of this application can achieve can be realized. For details, please refer to the previous embodiments, which will not be repeated here.
[0210] According to one aspect of this application, a computer program product or computer program is provided, comprising computer instructions stored in a computer-readable storage medium. A processor of a computer device reads the computer instructions from the computer-readable storage medium and executes the computer instructions, causing the computer device to perform the methods provided in the various optional implementations of the above embodiments.
[0211] The resource rendering method, apparatus, and computer-readable storage medium provided in the embodiments of this application have been described in detail above. Specific examples have been used to illustrate the principles and implementation methods of this application. The description of the above embodiments is only for the purpose of helping to understand the method and core ideas of this application. At the same time, for those skilled in the art, there will be changes in the specific implementation methods and application scope based on the ideas of this application. Therefore, the content of this specification should not be construed as a limitation of this application.
Claims
1. A resource rendering method, characterized in that, include: A consensus algorithm is used to determine the rendering execution node among the nodes in a geographical region. The rendering execution node is the common rendering execution node among the nodes in the geographical region, and the other nodes in the geographical region are the follower nodes of the rendering execution node. The rendering execution node sends heartbeat information to other nodes in the geographic area and receives response information from other nodes in response to the heartbeat information, and determines the child node corresponding to the rendering execution node based on the response information. Each of the child nodes sends heartbeat information to other nodes within the geographical area, and determines the next-level child node corresponding to each child node based on the returned response information, thereby obtaining the node connection relationship between each node in the geographical area; Based on the node connection relationships, construct a node relationship graph corresponding to the geographical region; Obtain resource rendering requests for the target object within the geographic region; Based on the resource rendering request, a node relationship graph corresponding to the geographical region is obtained. The node relationship graph includes at least one node with a connection relationship. The node corresponds to a terminal in the geographical region. The node includes a common rendering execution node for nodes in the geographical region. In the node relationship graph, the node path from the node to the rendering execution node is identified; Based on the node path, the resource rendering request is passed to the rendering execution node, and the resource rendering request instructs the rendering execution node to render the target object through the cloud; Receive the rendering resources corresponding to the target object returned by the rendering execution node, and display the rendering resources; Check the node status of the parent node corresponding to the current node; When the node is in a heartbeat circuit breaker state, search for neighboring nodes in the geographical region based on the node relationship graph; The neighboring node is designated as the new parent node of the current node, and a connection is established between the current node and the new parent node; the node relationship graph is updated based on the connection relationship between the current node and the new parent node.
2. The resource rendering method as described in claim 1, characterized in that, Receiving the rendering resources corresponding to the target object returned by the rendering execution node and displaying the rendering resources includes: Based on the node relationship graph, the resource transmission path from the rendering execution node to the node is identified; The rendering resources corresponding to the target object are received by the rendering execution node through the resource transmission path; According to the resource transmission path, the rendering resource is transmitted to the target node for display, and the target node is the node that displays the rendering resource.
3. The resource rendering method as described in claim 2, characterized in that, The step of transmitting the rendering resources to the target node for display according to the resource transmission path includes: Obtain the resource rendering request status corresponding to the node; Based on the resource rendering request status, the target node is determined among the nodes; Based on the resource transmission path, the rendering resources are transmitted to the target node for display.
4. The resource rendering method as described in claim 1, characterized in that, The step of obtaining the node relationship graph corresponding to the geographical region based on the resource rendering request includes: Based on the target object, search the resource cache pool corresponding to the geographical region for a target rendering resource that matches the resource rendering request; When the target rendering resource is not found, obtain the node relationship graph corresponding to the geographical region.
5. The resource rendering method as described in claim 1, characterized in that, The process of identifying the node path from the node to the rendering execution node in the node relationship graph includes: When multiple candidate rendering execution nodes are detected in the geographical area based on the node relationship graph, the resource occupancy status of the candidate rendering execution nodes is obtained; When the resource occupancy status is sufficient, the path distribution corresponding to the candidate rendering execution node is identified according to the node relationship graph; Based on the path distribution, rendering execution nodes are selected from the candidate rendering execution nodes, and the rendering execution permissions corresponding to the candidate rendering execution nodes are merged into the rendering execution nodes. Based on the node relationship graph, the node path from the node to the rendering execution node is identified.
6. The resource rendering method as described in claim 1, characterized in that, The method further includes: When multiple rendering requests for resources to be uploaded are received, the rendering request parameters corresponding to the rendering requests for the resources to be uploaded are obtained; Based on the rendering request parameters, the rendering requests for the resources to be uploaded are merged to obtain at least one target resource rendering request. The target resource rendering request is uploaded to the cloud.
7. The resource rendering method as described in claim 6, characterized in that, Uploading the target resource rendering request to the cloud includes: Obtain the request time corresponding to the target resource rendering request, and sort the target resource rendering requests based on the request time to obtain sorted resource rendering requests; Obtain request grouping parameters, and group the sorted resource rendering requests according to the request grouping parameters to obtain grouped resource rendering requests; The grouped resource rendering requests are uploaded to the cloud.
8. The resource rendering method as described in claim 7, characterized in that, After uploading the grouped resource rendering requests to the cloud, the process further includes: Receive a rendering resource group returned by the cloud in response to the grouped resource rendering request, wherein the rendering resource group includes at least one candidate rendering resource; Extract the packet header information of the candidate rendering resources, and determine the resource display parameters corresponding to the candidate rendering resources based on the packet header information; Based on the resource display parameters, the candidate rendering resources are transmitted to the corresponding nodes through the node relationship graph.
9. A resource rendering apparatus, characterized in that, include: The node connection relationship acquisition unit is used to determine the rendering execution node among the nodes in the geographical area using a consensus algorithm. The rendering execution node is the common rendering execution node of the nodes in the geographical area, and the other nodes in the geographical area are the follower nodes of the rendering execution node. The rendering execution node sends heartbeat information to other nodes in the geographic area and receives response information from other nodes in response to the heartbeat information, and determines the child node corresponding to the rendering execution node based on the response information. Each of the child nodes sends heartbeat information to other nodes within the geographical area, and determines the next-level child node corresponding to each child node based on the returned response information, thereby obtaining the node connection relationship between each node in the geographical area; A node relationship graph construction unit is used to construct a node relationship graph corresponding to the geographical region based on the node connection relationships. The request retrieval unit is used to retrieve resource rendering requests for a target object within a geographic area; The node relationship graph acquisition unit is used to acquire the node relationship graph corresponding to the geographical region based on the resource rendering request. The node relationship graph includes at least one node with a connection relationship. The node corresponds to a terminal in the geographical region. The node includes a common rendering execution node of the nodes in the geographical region. The path identification unit is used to identify the node path from the node to the rendering execution node in the node relationship graph; The request transmission unit is used to transmit the resource rendering request to the rendering execution node according to the node path, wherein the resource rendering request instructs the rendering execution node to render the target object through the cloud; The resource display unit is used to receive the rendering resources corresponding to the target object returned by the rendering execution node, and to display the rendering resources. The state detection unit is used to detect the node state of the parent node corresponding to the current node; A node search unit is used to search for neighboring nodes in a geographical area based on the node relationship graph when the node is in a heartbeat circuit breaker state. A connection unit is used to take the neighboring node as the new parent node of the current node and establish a connection with the new parent node; The update unit is used to update the node relationship graph based on the connection relationship between the current node and the new parent node.
10. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores a plurality of instructions adapted for loading by a processor to perform the steps of the resource rendering method according to any one of claims 1 to 8.
11. A computer device, characterized in that, The system includes a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor, when executing the computer program, implements the resource rendering method according to any one of claims 1 to 8.
12. A computer program product, characterized in that, The computer program product includes a computer program / instruction that, when executed by a processor, implements the steps of the resource rendering method according to any one of claims 1 to 8.
Citation Information
Patent Citations
Method and device for providing edge service, and equipment
CN112087312A
Page presentation method and device, electronic equipment and storage medium
CN114329298A
Image-forming device and control program
JP2007196566A