Scene display method and device, electronic equipment and computer program product

By receiving and updating the entity information of the scene entity on the client and determining the display area according to the position of the character, the problem of lack of vision caused by the AOI mechanism in MMORPG games is solved, and a multi-level rich vision performance is achieved.

CN120053959APending Publication Date: 2025-05-30NETEASE (HANGZHOU) NETWORK CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202510146988.0
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-02-10
Publication Date
2025-05-30

AI Technical Summary

Technical Problem

In MMORPG games, the AOI mechanism causes players to not see resources such as trees outside the AOI range, resulting in a lack of vision and a lack of multi-level rich vision performance.

Method used

By receiving the entity information of the scene entity sent by the receiving server, the entity management information is updated, and the display area of ​​each layer is determined according to the position of the role, the entity ownership change information is synchronized, and the model display status of the scene entity is updated.

Benefits of technology

It achieves multi-level rich vision performance, solves the problem of lack of vision in the scene, and improves the visual experience of the game.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120053959A_ABST
    Figure CN120053959A_ABST
Patent Text Reader

Abstract

The invention relates to a scene display method and device, electronic equipment and a computer program product, and belongs to the technical field of computers. The method applied to a client comprises the following steps: receiving entity information synchronization data of a scene entity sent by a server, wherein the entity information synchronization data comprises a scene number, an entity type and an entity refreshing mark of the scene entity; receiving real entity information of a scene entity in the region of interest sent by the server, and updating entity management information in an entity information manager according to the entity information synchronization data and the real entity information; determining each layer of display area associated with the current role, and synchronizing entity affiliation change information corresponding to each layer of display area to an entity information manager; and updating a model display state corresponding to the scene entity according to the entity management information and the entity affiliation change information in the entity information manager. According to the invention, the problem of long-shot missing in the scene can be solved, and multi-level long-shot performance is realized.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present disclosure relates to the field of computer technologies, and in particular, to a scene display method, a scene display device, an electronic device, and a computer program product. Background Art

[0002] In games of the MMORPG (Massive Multiplayer Online Role-Playing Game) type, there is an AOI (Area Of Interest) mechanism for efficiently managing and optimizing online games. Its main objective is to reduce network traffic and computing resource consumption while ensuring that users or objects only receive information relevant to them.

[0003] Under this mechanism, players can only see entities within their AOI. Entities outside the AOI are not sent by the server, and the client is unaware. For example, common resource types such as trees, due to the existence of logics such as player collection and interaction, are managed by the AOI mechanism. This mechanism causes players not to see trees outside the AOI, and the mountains in the distance on the client side will be bare, lacking in distant views.

[0004] In view of this, there is an urgent need in the art for a scene display method that can solve the problem of the lack of distant views in a scene and achieve rich multi-level distant view performances.

[0005] It should be noted that the information disclosed in the above background art section is only used to enhance the understanding of the background of the present disclosure, and thus may include information that does not constitute the prior art known to those of ordinary skill in the art. Summary of the Invention

[0006] The purpose of the present disclosure is to provide a scene display method, a scene display device, an electronic device, and a computer program product, which can at least to a certain extent solve the problem of the lack of distant views in a scene and achieve rich multi-level distant view performances.

[0007] According to a first aspect of the present disclosure, there is provided a scene display method applied to a client, including:

[0008] Receiving entity information synchronization data of a scene entity sent by a server, where the entity information synchronization data includes a scene number, an entity type, and an entity refresh flag of the scene entity;

[0009] Receiving real entity information of a scene entity within an area of interest sent by the server, and updating entity management information in an entity information manager according to the entity information synchronization data of the scene entity and the real entity information;

[0010] Determine the display areas of each layer associated with the current character according to the position of the current character, and synchronize the entity attribution change information corresponding to each layer display area to the entity information manager;

[0011] Update the model display state corresponding to the scene entity according to the entity management information and the entity attribution change information in the entity information manager.

[0012] According to a second aspect of the present disclosure, there is provided a scene display method, which is applied to a server and includes:

[0013] When a scene entity in the current scene is created or destroyed, determine the entity refresh flag of the scene entity, and obtain the entity information synchronization data of the scene entity according to the scene number of the current scene, the entity type of the scene entity, and the entity refresh flag, where the entity information synchronization data is in a dictionary structure;

[0014] Send the entity information synchronization data of the scene entities that have changed in the current scene within a preset synchronization period to the scene entities in the adjacent scene of the current scene, so that the scene entities in the adjacent scene update the corresponding entity information synchronization data;

[0015] Send the entity information synchronization data of all the scene entities that have changed in the current scene and the adjacent scene to the client, so that the client updates the model display state corresponding to the scene entity according to the entity information synchronization data.

[0016] According to a third aspect of the present disclosure, there is provided a scene display device, which is applied to a client and includes:

[0017] An entity information receiving module, configured to receive the entity information synchronization data of the scene entity sent by the server, where the entity information synchronization data includes the scene number, entity type, and entity refresh flag of the scene entity;

[0018] A management information update module, configured to receive the real entity information of the scene entities in the area of interest sent by the server, and update the entity management information in the entity information manager according to the entity information synchronization data and the real entity information of the scene entity;

[0019] An attribution information synchronization module, configured to determine the display areas of each layer associated with the current character according to the position of the current character, and synchronize the entity attribution change information corresponding to each layer display area to the entity information manager;

[0020] A scene entity display module, configured to update the model display state corresponding to the scene entity according to the entity management information and the entity attribution change information in the entity information manager.

[0021] According to a fourth aspect of the present disclosure, there is provided a scene display device, which is applied to a server and includes:

[0022] An entity information generation module, configured to determine an entity refresh flag of the scene entity when the scene entity in the current scene is created or destroyed, and obtain entity information synchronization data of the scene entity according to the scene number of the current scene, the entity type of the scene entity, and the entity refresh flag, where the entity information synchronization data is in a dictionary structure;

[0023] An entity information update module, configured to send the entity information synchronization data of the scene entities that have changed in the current scene within a preset synchronization period to the scene entities in the adjacent scene of the current scene, so that the scene entities in the adjacent scene update the corresponding entity information synchronization data;

[0024] An entity information sending module, configured to send the entity information synchronization data of all the scene entities that have changed in the current scene and the adjacent scene to the client, so that the client updates the model display state corresponding to the scene entity according to the entity information synchronization data.

[0025] According to a fifth aspect of the present disclosure, there is provided an electronic device, including: a processor; and a memory for storing executable instructions of the processor; wherein, the processor is configured to execute the scene display method according to any one of the above through executing the executable instructions.

[0026] According to a sixth aspect of the present disclosure, there is provided a computer program product, including a computer program, where when the computer program is executed by a processor, the scene display method according to any one of the above is implemented.

[0027] The exemplary embodiments of the present disclosure may have the following beneficial effects:

[0028] In the scene display method according to the exemplary embodiment of the present disclosure, on the client side, by receiving the entity information synchronization data of the scene entity sent by the server, including the scene number, entity type, and entity refresh flag of the scene entity, and receiving the real entity information of the scene entity within the region of interest sent by the server, then according to the entity information synchronization data and the real entity information of the scene entity, the entity management information in the entity information manager is updated. Next, according to the position of the current role, the display areas of each layer associated with the current role are determined, and the entity ownership change information corresponding to each layer display area is synchronized to the entity information manager. Finally, according to the entity management information and the entity ownership change information in the entity information manager, the model display state corresponding to the scene entity is updated. In the scene display method according to the exemplary embodiment of the present disclosure, by managing various different types of entity information through the entity manager, the commonalities between entities are extracted, thereby realizing the long-distance view effects of various types of entities. At the same time, based on the multi-layer display area to control the display of entities within different distance ranges, the problem of the lack of long-distance view in the scene can be solved, and a rich long-distance view performance at multiple levels can be achieved.

[0029] In the scene display method according to the exemplary embodiment of the present disclosure, on the server side, when a scene entity is created or destroyed, the entity refresh flag of the scene entity is determined, and according to the scene number of the current scene, the entity type of the scene entity, and the entity refresh flag, the entity information synchronization data in the form of a dictionary structure is obtained. Then, the entity information synchronization data of the scene entities that have changed in the current scene within the preset synchronization period is sent to the scene entities in the adjacent scenes of the current scene, so that the scene entities in the adjacent scenes can update the corresponding entity information synchronization data. Finally, the entity information synchronization data of all the scene entities that have changed in the current scene and the adjacent scenes is sent to the client, so that the client can update the model display state corresponding to the scene entity according to the entity information synchronization data. In the scene display method according to the exemplary embodiment of the present disclosure, if the entity information synchronization data is managed by using a specially designed dictionary structure, the amount of data synchronization between different entities on the server side is reduced, and the amount of data sent from the server to the client is also reduced, improving the throughput of the server and the data transmission efficiency.

[0030] It should be understood that the above general description and the following detailed description are only exemplary and explanatory, and cannot limit the present disclosure. Description of the Drawings

[0031] The drawings here are incorporated into the specification and form a part of the specification, showing the embodiments consistent with the present disclosure, and are used together with the specification to explain the principles of the present disclosure. Obviously, the drawings in the following description are only some embodiments of the present disclosure. For those of ordinary skill in the art, other drawings can be obtained based on these drawings without creative efforts.

[0032] Figure 1 Shows a schematic flow chart of a scenario display method applied to a client according to an exemplary embodiment of the present disclosure;

[0033] Figure 2 Shows a schematic flow chart of updating entity management information in an entity information manager according to an exemplary embodiment of the present disclosure;

[0034] Figure 3 Shows a schematic flow chart of updating entity management information in an entity information manager according to the scenario distance according to an exemplary embodiment of the present disclosure;

[0035] Figure 4 Schematically shows a schematic diagram of an entity manager based on a multi-layer trigger according to a specific embodiment of the present disclosure;

[0036] Figure 5 Shows a schematic flow chart of entity ownership change information synchronization according to an exemplary embodiment of the present disclosure;

[0037] Figure 6 Shows a schematic flow chart of creating or destroying a scenario entity in a scenario according to an exemplary embodiment of the present disclosure;

[0038] Figure 7 Shows a schematic flow chart of a scenario display method applied to a server according to an exemplary embodiment of the present disclosure;

[0039] Figure 8 Shows a schematic diagram of a server data synchronization structure according to a specific embodiment of the present disclosure;

[0040] Figure 9 Shows a schematic diagram of a client management structure according to a specific embodiment of the present disclosure;

[0041] Figure 10 Shows a schematic flow chart of a scenario display method applied to a client according to a specific embodiment of the present disclosure;

[0042] Figure 11 Shows a schematic flow chart of a scenario display method applied to a server according to a specific embodiment of the present disclosure;

[0043] Figure 12 Shows a block diagram of a scenario display device applied to a client according to an exemplary embodiment of the present disclosure;

[0044] Figure 13 Shows a block diagram of a scenario display device applied to a server according to an exemplary embodiment of the present disclosure;

[0045] Figure 14The figure shows a schematic structural diagram of a computer system of an electronic device suitable for implementing the embodiments of the present disclosure. Detailed implementation manners

[0046] Example embodiments will now be described more fully with reference to the accompanying drawings. However, the example embodiments can be implemented in various forms and should not be construed as limited to the examples set forth herein; rather, these embodiments are provided so that this disclosure will be more thorough and complete, and will fully convey the concept of the example embodiments to those skilled in the art. The described features, structures, or characteristics can be combined in any suitable manner in one or more embodiments. In the following description, numerous specific details are provided to give a thorough understanding of the embodiments of the present disclosure. However, those skilled in the art will realize that the technical solutions of the present disclosure can be practiced without one or more of the specific details, or other methods, components, devices, steps, etc. can be used. In other cases, well-known technical solutions are not shown or described in detail to avoid obscuring the various aspects of the present disclosure.

[0047] In addition, the accompanying drawings are only schematic illustrations of the present disclosure and are not necessarily drawn to scale. The same reference numerals in the drawings denote the same or similar parts, and thus repeated descriptions thereof will be omitted. Some of the block diagrams shown in the drawings are functional entities and do not necessarily correspond to physically or logically independent entities. These functional entities can be implemented in software form, or in one or more hardware modules or integrated circuits, or in different networks and / or processor devices and / or microcontroller devices.

[0048] In some related embodiments, for the problem of the lack of perspective of the client, a "fake tree system" can be used as a solution. For entities other than AOI that the client needs to display as a perspective, the server will additionally send the coordinates, orientations, and refresh information of these entities. The client will refresh a fake tree model for decoration at the corresponding positions and then switch to the real tree entity when the player approaches.

[0049] However, the perspective display method in the above related embodiments has the following problems:

[0050] (1) Few supported types: Only resource type entities such as trees are supported to generate decoration models, and other types such as simple general entities and defensive buildings are not supported, resulting in few perspective types on the client side.

[0051] (2) Large server data synchronization overhead: Each entity requires at least three integers (entity type, refresh number, scene number) to store data. And each entity will receive synchronization data of the surrounding scenes, ultimately resulting in a large amount of server synchronization data.

[0052] (3) High memory occupancy: When the client reads entity refresh data, it will load the refresh data of all entities in the scene, triggering a large number of table data loads. Moreover, there is a lot of redundancy in the entity refresh data, resulting in a large amount of additional memory overhead.

[0053] Based on the above problems, the present exemplary embodiment first provides a scene display method, which is applied to the client. Refer to Figure 1 As shown, the above scene display method may include the following steps:

[0054] Step S110. Receive the entity information synchronization data of the scene entities sent by the server. The entity information synchronization data includes the scene number, entity type, and entity refresh flag of the scene entities.

[0055] Step S120. Receive the real entity information of the scene entities within the region of interest sent by the server, and update the entity management information in the entity information manager according to the entity information synchronization data and the real entity information of the scene entities.

[0056] Step S130. Determine the display areas of each layer associated with the current role according to the position of the current role, and synchronize the entity attribution change information corresponding to each layer display area to the entity information manager.

[0057] Step S140. Update the model display state corresponding to the scene entities according to the entity management information and the entity attribution change information in the entity information manager.

[0058] In the scene display method of the present exemplary embodiment of the present disclosure, the entity manager manages entity information of multiple different types, extracts the commonalities between entities, thereby realizing the long - distance view effects of multiple types of entities. At the same time, based on the multi - layer display areas to control the display of entities within different distance ranges, it can solve the problem of the lack of long - distance views in the scene and achieve rich multi - level long - distance views.

[0059] Next, in combination with Figures 2 to 6 The above steps of the present exemplary embodiment will be described in more detail.

[0060] In step S110, receive the entity information synchronization data of the scene entities sent by the server. The entity information synchronization data includes the scene number, entity type, and entity refresh flag of the scene entities.

[0061] In this exemplary embodiment, the client can receive server synchronization data through the client vision component, parse out the scene number, entity type, and entity refresh flag, and distribute them to the client vision manager. Among them, the scene number is the number corresponding to different scenes; the entity type is the type of scene entity, including types such as players, resources, and buildings; the entity refresh flag is used to indicate whether the scene entity needs to be created or destroyed in the scene. For example, 0 indicates destruction, and 1 indicates creation.

[0062] In step S120, receive the real entity information of the scene entities within the region of interest sent by the server, and synchronize the data and real entity information according to the entity information of the scene entities, and update the entity management information in the entity information manager.

[0063] In this exemplary embodiment, the real entity information of the scene entities within the region of interest includes real entity model information. When the server sends the entity information synchronization data of the scene entities to the client, the server also normally issues AOI entity creation information, that is, the real entity information of the scene entities within the region of interest. These two parts of information will be synchronized to the entity information manager of the client.

[0064] In this exemplary embodiment, as Figure 2 shown, according to the entity information synchronization data and real entity information of the scene entities, update the entity management information in the entity information manager, which can specifically include the following steps:

[0065] Step S210. If the entity refresh flag of the scene entity is the destruction flag, remove the scene entity from the entity management information.

[0066] After the client vision manager receives the entity information synchronization data, obtain the entity refresh flag therein. If the entity refresh flag of the scene entity is the destruction flag, remove the scene entity from the entity management information.

[0067] Step S220. If the entity refresh flag of the scene entity is the creation flag, add the scene entity to the entity management information.

[0068] If the entity refresh flag of the scene entity is the creation flag, add the scene entity to the entity management information.

[0069] Step S230. If the scene entity is included in the scene entities within the region of interest, remove the scene entity from the entity management information.

[0070] When receiving the real entity information synchronized by AOI, these entities are created through the AOI mechanism. Therefore, the corresponding entity information and vision decorations in the entity management information can be removed.

[0071] In this exemplary embodiment, as Figure 3 shown, the method for updating the entity management information in the entity information manager may further include the following steps:

[0072] Step S310. Determine the current scene where the current role is located and the adjacent scenes of the current scene, and obtain the minimum distance between the current role and the adjacent scenes.

[0073] Traverse all the adjacent scene information of the current scene of the role, and calculate the minimum distance between the current role and each adjacent scene.

[0074] Step S320. If the minimum distance is greater than a preset distance threshold, remove the scene entities in the adjacent scene from the entity management information.

[0075] If the distance is greater than the preset distance threshold, remove all the entity information of this scene in the entity manager. If decorations have been created, destroy them together.

[0076] Step S330. If the minimum distance is less than or equal to the distance threshold, add the scene entities in the adjacent scene to the entity management information.

[0077] If the distance is less than the preset distance threshold and the scene entity information has not been added to the entity management information, add it and update the entity manager.

[0078] By traversing all the adjacent scene information of the current scene of the role, useless entity information of scenes farther away outside the field of view can be recycled in real time, reducing the performance overhead of the script. At the same time, pre-add the entity information of future available scenes to the manager and wait for subsequent updates for use.

[0079] In step S130, determine the display areas of each layer associated with the current role according to the position of the current role, and synchronize the entity attribution change information corresponding to each display area to the entity information manager.

[0080] In this exemplary embodiment, the display areas of each layer may include a near-layer area, a middle-layer area, and a far-layer area, and the entity information manager may include a near-layer trigger, a middle-layer trigger, and a far-layer trigger.

[0081] Figure 4 Schematically shows a schematic diagram of an entity manager based on multi-layer triggers in a specific embodiment of the present disclosure. The client entity information manager is based on a hierarchical trigger mechanism, and hierarchically manages entities through three-layer triggers to achieve the control of the visibility of distant views at different distances of the role.

[0082] In this exemplary embodiment, as Figure 5As shown, determine the display areas of each layer associated with the current character based on the position of the current character, and synchronize the entity attribution change information corresponding to each display area of each layer to the entity information manager. Specifically, it may include the following steps:

[0083] Step S510. Determine the display areas of each layer associated with the current character according to the position coordinates of the current character and the area ranges corresponding to the display areas of each layer.

[0084] According to the position coordinates of the current character and the area ranges corresponding to the display areas of each layer, taking the circular area as an example, the display areas of each layer associated with the current character can be determined according to the near-layer area radius, the middle-layer area radius, and the far-layer area radius, including the near-layer area, the middle-layer area, and the far-layer area.

[0085] Step S520. Determine the entity attribution information of the scene entities in each display area according to the entity coordinates of the scene entities.

[0086] Each layer trigger will independently update all the entity information owned by the layer trigger dynamically according to the character coordinates, the preset radius, and the entity coordinates.

[0087] Step S530. When the current character moves, determine the entity attribution change information corresponding to each display area according to the position coordinates of the current character and the entity coordinates of the scene entities, and synchronize it to the entity information manager.

[0088] When the current character moves, or at fixed time intervals, update the three-layer triggers in sequence. For example, when the character moves away, the near-layer entity information will move to the middle layer, and the middle-layer entity will move to the far layer. These entity attribution change information will ultimately be synchronized to the entity manager.

[0089] In step S140, update the model display state corresponding to the scene entity according to the entity management information and the entity attribution change information in the entity information manager.

[0090] Finally, according to the entity management information and the entity attribution change information in the entity information manager, create or destroy the scene entities of each layer, or adjust the display clarity of the scene entities in each display area to achieve the model display effect at different distances.

[0091] In this exemplary embodiment, as Figure 6 shown, update the model display state corresponding to the scene entity according to the entity management information and the entity attribution change information in the entity information manager to create or destroy the scene entities in the scene. Specifically, it may include the following steps:

[0092] Step S610. If the scene entity enters the middle layer area from the near layer area, obtain the detailed refresh data of the scene entity from the entity table data generated offline through the middle layer trigger, and create a decoration model corresponding to the scene entity at the entity coordinates of the scene entity.

[0093] Based on the entity attribution change information collected by the trigger by the entity manager, for the entity information that enters the middle layer trigger from the near layer, read the detailed refresh data of the entity from the offline-generated table data, including refresh information such as the position and orientation of the entity, and then create a decoration model at the corresponding position for long-distance view performance. Among them, the decoration model is only used for display and does not provide corresponding interaction functions.

[0094] In the embodiment of this example, if the scene entity enters the middle layer area from the near layer area, put the real model corresponding to the scene entity into the model cache pool so that it can be reused when creating the decoration model corresponding to the scene entity.

[0095] When the entity information in the near layer switches to the middle layer, the model will be stripped from the entity and enter the cache pool, and then reused as the decoration model in the middle layer.

[0096] Step S620. If the scene entity enters the near layer area from the middle layer area, create a real model corresponding to the scene entity at the entity coordinates of the scene entity.

[0097] For the entity information that enters the near layer from the middle layer, create a real model corresponding to the scene entity. Among them, the real model not only provides a display function but also can provide normal interaction functions. For example, interactive operations such as picking and felling can be performed on resource models such as plants.

[0098] In the embodiment of this example, if the scene entity enters the near layer area from the middle layer area, put the decoration model corresponding to the scene entity into the model cache pool so that it can be reused when creating the real model corresponding to the scene entity.

[0099] For the entity information that enters the near layer from the middle layer, put the corresponding decoration model into the cache pool and wait to be reused when the near layer entity enters the AOI, reducing the overhead of repeated model creation.

[0100] Step S630. If the scene entity enters the far layer area from the middle layer area, destroy the decoration model corresponding to the scene entity.

[0101] For the entity information that enters the far layer from the middle layer, directly destroy its corresponding decoration model, that is, the entity in the far layer is not displayed.

[0102] In this exemplary embodiment, all entities are managed by using a client entity manager. Internally, based on a hierarchical trigger mechanism, with the role as the center and the distance as the radius, a total of three layers of triggers are used to hierarchically manage the entities, so as to realize the far-view display and hiding control at different distances of the role. The near-layer trigger manages the entity information of the role at close range. The internal entities are sent by the AOI mechanism and there is no need to create a far-view decoration model. The entity information of the middle-layer trigger will refresh the model as a far-view decoration. The far-layer trigger manages the entity information at long distance, and this layer is responsible for hiding the decoration models beyond the visible range.

[0103] In this exemplary embodiment, models in the model cache pool that have not been reused within a preset reuse time range can also be deleted; and when the number of models in the model cache pool is greater than the model number threshold, some models exceeding the model number threshold are deleted according to the model reuse data.

[0104] The switching performance between different layers depends on the ModelCache (model cache pool) mechanism. By updating the model cache pool, models that have not been successfully reused within a period of time are destroyed. When the number of models exceeds the maximum number, the excess part will also be destroyed. This step aims to limit the memory overhead of the model cache and prevent useless models from occupying a large amount of memory.

[0105] The model cache pool and the refined entity refresh data generated by the offline tool can ensure that the client can achieve rich far-view performance at multiple levels with only a small amount of memory and CPU computing overhead. All entity information of the client is exported in a refined manner through an offline project and directly loaded and read logically. At the same time, combined with the scene dynamic loading and unloading technology, according to the distance between the role and the scene boundary, the far-view entity information of the scene is dynamically unloaded and loaded to ensure that the total number of far views is within a controllable range.

[0106] This exemplary embodiment also provides a scene display method, which is applied to a server. Refer to Figure 7 As shown, the above scene display method may include the following steps:

[0107] Step S710. When a scene entity in the current scene is created or destroyed, determine the entity refresh flag of the scene entity, and obtain the entity information synchronization data of the scene entity according to the scene number of the current scene, the entity type of the scene entity, and the entity refresh flag.

[0108] In this exemplary embodiment, a data structure CustomBitsetType based on bit synchronization can be designed on the server. Its basic structure is of dictionary type, with the value being an integer type. After removing the top flag bit from each integer, the remaining 63 bits can be used to represent the refresh flags of 63 entities. Based on this data structure, a synchronous data structure SpaceEntityBits can be implemented. The EntityBits in this data structure inherits from CustomBitsetType and additionally records the entity_type (entity type). Each entity only needs to occupy 1 bit to store the refresh flag bit. SpaceEntityBit is a dictionary structure, with the key being the entity type and the value being EntityBits, and additionally records the spaceno (scene number) to which it belongs. SpaceEntityBits is the data structure finally used for synchronization, also a dictionary structure, with the key being the scene number and the value being SpaceEntityBit.

[0109] As Figure 8 Shown is a schematic diagram of the server data synchronization structure in a specific embodiment of the present disclosure. Among them, BattleEntity is a scene entity in the game, RefreshComp is the refresh component of the scene, responsible for the creation and destruction of entities; BattleVisionComp is the long-range control component of the scene, responsible for collecting information on the creation and destruction of entities and synchronization; ServerWorld is the world entity, used for data synchronization between different BattleEntities on the same world line.

[0110] The refresh component RefreshComp on BattleEntity refreshes or destroys a certain entity and synchronizes its refresh flag (0 or 1) to the long-range component BattleVisionComp. The component will find the corresponding EntityBit data dictionary according to the entity type (entity_type) and the scene number (spaceno), and set the refresh flag through the set_bit interface.

[0111] Step S720. Synchronize the entity information synchronization data of the scene entities that have changed in the current scene within the preset synchronization period to the scene entities in the adjacent scenes of the current scene, so that the scene entities in the adjacent scenes can update the corresponding entity information synchronization data.

[0112] In this exemplary embodiment, the long-range component collects the incremental changes in data within a certain period, such as every 1 second or so, and synchronizes them to the world entity. The world entity distributes the changed data to the scene entities in other adjacent scenes, and the scene entities in other adjacent scenes will use this part of the data to update the long-range information of the scene.

[0113] Step S730. Send the entity information synchronization data of all the scene entities that have changed in the current scene and adjacent scenes to the client, so that the client can update the model display status corresponding to the scene entity according to the entity information synchronization data.

[0114] In this exemplary embodiment, the long - distance view component can synchronize the changed entity information to the client, and the client logic is responsible for updating the long - distance view representation.

[0115] In the scene display method of the exemplary embodiment of the present disclosure, if a specially designed dictionary structure is used to manage the entity information synchronization data, it reduces the amount of data synchronization between different entities on the server side, and also reduces the amount of data sent from the server to the client, improving the throughput of the server and the data transmission efficiency.

[0116] As Figure 9 shown is a schematic diagram of the client management structure in a specific embodiment of the present disclosure. The client management structure is a multi - layer entity management structure for managing entity information and creating / destroying the long - distance view representation. In the figure, BattleVisionComp is the client long - distance view component, EntityVisionMgr is the client long - distance view manager, DecorationEntity is the long - distance view decoration model, and EntityManager is the entity information manager, which includes three - layer triggers.

[0117] As Figure 10 shown is a schematic flowchart of the scene display method applied to the client in a specific embodiment of the present disclosure. The specific steps of this flowchart are as follows:

[0118] Step S1010. Entity refresh and destruction.

[0119] The refresh component RefreshComp on BattleEntity refreshes or destroys a certain entity and synchronizes its refresh flag (0 or 1) to the long - distance view component BattleVisionComp.

[0120] Step S1020. Update the long - distance view component.

[0121] The component will find the corresponding EntityBit data dictionary according to the entity type (entity_type) and the scene number (spaceno), and set the refresh flag through the set_bit interface.

[0122] Step S1030. Synchronize the world entity.

[0123] The long - distance view component collects the incremental changes of data within a certain period, such as about every 1 second, and synchronizes them to the ServerWorld entity.

[0124] Step S1040. Synchronize adjacent scene entities.

[0125] The ServerWorld entity distributes the changed data to other adjacent BattleEntities, and these other BattleEntities will use this part of the data to update the distant view information of the scene.

[0126] Step S1050. Synchronize the client.

[0127] The BattleVisionComp of the distant view component synchronizes the changed entity information to the client, and the client logic is responsible for updating the distant view performance.

[0128] Based on a lightweight data structure, the server processes the collection and synchronization of entity refresh data, and solves the server synchronization problem of the distant view optimization mechanism with relatively small data overhead.

[0129] As Figure 11 shown is a flowchart of a scene display method applied to a server in a specific embodiment of the present disclosure. The specific steps of this flowchart are as follows:

[0130] Step S1110. Server information synchronization.

[0131] The client's distant view component receives the server synchronization data, parses out the scene number, entity type, and entity refresh flag, and distributes them to the client's distant view manager.

[0132] Step S1120. Server AOI synchronization.

[0133] When the server normally issues AOI entity creation information, it forwards the entity information to the distant view manager, and this part of the information is usually located in the inner trigger.

[0134] Step S1130. Update the entity manager.

[0135] After receiving the entity information synchronized by the distant view component, if the entity refresh flag is for destruction, EntityVisionManager removes it from the EntityManager; otherwise, it adds it. When receiving the entity creation information synchronized by AOI, it removes the corresponding entity information and distant view decorations from the EntityManager.

[0136] Step S1140. Update the scene entity information.

[0137] Traverse all adjacent scene information of the character's current scene, calculate the minimum distance between the character and the scene. If the distance is greater than the preset value, remove all entity information of this scene in the entity manager. If decorations have been created, destroy them together. If the distance is less than the preset value and the scene entity information has not been added to the EntityManager, add it and update the entity manager.

[0138] This step is used to recycle useless entity information of scenes far away outside the field of view even, reducing the performance overhead of the script. At the same time, pre-add the entity information of future available scenes to the manager and wait for subsequent updates for use.

[0139] Step S1150. Update the three-layer trigger.

[0140] Update the three-layer trigger in sequence. Each layer of trigger will independently update all entity information owned by this layer of trigger according to the character coordinates, preset radius, and entity coordinates. For example, when the character moves away, the entity information in the near layer will move to the middle layer, and the entity in the middle layer will move to the far layer. These entity ownership change information will ultimately be synchronized to the entity manager.

[0141] Step S1160. Create or destroy models.

[0142] Based on the entity ownership change information collected by the trigger, the entity manager reads the detailed refresh data of the entity from the table data generated offline for the entity information that enters the middle-layer trigger from the near layer, and then creates a decoration model at the corresponding position for long-distance view performance; for the entity information that enters the near layer from the middle layer, put the corresponding decoration model into the cache pool and wait to be reused when the near-layer entity enters the AOI, reducing the overhead of repeated model creation; for the entity information that enters the far layer from the middle layer, directly destroy its corresponding decoration model.

[0143] Step S1170. Update the model cache.

[0144] Destroy the models that have not been successfully reused within a period of time. When the number of models exceeds the maximum number, the excess part will also be destroyed. This step aims to limit the memory overhead of the model cache and avoid useless models occupying a large amount of memory.

[0145] Step S1180. Step iteration.

[0146] After the character's position changes, the script triggers an update. According to the character's latest position, start executing from step S1140 to refresh the long-distance view performance of the client.

[0147] It should be noted that although the various steps of the methods in the present disclosure are described in a specific order in the accompanying drawings, this does not require or imply that these steps must be performed in that specific order, or that all the steps shown must be performed to achieve the desired result. Additionally or alternatively, certain steps may be omitted, multiple steps may be combined into one step for execution, and / or one step may be decomposed into multiple steps for execution, etc.

[0148] Furthermore, the present disclosure also provides a scenario display device, which is applied to a client. Referring to Figure 12 as shown, the scenario display device may include an entity information receiving module 1210, a management information updating module 1220, an attribution information synchronization module 1230, and a scenario entity display module 1240. Among them:

[0149] The entity information receiving module 1210 may be configured to receive entity information synchronization data of scenario entities sent by a server, where the entity information synchronization data includes a scenario number, an entity type, and an entity refresh flag of the scenario entity;

[0150] The management information updating module 1220 may be configured to receive real entity information of scenario entities within an area of interest sent by the server, and update the entity management information in the entity information manager according to the entity information synchronization data and the real entity information of the scenario entities;

[0151] The attribution information synchronization module 1230 may be configured to determine display areas of each layer associated with the current role according to the position of the current role, and synchronize entity attribution change information corresponding to each layer display area to the entity information manager;

[0152] The scenario entity display module 1240 may be configured to update the model display state corresponding to the scenario entity according to the entity management information and the entity attribution change information in the entity information manager.

[0153] In some exemplary embodiments of the present disclosure, the management information updating module 1220 may include a destruction flag removal unit, a creation flag addition unit, and an interest information removal unit. Among them:

[0154] The destruction flag removal unit may be configured to remove the scenario entity from the entity management information if the entity refresh flag of the scenario entity is a destruction flag;

[0155] The creation flag addition unit may be configured to add the scenario entity to the entity management information if the entity refresh flag of the scenario entity is a creation flag;

[0156] The interest information removal unit may be configured to remove the scenario entity from the entity management information if the scenario entity is included in the scenario entities within the area of interest.

[0157] In some exemplary embodiments of the present disclosure, the management information update module 1220 may further include a scene distance determination unit, a long-distance scene removal unit, and a short-distance scene addition unit. Among them:

[0158] The scene distance determination unit may be configured to determine the current scene where the current character is located and the adjacent scenes of the current scene, and obtain the minimum distance between the current character and the adjacent scenes;

[0159] The long-distance scene removal unit may be configured to remove the scene entities in the adjacent scenes from the entity management information if the minimum distance is greater than a preset distance threshold;

[0160] The short-distance scene addition unit may be configured to add the scene entities in the adjacent scenes to the entity management information if the minimum distance is less than or equal to the distance threshold.

[0161] In some exemplary embodiments of the present disclosure, the attribution information synchronization module 1230 may include a display area determination unit for each layer, an entity attribution information determination unit, and an entity attribution change information determination unit. Among them:

[0162] The display area determination unit for each layer may be configured to determine the display areas for each layer associated with the current character according to the position coordinates of the current character and the area ranges respectively corresponding to the display areas for each layer;

[0163] The entity attribution information determination unit may be configured to determine the entity attribution information of the scene entities in the display areas for each layer according to the entity coordinates of the scene entities;

[0164] The entity attribution change information determination unit may be configured to, when the current character moves, determine the entity attribution change information respectively corresponding to the display areas for each layer according to the position coordinates of the current character and the entity coordinates of the scene entities, and synchronize it to the entity information manager.

[0165] In some exemplary embodiments of the present disclosure, the scene entity display module 1240 may include a decorative model creation unit, a real model creation unit, and a decorative model destruction unit. Among them:

[0166] The decorative model creation unit may be configured to, if the scene entity enters the middle layer area from the near layer area, obtain the detailed refresh data of the scene entity from the entity table data generated offline through the middle layer trigger, and create a decorative model corresponding to the scene entity at the entity coordinates of the scene entity;

[0167] The real model creation unit may be configured to, if the scene entity enters the near layer area from the middle layer area, create a real model corresponding to the scene entity at the entity coordinates of the scene entity;

[0168] The decoration model destruction unit can be used to destroy the decoration model corresponding to the scene entity if the scene entity enters the far layer area from the middle layer area.

[0169] In some exemplary embodiments of the present disclosure, the scene entity display module 1240 may further include a real model reuse unit and a decoration model reuse unit. Among them:

[0170] The real model reuse unit can be used to put the real model corresponding to the scene entity into the model cache pool if the scene entity enters the middle layer area from the near layer area, so as to be reused when creating the decoration model corresponding to the scene entity;

[0171] The decoration model reuse unit can be used to put the decoration model corresponding to the scene entity into the model cache pool if the scene entity enters the near layer area from the middle layer area, so as to be reused when creating the real model corresponding to the scene entity.

[0172] In some exemplary embodiments of the present disclosure, the scene entity display module 1240 may further include a first model deletion unit and a second model deletion unit. Among them:

[0173] The first model deletion unit can be used to delete the models in the model cache pool that have not been reused within the preset reuse time range;

[0174] The second model deletion unit can be used to delete some models exceeding the model quantity threshold according to the model reuse data when the number of models in the model cache pool is greater than the model quantity threshold.

[0175] Furthermore, the present disclosure also provides a scene display device, which is applied to a server. Refer to Figure 13 As shown, the scene display device may include an entity information generation module 1310, an entity information update module 1320, and an entity information sending module 1330. Among them:

[0176] The entity information generation module 1310 can be used to determine the entity refresh flag of the scene entity when the scene entity in the current scene is created or destroyed, and obtain the entity information synchronization data of the scene entity according to the scene number of the current scene, the entity type of the scene entity, and the entity refresh flag, where the entity information synchronization data is in a dictionary structure;

[0177] The entity information update module 1320 can be used to send the entity information synchronization data of the scene entities that have changed in the current scene within the preset synchronization period to the scene entities in the adjacent scenes of the current scene, so that the scene entities in the adjacent scenes can update the corresponding entity information synchronization data;

[0178] The entity information sending module 1330 can be used to send the entity information synchronization data of all changed scene entities in the current scene and adjacent scenes to the client, so that the client can update the model display state corresponding to the scene entity according to the entity information synchronization data.

[0179] The specific details of each module / unit in the above scene display device have been described in detail in the corresponding method embodiment section, and will not be repeated here.

[0180] It should be noted that although several modules or units of the device for action execution are mentioned in the above detailed description, this division is not mandatory. In fact, according to the exemplary embodiments of the present disclosure, the features and functions of the two or more modules or units described above can be embodied in one module or unit. Conversely, the features and functions of one module or unit described above can be further divided and embodied by multiple modules or units.

[0181] Figure 14 The structural diagram of a computer system of an electronic device suitable for implementing the embodiments of the present disclosure is shown.

[0182] It should be noted that Figure 14 The computer system 1400 of the electronic device shown is only an example, and should not impose any limitation on the functions and usage scope of the embodiments of the present disclosure.

[0183] As Figure 14 shown, the computer system 1400 includes a central processing unit (CPU) 1401, which can perform various appropriate actions and processes according to the program stored in the read-only memory (ROM) 1402 or the program loaded from the storage section 1408 into the random access memory (RAM) 1403. In the RAM 1403, various programs and data required for system operation are also stored. The CPU 1401, ROM 1402, and RAM 1403 are connected to each other through a bus 1404. The input / output (I / O) interface 1405 is also connected to the bus 1404.

[0184] The following components are connected to the I / O interface 1405: an input section 1406 including a keyboard, a mouse, etc.; an output section 1407 including a cathode ray tube (CRT), a liquid crystal display (LCD), etc. and a speaker, etc.; a storage section 1408 including a hard disk, etc.; and a communication section 1409 including a network interface card such as a LAN card, a modem, etc. The communication section 1409 performs communication processing via a network such as the Internet. A drive 1410 is also connected to the I / O interface 1405 as needed. A removable medium 1411, such as a magnetic disk, an optical disk, a magneto-optical disk, a semiconductor memory, etc., is installed on the drive 1410 as needed so that a computer program read therefrom is installed into the storage section 1408 as needed.

[0185] In particular, according to an embodiment of the present disclosure, the processes described above with reference to the flowcharts can be implemented as computer software programs. For example, an embodiment of the present disclosure includes a computer program product including a computer program carried on a computer-readable medium, the computer program including program codes for performing the methods shown in the flowcharts. In such an embodiment, the computer program can be downloaded and installed from a network via the communication section 1409, and / or installed from the removable medium 1411. When the computer program is executed by a central processing unit (CPU) 1401, various functions defined in the system of the present disclosure are executed.

[0186] An exemplary embodiment of the present disclosure also provides a computer program product. The computer program product includes a computer program which, when executed by a processor, implements the above-described scenario display method.

[0187] In one embodiment, the computer program product may be a tangible product containing a computer program, such as a computer-readable storage medium storing the computer program. The readable storage medium may be a storage medium based on signals such as electricity, magnetism, light, electromagnetic, infrared, etc., including but not limited to: random access memory (RAM), read-only memory (ROM), magnetic tape, floppy disk, flash memory, mechanical hard disk (HDD), solid state drive (SSD), etc. Exemplarily, the computer program product can be implemented as a non-volatile storage medium storing the computer program, such as read-only memory, Nand Flash, etc.

[0188] In one embodiment, the computer program product may be an intangible product containing a computer program. Exemplarily, the computer program product can be implemented as a virtual digital product, such as an executable file storing the computer program, an installation package and other digital files.

[0189] The code of a computer program can be written in one or more programming languages. Examples of programming languages include C, Java, C++, etc. The program code can be executed entirely on the user's computing device, or partially on the user's computing device, or as an independent software package, or partially on the user's computing device and partially on a remote computing device, or entirely on a remote computing device or server. In cases involving a remote computing device, the remote computing device can be connected to the user's computing device via any type of network, such as a local area network (LAN), wide area network (WAN), etc., or it can be connected to an external computing device (e.g., via an Internet connection provided by an operator).

[0190] A computer program can be carried or transmitted by signals such as electrical, magnetic, optical, electromagnetic, infrared, etc. An electronic device can convert the signal carrying the computer program into a digital signal and then run the computer program. When the computer program runs on an electronic device, its code is used to cause the electronic device to execute (more specifically, to cause the processor of the electronic device to execute) the method steps of various exemplary embodiments of the present disclosure, such as the above-described scenario display method can be executed.

[0191] The flowcharts and block diagrams in the accompanying drawings illustrate the possible architectures, functions, and operations of systems, methods, and computer program products according to various embodiments of the present disclosure. In this regard, each block in the flowchart or block diagram may represent a module, a program segment, or a part of code, and the above-mentioned module, program segment, or part of code contains one or more executable instructions for implementing the specified logical function. It should also be noted that in some alternative implementations, the functions marked in the blocks may occur in a different order than that marked in the accompanying drawings. For example, two consecutive blocks shown may actually be executed substantially in parallel, and they may sometimes be executed in the reverse order, depending on the functions involved. It should also be noted that each block in the block diagram or flowchart, and the combination of blocks in the block diagram or flowchart, can be implemented by a dedicated hardware-based system for performing the specified functions or operations, or by a combination of dedicated hardware and computer instructions.

[0192] It should be noted that although several modules of the device for action execution are mentioned in the above detailed description, such a division is not mandatory. In fact, according to the embodiments of the present disclosure, the features and functions of two or more of the above-described modules can be embodied in one module. Conversely, the features and functions of one module described above can be further divided and embodied by multiple modules.

[0193] Other embodiments of the present disclosure will be readily apparent to those skilled in the art upon consideration of the specification and practice of the invention disclosed herein. The present disclosure is intended to cover any variations, uses, or adaptations of the present disclosure that follow the general principles of the present disclosure and include known common general knowledge or conventional technical means in the technical field not disclosed by the present disclosure.

[0194] It should be understood that the present disclosure is not limited to the exact structures described above and shown in the drawings, and various modifications and changes can be made without departing from its scope. The scope of the present disclosure is only limited by the appended claims.

Claims

1. A scene display method, applied to a client, characterized in that: include: Receiving entity information synchronization data of a scene entity sent by a server, wherein the entity information synchronization data includes a scene number, an entity type, and an entity refresh mark of the scene entity; Receiving real entity information of scene entities within the region of interest sent by the server, and updating entity management information in the entity information manager according to entity information synchronization data of the scene entities and the real entity information; Determine each layer of display area associated with the current character according to the position of the current character, and synchronize entity ownership change information corresponding to each layer of display area to the entity information manager; The model display state corresponding to the scene entity is updated according to the entity management information and the entity attribution change information in the entity information manager.

2. The scene display method according to claim 1, characterized in that: The updating of entity management information in the entity information manager according to the entity information synchronization data of the scene entity and the real entity information comprises: If the entity refresh mark of the scene entity is a destruction mark, removing the scene entity from the entity management information; If the entity refresh mark of the scene entity is a creation mark, adding the scene entity to the entity management information; If the scene entity is included in the scene entities within the region of interest, the scene entity is removed from the entity management information.

3. The scene display method according to claim 2, characterized in that: The method further comprises: Determine the current scene where the current character is located and the adjacent scene of the current scene, and obtain the minimum distance between the current character and the adjacent scene; If the minimum distance is greater than a preset distance threshold, removing the scene entity in the adjacent scene from the entity management information; If the minimum distance is less than or equal to the distance threshold, the scene entity in the adjacent scene is added to the entity management information.

4. The scene display method according to claim 1, characterized in that: The determining of each layer of display area associated with the current character according to the position of the current character, and synchronizing entity ownership change information corresponding to each layer of display area to the entity information manager, includes: Determine the display areas of each layer associated with the current character according to the position coordinates of the current character and the area ranges corresponding to the display areas of each layer; Determining entity attribution information of the scene entity in each layer of display area according to the entity coordinates of the scene entity; When the current character moves, the entity ownership change information corresponding to each layer of display area is determined according to the position coordinates of the current character and the entity coordinates of the scene entity and synchronized to the entity information manager.

5. The scene display method according to claim 4, characterized in that: The display areas of each layer include a near layer area, a middle layer area and a far layer area, the entity information manager includes a near layer trigger, a middle layer trigger and a far layer trigger, and the updating of the model display state corresponding to the scene entity according to the entity management information and the entity ownership change information in the entity information manager to create or destroy the scene entity in the scene includes: If the scene entity enters the middle layer area from the near layer area, the detailed refresh data of the scene entity is obtained from the entity table data generated offline through the middle layer trigger, and a decoration model corresponding to the scene entity is created at the entity coordinates of the scene entity; If the scene entity enters the near-layer area from the middle-layer area, a real model corresponding to the scene entity is created at the entity coordinates of the scene entity; If the scene entity enters the far-layer area from the middle-layer area, the decoration model corresponding to the scene entity is destroyed.

6. The scene display method according to claim 5, characterized in that: The method further comprises: If the scene entity enters the middle layer area from the near layer area, the real model corresponding to the scene entity is placed in the model cache pool so that the decoration model corresponding to the scene entity can be reused when it is created; If the scene entity enters the near layer area from the middle layer area, the decoration model corresponding to the scene entity is put into the model buffer pool so that the real model corresponding to the scene entity can be reused when it is created.

7. The scene display method according to claim 6, characterized in that: The method further comprises: Deleting the models in the model cache pool that have not been reused within a preset reuse time range; and When the number of models in the model cache pool is greater than a model number threshold, some models exceeding the model number threshold are deleted according to model reuse data.

8. A scene display method, applied to a server, characterized in that: include: When a scene entity in the current scene is created or destroyed, an entity refresh mark of the scene entity is determined, and entity information synchronization data of the scene entity is obtained according to the scene number of the current scene, the entity type of the scene entity and the entity refresh mark, wherein the entity information synchronization data is a dictionary structure; Sending entity information synchronization data of scene entities that have changed in the current scene within a preset synchronization period to scene entities in adjacent scenes of the current scene, so that the scene entities in the adjacent scenes update corresponding entity information synchronization data; The entity information synchronization data of all changed scene entities in the current scene and the adjacent scenes are sent to the client, so that the client updates the model display status corresponding to the scene entity according to the entity information synchronization data.

9. A scene display device, applied to a client, characterized in that: include: An entity information receiving module, used for receiving entity information synchronization data of a scene entity sent by a server, wherein the entity information synchronization data includes a scene number, an entity type and an entity refresh mark of the scene entity; A management information updating module, configured to receive real entity information of scene entities within the region of interest sent by the server, and update entity management information in the entity information manager according to entity information synchronization data of the scene entities and the real entity information; An affiliation information synchronization module, used to determine each layer of display area associated with the current character according to the position of the current character, and synchronize entity affiliation change information corresponding to each layer of display area to the entity information manager; The scene entity display module is used to update the model display state corresponding to the scene entity according to the entity management information and the entity attribution change information in the entity information manager.

10. A scene display device, applied to a server, characterized in that: include: An entity information generation module, used to determine the entity refresh mark of the scene entity when the scene entity in the current scene is created or destroyed, and obtain the entity information synchronization data of the scene entity according to the scene number of the current scene, the entity type of the scene entity and the entity refresh mark, wherein the entity information synchronization data is a dictionary structure; An entity information updating module, used for sending entity information synchronization data of scene entities that have changed in the current scene within a preset synchronization period to scene entities in adjacent scenes of the current scene, so that the scene entities in the adjacent scenes update corresponding entity information synchronization data; The entity information sending module is used to send entity information synchronization data of all changed scene entities in the current scene and the adjacent scenes to the client, so that the client updates the model display status corresponding to the scene entity according to the entity information synchronization data.

11. An electronic device, characterized in that: include: processor; as well as A memory for storing one or more programs, which, when executed by the processor, enables the processor to implement the scene display method as described in any one of claims 1 to 8.

12. A computer program product, comprising a computer program, characterized in that When the computer program is executed by a processor, the scene display method according to any one of claims 1 to 8 is implemented.