View picture display method and device, equipment and storage medium

By saving virtual object data in the terminal cache, the high bandwidth load problem caused by frequent object movement in the virtual scene is solved, and the effect of saving bandwidth and reducing costs is achieved.

CN120001033APending Publication Date: 2025-05-16TENCENT TECHNOLOGY (SHENZHEN) CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202311516424.9
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2023-11-14
Publication Date
2025-05-16

AI Technical Summary

Technical Problem

In a virtual scene, frequent object movement causes changes in the field of view, causing the server to frequently send object data of virtual objects, increasing the bandwidth load and cost of the server.

Method used

By saving virtual object data in the displayed field of view screen in the terminal cache, when the field of view screen is switched back to the same screen, it is displayed directly based on the cached data, and no longer obtains data from the server.

Benefits of technology

This reduces the amount of data that the server needs to send, saves bandwidth, and thus reduces bandwidth costs and improves the efficiency of screen switching.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120001033A_ABST
    Figure CN120001033A_ABST
Patent Text Reader

Abstract

The invention provides a visual field picture display method and device, equipment and a storage medium, and belongs to the technical field of computers. The method comprises the steps that a first view image of an object is displayed, at least one virtual object is displayed in the first view image, the at least one virtual object is stored in a cache, and the cache is used for storing the virtual object displayed in the image; if the view field of the object changes, displaying a second view field picture of the object; and in response to switching from the second view image to the first view image, displaying the first view image based on the virtual object stored in the cache. Through the method, even if the view image of the object is frequently switched, image switching can be completed based on the object data stored by the terminal, the process that a server frequently sends a large amount of object data to the terminal is avoided, the amount of data needing to be sent by the server is reduced, the bandwidth is saved, and then the bandwidth cost is reduced.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of computer technology, and in particular to a method, device, equipment and storage medium for displaying a visual field. Background Art

[0002] There will be multiple virtual objects in the virtual scene of the game, and the field of view of the objects in the virtual scene will change as the objects move. Therefore, when the field of view changes due to the movement of the objects, the virtual objects displayed in the field of view need to be changed, and this change is usually determined by the logic of the server. Therefore, when the field of view changes, the server needs to send the object data of the virtual objects in the changed field of view to the terminal so that the terminal can display the changed field of view.

[0003] Among them, since the object moves frequently in the virtual scene, the object's field of view changes from the first field of view to the second field of view, and may be switched from the second field of view back to the first field of view. Each time the first field of view is displayed, the server needs to resend the object data of the virtual object in the first field of view to the terminal, that is, the server needs to frequently send a large amount of object data to the terminal, which makes the overall amount of data that the server needs to send large, which in turn causes the server's bandwidth to increase, thereby increasing the bandwidth cost. Summary of the invention

[0004] The embodiments of the present application provide a method, device, equipment and storage medium for displaying a visual field, which reduces the amount of data that needs to be sent by the server, saves bandwidth, and thus reduces bandwidth costs. The technical solution is as follows:

[0005] In one aspect, a method for displaying a visual field is provided, the method comprising:

[0006] A first field of view screen showing an object, wherein at least one virtual object is shown in the first field of view screen, and the at least one virtual object is stored in a cache of the terminal, and the cache is used to store the virtual object shown in the screen;

[0007] If the field of view of the object changes, displaying a second field of view of the object;

[0008] In response to switching back from the second field of view picture to the first field of view picture, the first field of view picture is displayed based on the virtual objects stored in the cache.

[0009] On the other hand, a method for displaying a visual field is provided, the method comprising:

[0010] In response to an object entering a first field of view, object data of at least one virtual object in the first field of view is sent to a terminal, the terminal is used to display the first field of view and store the virtual object in a cache, and the cache is used to store the virtual object displayed in the screen;

[0011] In response to the object entering the second field of view, sending object data of at least one virtual object in the second field of view to the terminal, and the terminal is used to display the second field of view;

[0012] In response to detecting that the terminal switches from the second field of view picture back to the first field of view picture, switching data is sent to the terminal, where the switching data is used to instruct the terminal to display the first field of view picture based on the virtual object stored in the cache.

[0013] On the other hand, a visual field synchronization device is provided, the device comprising:

[0014] A first display module, used to display a first field of view picture of an object, wherein at least one virtual object is displayed in the first field of view picture, and the at least one virtual object is stored in a cache of the terminal, and the cache is used to store the virtual object displayed in the picture;

[0015] A second display module, used for displaying a second field of view of the object if the field of view of the object changes;

[0016] The third display module is used for displaying the first field of view picture based on the virtual object stored in the cache in response to switching from the second field of view picture back to the first field of view picture.

[0017] In some embodiments, the first field of view picture and the second field of view picture correspond to a plurality of grids in the virtual scene respectively, each grid is configured with an iteration number, and the iteration number of each grid is updated when a virtual object in the corresponding grid changes;

[0018] The third display module is used for:

[0019] In response to switching back from the second field of view to the first field of view, receiving iteration numbers of a plurality of grids in the first field of view sent by a server;

[0020] If the first iteration number exists in the cache, based on the saved virtual objects in the grid to which the first iteration number belongs, the first field of view picture is displayed, and the virtual objects in the grid to which the first iteration number belongs are displayed in the first field of view picture;

[0021] The first iteration number is the same as the received iteration number.

[0022] In some embodiments, the third display module is further used for:

[0023] For a second iteration number other than the first iteration number in the cache, obtaining object data of a virtual object in a grid to which the second iteration number belongs from the server;

[0024] Based on the acquired object data, the first field of view picture is displayed, virtual objects in the grid to which the second iteration number belongs are displayed in the first field of view picture, and the cache is updated based on the acquired iteration number and object data.

[0025] In some embodiments, the apparatus further comprises:

[0026] The first update module is used to update the iteration number of any grid in which the virtual object is placed stored in the cache and save the received virtual object in the cache based on the received iteration number and object data if object data of the virtual object placed in any grid in the cache and the iteration number of any grid in which the virtual object is placed are received.

[0027] In some embodiments, the apparatus further comprises:

[0028] A second updating module is configured to update the iteration number of the first grid, the iteration number of the second grid and the received virtual object stored in the cache based on the received iteration number and the object data if object data of the virtual object moved from the first grid to the second grid, the iteration number of the first grid and the iteration number of the second grid are received;

[0029] The first grid and the second grid are stored in the cache.

[0030] In some embodiments, the apparatus further comprises:

[0031] A third updating module is configured to, if object data of a virtual object moved from a first grid to a second grid and an iteration number of the second grid are received, update the iteration number of the second grid stored in the cache and store the received virtual object in the cache based on the received iteration number and object data;

[0032] The second grid is stored in the cache.

[0033] In some embodiments, storing the virtual object in the cache means storing object data of the virtual object in the cache, and the apparatus further comprises:

[0034] a fourth updating module, configured to, upon receiving an object identifier of a virtual object moved from a first grid to a second grid and an iteration number of the first grid, update the iteration number of the first grid stored in the cache and delete the object data of the virtual object corresponding to the object identifier in the cache based on the received iteration number and object data;

[0035] The first grid is stored in the cache.

[0036] In some embodiments, storing the virtual object in the cache means storing object data of the virtual object in the cache, and the apparatus further comprises:

[0037] a determination module, configured to determine a target number if the sum of the number of received virtual objects and the number of virtual objects stored in the cache is greater than a number threshold, the target number being the difference between the sum of the number of received virtual objects and the number of virtual objects stored in the cache and the number threshold;

[0038] The deleting module is used to delete the object data of the target number of virtual objects whose latest rendering time in the cache is farthest from the current time.

[0039] In some embodiments, storing the virtual object in the cache refers to storing object data of the virtual object in the cache, and the apparatus further comprises:

[0040] The fifth update module is used to update the iteration number of any grid of the virtual object moved out of the virtual scene from any grid in the cache and delete the object data of the virtual object corresponding to the object identifier in the cache based on the received iteration number and object identifier.

[0041] In another aspect, a visual field display device is provided, the device comprising:

[0042] a first sending module, configured to send object data of at least one virtual object in a first field of view to a terminal in response to an object entering the first field of view, wherein the terminal is configured to display the first field of view and store the virtual object in a cache, wherein the cache is configured to store the virtual object displayed in the screen;

[0043] A second sending module, configured to send object data of at least one virtual object in a second field of view to the terminal in response to the object entering the second field of view, and the terminal is configured to display the second field of view;

[0044] The third sending module is used to send switching data to the terminal in response to detecting that the terminal switches from the second field of view picture back to the first field of view picture, wherein the switching data is used to instruct the terminal to display the first field of view picture based on the virtual object stored in the cache.

[0045] In some embodiments, the first field of view picture and the second field of view picture correspond to a plurality of grids in the virtual scene respectively, each grid is configured with an iteration number, and the iteration number of each grid is updated when the virtual object in the corresponding grid changes; the third sending module is used to:

[0046] In response to detecting that the terminal switches from the second field of view back to the first field of view, the iteration numbers of multiple grids in the first field of view are sent to the terminal, and the terminal is used to display the first field of view based on the virtual objects in the grid to which the first iteration number belongs if there is a first iteration number in the cache; wherein the first iteration number is the same as the received iteration number.

[0047] In some embodiments, the apparatus further comprises:

[0048] A receiving module, configured to receive a data acquisition request sent by the terminal, wherein the data acquisition request is triggered based on a second iteration number other than the first iteration number in the cache;

[0049] The third sending module is also used to send object data of virtual objects in the grid to which the second iteration number belongs to the terminal based on the data acquisition request, so that the terminal displays the first field of view and updates the cache based on the acquired iteration number and object data.

[0050] In some embodiments, the apparatus further comprises:

[0051] A first updating module, configured to update the iteration number of the grid where the virtual object is placed in response to any virtual object being placed in any grid in the cache;

[0052] The fourth sending module is used to send the updated iteration number of any grid where the virtual object is placed and the object data of the placed virtual object to the terminal, so that the terminal updates the iteration number of any grid where the virtual object is placed stored in the cache and stores the received virtual object in the cache.

[0053] In some embodiments, the apparatus further comprises:

[0054] A second updating module, configured to update iteration numbers of the first grid and the second grid in response to the virtual object moving from the first grid to the second grid, wherein the first grid and the second grid are stored in the cache;

[0055] The fifth sending module is used to send the updated iteration number of the first grid, the iteration number of the second grid and the object data of the moved virtual object to the terminal, so that the terminal updates the iteration number of the first grid, the iteration number of the second grid and the received virtual object saved in the cache.

[0056] In some embodiments, the apparatus further comprises:

[0057] A third updating module, configured to update the iteration numbers of the first grid and the second grid in response to the virtual object moving from the first grid to the second grid, the second grid being stored in the cache;

[0058] The sixth sending module is used to send the updated iteration number of the second grid and the object data of the moved virtual object to the terminal, so that the terminal updates the iteration number of the second grid and the received virtual object stored in the cache.

[0059] In some embodiments, storing the virtual object in the cache refers to storing object data of the virtual object in the cache, and the apparatus further comprises:

[0060] a fourth updating module, configured to update an iteration number of the first grid and an iteration number of the second grid in response to the virtual object moving from the first grid to the second grid, wherein the first grid is stored in the cache;

[0061] The seventh sending module is used to send the updated iteration number of the second grid and the object identifier of the moved virtual object to the terminal, so that the terminal updates the iteration number of the first grid stored in the cache and deletes the object data of the virtual object corresponding to the object identifier in the cache.

[0062] In some embodiments, storing the virtual object in the cache refers to storing object data of the virtual object in the cache, and the apparatus further comprises:

[0063] a fifth updating module, configured to update an iteration number of any grid of the virtual object that is moved out in response to the virtual object in any grid in the cache being moved out of the virtual scene;

[0064] An eighth sending module is used to send the object identification of the removed virtual object and the updated iteration number of any grid of the removed virtual object to the terminal, so that the terminal updates the iteration number of any grid of the removed virtual object stored in the cache and deletes the object data of the virtual object corresponding to the object identification in the cache.

[0065] On the other hand, a computer device is provided, which includes a processor and a memory, wherein the memory is used to store at least one program, and the at least one program is loaded and executed by the processor to implement the field of view screen display method in the embodiment of the present application.

[0066] On the other hand, a computer-readable storage medium is provided, in which at least one program is stored. The at least one program is loaded and executed by a processor to implement the field of view screen display method in the embodiment of the present application.

[0067] On the other hand, a computer program product is provided, which includes at least one program segment, wherein the at least one program segment is stored in a computer-readable storage medium, a processor of a computer device reads the at least one program segment from the computer-readable storage medium, and the processor executes the at least one program segment, so that the computer device executes the field of view screen display method described in any of the above-mentioned implementation methods.

[0068] The embodiment of the present application provides a method for displaying a visual field, which stores the object data of a virtual object in a displayed visual field in a cache of a terminal, so that when the visual field is switched to the visual field next time, the visual field is displayed directly based on the object data stored in the cache, without the need to obtain the object data from the server. Through this method, even if the visual field of the object is frequently switched, the screen switching can be completed based on the object data stored in the terminal, avoiding the process of the server frequently sending a large amount of object data to the terminal, reducing the amount of data that the server needs to send, saving bandwidth, and thus reducing bandwidth costs. BRIEF DESCRIPTION OF THE DRAWINGS

[0069] In order to more clearly illustrate the technical solutions in the embodiments of the present application, the drawings required for use in the description of the embodiments will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without creative work.

[0070] Figure 1 It is a schematic diagram of an implementation environment provided by an embodiment of the present application;

[0071] Figure 2is a flow chart of a method for displaying a visual field provided in an embodiment of the present application;

[0072] Figure 3 is a flow chart of another method for displaying a visual field provided in an embodiment of the present application;

[0073] Figure 4 is a flow chart of another method for displaying a visual field provided in an embodiment of the present application;

[0074] Figure 5 is a grid schematic diagram in a virtual scene provided in an embodiment of the present application;

[0075] Figure 6 This is a grid diagram corresponding to a field of view switching provided in an embodiment of the present application;

[0076] Figure 7 is a block diagram of a visual field display device provided in an embodiment of the present application;

[0077] Figure 8 is a block diagram of another visual field display device provided in an embodiment of the present application;

[0078] Fig. 9 is a block diagram of a terminal provided in an embodiment of the present application;

[0079] Fig.10 This is a block diagram of a server provided in an embodiment of the present application. DETAILED DESCRIPTION

[0080] In order to make the objectives, technical solutions and advantages of the present application clearer, the implementation methods of the present application will be further described in detail below with reference to the accompanying drawings.

[0081] In this application, the terms "first", "second", etc. are used to distinguish identical or similar items with basically the same effects and functions. It should be understood that there is no logical or temporal dependency between "first", "second", and "nth", nor is there any limitation on quantity and execution order.

[0082] In the present application, the term "at least one" means one or more, and the term "plurality" means two or more.

[0083] It should be noted that the information (including but not limited to user device information, user personal information, etc.), data (including but not limited to data used for analysis, stored data, displayed data, etc.) and signals involved in this application are all authorized by the user or fully authorized by all parties, and the collection, use and processing of relevant data must comply with relevant laws, regulations and standards of relevant countries and regions. For example, the object data involved in this application are all obtained with full authorization.

[0084] The following is an introduction to the professional terms involved in this application:

[0085] Virtual scene: a virtual scene displayed (or provided) when an application is running on a terminal. The virtual scene can be a simulation of the real world, a semi-simulated and semi-fictitious virtual environment, or a purely fictitious virtual environment. The virtual scene can be any of a two-dimensional virtual scene, a 2.5-dimensional virtual scene, or a three-dimensional virtual scene. The embodiments of the present application do not limit the dimensions of the virtual scene. For example, a virtual scene may include the sky, land, ocean, etc. The land may include environmental elements such as deserts and cities, and terminal users can control virtual objects to move in the virtual scene.

[0086] Virtual object: refers to an movable object in the virtual world. The movable object can be at least one of a virtual character, a virtual animal, and a cartoon character. Optionally, when the virtual world is a three-dimensional virtual world, the virtual object can be a three-dimensional stereo model, and each virtual object has its own shape and volume in the three-dimensional virtual world, occupying a part of the space in the three-dimensional virtual world. Optionally, the virtual object is a three-dimensional character built based on three-dimensional human skeleton technology, and the virtual object achieves different external images by wearing different skins. In some implementations, the virtual object can also be implemented using a 2.5-dimensional or 2-dimensional model, which is not limited in the embodiments of the present application.

[0087] The following is an introduction to the implementation environment involved in this application:

[0088] The visual field display method provided in the embodiment of the present application can be executed by a computer device, which can be provided as a server or a terminal. The following is a schematic diagram of the implementation environment of the visual field display method provided in the embodiment of the present application.

[0089] See also Figure 1 , Figure 1 A schematic diagram of an implementation environment of a method for displaying a visual field provided in an embodiment of the present application, the implementation environment comprising a terminal 101 and a server 102. The terminal 101 and the server 102 can be directly or indirectly connected via wired or wireless communication, which is not limited in the present application. In some embodiments, a target application is installed on the terminal 101, and the target application can be a game application. The object logged into the game enters a virtual scene in the game, and the visual field of the object is displayed on the terminal 101. As the object moves, the visual field of the object changes, and then the terminal 101 displays the changed visual field. The server 102 is used to provide background services for the target application. For example, the server 102 is used to provide the terminal 101 with the data required to display the visual field when the object displays the visual field.

[0090] In some embodiments, the terminal 101 can be a smart phone, a tablet computer, a laptop computer, a desktop computer, an intelligent voice interaction device, a smart home appliance, a vehicle terminal, an aircraft, a VR (Virtual Reality) device, an AR (Augmented Reality) device, etc., but is not limited thereto. In some embodiments, the server 102 is an independent server or a server cluster or a distributed system composed of multiple servers. It can also be a cloud server that provides basic cloud computing services such as cloud services, cloud databases, cloud computing, cloud functions, cloud storage, network services, cloud communications, middleware services, domain name services, security services, CDN (Content Delivery Network), and big data and artificial intelligence platforms. In some embodiments, the server 102 mainly undertakes computing work, and the terminal 101 undertakes secondary computing work; or, the server 102 undertakes secondary computing services, and the terminal 101 undertakes the main computing work; or, the server 102 and the terminal 101 use a distributed computing architecture for collaborative computing.

[0091] See also Figure 2 , Figure 2 A flowchart of a method for displaying a visual field provided in an embodiment of the present application, the method is executed by a terminal, and the method includes the following steps.

[0092] 201. A terminal displays a first field of view screen of an object, wherein at least one virtual object is displayed in the first field of view screen, and the at least one virtual object is stored in a cache of the terminal, and the cache is used to store the virtual object displayed in the screen.

[0093] In an embodiment of the present application, the first field of view of the object corresponds to a partial area in the virtual scene. Optionally, the first field of view of the object corresponds to an area in the virtual scene centered at the location of the object and within a preset range from the location.

[0094] In the embodiment of the present application, the first field of view picture may be an initial scene field of view picture after the object enters the virtual scene, or may be other field of view pictures.

[0095] For example, the other field of view may be the field of view corresponding to the area that the object first enters during the movement after entering the virtual scene. Accordingly, the virtual object displayed in the first field of view has not been saved in the cache. At this time, the terminal obtains the object data of the virtual object from the server to display the first field of view, and saves the virtual object displayed in the first field of view in the cache.

[0096] For another example, the other visual field pictures may be any visual field pictures in the virtual scene, and the virtual objects displayed in the first visual field picture may have been cached when previously displayed on the terminal. Accordingly, the terminal currently displays the first visual field picture based on the virtual objects previously stored in the cache.

[0097] In the embodiment of the present application, virtual objects are some objects that are visible, touchable or interactive in the virtual scene, such as tables, chairs, stones, buildings or trees.

[0098] In an embodiment of the present application, the cache is used to save the virtual objects displayed in the screen. Saving virtual objects in the cache means saving the object data of the virtual objects in the cache. The object data is obtained from the server. The object data includes the object type identifier, object identifier and position of the virtual object. The object identifier is a globally unique identifier of the virtual object in the virtual scene, and the position is the position of the virtual object in the virtual scene. The terminal stores rendering data of multiple virtual objects. The terminal finds the rendering data corresponding to the object type identifier and the object identifier from the storage based on the object type identifier and the object identifier in the object data, and then renders the virtual object in the field of view based on the position in the object data.

[0099] In other embodiments, the object data of the virtual object includes the rendering data and position of the virtual object, so that after the terminal obtains the object data, it can directly render the virtual object in the field of view based on the rendering data and position without having to search for the rendering data.

[0100] In an embodiment of the present application, there may be multiple objects in a virtual scene, and the multiple objects correspond to multiple terminals, and the terminal is a terminal where any one of the multiple objects is located.

[0101] 202. If the field of view of the object changes, the terminal displays a second field of view image of the object.

[0102] In the embodiment of the present application, as the position of the object in the virtual scene changes, the field of view of the object changes. At least one virtual object is displayed in the second field of view, and the object data of the at least one virtual object is stored in the cache.

[0103] In the embodiment of the present application, for any visual field, after obtaining the object data of the virtual object in the visual field from the server, the terminal saves the object data in the cache. That is, the object data of the virtual object in any displayed visual field can be queried in the cache.

[0104] 203. In response to switching from the second field of view picture back to the first field of view picture, the terminal displays the first field of view picture based on the virtual object stored in the cache.

[0105] In an embodiment of the present application, since the first field of view has been displayed before, the object data of the virtual objects in the first field of view has been saved in the cache. Therefore, when the first field of view is displayed again, the virtual objects in the first field of view can be directly obtained from the cache of the terminal to display the first field of view without having to obtain it from the server again.

[0106] The embodiment of the present application provides a method for displaying a visual field, which stores the object data of a virtual object in a displayed visual field in a cache of a terminal, so that when the visual field is switched to the visual field next time, the visual field is displayed directly based on the object data stored in the cache, without the need to obtain the object data from the server. Through this method, even if the visual field of the object is frequently switched, the screen switching can be completed based on the object data stored in the terminal, avoiding the process of the server frequently sending a large amount of object data to the terminal, reducing the amount of data that the server needs to send, saving bandwidth, and thus reducing bandwidth costs.

[0107] Above Figure 2 The basic process of the visual field display method is described with the terminal as the execution subject. Figure 3 This article introduces the method of displaying the visual field by taking the server as the execution subject. Figure 3 , Figure 3 A flowchart of a method for displaying a visual field provided in an embodiment of the present application, the method is executed by a server, and the method includes the following steps.

[0108] 301. In response to an object entering a first field of view, a server sends object data of at least one virtual object in the first field of view to a terminal, the terminal is used to display the first field of view and save the virtual object in a cache, and the cache is used to save the virtual object displayed in the screen.

[0109] In the embodiment of the present application, the terminal is the terminal where the object is located. If the object enters the first field of view for the first time, the server sends object data of at least one virtual object in the first field of view to the terminal. The terminal displays the first field of view, and at least one virtual object is displayed in the first field of view.

[0110] 302. In response to the object entering the second field of view, the server sends object data of at least one virtual object in the second field of view to the terminal, and the terminal is used to display the second field of view.

[0111] In an embodiment of the present application, if the object enters the second field of view for the first time, the server sends object data of at least one virtual object in the second field of view to the terminal, and the terminal saves the object data of at least one virtual object in the second field of view in a cache. The terminal displays the second field of view, and at least one virtual object is displayed in the second field of view.

[0112] 303. In response to detecting that the terminal switches from the second field of view picture back to the first field of view picture, the server sends switching data to the terminal, where the switching data is used to instruct the terminal to display the first field of view picture based on the virtual object stored in the cache.

[0113] In the embodiment of the present application, the switching data does not carry object data. Further, the switching data carries the screen identifier of the first field of view, so that the terminal obtains the object data of the virtual object in the first field of view from the cache based on the screen identifier, and then displays the first field of view.

[0114] The embodiment of the present application provides a method for displaying a visual field, which stores the object data of a virtual object in a displayed visual field in a cache of a terminal, so that when the visual field is switched to the visual field next time, the visual field is displayed directly based on the object data stored in the cache, without the need to obtain the object data from the server. Through this method, even if the visual field of the object is frequently switched, the screen switching can be completed based on the object data stored in the terminal, avoiding the process of the server frequently sending a large amount of object data to the terminal, reducing the amount of data that the server needs to send, saving bandwidth, and thus reducing bandwidth costs.

[0115] Through the above Figure 2 and Figure 3 The embodiment briefly introduces the basic process of visual field display. Figure 4 The embodiment of the present invention further introduces the process of displaying the visual field in detail. The method is described by taking the interaction process between the terminal and the server as an example. The method includes the following steps.

[0116] 401. In response to an object entering a first field of view, a server sends object data of at least one virtual object in the first field of view to a terminal, the terminal is used to display the first field of view and save the virtual object in a cache, and the cache is used to save the virtual object displayed in the screen.

[0117] In some embodiments, the virtual scene is divided into multiple grids, and any field of view of the object corresponds to multiple grids in the virtual scene, and the multiple grids corresponding to any field of view are centered on the grid where the object is located.

[0118] In some embodiments, the virtual scene is divided into x equal parts horizontally and y equal parts vertically, that is, the entire virtual scene is a combination of several small squares, and a small square is a grid (Around). Optionally, virtual objects in a grid will enter or leave the object's field of view at one time.

[0119] Optionally, the horizontal number and the vertical number of the multiple grids corresponding to the field of view are the same, such as the multiple grids are 3×3 nine-grid grids, or 4×4 16-grid grids, which are not specifically limited here. Figure 5 , Figure 5 1 is a schematic diagram of a grid in a virtual scene provided by an embodiment of the present application, wherein the multiple grids corresponding to the field of view of the object include 8 grids centered on the grid where the object is located and the grid where the object is located.

[0120] In an embodiment of the present application, the object data includes an object type identifier, an object identifier, and a position of a virtual object, and further includes a grid identifier of a grid where the virtual object is located. The grid identifier of each grid is a position number of the grid among multiple grids. Optionally, a grid identifier corresponds to a grid coordinate, which is used to indicate the coordinate of the grid among multiple grids, and the grid coordinate includes a grid horizontal coordinate and a grid vertical coordinate, that is, indicating which grid the grid is in the horizontal direction and which grid the grid is in the vertical direction.

[0121] In some embodiments, each grid includes at least one virtual object. Accordingly, the object data of at least one virtual object in the first field of view is the object data of the virtual objects in the multiple grids corresponding to the first field of view. The server sending the object data of at least one virtual object in the first field of view to the terminal means that the server sends the grid identifier of each grid corresponding to the first field of view and the object data of the virtual object in each grid to the terminal.

[0122] 402. The terminal receives object data of at least one virtual object in a first field of view, displays the first field of view based on the object data of at least one virtual object in the first field of view, and stores at least one virtual object in the first field of view in a cache.

[0123] The terminal renders the virtual object in each grid in the grid based on the grid identifier of each grid corresponding to the first field of view and the object data of the virtual object in each grid to display the first field of view.

[0124] In some embodiments, rendering data of multiple virtual objects are stored on the terminal. The terminal finds rendering data corresponding to the object type identifier and the object identifier from the storage based on the object type identifier and the object identifier in the object data, and then renders the virtual object in the field of view based on the position and grid identifier in the object data.

[0125] It should be noted that when the object enters the first field of view for the first time, the object data of the virtual objects in the multiple grids corresponding to the first field of view are not saved on the terminal side, so the first field of view needs to be displayed based on the object data sent by the server.

[0126] In the embodiment of the present application, the virtual objects in the grid may change, such as when the virtual objects are placed in the grid, or when the virtual objects are moved out of the grid, or when the virtual objects move in the grid. Therefore, each grid is configured with an iteration number, and the iteration number of each grid is updated when the virtual objects in the corresponding grid change. Updating the iteration number means adding 1 to the iteration number, that is, when the virtual objects in the grid change, the server adds 1 to the iteration number of the grid. Each update of the iteration number is based on the previous update, that is, the iteration number is iteratively updated.

[0127] Accordingly, when the server sends the object data of each grid to the terminal, it also sends the latest iteration number of each grid to the terminal. Optionally, the iteration number of each grid saved on the server and the terminal is a 64-bit positive integer, and the iteration number of each grid is initialized to 0. The iteration number of each grid saved on the terminal is synchronously determined by the iteration number of the same grid on the server, that is, each time the server sends the iteration number of any grid to the terminal, the terminal updates the saved iteration number of the grid based on the received iteration number.

[0128] The cache stores iteration numbers of multiple grids and object data after changes that match the iteration numbers, that is, the iteration number and object data of any grid stored in the cache correspond to the same change of the virtual object in the grid.

[0129] 403. In response to the object entering the second field of view, the server sends object data of at least one virtual object in the second field of view to the terminal.

[0130] In the embodiment of the present application, the process of the server sending the object data to the terminal in step 403 is the same as step 401 and will not be repeated here.

[0131] 404. The terminal receives object data of at least one virtual object in the second field of view, and displays the second field of view based on the object data of the at least one virtual object in the second field of view.

[0132] In the embodiment of the present application, the process of the terminal displaying the second field of view in step 404 is the same as step 402, and will not be repeated here. The terminal also stores at least one virtual object in the second field of view in a cache.

[0133] 405. In response to detecting that the terminal switches from the second field of view picture back to the first field of view picture, the server sends iteration numbers of multiple grids in the first field of view picture to the terminal.

[0134] In some embodiments, because the perspective of the object changes or the object moves in the same grid, that is, the grid where the object is located has not changed, the grids corresponding to the first field of view picture and the second field of view picture are the same. Accordingly, the terminal can switch the field of view picture based on the locally cached data, without the need for the server to synchronize the field of view of the terminal. Optionally, when the field of view picture changes, the server determines whether the grid where the object is located has changed, that is, detects whether the player crosses the boundary between the grids to decide whether to execute step 405.

[0135] In some embodiments, since the grids belonging to both the second visual field and the first visual field do not need to be updated, the multiple grids in the first visual field sent by the server to the terminal belong to the first visual field but not to the second visual field. Therefore, before sending the iteration number to the terminal, the server also determines the first grid based on the grids corresponding to the first visual field and the second visual field respectively.

[0136] In some embodiments, the server sets a new entry list for the object, and the new entry list is used to store the first grid. Optionally, when the grid where the object is located changes, the server recalculates the multiple grids within the field of view and the multiple grids within the field of view before the change, that is, respectively determines the multiple grids corresponding to the first field of view picture and the second field of view picture, and then obtains the multiple grids that belong to the first field of view picture but not to the second field of view picture, and stores the multiple grids in the new entry list. Among them, the grid identifiers of the multiple grids are stored in the new entry list. Then, based on the multiple grids stored in the new entry list, the iteration numbers of the multiple first grids are sent to the terminal.

[0137] For example, see Figure 6 , Figure 6 This is a schematic diagram of a grid corresponding to a field of view switching provided by an embodiment of the present application. When the grid where the object is located in the virtual scene changes, the grid corresponding to the field of view changes, and then multiple grids belonging to the new list can be determined.

[0138] The server also sends grid identifiers of multiple grids to the terminal, so that the terminal can query the corresponding iteration number based on the grid identifiers.

[0139] In the embodiment of the present application, the process of the server sending switching data to the terminal in response to detecting that the terminal switches from the second field of view to the first field of view is implemented through the above step 405. In this embodiment, since the terminal has previously displayed the first field of view, the terminal has already saved the object data of the virtual object in the first field of view, and only the iteration number is sent. In this way, when the iteration numbers are the same, the terminal can directly display the first field of view based on the object data saved in the cache without sending the object data again, thereby reducing the amount of data sent and saving bandwidth.

[0140] It should be noted that the above step 405 is only an optional implementation method for implementing the process. The process can also be implemented by other optional implementation methods, such as directly sending object data, which is not specifically limited here.

[0141] 406. The terminal receives iteration numbers of multiple grids in the first field of view. If the first iteration number exists in the cache, the first field of view is displayed based on the virtual objects in the grid to which the first iteration number belongs that are saved, and the virtual objects in the grid to which the first iteration number belongs are displayed in the first field of view; wherein the first iteration number is the same as the received iteration number.

[0142] In this embodiment, the iteration numbers of some or all of the received multiple grids are the same as the iteration numbers stored in the cache.

[0143] In the embodiment of the present application, the process of displaying the first field of view image based on the virtual object stored in the cache in response to switching from the second field of view image back to the first field of view image is implemented through the above step 406. In this embodiment, the iteration number sent by the server is the same as the iteration number stored in the cache. Since the iteration number corresponds to the object data, it means that the object data stored in the cache is the latest object data, and then the first field of view image is displayed based on the object data stored in the cache. Not only does it not need to obtain the object data from the server, the data transmission volume is reduced, the bandwidth is saved, and the accuracy of the object data is guaranteed, thereby improving the accuracy of the displayed first field of view image.

[0144] It should be noted that the above step 406 is only an optional implementation method for implementing the process. The process can also be implemented by other optional implementation methods, such as directly displaying the field of view based on the stored object data, which is not specifically limited here.

[0145] 407. If a second iteration number other than the first iteration number exists in the cache, the terminal sends a data acquisition request to the server.

[0146] In an embodiment of the present application, the iteration numbers of some or all of the received multiple grids are different from the iteration numbers stored in the cache.

[0147] In some embodiments, the data acquisition request carries the grid identifiers of multiple grids whose iteration numbers sent by the server are different from the iteration numbers stored in the cache, so that the server can send the object data of the virtual objects in these grids to the terminal based on the grid identifiers. Accordingly, the data acquisition request is used to request to obtain the object data of the virtual objects in these multiple grids. In addition, the embodiment of the present application concentrates the grid identifiers of multiple grids in one data acquisition request and sends it to the server, which reduces the number of data transmissions and thus improves the transmission efficiency.

[0148] In other embodiments, each data acquisition request corresponds to a grid, that is, the data acquisition request of any grid carries the grid identifier of the grid, and is used to request to acquire the object data of the virtual object in the grid.

[0149] 408. The server receives the data acquisition request, and based on the data acquisition request, sends the object data of the virtual object in the grid to which the second iteration number belongs to the terminal.

[0150] If the data acquisition request corresponds to one grid, the server sends the object data of the virtual object in the grid to the terminal. If the data acquisition request corresponds to multiple grids, the server sends the object data of the virtual objects in the multiple grids to the terminal. The terminal is used to display the first field of view and update the cache based on the obtained iteration number and object data.

[0151] In an embodiment of the present application, when the server sends the object data of the virtual object in the grid belonging to the second iteration number to the terminal, it also sends the grid identifier of the grid to the terminal, so that the terminal can determine the grid to which the object data belongs based on the grid identifier.

[0152] 409. The terminal receives object data of virtual objects in the grid to which the second iteration number belongs, displays the first field of view screen based on the object data of virtual objects in the grid to which the second iteration number belongs, displays the object data of virtual objects in the grid to which the second iteration number belongs in the first field of view screen, and updates the cache based on the received iteration number and object data.

[0153] In an embodiment of the present application, the iteration number sent by the server is different from the iteration number stored in the cache. Since the iteration number corresponds to object data, it means that the object data stored in the cache is not the latest object data, and then the latest object data is obtained from the server to display the first field of view image, thereby ensuring the accuracy of the object data and thus ensuring the accuracy of the displayed field of view image.

[0154] In some embodiments, the iteration number and object data of any first grid saved in the cache are updated, that is, the iteration number and object data of any first grid saved are deleted, and the iteration number and object data of the first grid are saved as the received iteration number and object data to ensure the timeliness of the data saved in the cache.

[0155] In some embodiments, when the server sends the object data of the virtual object in any grid to the terminal, it also sends the iteration number of the grid to the server. Since the object data of the virtual object in the grid may change during the process of the terminal sending the data acquisition request to the server, resulting in a change in the iteration number, the iteration number is sent again while the object data is sent, ensuring that the iteration number is an iteration number that matches the latest object data, thereby ensuring the accuracy of the data stored in the cache.

[0156] In some embodiments, in order to prevent the data stored in the terminal from growing to an unacceptable level, it is also necessary to control the amount of data stored in the terminal. If the sum of the number of received virtual objects and the number of virtual objects stored in the cache is greater than the number threshold, the terminal determines a target number, which is the difference between the sum of the number of received virtual objects and the number of virtual objects stored in the cache and the number threshold; the object data of the target number of virtual objects whose latest rendering time in the cache is farthest from the current time is deleted. The number threshold is the maximum number of virtual objects that the terminal allows the cache to store, and the number threshold is greater than the upper limit of the number of virtual objects that can be placed in a single grid.

[0157] In this embodiment, since it is highly likely that virtual objects whose rendering time is far from the current time will not be displayed in the near future and their object data are highly likely to change, the object data of virtual objects whose rendering time is farthest from the current time is deleted to control the upper limit of the object data of virtual objects that can be stored in the cache. This not only avoids the growth of data stored in the terminal to an unacceptable level, but also ensures the rationality of data deletion.

[0158] In other embodiments, if the sum of the number of received virtual objects and the number of virtual objects stored in the cache is greater than the number threshold, the terminal directly deletes the object data of the first number of virtual objects whose latest rendering time is farthest from the current time in the cache, where the first number is the number of received virtual objects, to improve data cache efficiency. Alternatively, if the number of received virtual objects (SYNC_NUM) is greater than the number threshold (CACHE_ENTITY_MAX_NUM), the terminal directly deletes the object data of the first number of virtual objects whose latest rendering time is farthest from the current time in the cache, to improve efficiency.

[0159] In some embodiments, the cache also stores the latest rendering time of multiple virtual objects, that is, the rendering time of each virtual object is the rendering time closest to the current time among the multiple rendering times. After rendering based on any virtual object, the rendering time of the virtual object stored in the cache is updated to the current time. Optionally, multiple virtual objects are sorted in the cache according to their latest rendering time, that is, the closer the latest rendering time is to the current time, the higher the sorting. Accordingly, when the terminal deletes the object data of the target number of virtual objects whose latest rendering time is farthest from the current time in the cache, it can directly delete the object data of the target number of virtual objects sorted at the end, thereby improving processing efficiency.

[0160] In an embodiment of the present application, after receiving the object data of multiple virtual objects, the terminal deletes part of the object data in the cache to save the received object data of the multiple virtual objects in the cache.

[0161] In some embodiments, when the object first enters the virtual scene, the terminal does not save the object data of the virtual objects in the virtual scene, and the server is required to send the object data to the terminal so that it can display the field of view. In response to the object first entering the virtual scene, the server determines the multiple grids corresponding to the field of view when the object first enters the virtual scene; the server sends the iteration numbers of the multiple grids and the object data of the virtual objects in the multiple grids to the terminal, so that the terminal displays the field of view based on the object data, and saves the iteration numbers of the multiple grids and the virtual objects in the multiple grids in the cache. In this embodiment, since the object enters the virtual scene for the first time, the terminal side does not save the corresponding object data, so the object data is sent directly to the terminal, ensuring the rationality and accuracy of the interaction.

[0162] In some embodiments, if the cache does not store the iteration number of any mesh that has not been displayed before, the iteration number of the mesh is obtained from the server and then directly saved. In other embodiments, the cache stores the initial iteration number of any mesh in the virtual scene, and the terminal updates the initial iteration number of any mesh stored in the cache to the received iteration number of the mesh. The server also sends the mesh identifiers of multiple meshes to the terminal, so that the terminal can save the iteration numbers and object data of the received multiple meshes based on the mesh identifiers.

[0163] In some embodiments, after the terminal receives data of multiple second grids, in order to prevent the data stored in the terminal from growing to an unacceptable level, it is also necessary to control the amount of data stored in the terminal. If the sum of the number of received virtual objects and the number of virtual objects stored in the cache is greater than the number threshold, the terminal determines a target number, which is the difference between the sum of the number of received virtual objects and the number of virtual objects stored in the cache and the number threshold; deletes the object data of the target number of virtual objects whose latest rendering time in the cache is the farthest from the current time.

[0164] 410. In response to detecting that the terminal switches from the second field of view to the first field of view, the server sends object identifiers of virtual objects in a plurality of grids in the second field of view to the terminal.

[0165] In some embodiments, since the grids that belong to both the second field of view and the first field of view do not need to be updated, and the virtual objects in the grids that belong to the second field of view but not the first field of view need to be deleted, the grids corresponding to the virtual objects in the multiple grids in the second field of view sent by the server to the terminal belong to the second field of view but not the first field of view. Therefore, before sending the iteration number to the terminal, the server also determines the multiple grids based on the grids corresponding to the first field of view and the second field of view, respectively.

[0166] In some embodiments, the server sets a removal list for the object, and the removal list is used to store grids that belong to the second field of view but not to the first field of view. Then, the server sends object identifiers of virtual objects in the multiple grids stored in the removal list to the terminal.

[0167] The removal list is used to store grids that belong to the second field of view but not to the first field of view. Optionally, when the grid where the object is located changes, the server recalculates the multiple grids within the field of view and the multiple grids within the field of view before the change, that is, respectively determines the multiple grids corresponding to the first field of view and the second field of view, and then obtains the multiple grids that belong to the second field of view and do not belong to the first field of view, and stores these multiple grids in the removal list. The grid identifiers of these multiple grids are stored in the removal list. Then, based on the multiple grids stored in the removal list, the object identifiers of the virtual objects in these multiple grids are sent to the terminal.

[0168] For example, see Figure 6 , Figure 6 This is a schematic diagram of a grid corresponding to a field of view switching provided by an embodiment of the present application. When the grid where the object is located in the virtual scene changes, the grid corresponding to the field of view changes, and then multiple grids belonging to the removal list can be determined.

[0169] In an embodiment of the present application, the object data of the virtual object in the grid includes the grid identifier of the grid, thereby facilitating the server to find the object identifier of the virtual object in the grid based on the grid identifier of the grid.

[0170] In other embodiments, the server sends the grid identifiers of the multiple grids to the terminal. Since the object data of the virtual objects stored in the terminal includes the grid identifier of the grid where the virtual objects are located, the terminal can query the object identifier of the virtual object corresponding to the grid identifier from the cache based on the grid identifier, and then delete it from the field of view based on the object identifier.

[0171] The server sends the object identification to the terminal so that the terminal deletes the virtual objects in the plurality of grids in the second field of view from the second field of view to display the first field of view. In some embodiments, the server also sends the grid identification of the plurality of grids to the terminal so that the terminal can determine the grid where the virtual object to be deleted is located based on the grid identification to improve efficiency.

[0172] 411. The terminal receives object identifiers of virtual objects in multiple grids in the second field of view, and based on the object identifiers of the virtual objects in the multiple grids in the second field of view, deletes the virtual objects in the multiple grids in the second field of view from the second field of view to display the first field of view.

[0173] In some embodiments, the virtual objects in the second grid constitute the visual field corresponding to the second grid. Accordingly, the virtual objects in the second grid are deleted from the second visual field, so that the grid corresponding to the first visual field no longer includes the second grid. In other embodiments, the second grid also includes other content besides the virtual objects. In this case, the terminal not only deletes the virtual objects in the second grid from the second visual field, but also deletes other content in the second grid, so that the grid corresponding to the first visual field no longer includes the second grid.

[0174] It should be noted that the serial numbers of the above steps 405-409 and steps 410-411 are only for the convenience of explanation and are not used to limit the execution order of the two. For example, the server may execute steps 405-409 first and then steps 410-411, or may execute steps 410-411 first and then steps 405-409, or may execute steps 405-409 and steps 410-411 simultaneously to improve the display efficiency of the field of view.

[0175] In some embodiments, after any virtual object is placed in the virtual scene, if the grid is saved in the cache of any object, the cache needs to be updated based on the changes in the grid. In response to any virtual object being placed in any grid in the cache, the server updates the iteration number of the grid where the virtual object is placed; the server sends the updated iteration number of the grid where the virtual object is placed and the object data of the placed virtual object to the terminal, so that the terminal updates the iteration number of the grid where the virtual object is placed stored in the cache and saves the received virtual object in the cache. Correspondingly, if the terminal receives the object data of the virtual object placed in any grid in the cache and the iteration number of the grid where the virtual object is placed, based on the received iteration number and object data, the iteration number of the grid where the virtual object is placed stored in the cache is updated and the received virtual object is saved in the cache.

[0176] Furthermore, if the grid corresponding to the current field of view of the terminal includes the grid where the placed virtual object is located, it is necessary to render the virtual object into the field of view of the object. The terminal displays the placed virtual object in the field of view based on the received object data. If the grids corresponding to the field of view of multiple objects include the grid where the placed virtual object is located, it is necessary to render the virtual object into the field of view of the multiple objects. Accordingly, the server sends iteration numbers and object data to the multiple terminals where the multiple objects are located, so that the multiple terminals display the placed virtual objects in their respective fields of view, update the iteration numbers in their respective caches, and save the placed virtual objects.

[0177] In this embodiment, after any virtual object is placed in the virtual scene, the iteration number of the grid where it is placed changes, so the iteration number of the grid is updated, and then the object data of the virtual object and the iteration number of the grid are directly sent to the terminal, and the iteration number saved in the cache is updated based on the updated iteration number, so that the iteration number saved in the cache can be updated in time, that is, the accuracy of the data saved in the cache is guaranteed, and it is convenient for the terminal to display the virtual object that has newly entered the virtual scene in the field of view based on the object data.

[0178] In some embodiments, multiple virtual objects are placed in a virtual scene at the same time, so that the terminal receives object data of multiple virtual objects at the same time. In order to prevent the data stored in the terminal from growing to an unacceptable level, it is also necessary to control the amount of data stored in the terminal. If the sum of the number of received virtual objects and the number of virtual objects stored in the cache is greater than the number threshold, a target number is determined, which is the difference between the sum of the number of received virtual objects and the number of virtual objects stored in the cache and the number threshold; the object data of the target number of virtual objects whose latest rendering time in the cache is the farthest from the current time is deleted.

[0179] In some embodiments, if the position of any virtual object in the virtual scene changes, if the cache includes the grid where the virtual object was located before the change, the grid where the virtual object was located after the change, or the grids where the virtual object was located before and after the change, then the cache of the object needs to be updated based on the position change of the virtual object. Therefore, the following situations are included.

[0180] In one case, in response to a virtual object moving from a first grid to a second grid, the server updates the iteration numbers of the first grid and the second grid, and the first grid and the second grid are stored in a cache; the updated iteration number of the first grid, the iteration number of the second grid, and the object data of the moved virtual object are sent to the terminal, so that the terminal updates the iteration number of the first grid, the iteration number of the second grid, and the received virtual object stored in the cache. Correspondingly, if the object data of the virtual object moving from the first grid to the second grid, the iteration number of the first grid, and the iteration number of the second grid are received, the iteration number of the first grid, the iteration number of the second grid, and the received virtual object stored in the cache are updated based on the received iteration number and object data; wherein the first grid and the second grid are stored in the cache.

[0181] The server also sends the grid identifier of the first grid and the grid identifier of the second grid to the terminal, so that the terminal finds the corresponding iteration number based on the grid identifier to perform the update. The object data of any virtual object includes the grid identifier of the grid where it is located. Therefore, updating the received virtual object is to update the position included in the object data of the virtual object and the grid where the virtual object is located. Updating the grid where the virtual object is located is to update the grid identifier included in the object data to the grid identifier of the second grid.

[0182] In this case, the object data includes the changed position of the virtual object. Since the virtual object whose position has changed has been rendered and displayed on the terminal side before, and its object type identifier has been stored on the terminal side, the server can only send the object identifier and the changed position of the virtual object to the terminal, so that the terminal only needs to change the position of the second virtual object, thereby reducing the amount of data transmission and saving bandwidth.

[0183] Furthermore, if the grid corresponding to the current field of view of the terminal includes the first grid and the second grid, the position change of the virtual object needs to be updated to the field of view of the object. If the grids corresponding to the field of view of multiple objects include the first grid and the second grid, the position change of the virtual object needs to be updated to the field of view of the multiple objects. Accordingly, the server sends object data and iteration numbers to the terminals where the multiple objects are located, respectively, to update their respective field of view and cache.

[0184] In another case, in response to the virtual object moving from the first grid to the second grid, the server updates the iteration numbers of the first grid and the second grid, and the second grid is stored in the cache; the updated iteration number of the second grid and the object data of the moved virtual object are sent to the terminal, so that the terminal updates the iteration number of the second grid and the received virtual object stored in the cache. Correspondingly, if the terminal receives the object data of the virtual object moved from the first grid to the second grid and the iteration number of the second grid, based on the received iteration number and object data, the iteration number of the second grid stored in the cache is updated and the received virtual object is stored in the cache; wherein the second grid is stored in the cache.

[0185] In this case, since the object data of the second virtual object has changed, it is necessary to render and save the latest object data based on the latest object data, regardless of whether the object data of the second virtual object has been previously saved in the cache. Therefore, the object data of the second virtual object is directly sent to the terminal, so that if it has been previously saved, the previously saved data is updated based on the received object data, and if it has not been previously saved, it is directly saved, thereby improving the interaction efficiency.

[0186] In some embodiments, if the first grid belongs to other field of view images that have been previously displayed on the terminal, the first grid is also stored in the cache; accordingly, the server also sends the updated iteration number of the first grid to the terminal so that the terminal updates the iteration number of the first grid stored in the cache.

[0187] Furthermore, if the grid corresponding to the current field of view of the terminal includes the second grid but does not include the first grid, the virtual object needs to be rendered into the field of view of the object. If the grids corresponding to the field of view of multiple objects include the second grid but do not include the first grid, the virtual object needs to be rendered into the field of view of the multiple objects. Accordingly, the server sends object data and iteration numbers to the terminals where the multiple objects are located, respectively, to update their respective field of view and cache.

[0188] In this case, the terminal receives at least one virtual object. In order to prevent the data stored in the terminal from growing to an unacceptable level, the amount of data stored in the terminal needs to be controlled. If the sum of the number of received virtual objects and the number of virtual objects stored in the cache is greater than the number threshold, a target number is determined, which is the difference between the sum of the number of received virtual objects and the number of virtual objects stored in the cache and the number threshold; the object data of the target number of virtual objects whose latest rendering time in the cache is farthest from the current time is deleted.

[0189] In another case, in response to a virtual object moving from a first grid to a second grid, the server updates the iteration number of the first grid and the iteration number of the second grid, and the first grid is stored in a cache; the updated iteration number of the second grid and the object identifier of the moved virtual object are sent to the terminal, so that the terminal updates the iteration number of the first grid stored in the cache and deletes the object data of the virtual object corresponding to the object identifier in the cache. Correspondingly, if the terminal receives the object identifier of the virtual object moved from the first grid to the second grid and the iteration number of the first grid, based on the received iteration number and object data, the iteration number of the first grid stored in the cache is updated and the object data of the virtual object corresponding to the object identifier in the cache is deleted.

[0190] In some embodiments, the second grid belongs to other field of view images that have been previously displayed on the terminal, and the second grid is also stored in the cache; accordingly, the server also sends the updated iteration number of the second grid to the terminal, so that the terminal updates the iteration number of the second grid stored in the cache.

[0191] In this case, since the removed virtual object needs to be deleted from the cache, the second virtual object can be directly deleted based on the object identifier, and the server no longer needs to send object data such as the location of the virtual object to the terminal, thereby reducing data transmission volume and saving bandwidth.

[0192] Furthermore, if the grid corresponding to the current field of view of the terminal includes the first grid but does not include the second grid, the virtual object needs to be deleted from the field of view of the object. If the grids corresponding to the field of view of multiple objects include the first grid but do not include the second grid, the virtual object needs to be deleted from the field of view of the multiple objects. Accordingly, the server sends object identifiers and iteration numbers to the terminals where the multiple objects are located, respectively, to update their respective field of view and cache.

[0193] It should be noted that, in any of the above situations, when the server sends the iteration number of any grid, it also sends the grid identifier of the grid, so as to update the iteration number based on the grid identifier.

[0194] In some embodiments, the server determines a plurality of third grids (Set_1) corresponding to the first grid (Around_1), the plurality of third grids including the first grid, and the plurality of third grids are centered on the first grid, and the grid corresponding to the field of view corresponding to the object located in the plurality of third grids includes the first grid. The server determines a plurality of fourth grids (Set_2) corresponding to the second grid (Around_2), the plurality of fourth grids including the second grid, and the plurality of fourth grids are centered on the second grid, and the field of view corresponding to the object located in the fourth grid includes the second grid. The server determines the retention list, the new entry list, and the removal list of the virtual objects whose positions have moved based on the plurality of third grids and the plurality of fourth grids.

[0195] Among them, the retention list stores multiple grid identifiers of the sixth grid, and the sixth grid belongs to multiple third grids and multiple fourth grids. The new entry list stores multiple grid identifiers of the seventh grid, and the seventh grid belongs to multiple fourth grids and does not belong to multiple third grids. The removal list stores multiple eighth grids, and multiple eighth grids belong to multiple third grids and do not belong to multiple fourth grids. Or, the retention list stores multiple terminal identifiers of multiple terminals corresponding to multiple sixth grids. The new entry list stores multiple terminal identifiers of multiple terminals corresponding to multiple seventh grids. The removal list stores multiple terminal identifiers of multiple terminals corresponding to multiple eighth grids. Correspondingly, the server executes the first case based on multiple retention lists, that is, sends the updated iteration number and the changed position of the first grid and the second grid to multiple terminals in the retention list. The second case is executed based on the new entry list, that is, the iteration number and object data of the first grid and the second grid are sent to multiple terminals in the new entry list. The third case is executed based on the removal list, that is, the iteration number and object identifier of the first grid and the second grid are sent to multiple terminals in the removal list.

[0196] In some embodiments, the grids where the virtual object is located before and after the position changes may be the same, that is, the first grid is the same as the second grid, and the new entry list and the removal list are empty, and only the first case needs to be executed based on the retention list. If the new entry list is not empty, the second case is executed based on the new entry list. If the removal list is not empty, the third case is executed based on the removal list.

[0197] In some embodiments, when any virtual object is moved out of the virtual scene, if the cache grid of any object includes the grid where the virtual object was before being moved out of the virtual scene, the cache needs to be updated based on the moved virtual object.

[0198] In which, in response to a virtual object in any grid in the cache being moved out of the virtual scene, the server updates the iteration number of the grid of the virtual object being moved out; the server sends the object identification of the virtual object being moved out and the updated iteration number of the grid of the virtual object being moved out to the terminal, so that the terminal updates the iteration number of the grid of the virtual object being moved out stored in the cache and deletes the object data of the virtual object corresponding to the object identification in the cache. Correspondingly, if the terminal receives the object identification of the virtual object being moved out of the virtual scene from any grid in the cache and the iteration number of the grid of the virtual object being moved out, based on the received iteration number and object identification, the iteration number of the grid of the virtual object being moved out stored in the cache is updated and the object data of the virtual object corresponding to the object identification in the cache is deleted.

[0199] Optionally, since the virtual object is removed from the virtual scene, the terminal no longer needs to display the field of view based on the object data of the virtual object, and the object data of the virtual object stored in the cache is deleted to save the storage resources of the terminal. In this embodiment, since the virtual object needs to be deleted from the virtual scene, the virtual object can be directly deleted based on the object identifier, and the server no longer needs to send data such as the location of the virtual object to the terminal, thereby reducing the amount of data transmission and saving bandwidth. And because the virtual object is removed from the grid, the iteration number of the grid is updated, so the iteration number of the grid is sent to the terminal at the same time, which is convenient for the terminal to update the iteration number stored in the cache, and the iteration number stored in the cache is updated in time, that is, the accuracy of the data stored in the cache is guaranteed.

[0200] Furthermore, if the grid corresponding to the current field of view of the terminal includes the grid of the removed virtual object, the terminal deletes the virtual object from the field of view of the object. If the grids corresponding to the field of view of multiple objects include the grid of the removed object, the virtual object needs to be deleted from the field of view of the multiple objects. Accordingly, the server sends object identifiers and iteration numbers to the terminals where the multiple objects are located, respectively, to update their respective field of view and cache.

[0201] The embodiment of the present application provides a method for displaying a visual field, which establishes an object data cache of a virtual object on the terminal side, so that when any grid no longer belongs to the visual field of the object, the terminal deletes the display of the corresponding virtual object in the visual field of the object, but the original object data (such as object type identification, object identification, location, etc.) used for displaying the virtual object is stored in the terminal, so that when the grid re-enters the visual field of the object, the terminal can directly obtain the object data of the corresponding virtual object in the cache without having to be synchronized by the server. And in implementation, considering that the cache will cause an increase in the terminal's memory overhead, a quantity threshold mechanism is set to ensure that the terminal will not occupy an unacceptable amount of memory due to the cache.

[0202] The method for displaying the visual field provided in the embodiment of the present application can greatly reduce the amount of data that the server needs to synchronize to the client when the object frequently crosses the same boundary, thereby improving the user experience and reducing the cost of the game operator. The objects participating in the virtual game can have a smoother experience without significantly increasing the bandwidth cost. The method provided in the embodiment of the present application is suitable for high-density object scenes, and the number of virtual objects in a single grid can be as high as 10,000.

[0203] In some virtual scenes, 5,000 virtual objects are placed in each grid. There are 300 objects in the virtual scene that move and fight, and the objects cross the grid boundary once per second on average. In this scenario, the average single-person downstream traffic in the traditional field of view display method and the method provided in the embodiment of the present application were tested respectively. The average single-person downstream traffic corresponding to the traditional field of view display method and the method provided in the embodiment of the present application was 820KB / s and 70KB / s, respectively. It can be seen from the test results that the method provided in the embodiment of the present application can significantly reduce the single-person downstream traffic, thereby saving bandwidth.

[0204] The embodiment of the present application provides a method for displaying a visual field, which stores the object data of a virtual object in a displayed visual field in a cache of a terminal, so that when the visual field is switched to the visual field next time, the visual field is displayed directly based on the object data stored in the cache, without the need to obtain the object data from the server. Through this method, even if the visual field of the object is frequently switched, the screen switching can be completed based on the object data stored in the terminal, avoiding the process of the server frequently sending a large amount of object data to the terminal, reducing the amount of data that the server needs to send, saving bandwidth, and thus reducing bandwidth costs.

[0205] Figure 7 A block diagram of a visual field synchronization device provided according to an embodiment of the present application. Figure 7 , the device comprises:

[0206] A first display module 701 is used to display a first field of view of an object, wherein at least one virtual object is displayed in the first field of view, and the at least one virtual object is stored in a cache of the terminal, and the cache is used to store the virtual object displayed in the screen;

[0207] The second display module 702 is used to display a second field of view of the object if the field of view of the object changes;

[0208] The third display module 703 is used for displaying the first field of view picture based on the virtual object stored in the cache in response to switching from the second field of view picture back to the first field of view picture.

[0209] In some embodiments, the first field of view picture and the second field of view picture correspond to a plurality of grids in the virtual scene respectively, each grid is configured with an iteration number, and the iteration number of each grid is updated when a virtual object in the corresponding grid changes;

[0210] The third display module 703 is used to:

[0211] In response to switching from the second field of view picture back to the first field of view picture, receiving iteration numbers of multiple grids in the first field of view picture sent by the server;

[0212] If the first iteration number exists in the cache, based on the virtual objects in the grid to which the first iteration number is stored, the first field of view screen is displayed, and the virtual objects in the grid to which the first iteration number belongs are displayed in the first field of view screen;

[0213] The first iteration number is the same as the received iteration number.

[0214] In some embodiments, the third display module 703 is further used to:

[0215] For a second iteration number other than the first iteration number in the cache, obtaining object data of a virtual object in a grid to which the second iteration number belongs from the server;

[0216] Based on the acquired object data, a first field of view picture is displayed, virtual objects in the grid to which the second iteration number belongs are displayed in the first field of view picture, and a cache is updated based on the acquired iteration number and object data.

[0217] In some embodiments, the apparatus further comprises:

[0218] The first update module is used to update the iteration number of any grid where the virtual object is placed stored in the cache and save the received virtual object in the cache based on the received iteration number and object data if the object data of the virtual object placed in any grid in the cache and the iteration number of the grid where the virtual object is placed are received.

[0219] In some embodiments, the apparatus further comprises:

[0220] A second updating module is configured to update the iteration number of the first grid, the iteration number of the second grid and the received virtual object stored in the cache based on the received iteration number and the object data if object data of the virtual object moved from the first grid to the second grid, the iteration number of the first grid and the iteration number of the second grid are received;

[0221] The first grid and the second grid are stored in a cache.

[0222] In some embodiments, the apparatus further comprises:

[0223] A third updating module is configured to, if object data of a virtual object moved from the first grid to the second grid and an iteration number of the second grid are received, update the iteration number of the second grid stored in the cache and store the received virtual object in the cache based on the received iteration number and object data;

[0224] The second grid is stored in the cache.

[0225] In some embodiments, storing the virtual object in the cache means storing object data of the virtual object in the cache, and the apparatus further comprises:

[0226] a fourth updating module, configured to update the iteration number of the first grid stored in the cache and delete the object data of the virtual object corresponding to the object identifier in the cache based on the received iteration number and object data, if an object identifier of the virtual object moved from the first grid to the second grid and an iteration number of the first grid are received;

[0227] The first grid is stored in the cache.

[0228] In some embodiments, the method further comprises:

[0229] a determination module, configured to determine a target number if the sum of the number of received virtual objects and the number of virtual objects stored in the cache is greater than a number threshold, wherein the target number is a difference between the sum of the number of received virtual objects and the number of virtual objects stored in the cache and the number threshold;

[0230] The deletion module is used to delete the object data of a target number of virtual objects whose latest rendering time in the cache is farthest from the current time.

[0231] In some embodiments, the apparatus further comprises:

[0232] The fifth update module is used to update the iteration number of any grid of the virtual object moved out of the virtual scene stored in the cache and delete the object data of the virtual object corresponding to the object identifier in the cache based on the received iteration number and object identifier if the object identifier of the virtual object is received from any grid in the cache and the iteration number of any grid of the virtual object moved out.

[0233] The embodiment of the present application provides a visual field display device, which stores the object data of the virtual object in the displayed visual field in the cache of the terminal, so that when switching to the visual field next time, the visual field display is directly based on the object data stored in the cache, without the need to obtain the object data from the server. Through this device, even if the visual field of the object is frequently switched, the screen switching can be completed based on the object data stored in the terminal, avoiding the process of the server frequently sending a large amount of object data to the terminal, reducing the amount of data that the server needs to send, saving bandwidth, and thus reducing bandwidth costs.

[0234] Figure 8 A block diagram of another visual field display device provided according to an embodiment of the present application. Figure 8 , the device comprises:

[0235] A first sending module 801, configured to send object data of at least one virtual object in the first field of view to a terminal in response to an object entering the first field of view, wherein the terminal is configured to display the first field of view and store the virtual object in a cache, and the cache is configured to store the virtual object displayed in the screen;

[0236] A second sending module 802 is used to send object data of at least one virtual object in the second field of view to the terminal in response to the object entering the second field of view, and the terminal is used to display the second field of view;

[0237] The third sending module 803 is used to send switching data to the terminal in response to detecting that the terminal switches from the second field of view to the first field of view, where the switching data is used to instruct the terminal to display the first field of view based on the virtual object stored in the cache.

[0238] In some embodiments, the first field of view picture and the second field of view picture correspond to a plurality of grids in the virtual scene respectively, each grid is configured with an iteration number, and the iteration number of each grid is updated when the virtual object in the corresponding grid changes; the third sending module 803 is used to:

[0239] In response to detecting that the terminal switches from the second field of view back to the first field of view, the iteration numbers of multiple grids in the first field of view are sent to the terminal, and the terminal is used to display the first field of view based on the virtual objects in the grid to which the first iteration number belongs if the first iteration number exists in the cache; wherein the first iteration number is the same as the received iteration number.

[0240] In some embodiments, the apparatus further comprises:

[0241] A receiving module, used for receiving a data acquisition request sent by a terminal, wherein the data acquisition request is triggered based on a second iteration number other than the first iteration number in the cache;

[0242] The third sending module 803 is further used to send object data of virtual objects in the grid belonging to the second iteration number to the terminal based on the data acquisition request, so that the terminal displays the first field of view and updates the cache based on the acquired iteration number and object data.

[0243] In some embodiments, the apparatus further comprises:

[0244] A first updating module, configured to update an iteration number of any grid where the virtual object is placed in response to any virtual object being placed in any grid in the cache;

[0245] The fourth sending module is used to send the updated iteration number of any grid where the virtual object is placed and the object data of the placed virtual object to the terminal, so that the terminal updates the iteration number of any grid where the virtual object is placed stored in the cache and stores the received virtual object in the cache.

[0246] In some embodiments, the apparatus further comprises:

[0247] A second updating module, configured to update iteration numbers of the first grid and the second grid in response to the virtual object moving from the first grid to the second grid, wherein the first grid and the second grid are stored in a cache;

[0248] The fifth sending module is used to send the updated iteration number of the first grid, the iteration number of the second grid and the object data of the moved virtual object to the terminal, so that the terminal updates the iteration number of the first grid, the iteration number of the second grid and the received virtual object stored in the cache.

[0249] In some embodiments, the apparatus further comprises:

[0250] A third updating module, configured to update the iteration numbers of the first grid and the second grid in response to the virtual object moving from the first grid to the second grid, wherein the second grid is stored in a cache;

[0251] The sixth sending module is used to send the updated iteration number of the second grid and the object data of the moved virtual object to the terminal, so that the terminal updates the iteration number of the second grid and the received virtual object stored in the cache.

[0252] In some embodiments, storing the virtual object in the cache means storing object data of the virtual object in the cache, and the apparatus further comprises:

[0253] A fourth updating module, configured to update an iteration number of the first grid and an iteration number of the second grid in response to the virtual object moving from the first grid to the second grid, wherein the first grid is stored in a cache;

[0254] The seventh sending module is used to send the updated iteration number of the second grid and the object identifier of the moved virtual object to the terminal, so that the terminal updates the iteration number of the first grid stored in the cache and deletes the object data of the virtual object corresponding to the object identifier in the cache.

[0255] In some embodiments, the apparatus further comprises:

[0256] a fifth updating module, configured to update an iteration number of any grid of the virtual object that is moved out in response to the virtual object in any grid in the cache being moved out of the virtual scene;

[0257] The eighth sending module is used to send the object identification of the removed virtual object and the updated iteration number of any grid of the removed virtual object to the terminal, so that the terminal updates the iteration number of any grid of the removed virtual object stored in the cache and deletes the object data of the virtual object corresponding to the object identification in the cache.

[0258] The embodiment of the present application provides a visual field display device, which stores the object data of the virtual object in the displayed visual field in the cache of the terminal, so that when switching to the visual field next time, the visual field display is directly based on the object data stored in the cache, without the need to obtain the object data from the server. Through this device, even if the visual field of the object is frequently switched, the screen switching can be completed based on the object data stored in the terminal, avoiding the process of the server frequently sending a large amount of object data to the terminal, reducing the amount of data that the server needs to send, saving bandwidth, and thus reducing bandwidth costs.

[0259] In the embodiments of the present application, the computer device may be a terminal or a server. When the computer device is a terminal, the terminal serves as the execution subject to implement the technical solution provided in the embodiments of the present application; when the computer device is a server, the server serves as the execution subject to implement the technical solution provided in the embodiments of the present application; or, the technical solution provided in the present application is implemented through interaction between the terminal and the server, which is not limited in the embodiments of the present application.

[0260] Fig. 9 A structural block diagram of a terminal 900 provided by an exemplary embodiment of the present application is shown.

[0261] Typically, the terminal 900 includes a processor 901 and a memory 902 .

[0262] The processor 901 may include one or more processing cores, such as a 4-core processor, an 8-core processor, etc. The processor 901 may be implemented in at least one hardware form of DSP (Digital Signal Processing), FPGA (Field-Programmable Gate Array), and PLA (Programmable Logic Array). The processor 901 may also include a main processor and a coprocessor. The main processor is a processor for processing data in the awake state, also known as a CPU (Central Processing Unit); the coprocessor is a low-power processor for processing data in the standby state. In some embodiments, the processor 901 may be integrated with a GPU (Graphics Processing Unit), which is responsible for rendering and drawing the content to be displayed on the display screen. In some embodiments, the processor 901 may also include an AI (Artificial Intelligence) processor, which is used to process computing operations related to machine learning.

[0263] The memory 902 may include one or more computer-readable storage media, which may be non-transitory. The memory 902 may also include a high-speed random access memory, and a non-volatile memory, such as one or more disk storage devices, flash memory storage devices. In some embodiments, the non-transitory computer-readable storage medium in the memory 902 is used to store at least one program code, which is used to be executed by the processor 901 to implement the field of view screen display method provided in the method embodiment of the present application.

[0264] In some embodiments, the terminal 900 may further optionally include: a peripheral device interface 903 and at least one peripheral device. The processor 901, the memory 902 and the peripheral device interface 903 may be connected via a bus or a signal line. Each peripheral device may be connected to the peripheral device interface 903 via a bus, a signal line or a circuit board. Specifically, the peripheral device includes: at least one of a radio frequency circuit 904, a display screen 905, a camera assembly 906, an audio circuit 907 and a power supply 908.

[0265] The peripheral device interface 903 may be used to connect at least one peripheral device related to I / O (Input / Output) to the processor 901 and the memory 902. In some embodiments, the processor 901, the memory 902, and the peripheral device interface 903 are integrated on the same chip or circuit board; in some other embodiments, any one or two of the processor 901, the memory 902, and the peripheral device interface 903 may be implemented on a separate chip or circuit board, which is not limited in this embodiment.

[0266] The radio frequency circuit 904 is used to receive and transmit RF (Radio Frequency) signals, also known as electromagnetic signals. The radio frequency circuit 904 communicates with communication networks and other communication devices through electromagnetic signals. The radio frequency circuit 904 converts electrical signals into electromagnetic signals for transmission, or converts received electromagnetic signals into electrical signals. Optionally, the radio frequency circuit 904 includes: an antenna system, an RF transceiver, one or more amplifiers, a tuner, an oscillator, a digital signal processor, a codec chipset, a user identity module card, and the like. The radio frequency circuit 904 can communicate with other terminals through at least one wireless communication protocol. The wireless communication protocol includes, but is not limited to: the World Wide Web, a metropolitan area network, an intranet, various generations of mobile communication networks (2G, 3G, 4G and 5G), a wireless local area network and / or a WiFi (Wireless Fidelity) network. In some embodiments, the radio frequency circuit 904 may also include circuits related to NFC (Near Field Communication), which is not limited in this application.

[0267] The display screen 905 is used to display the UI (User Interface). The UI may include graphics, text, icons, videos, and any combination thereof. When the display screen 905 is a touch display screen, the display screen 905 also has the ability to collect touch signals on the surface or above the surface of the display screen 905. The touch signal can be input to the processor 901 as a control signal for processing. At this time, the display screen 905 can also be used to provide virtual buttons and / or virtual keyboards, also known as soft buttons and / or soft keyboards. In some embodiments, the display screen 905 can be one, set on the front panel of the terminal 900; in other embodiments, the display screen 905 can be at least two, respectively set on different surfaces of the terminal 900 or in a folding design; in other embodiments, the display screen 905 can be a flexible display screen, set on the curved surface or folding surface of the terminal 900. Even, the display screen 905 can also be set to a non-rectangular irregular shape, that is, a special-shaped screen. The display screen 905 can be made of materials such as LCD (Liquid Crystal Display), OLED (Organic Light-Emitting Diode, organic light-emitting diode).

[0268] The camera assembly 906 is used to capture images or videos. Optionally, the camera assembly 906 includes a front camera and a rear camera. Typically, the front camera is arranged on the front panel of the terminal, and the rear camera is arranged on the back of the terminal. In some embodiments, there are at least two rear cameras, which are any one of a main camera, a depth of field camera, a wide-angle camera, and a telephoto camera, so as to realize the fusion of the main camera and the depth of field camera to realize the background blur function, the fusion of the main camera and the wide-angle camera to realize panoramic shooting and VR (Virtual Reality) shooting function or other fusion shooting functions. In some embodiments, the camera assembly 906 may also include a flash. The flash can be a monochrome temperature flash or a dual-color temperature flash. A dual-color temperature flash refers to a combination of a warm light flash and a cold light flash, which can be used for light compensation at different color temperatures.

[0269] The audio circuit 907 may include a microphone and a speaker. The microphone is used to collect sound waves from the user and the environment, and convert the sound waves into electrical signals and input them into the processor 901 for processing, or input them into the radio frequency circuit 904 to achieve voice communication. For the purpose of stereo acquisition or noise reduction, there may be multiple microphones, which are respectively arranged at different parts of the terminal 900. The microphone may also be an array microphone or an omnidirectional acquisition microphone. The speaker is used to convert the electrical signal from the processor 901 or the radio frequency circuit 904 into sound waves. The speaker may be a traditional film speaker or a piezoelectric ceramic speaker. When the speaker is a piezoelectric ceramic speaker, it can not only convert the electrical signal into sound waves audible to humans, but also convert the electrical signal into sound waves inaudible to humans for purposes such as ranging. In some embodiments, the audio circuit 907 may also include a headphone jack.

[0270] The power supply 908 is used to power various components in the terminal 900. The power supply 908 can be an alternating current, a direct current, a disposable battery, or a rechargeable battery. When the power supply 908 includes a rechargeable battery, the rechargeable battery can be a wired rechargeable battery or a wireless rechargeable battery. A wired rechargeable battery is a battery charged through a wired line, and a wireless rechargeable battery is a battery charged through a wireless coil. The rechargeable battery can also be used to support fast charging technology.

[0271] In some embodiments, the terminal 900 further includes one or more sensors 909 . The one or more sensors 909 include, but are not limited to: an acceleration sensor 910 , a gyroscope sensor 911 , a pressure sensor 912 , an optical sensor 913 , and a proximity sensor 914 .

[0272] The acceleration sensor 910 can detect the magnitude of acceleration on the three coordinate axes of the coordinate system established by the terminal 900. For example, the acceleration sensor 910 can be used to detect the components of gravity acceleration on the three coordinate axes. The processor 901 can control the display screen 905 to display the user interface in a horizontal view or a vertical view according to the gravity acceleration signal collected by the acceleration sensor 910. The acceleration sensor 910 can also be used to collect motion data of games or users.

[0273] The gyro sensor 911 can detect the body direction and rotation angle of the terminal 900, and the gyro sensor 911 can cooperate with the acceleration sensor 910 to collect the user's 3D actions on the terminal 900. The processor 901 can implement the following functions based on the data collected by the gyro sensor 911: motion sensing (such as changing the UI according to the user's tilt operation), image stabilization during shooting, game control, and inertial navigation.

[0274] The pressure sensor 912 can be set on the side frame of the terminal 900 and / or the lower layer of the display screen 905. When the pressure sensor 912 is set on the side frame of the terminal 900, it can detect the user's holding signal of the terminal 900, and the processor 901 performs left and right hand recognition or shortcut operation according to the holding signal collected by the pressure sensor 912. When the pressure sensor 912 is set on the lower layer of the display screen 905, the processor 901 controls the operability controls on the UI interface according to the user's pressure operation on the display screen 905. The operability controls include at least one of a button control, a scroll bar control, an icon control, and a menu control.

[0275] The optical sensor 913 is used to collect the ambient light intensity. In one embodiment, the processor 901 can control the display brightness of the display screen 905 according to the ambient light intensity collected by the optical sensor 913. Specifically, when the ambient light intensity is high, the display brightness of the display screen 905 is increased; when the ambient light intensity is low, the display brightness of the display screen 905 is reduced. In another embodiment, the processor 901 can also dynamically adjust the shooting parameters of the camera assembly 906 according to the ambient light intensity collected by the optical sensor 913.

[0276] The proximity sensor 914, also called a distance sensor, is usually arranged on the front panel of the terminal 900. The proximity sensor 914 is used to collect the distance between the user and the front of the terminal 900. In one embodiment, when the proximity sensor 914 detects that the distance between the user and the front of the terminal 900 is gradually decreasing, the processor 901 controls the display screen 905 to switch from the screen-on state to the screen-off state; when the proximity sensor 914 detects that the distance between the user and the front of the terminal 900 is gradually increasing, the processor 901 controls the display screen 905 to switch from the screen-off state to the screen-on state.

[0277] Those skilled in the art will understand that Fig. 9 The structure shown in the figure does not constitute a limitation on the terminal 900, and the terminal 900 may include more or less components than those shown in the figure, or combine some components, or adopt a different component arrangement.

[0278] Fig.10It is a structural diagram of a server provided according to an embodiment of the present application. The server 1000 may have relatively large differences due to different configurations or performances, and may include one or more processors (Central Processing Units, CPU) 1001 and one or more memories 1002, wherein the memory 1002 is used to store executable program codes, and the processor 1001 is configured to execute the above executable program codes to implement the visual field display method provided by the above-mentioned various method embodiments. Of course, the server may also have components such as a wired or wireless network interface, a keyboard, and an input and output interface for input and output. The server may also include other components for implementing device functions, which will not be repeated here.

[0279] An embodiment of the present application also provides a computer-readable storage medium, in which at least one program is stored. The at least one program is loaded and executed by a processor to implement the field of view screen display method of any of the above-mentioned implementation modes.

[0280] An embodiment of the present application also provides a computer program product, which includes at least one program, and the at least one program is stored in a computer-readable storage medium. A processor of a computer device reads at least one program from the computer-readable storage medium, and the processor executes at least one program, so that the computer device executes the field of view display method of any of the above-mentioned implementation methods.

[0281] In some embodiments, the computer program product involved in the embodiments of the present application may be deployed and executed on a computer device, or on multiple computer devices located at one location, or on multiple computer devices distributed at multiple locations and interconnected by a communication network. Multiple computer devices distributed at multiple locations and interconnected by a communication network may constitute a blockchain system.

[0282] The above are only optional embodiments of the present application and are not intended to limit the present application. Any modifications, equivalent substitutions, improvements, etc. made within the spirit and principles of the present application should be included in the protection scope of the present application.

Claims

1. A method for displaying a visual field, characterized in that: The method comprises: A first field of view screen showing an object, wherein at least one virtual object is shown in the first field of view screen, and the at least one virtual object is stored in a cache of the terminal, and the cache is used to store the virtual object shown in the screen; If the field of view of the object changes, displaying a second field of view of the object; In response to switching back from the second field of view picture to the first field of view picture, the first field of view picture is displayed based on the virtual objects stored in the cache.

2. The method according to claim 1, characterized in that The first field of view picture and the second field of view picture correspond to a plurality of grids in the virtual scene respectively, each grid is configured with an iteration number, and the iteration number of each grid is updated when a virtual object in the corresponding grid changes; In response to switching back from the second field of view picture to the first field of view picture, displaying the first field of view picture based on the virtual object stored in the cache includes: In response to switching back from the second field of view to the first field of view, receiving iteration numbers of a plurality of grids in the first field of view sent by a server; If the first iteration number exists in the cache, based on the saved virtual objects in the grid to which the first iteration number belongs, the first field of view picture is displayed, and the virtual objects in the grid to which the first iteration number belongs are displayed in the first field of view picture; The first iteration number is the same as the received iteration number.

3. The method according to claim 2, characterized in that The method further comprises: For a second iteration number other than the first iteration number in the cache, obtaining object data of a virtual object in a grid to which the second iteration number belongs from the server; Based on the acquired object data, the first field of view picture is displayed, virtual objects in the grid to which the second iteration number belongs are displayed in the first field of view picture, and the cache is updated based on the acquired iteration number and object data.

4. The method according to claim 2, characterized in that: The method further comprises: If object data of a virtual object placed in any grid in the cache and the iteration number of any grid in which the virtual object is placed are received, based on the received iteration number and object data, the iteration number of the grid in which the virtual object is placed stored in the cache is updated and the received virtual object is stored in the cache.

5. The method according to claim 2, characterized in that: The method further comprises: If object data of a virtual object moved from a first grid to a second grid, an iteration number of the first grid, and an iteration number of the second grid are received, updating the iteration number of the first grid, the iteration number of the second grid, and the received virtual object stored in the cache based on the received iteration number and the object data; The first grid and the second grid are stored in the cache.

6. The method according to claim 2, characterized in that The method further comprises: If object data of a virtual object moved from a first grid to a second grid and an iteration number of the second grid are received, based on the received iteration number and object data, updating the iteration number of the second grid stored in the cache and storing the received virtual object in the cache; The second grid is stored in the cache.

7. The method according to claim 2, characterized in that Storing the virtual object in the cache means storing object data of the virtual object in the cache, and the method further includes: If an object identifier of a virtual object moved from a first grid to a second grid and an iteration number of the first grid are received, based on the received iteration number and object data, updating the iteration number of the first grid stored in the cache and deleting the object data of the virtual object corresponding to the object identifier in the cache; The first grid is stored in the cache.

8. The method according to claim 3, 4 or 6, characterized in that: Storing the virtual object in the cache means storing object data of the virtual object in the cache, and the method further includes: If the sum of the number of received virtual objects and the number of virtual objects stored in the cache is greater than the number threshold, determine a target number, where the target number is the difference between the sum of the number of received virtual objects and the number of virtual objects stored in the cache and the number threshold; The object data of the target number of virtual objects whose latest rendering time in the cache is farthest from the current time are deleted.

9. A method for displaying a visual field, characterized in that: The method comprises: In response to an object entering a first field of view, object data of at least one virtual object in the first field of view is sent to a terminal, the terminal is used to display the first field of view and store the virtual object in a cache, and the cache is used to store the virtual object displayed in the screen; In response to the object entering the second field of view, sending object data of at least one virtual object in the second field of view to the terminal, and the terminal is used to display the second field of view; In response to detecting that the terminal switches from the second field of view picture back to the first field of view picture, switching data is sent to the terminal, where the switching data is used to instruct the terminal to display the first field of view picture based on the virtual object stored in the cache.

10. The method according to claim 9, characterized in that The first field of view picture and the second field of view picture correspond to a plurality of grids in the virtual scene respectively, each grid is configured with an iteration number, and the iteration number of each grid is updated when a virtual object in the corresponding grid changes; The sending switching data to the terminal in response to detecting that the terminal switches from the second field of view picture back to the first field of view picture includes: In response to detecting that the terminal switches from the second field of view back to the first field of view, the iteration numbers of multiple grids in the first field of view are sent to the terminal, and the terminal is used to display the first field of view based on the virtual objects in the grid to which the first iteration number belongs if there is a first iteration number in the cache; wherein the first iteration number is the same as the received iteration number.

11. The method according to claim 10, characterized in that The method further comprises: receiving a data acquisition request sent by the terminal, wherein the data acquisition request is triggered based on a second iteration number other than the first iteration number in the cache; Based on the data acquisition request, object data of virtual objects in the grid to which the second iteration number belongs is sent to the terminal, so that the terminal displays the first field of view and updates the cache based on the acquired iteration number and object data.

12. The method according to claim 10, characterized in that The method further comprises: In response to any virtual object being placed in any grid in the cache, updating the iteration number of the grid where the virtual object is placed; Sending the updated iteration number of any grid where the virtual object is placed and the object data of the placed virtual object to the terminal, so that the terminal updates the iteration number of any grid where the virtual object is placed stored in the cache and stores the received virtual object in the cache.

13. The method according to claim 10, characterized in that The method further comprises: In response to a virtual object moving from a first grid to a second grid, updating iteration numbers of the first grid and the second grid, the first grid and the second grid being stored in the cache; Sending the updated iteration number of the first grid, the iteration number of the second grid and the object data of the moved virtual object to the terminal, so that the terminal updates the iteration number of the first grid, the iteration number of the second grid and the received virtual object stored in the cache.

14. The method according to claim 10, characterized in that The method further comprises: In response to a virtual object moving from a first grid to a second grid, updating iteration numbers of the first grid and the second grid, the second grid being stored in the cache; The updated iteration number of the second grid and the object data of the moved virtual object are sent to the terminal, so that the terminal updates the iteration number of the second grid and the received virtual object stored in the cache.

15. The method according to claim 10, characterized in that Storing the virtual object in the cache means storing the object data of the virtual object in the cache, and the method further comprises: In response to a virtual object moving from a first grid to a second grid, updating an iteration number of the first grid and an iteration number of the second grid, the first grid being stored in the cache; The updated iteration number of the first grid and the object identifier of the moved virtual object are sent to the terminal, so that the terminal updates the iteration number of the first grid stored in the cache and deletes the object data of the virtual object corresponding to the object identifier in the cache.

16. A visual field display device, characterized in that: The device comprises: A first display module, used to display a first field of view picture of an object, wherein at least one virtual object is displayed in the first field of view picture, and the at least one virtual object is stored in a cache of the terminal, and the cache is used to store the virtual object displayed in the picture; A second display module, used for displaying a second field of view of the object if the field of view of the object changes; The third display module is used for displaying the first field of view picture based on the virtual object stored in the cache in response to switching from the second field of view picture back to the first field of view picture.

17. A visual field display device, characterized in that: The device comprises: a first sending module, configured to send object data of at least one virtual object in a first field of view to a terminal in response to an object entering the first field of view, wherein the terminal is configured to display the first field of view and store the virtual object in a cache, wherein the cache is configured to store the virtual object displayed in the screen; A second sending module, configured to send object data of at least one virtual object in a second field of view to the terminal in response to the object entering the second field of view, and the terminal is configured to display the second field of view; The third sending module is used to send switching data to the terminal in response to detecting that the terminal switches from the second field of view picture back to the first field of view picture, wherein the switching data is used to instruct the terminal to display the first field of view picture based on the virtual object stored in the cache.

18. A computer device, characterized in that: The computer device includes a processor and a memory, the memory is used to store at least one program, and the at least one program is loaded by the processor and executes the field of view image display method described in any one of claims 1-8 or the field of view image display method described in any one of claims 9-15.

19. A computer-readable storage medium, characterized in that: The computer-readable storage medium is used to store at least one program, and the at least one program is used to execute the field of view picture display method described in any one of claims 1-8 or the field of view picture display method described in any one of claims 9-15.

20. A computer program product, characterized in that The computer program product includes at least one program segment, which is stored in a computer-readable storage medium. The processor of a computer device reads the at least one program segment from the computer-readable storage medium, and the processor executes the at least one program segment, so that the computer device executes the field of view display method described in any one of claims 1 to 8 or the field of view display method described in any one of claims 9 to 15.