Method for rendering data, storage medium and electronic device

By dividing the rendering area on the terminal path node and executing different rendering strategies, the problems of long real-time rendering and unsmooth scene switching are solved, improving rendering efficiency and user experience.

CN114972602BActive Publication Date: 2024-10-11CHINA TELECOM CORP LTD
View PDF 5 Cites 0 Cited by

Patent Information

Application Number
CN202210668360.3
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-06-14
Publication Date
2024-10-11
Estimated Expiration
2042-06-14

AI Technical Summary

Technical Problem

When the existing technology renders content in a large space in real time, the overall rendering takes a long time and requires high device performance, or only renders the area where the device is located and the scene switching is not smooth when the user moves. There is a lack of effective solutions.

Method used

By determining the position of the terminal at the path node, the central rendering area and the peripheral rendering area are divided, and different rendering strategies are executed according to the regional relationship to avoid repeated rendering, save rendering resources, improve rendering efficiency, and ensure smooth scene switching.

Benefits of technology

It achieves smooth scene switching during terminal movement, reduces the efficiency of rendering application development and overall rendering time, and solves the problems of low rendering application development efficiency and unsmooth scene switching.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN114972602B_ABST
    Figure CN114972602B_ABST
Patent Text Reader

Abstract

The present application discloses a method for rendering data, a storage medium, and an electronic device, wherein the method comprises: determining a first position of a terminal at a first path node, determining a first central rendering area and a first peripheral rendering area corresponding to the terminal based on the first position; determining a second position of the terminal at a second path node during movement, determining a second central rendering area and a second peripheral rendering area corresponding to the terminal based on the second position; when the first central rendering area and the second central rendering area do not belong to the same area, executing different rendering strategies according to the positional relationship between the first peripheral rendering area and the second peripheral rendering area. The present application solves the technical problems of low rendering application development efficiency, long overall rendering time, and unsmooth scene switching during terminal movement caused by the single implementation method of real-time rendering in most business systems.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of AR rendering technology, and in particular to a method for rendering data, a storage medium, and an electronic device. Background Art

[0002] At present, there are two main ways to render content in real time in large spaces based on 5G and edge design computing. One way is to render the entire area first. When the user moves with the device in the area, the real-time screen switching is relatively smooth. However, this method takes a long time to render the entire area and has high performance requirements for the device. The other way is to render only the area where the device is located, which takes less time and has relatively low requirements for device performance. However, in actual use, since only the area where the device is located is rendered, when the user moves, a new real-time screen needs to be re-rendered according to the user's real-time location, and the rendering of the real-time screen takes a certain amount of time, resulting in the screen switching not being smooth enough during the user's movement.

[0003] To address the above-mentioned problems, no effective solution has been proposed yet. Summary of the invention

[0004] The embodiments of the present application provide a method for rendering data, a storage medium, and an electronic device to at least solve the technical problems of low efficiency in rendering application development, long time required for overall rendering, and unsmooth scene switching during terminal movement due to the single implementation method of real-time rendering in most business systems.

[0005] According to one aspect of an embodiment of the present application, a rendering method is provided, including: determining a first position of a terminal at a first path node, and determining a first central rendering area and a first peripheral rendering area corresponding to the terminal based on the first position as a base point; rendering the first central rendering area and the first peripheral area according to first rendering information corresponding to the first central rendering area and second rendering information corresponding to the first peripheral area, respectively; determining a second position of the terminal at a second path node during movement, and determining a second central rendering area and a second peripheral rendering area corresponding to the terminal based on the second position as a base point; when the first central rendering area and the second central rendering area do not belong to the same area, executing different rendering strategies according to the positional relationship between the first peripheral rendering area and the second peripheral rendering area, wherein the rendering strategy is at least used to indicate whether to render the second peripheral rendering area.

[0006] Optionally, different rendering strategies are executed according to the positional relationship between the first peripheral rendering area and the second peripheral rendering area, including: obtaining the intersection area of ​​the first peripheral rendering area and the second peripheral rendering area, and determining that the intersection area is a rendered area; determining other areas in the second peripheral rendering area except the intersection area; obtaining attribute types of other areas, and executing different rendering strategies according to the attribute types of other areas, wherein the attribute type is used to indicate whether the other areas are areas that the terminal repeatedly passes through during movement.

[0007] Optionally, different rendering strategies are executed according to the attribute types of other areas, including: when it is determined that the attribute type indicates that the other areas belong to areas that the terminal repeatedly passes through during movement, obtaining third rendering information corresponding to the other areas from the terminal's memory; and rendering the other areas according to the third rendering information.

[0008] Optionally, different rendering strategies are executed according to the attribute types of other areas, including: when it is determined that the attribute types indicate that the other areas do not belong to the areas that the terminal repeatedly passes through during the movement, sending a rendering request to the server, wherein the rendering request is used to obtain fourth rendering information corresponding to the other areas; receiving the fourth rendering information returned by the server, and rendering the other areas according to the fourth rendering information.

[0009] Optionally, before determining the first position of the terminal at the first path node, it also includes: obtaining the moving area of ​​the terminal and determining the map image corresponding to the moving area; dividing the map image into a predetermined number of grids to obtain a grid map, obtaining the navigation path of the terminal on the grid map, dividing the navigation path according to preset intervals, and obtaining multiple path nodes.

[0010] Optionally, determining a first central rendering area and a first peripheral rendering area corresponding to the terminal based on the first position as a base point includes: determining a first grid corresponding to the first position in a grid map, and determining the first grid as the first central rendering area; determining multiple second grids surrounding the first grid, and determining an area composed of the multiple second grids as the first peripheral rendering area.

[0011] Optionally, the above method also includes: determining the starting position of the terminal during the movement process, obtaining a first circle with the starting position as the first center and the first preset length as the radius, and determining the first circle as the first central rendering area; and determining a second circle with the starting position as the second center and the second preset length as the radius, and determining the second circle as the first peripheral rendering area, wherein the first preset length is less than the second preset length.

[0012] Optionally, the above method also includes: determining the end position of the terminal during the movement, and determining whether the end position is in an area outside the first circle; when the end position is in an area outside the first circle, obtaining a third circle with the end position as the third center and the first preset length as the radius, and determining the third circle as a third central rendering area; and determining a fourth circle with the end position as the fourth center and the second preset length as the radius, and determining the fourth circle as a third peripheral rendering area; rendering the third central rendering area and the third peripheral area according to the fifth rendering information corresponding to the third central rendering area and the sixth rendering information corresponding to the third peripheral area, respectively.

[0013] According to another aspect of an embodiment of the present application, a non-volatile storage medium is further provided, the storage medium including a stored program, wherein when the program is running, a device where the storage medium is located is controlled to execute any method for rendering data.

[0014] According to another aspect of an embodiment of the present application, there is also provided an electronic device, comprising: a processor; and a memory for storing instructions executable by the processor; wherein the processor is configured to execute the instructions to implement any method of rendering data.

[0015] In an embodiment of the present application, a method of avoiding repeated rendering is adopted, by determining a first position of the terminal at a first path node, and determining a first central rendering area and a first peripheral rendering area corresponding to the terminal based on the first position; rendering the first central rendering area and the first peripheral area respectively according to first rendering information corresponding to the first central rendering area and second rendering information corresponding to the first peripheral area; determining a second position of the terminal at a second path node during movement, and determining a second central rendering area and a second peripheral rendering area corresponding to the terminal based on the second position; when the first central rendering area and the second central rendering area do not belong to the same area, the purpose of executing different rendering strategies according to the positional relationship between the first peripheral rendering area and the second peripheral rendering area is achieved, thereby achieving the technical effect of saving rendering resources, improving rendering efficiency, and ensuring the smoothness of scene switching during the movement of the terminal, thereby solving the technical problems of low rendering application development efficiency, long time required for overall rendering, and unsmooth scene switching during terminal movement caused by the single implementation method of real-time rendering in most business systems. BRIEF DESCRIPTION OF THE DRAWINGS

[0016] The drawings described herein are used to provide a further understanding of the present application and constitute a part of the present application. The illustrative embodiments of the present application and their descriptions are used to explain the present application and do not constitute an improper limitation on the present application. In the drawings:

[0017] Figure 1is a flowchart of an optional method for rendering data according to an embodiment of the present application;

[0018] Figure 2 is a schematic diagram of a grid map in an optional implementation manner of the present application;

[0019] Figure 3 It is a schematic diagram of the rendering process in an embodiment of the present application;

[0020] Figure 4 It is a schematic diagram of the rendering process in an embodiment of the present application;

[0021] Figure 5 A schematic block diagram of an example electronic device 500 that can be used to implement embodiments of the present application is shown. DETAILED DESCRIPTION

[0022] In order to enable those skilled in the art to better understand the solution of the present application, the technical solution in the embodiments of the present application will be clearly and completely described below in conjunction with the drawings in the embodiments of the present application. Obviously, the described embodiments are only part of the embodiments of the present application, not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in this field without creative work should fall within the scope of protection of the present application.

[0023] It should be noted that the terms "first", "second", etc. in the specification and claims of the present application and the above-mentioned drawings are used to distinguish similar objects, and are not necessarily used to describe a specific order or sequence. It should be understood that the data used in this way can be interchangeable where appropriate, so that the embodiments of the present application described herein can be implemented in an order other than those illustrated or described herein. In addition, the terms "including" and "having" and any of their variations are intended to cover non-exclusive inclusions, for example, a process, method, system, product or device comprising a series of steps or units is not necessarily limited to those steps or units clearly listed, but may include other steps or units that are not clearly listed or inherent to these processes, methods, products or devices.

[0024] According to an embodiment of the present application, a rendering method embodiment is provided. It should be noted that the steps shown in the flowchart of the accompanying drawings can be executed in a computer system such as a set of computer executable instructions, and although a logical order is shown in the flowchart, in some cases, the steps shown or described can be executed in an order different from that shown here.

[0025] Figure 1 is a flowchart of a method for rendering data according to an embodiment of the present application, such as Figure 1 As shown, the method comprises the following steps:

[0026] S102, determining a first position of a terminal at a first path node, and determining a first central rendering area and a first peripheral rendering area corresponding to the terminal based on the first position;

[0027] S104, rendering the first central rendering area and the first peripheral area according to first rendering information corresponding to the first central rendering area and second rendering information corresponding to the first peripheral area respectively;

[0028] S106, determining a second position of the terminal at the second path node during the movement, and determining a second central rendering area and a second peripheral rendering area corresponding to the terminal based on the second position;

[0029] S108, when the first central rendering area and the second central rendering area do not belong to the same area, executing different rendering strategies according to the positional relationship between the first peripheral rendering area and the second peripheral rendering area, wherein the rendering strategy is at least used to indicate whether to render the second peripheral rendering area.

[0030] In the method for rendering data, a first position of a terminal at a first path node is determined, and a first central rendering area and a first peripheral rendering area corresponding to the terminal are determined with the first position as a base point; the first central rendering area and the first peripheral area are rendered respectively according to first rendering information corresponding to the first central rendering area and second rendering information corresponding to the first peripheral area; a second position of the terminal at a second path node during movement is determined, and a second central rendering area and a second peripheral rendering area corresponding to the terminal are determined with the second position as a base point; when the first central rendering area and the second central rendering area do not belong to the same area, the purpose of executing different rendering strategies according to the positional relationship between the first peripheral rendering area and the second peripheral rendering area is achieved, thereby achieving the technical effect of saving rendering resources, improving rendering efficiency, and ensuring the smoothness of scene switching during the movement of the terminal, thereby solving the technical problems of low rendering application development efficiency, long time required for overall rendering, and unsmooth scene switching during terminal movement caused by the single implementation method of real-time rendering in most business systems.

[0031] In some optional embodiments of the present application, different rendering strategies are executed according to the positional relationship between the first peripheral rendering area and the second peripheral rendering area. This can be achieved through the following steps. Specifically, an intersection area of ​​the first peripheral rendering area and the second peripheral rendering area is obtained, and the intersection area is determined to be a rendered area; other areas except the intersection area in the second peripheral rendering area are determined; attribute types of other areas are obtained, and different rendering strategies are executed according to the attribute types of other areas, wherein the attribute types are used to indicate whether other areas are areas that the terminal repeatedly passes through during movement.

[0032] Specifically, different rendering strategies are executed according to the attribute types of other areas. When it is determined that the attribute type indicates that the other areas belong to areas that the terminal repeatedly passes through during movement, third rendering information corresponding to the other areas is obtained from the terminal's memory; and the other areas are rendered according to the third rendering information.

[0033] Optionally, different rendering strategies are executed according to the attribute types of other areas. When it is determined that the attribute type indicates that the other areas do not belong to the areas that the terminal repeatedly passes through during movement, a rendering request is sent to the server, wherein the rendering request is used to obtain the fourth rendering information corresponding to the other areas; the fourth rendering information returned by the server is received, and the other areas are rendered according to the fourth rendering information. It is easy to notice that according to the different detour attributes of the area to be rendered (whether it is an area that the terminal repeatedly passes through during movement), calling the rendering data from the local memory of the terminal or from the server can save the local hardware resources of the terminal, and at the same time, the communication volume with the server can be taken into account.

[0034] As an optional implementation, before determining the first position of the terminal at the first path node, the moving area of ​​the terminal can also be obtained to determine a map image corresponding to the moving area; the map image is divided into a predetermined number of grids to obtain a grid map, the navigation path of the terminal on the grid map is obtained, and the navigation path is divided according to preset intervals to obtain multiple path nodes.

[0035] It should be noted that determining the first central rendering area and the first peripheral rendering area corresponding to the terminal based on the first position as the base point includes: determining the first grid corresponding to the first position in the grid map, and determining the first grid as the first central rendering area; determining multiple second grids surrounding the first grid, and determining the area composed of the multiple second grids as the first peripheral rendering area.

[0036] In order to facilitate those skilled in the art to better understand the relevant embodiments of the present application, the above embodiments are now described in conjunction with an optional implementation of the present application. The implementation includes the following steps, specifically:

[0037] (I) Pretreatment process:

[0038] Figure 2 is a schematic diagram of a grid map of the exemplary embodiment of the present application, such as Figure 2 As shown in the figure, the map of the entire area is first divided into multiple grids. When generating a navigation path for the user (such as Figure 2 After the thick solid line in the figure, multiple path nodes are set on the navigation path according to the preset interval (such as Figure 2 In addition, the rendering sequence number is initialized to 1.

[0039] Starting from the first path node, for each path node, first determine whether the path node is in the same grid as the previous path node. If so, skip the path node; if not, take the grid where the path node is located as the center grid of the nine-square grid, assign a rendering number to each grid in the nine-square grid, and increase the rendering number by 1. Then perform the same operation for the next path node until all the path nodes have been completed.

[0040] For ease of understanding, Figure 2 As shown, first for the first path node at the starting point, perform the following steps:

[0041] 1.1, determine whether the first path node is in the same grid as the previous path node. Since there is no previous path node for the first path node, the next step is automatically executed.

[0042] 1.2. With the grid where the first path node is located as the center grid, determine a nine-square grid, which includes: the grid where the first path node is located and the eight grids surrounding the grid; then assign a rendering number 1 to each grid in the nine-square grid, and add 1 to the rendering number (the rendering number becomes 2 at this time).

[0043] Next, for the second path node, perform the following steps:

[0044] 2.1, determine whether the second path node is in the same grid as the previous path node. If so, skip the path node. If not, execute 2.2. Since the second path node and the first path node are in different grids, execute 2.2 next.

[0045] 2.2, with the grid where the second path node is located as the center grid, determine a nine-square grid, then assign a rendering number of 2 to each grid in the nine-square grid, and add 1 to the rendering number (the rendering number becomes 3 at this time). It should be noted that the grids that have been assigned rendering numbers before will still retain the previous rendering numbers, so these grids are assigned multiple rendering numbers at the same time. For example Figure 2 Some grids have rendering numbers including 1 and 2.

[0046] Then, for the third path node, perform the following steps:

[0047] 3.1, determine whether the third path node is in the same grid as the previous path node. If so, skip the path node. Since the third path node is in the same grid as the second path node, skip the third path node and then perform the corresponding operation on the fourth path node.

[0048] By analogy, after performing the corresponding operations on each path node, we get Figure 2 Results shown. Figure 2 In the render process, a portion of the grid is assigned one or more rendering numbers.

[0049] For each grid assigned a rendering number, determine whether there is a gap between the rendering numbers of the grid. If there is, it means that the grid belongs to a grid on the detour segment, and then add detour grid attributes to the grid (such as Figure 2 gray grid in the .

[0050] For ease of understanding, Figure 2 Take a grid in as an example. The grid is assigned three rendering numbers: 8, 28, and 29. Since there is a gap between rendering number 8 and rendering number 28 (i.e., rendering number 8 and rendering number 28 are not continuous), it means that when the user moves along the navigation path with the terminal, after the grid has undergone the rendering corresponding to rendering number 8, the terminal will detour to the vicinity of the grid, so that the grid will undergo the rendering corresponding to rendering number 28 again. Therefore, a detour attribute should be added to the grid.

[0051] (II) Rendering process:

[0052] Figure 3 It is a schematic diagram of the rendering process in the embodiment of the present application. Figure 3 As shown, when the terminal turns on the AR rendering function, the current longitude and latitude of the terminal is obtained. The grid where the current longitude and latitude are located is used as the central grid, and the 8 grids around the central grid are used as the peripheral grids to determine a nine-square grid, and the AR rendering information of the nine-square grid is loaded.

[0053] Next, it is periodically determined whether the terminal has moved (that is, whether the longitude and latitude of the terminal have changed). If it has changed, it is determined whether the new longitude and latitude of the terminal are still in the center grid (that is, whether the terminal has switched between grids). If it is still in the center grid, the current cycle ends and the next cycle starts. If it is no longer in the center grid (at this time the terminal usually moves to the outer grid), the new grid where the terminal is located is used as the center grid, the nine-square grid is redetermined, and the AR rendering information is loaded for the redetermined nine-square grid. In addition, some AR rendering information that is no longer needed will be deleted to reduce memory pressure.

[0054] When loading AR rendering information for the re-determined nine-square grid, rendering is performed in the following manner:

[0055] (1) For the grid that has been rendered last time, there is no need to render it again.

[0056] (2) For the grid that was not rendered last time, first determine whether the grid has a detour attribute. If it has a detour attribute, try to directly obtain the AR rendering information of the grid from the memory, so that there is no need to repeatedly load and render. It should be noted that if the detour grid is currently being rendered for the first time, the AR rendering information of the detour grid does not exist in the memory.

[0057] (3) For a grid that was not rendered last time and does not have a detour attribute, or for a detour grid for which AR rendering information does not exist in the memory, the AR rendering information needs to be loaded from the server.

[0058] When deleting AR rendering information that is no longer needed, delete it in the following way:

[0059] For the grid included in the previous nine-square grid but not included in the current nine-square grid, determine whether the grid has a detour attribute. If the grid does not have a detour attribute, delete the AR rendering information of the grid. If the grid has a detour attribute, retain the AR rendering information of the grid.

[0060] For ease of understanding, Figure 2 As shown, when the terminal moves from grid A to grid B, a new nine-square grid is determined with grid B as the center grid, such as Figure 2 As shown in the nine-square grid.

[0061] First, for grids C, D, and E, since these three grids belong to the previous nine-square grid but not the current nine-square grid, and these three grids do not have a detour attribute, in order to reduce memory pressure, the AR rendering information of these three grids needs to be deleted.

[0062] Next, for grids F, G, and H, they are grids that were not rendered last time. Therefore, first determine whether these grids have detour attributes. After judgment, it is determined that grid F has a detour attribute, and grids G and H do not have a detour attribute. Therefore, try to get the AR rendering information of grid F from the memory. Since grid F has been rendered once before, the AR rendering information of the grid can be directly obtained from the memory to avoid repeated loading. For grids G and H, the terminal needs to load the AR rendering information of these two grids from the server.

[0063] In addition, for the remaining 6 grids (such as grids J, K, B, A, etc.) except grids F, G, and H in the current nine-square grid, since they are the grids that have been rendered last time, there is no need to load and render them again. It is worth noting that since the terminal is currently located at grid B, the area that the user's field of vision mainly focuses on is grid B. And since grid B does not need to be rendered at this time (because it has been rendered in the previous nine-square grid), there will be no problem of screen switching delay for grid B, which can significantly improve the user experience.

[0064] In addition, when the terminal starts the navigation function, the terminal also monitors the user's movement trend to determine whether the user has abandoned the navigation path. If so, the AR rendering information of the detour grid saved in the memory is deleted, and the detour attribute of the detour grid is deleted, thereby helping to reduce memory pressure.

[0065] It is easy to notice that by rendering the central area and the peripheral area, and by continuously judging whether the terminal has moved out of the central area, and after the terminal has moved out of the central area, redetermining the new central area and the peripheral area and rendering them, the problem of the screen switching being not smooth during the user's movement can be solved. At the same time, the entire map is divided into multiple grids in advance, and detour attributes are added to some of the grids in the multiple grids according to the user's navigation path. During rendering, the AR rendering information of the grid is managed according to the detour attributes of the grid, thereby avoiding repeated loading of the AR rendering information.

[0066] As another optional implementation method of the present application, the above method also includes: determining the starting position of the terminal during the movement, obtaining a first circle with the starting position as the first center and the first preset length as the radius, and determining the first circle as the first central rendering area; and determining a second circle with the starting position as the second center and the second preset length as the radius, and determining the second circle as the first peripheral rendering area, wherein the first preset length is less than the second preset length.

[0067] Optionally, the above method also includes: determining the end position of the terminal during the movement, and determining whether the end position is in an area outside the first circle; when the end position is in an area outside the first circle, obtaining a third circle with the end position as the third center and the first preset length as the radius, and determining the third circle as a third central rendering area; and determining a fourth circle with the end position as the fourth center and the second preset length as the radius, and determining the fourth circle as a third peripheral rendering area; rendering the third central rendering area and the third peripheral area according to the fifth rendering information corresponding to the third central rendering area and the sixth rendering information corresponding to the third peripheral area, respectively.

[0068] Figure 4 is a schematic diagram of the rendering process of the method of this embodiment, such as Figure 4As shown, the process can be rendered as follows:

[0069] Step 1: Get the terminal's latitude and longitude information and select the radius r.

[0070] Step 2: With the terminal's longitude and latitude as the center, determine a circle with a radius of r as the center area, and load and initialize the AR rendering information of the center area.

[0071] Step 3: With the terminal's longitude and latitude as the center, set a circle with an outer radius of 2r and an inner radius of r as the outer area, and load and initialize the AR rendering information of the outer area.

[0072] Step 4: Determine whether the longitude and latitude of the terminal have changed. If so, proceed to step 5. In other words, when the terminal moves, proceed to step 5.

[0073] Step 5: Determine whether the new longitude and latitude of the terminal is within the AR rendering area with a radius of r. If it is still within the AR rendering area with a radius of r, return to step 4; otherwise, proceed to step 6.

[0074] Step 6: With the new longitude and latitude of the terminal as the center, redefine the circle with a radius of r as the center area, and load and initialize the AR rendering information of the center area.

[0075] Step 7: With the terminal's longitude and latitude as the center, redefine a circle with an outer radius of 2r and an inner radius of r as the outer area, and load and initialize the AR rendering information of the outer area.

[0076] According to another aspect of an embodiment of the present application, a non-volatile storage medium is further provided, the storage medium including a stored program, wherein when the program is running, a device where the storage medium is located is controlled to execute any method for rendering data.

[0077] Specifically, the above storage medium is used to store program instructions for the following functions to implement the following functions:

[0078] Determine a first position of a terminal at a first path node, and determine a first central rendering area and a first peripheral rendering area corresponding to the terminal based on the first position; render the first central rendering area and the first peripheral area according to first rendering information corresponding to the first central rendering area and second rendering information corresponding to the first peripheral area, respectively; determine a second position of the terminal at a second path node during movement, and determine a second central rendering area and a second peripheral rendering area corresponding to the terminal based on the second position; when the first central rendering area and the second central rendering area do not belong to the same area, execute different rendering strategies according to the positional relationship between the first peripheral rendering area and the second peripheral rendering area, wherein the rendering strategy is at least used to indicate whether to render the second peripheral rendering area.

[0079] Optionally, in this embodiment, the above-mentioned storage medium may include, but is not limited to, electronic, magnetic, optical, electromagnetic, infrared, or semiconductor systems, devices or equipment, or any suitable combination of the above-mentioned contents. More specific examples of the above-mentioned storage medium may include electrical connections based on one or more lines, portable computer disks, hard disks, random access memories (RAM), read-only memories (ROM), erasable programmable read-only memories (EPROM or flash memory), optical fibers, portable compact disk read-only memories (CD-ROM), optical storage devices, magnetic storage devices, or any suitable combination of the above-mentioned contents.

[0080] In an exemplary embodiment of the present application, a computer program product is further provided, including a computer program, and when the computer program is executed by a processor, the computer program implements any of the above methods for rendering data.

[0081] Optionally, the computer program may implement the following steps when executed by a processor:

[0082] Determine a first position of a terminal at a first path node, and determine a first central rendering area and a first peripheral rendering area corresponding to the terminal based on the first position; render the first central rendering area and the first peripheral area according to first rendering information corresponding to the first central rendering area and second rendering information corresponding to the first peripheral area, respectively; determine a second position of the terminal at a second path node during movement, and determine a second central rendering area and a second peripheral rendering area corresponding to the terminal based on the second position; when the first central rendering area and the second central rendering area do not belong to the same area, execute different rendering strategies according to the positional relationship between the first peripheral rendering area and the second peripheral rendering area, wherein the rendering strategy is at least used to indicate whether to render the second peripheral rendering area.

[0083] According to an embodiment of the present application, an electronic device is provided, which includes: at least one processor; and a memory communicatively connected to the at least one processor; wherein the memory stores instructions executable by the at least one processor, and the instructions are executed by the at least one processor so that the at least one processor can execute any one of the above-mentioned methods for rendering data.

[0084] Optionally, the electronic device may further include a transmission device and an input / output device, wherein the transmission device is connected to the processor, and the input / output device is connected to the processor.

[0085] Figure 5A schematic block diagram of an example electronic device 500 that can be used to implement an embodiment of the present application is shown. The electronic device is intended to represent various forms of digital computers, such as laptop computers, desktop computers, workbenches, personal digital assistants, servers, blade servers, mainframe computers, and other suitable computers. The electronic device can also represent various forms of mobile devices, such as personal digital processing, cellular phones, smart phones, wearable devices, and other similar computing devices. The components shown herein, their connections and relationships, and their functions are merely examples and are not intended to limit the implementation of the present application described and / or required herein.

[0086] like Figure 5 As shown, the device 500 includes a computing unit 501, which can perform various appropriate actions and processes according to a computer program stored in a read-only memory (ROM) 502 or a computer program loaded from a storage unit 508 into a random access memory (RAM) 503. In the RAM 503, various programs and data required for the operation of the device 500 can also be stored. The computing unit 501, the ROM 502, and the RAM 503 are connected to each other via a bus 504. An input / output (I / O) interface 505 is also connected to the bus 504.

[0087] A number of components in the device 500 are connected to the I / O interface 505, including: an input unit 506, such as a keyboard, a mouse, etc.; an output unit 507, such as various types of displays, speakers, etc.; a storage unit 508, such as a disk, an optical disk, etc.; and a communication unit 509, such as a network card, a modem, a wireless communication transceiver, etc. The communication unit 509 allows the device 500 to exchange information / data with other devices through a computer network such as the Internet and / or various telecommunication networks.

[0088] The computing unit 501 may be a variety of general and / or special processing components with processing and computing capabilities. Some examples of the computing unit 501 include, but are not limited to, a central processing unit (CPU), a graphics processing unit (GPU), various dedicated artificial intelligence (AI) computing chips, various computing units running machine learning model algorithms, digital signal processors (DSPs), and any appropriate processors, controllers, microcontrollers, etc. The computing unit 501 performs the various methods and processes described above, such as a method for rendering data. For example, in some embodiments, the method for rendering data may be implemented as a computer software program, which is tangibly contained in a machine-readable medium, such as a storage unit 508. In some embodiments, part or all of the computer program may be loaded and / or installed on the device 500 via the ROM 502 and / or the communication unit 509. When the computer program is loaded into the RAM 503 and executed by the computing unit 501, one or more steps of the method for rendering data described above may be performed. Alternatively, in other embodiments, the computing unit 501 may be configured to perform the method for rendering data in any other appropriate manner (e.g., by means of firmware).

[0089] Various implementations of the systems and techniques described above herein can be implemented in digital electronic circuit systems, integrated circuit systems, field programmable gate arrays (FPGAs), application specific integrated circuits (ASICs), application specific standard products (ASSPs), systems on chips (SOCs), load programmable logic devices (CPLDs), computer hardware, firmware, software, and / or combinations thereof. These various implementations can include: being implemented in one or more computer programs that can be executed and / or interpreted on a programmable system including at least one programmable processor, which can be a special purpose or general purpose programmable processor that can receive data and instructions from a storage system, at least one input device, and at least one output device, and transmit data and instructions to the storage system, the at least one input device, and the at least one output device.

[0090] The program code for implementing the method of the present application can be written in any combination of one or more programming languages. These program codes can be provided to a processor or controller of a general-purpose computer, a special-purpose computer, or other programmable data processing device, so that the program code, when executed by the processor or controller, implements the functions / operations specified in the flow chart and / or block diagram. The program code can be executed entirely on the machine, partially on the machine, partially on the machine and partially on a remote machine as a stand-alone software package, or entirely on a remote machine or server.

[0091] In the context of the present application, a machine-readable medium may be a tangible medium that may contain or store a program for use by or in conjunction with an instruction execution system, device, or equipment. A machine-readable medium may be a machine-readable signal medium or a machine-readable storage medium. A machine-readable medium may include, but is not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, device, or equipment, or any suitable combination of the foregoing. A more specific example of a machine-readable storage medium may include an electrical connection based on one or more lines, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing.

[0092] To provide interaction with a user, the systems and techniques described herein can be implemented on a computer having: a display device (e.g., a CRT (cathode ray tube) or LCD (liquid crystal display) monitor) for displaying information to the user; and a keyboard and pointing device (e.g., a mouse or trackball) through which the user can provide input to the computer. Other types of devices can also be used to provide interaction with the user; for example, the feedback provided to the user can be any form of sensory feedback (e.g., visual feedback, auditory feedback, or tactile feedback); and input from the user can be received in any form (including acoustic input, voice input, or tactile input).

[0093] The systems and techniques described herein may be implemented in a computing system that includes back-end components (e.g., as a data server), or a computing system that includes middleware components (e.g., an application server), or a computing system that includes front-end components (e.g., a user computer with a graphical user interface or a web browser through which a user can interact with implementations of the systems and techniques described herein), or a computing system that includes any combination of such back-end components, middleware components, or front-end components. The components of the system may be interconnected by any form or medium of digital data communication (e.g., a communication network). Examples of communication networks include: a local area network (LAN), a wide area network (WAN), and the Internet.

[0094] A computer system may include a client and a server. The client and the server are generally remote from each other and usually interact through a communication network. The relationship of client and server is generated by computer programs running on respective computers and having a client-server relationship with each other. The server may be a cloud server, a server of a distributed system, or a server combined with a blockchain.

[0095] In a related embodiment of the present application, a method of avoiding repeated rendering is adopted, by determining a first position of the terminal at a first path node, and determining a first central rendering area and a first peripheral rendering area corresponding to the terminal with the first position as a base point; rendering the first central rendering area and the first peripheral area respectively according to first rendering information corresponding to the first central rendering area and second rendering information corresponding to the first peripheral area; determining a second position of the terminal at a second path node during movement, and determining a second central rendering area and a second peripheral rendering area corresponding to the terminal with the second position as a base point; when the first central rendering area and the second central rendering area do not belong to the same area, the purpose of executing different rendering strategies according to the positional relationship between the first peripheral rendering area and the second peripheral rendering area is achieved, thereby achieving the technical effect of saving rendering resources, improving rendering efficiency, and ensuring the smoothness of scene switching during the movement of the terminal, thereby solving the technical problems of low rendering application development efficiency, long time required for overall rendering, and unsmooth scene switching during terminal movement caused by the single implementation method of real-time rendering in most business systems.

[0096] The serial numbers of the above-mentioned embodiments of the present application are for description only and do not represent the advantages or disadvantages of the embodiments.

[0097] In the above embodiments of the present application, the description of each embodiment has its own emphasis. For parts that are not described in detail in a certain embodiment, please refer to the relevant description of other embodiments.

[0098] In the several embodiments provided in this application, it should be understood that the disclosed technical content can be implemented in other ways. Among them, the device embodiments described above are only schematic. For example, the division of the units can be a logical function division. There may be other division methods in actual implementation. For example, multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be through some interfaces, indirect coupling or communication connection of units or modules, which can be electrical or other forms.

[0099] The units described as separate components may or may not be physically separated, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed on multiple units. Some or all of the units may be selected according to actual needs to achieve the purpose of the present embodiment.

[0100] In addition, each functional unit in each embodiment of the present application may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit. The above-mentioned integrated unit may be implemented in the form of hardware or in the form of software functional units.

[0101] If the integrated unit is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present application, in essence, or the part that contributes to the prior art or all or part of the technical solution can be embodied in the form of a software product, and the computer software product is stored in a storage medium, including a number of instructions to enable a computer device (which can be a personal computer, a server or a network device, etc.) to perform all or part of the steps of the method described in each embodiment of the present application. The aforementioned storage medium includes: U disk, read-only memory (ROM, Read-Only Memory), random access memory (RAM, Random Access Memory), mobile hard disk, disk or optical disk and other media that can store program codes.

[0102] The above is only a preferred implementation of the present application. It should be pointed out that for ordinary technicians in this technical field, several improvements and modifications can be made without departing from the principles of the present application. These improvements and modifications should also be regarded as the scope of protection of the present application.

Claims

1. A method for rendering data, characterized in that: include: Determine a first position of a terminal at a first path node, and determine a first central rendering area and a first peripheral rendering area corresponding to the terminal based on the first position; rendering the first central rendering area and the first peripheral rendering area according to first rendering information corresponding to the first central rendering area and second rendering information corresponding to the first peripheral rendering area respectively; Determine a second position of the terminal at a second path node during movement, and determine a second central rendering area and a second peripheral rendering area corresponding to the terminal based on the second position; In a case where the first central rendering area and the second central rendering area do not belong to the same area, other areas outside the intersection area of ​​the first peripheral rendering area and the second peripheral rendering area are obtained, and different rendering strategies are executed according to the attribute types of the other areas, wherein the attribute type is used to indicate whether the other areas are areas that the terminal repeatedly passes through during movement, and the rendering strategy is at least used to indicate whether to render the second peripheral rendering area.

2. The method according to claim 1, characterized in that: Different rendering strategies are executed according to the attribute type of the other area, including: When it is determined that the attribute type indicates that the other area belongs to an area that the terminal repeatedly passes through during movement, obtaining third rendering information corresponding to the other area from a memory of the terminal; The other areas are rendered according to the third rendering information.

3. The method according to claim 1, characterized in that: Different rendering strategies are executed according to the attribute type of the other area, including: When it is determined that the attribute type indicates that the other area does not belong to the area that the terminal repeatedly passes through during movement, sending a rendering request to the server, wherein the rendering request is used to obtain fourth rendering information corresponding to the other area; The fourth rendering information returned by the server is received, and the other areas are rendered according to the fourth rendering information.

4. The method according to claim 1, characterized in that: Before determining the first position of the terminal at the first path node, the method further includes: Acquire the moving area of ​​the terminal, and determine the map image corresponding to the moving area; The map image is divided into a predetermined number of grids to obtain a grid map, a navigation path of the terminal on the grid map is acquired, and the navigation path is divided according to preset intervals to obtain a plurality of path nodes.

5. The method according to claim 1, characterized in that Determining a first central rendering area and a first peripheral rendering area corresponding to the terminal based on the first position includes: Determine a first grid corresponding to the first position in the grid map, and determine the first grid as a first central rendering area; A plurality of second grids surrounding the first grid are determined, and an area formed by the plurality of second grids is determined as the first peripheral rendering area.

6. The method according to claim 1, characterized in that The method further comprises: Determine a starting position of the terminal during the movement, obtain a first circle with the starting position as a first center and a first preset length as a radius, and determine the first circle as the first central rendering area; and A second circle is determined with the starting position as the second center and a second preset length as the radius, and the second circle is determined as the first peripheral rendering area, wherein the first preset length is smaller than the second preset length.

7. The method according to claim 6, characterized in that The method further comprises: Determine the terminal's final position during the movement, and determine whether the final position is in an area outside the first circle; When the end point is outside the first circle, a third circle is obtained with the end point as the third center and the first preset length as the radius, and the third circle is determined as the third central rendering area; and Determine a fourth circle with the end point position as the fourth circle center and the second preset length as the radius, and determine the fourth circle as the third peripheral rendering area; The third central rendering area and the third peripheral rendering area are rendered according to the fifth rendering information corresponding to the third central rendering area and the sixth rendering information corresponding to the third peripheral rendering area respectively.

8. A non-volatile storage medium, characterized in that: The storage medium includes a stored program, wherein when the program is executed, the device where the storage medium is located is controlled to execute the method for rendering data according to any one of claims 1 to 7.

9. An electronic device, characterized in that: include: processor; a memory for storing instructions executable by the processor; The processor is configured to execute the instructions to implement the method for rendering data as claimed in any one of claims 1 to 7.

Citation Information

Patent Citations

  • Virtual scene display method and device, storage medium, electronic device

    CN108310768A

  • Picture scene switching method and device, computer equipment and storage medium

    CN111586317A

  • Method and device for graphic rendering

    CN111861854A

  • Region AR rendering method and device, electronic equipment and readable storage medium

    CN114445539A

  • Graphics rendering method and apparatus

    US20220058766A1