Map construction method and device, data synchronization method and device

By setting up a shared area in the game scene and synchronizing data, the calculation pressure problem caused by frequent scene data acquisition is solved, and the data acquisition and display efficiency is improved.

CN114797105BActive Publication Date: 2025-07-08SHANGHAI HODE INFORMATION TECH CO LTD
View PDF 3 Cites 0 Cited by

Patent Information

Application Number
CN202110068919.4
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2021-01-19
Publication Date
2025-07-08
Estimated Expiration
2041-01-19

AI Technical Summary

Technical Problem

In the prior art, frequent scene data acquisition increases the computing pressure of computing devices, reduces the efficiency of data acquisition, and thus affects the display efficiency of game scene maps.

Method used

By setting a shared area between adjacent scene servers, the first scene server stores and manages the scene data of the shared area, and synchronizes when the scene data changes, frequent data acquisition for different scene servers is reduced.

Benefits of technology

It reduces the computing pressure of computing devices, improves data acquisition efficiency, increases the display efficiency of scene maps, and achieves faster scene data synchronization and display.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN114797105B_ABST
    Figure CN114797105B_ABST
Patent Text Reader

Abstract

The present application provides a map construction method and apparatus, and a data synchronization method and apparatus. The map construction method includes: creating a first scene map, and determining at least one second scene map adjacent to the first scene map; obtaining the at least one second scene map and determining a shared area between the first scene map and the at least one second scene map based on the boundaries of the first scene map and the at least one second scene map. Wherein, a first scene server stores scene data of the at least one second scene map located in the shared area. In the embodiments of the present application, a shared area can be set in the scene maps corresponding to adjacent scene servers, and the first scene server and the second scene server share the scene data of the shared area. In this way, it is not necessary to frequently obtain scene data from different scene servers, reducing the operations of the computing device, and thus reducing the computing pressure on the computing device.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of Internet technologies, and in particular, to a method for constructing a map and a method for data synchronization. This application also relates to a map construction device, a data synchronization device, a computing device, and a computer-readable storage medium. Background Art

[0002] In current game scenarios, a seamless map is usually composed of multiple scene maps, and each scene map corresponds to a server for management. During the game play, the client needs to display the scene map within the field of view of the game character. As the game character moves, the client needs to frequently obtain scene data from different scene servers to display different scene maps. Frequent acquisition of scene data will not only increase the computing pressure on the computing device, but also reduce the efficiency of data acquisition, and further reduce the efficiency of displaying the scene map. Summary of the Invention

[0003] In view of this, embodiments of this application provide a method for constructing a map and a method for data synchronization. This application also relates to a map construction device, a data synchronization device, a computing device, and a computer-readable storage medium, so as to solve the problem in the prior art that frequent acquisition of scene data increases the computing pressure on the computing device, reduces the efficiency of data acquisition, and further reduces the efficiency of displaying the scene map.

[0004] According to the first aspect of the embodiments of this application, a method for constructing a map is provided, which is applied to a first scene server and includes:

[0005] Create a first scene map, and determine at least one second scene map adjacent to the first scene map;

[0006] Obtain the at least one second scene map and determine a shared area between the first scene map and the at least one second scene map based on the boundaries of the first scene map and the at least one second scene map, where the first scene server stores the scene data of the at least one second scene map located in the shared area.

[0007] According to the second aspect of the embodiments of this application, a method for data synchronization is provided, which is applied to a first scene server and includes:

[0008] When it is detected that the scene data in the shared area has changed, obtain the to-be-synchronized scene data that has changed, where the shared area is determined based on the boundaries of the first scene map and at least one second scene map;

[0009] Construct a data synchronization instruction based on the to-be-synchronized scenario data and send it to at least one second scenario server corresponding to the shared area, where the first scenario server stores the scenario data of the at least one second scenario map located in the shared area.

[0010] According to a third aspect of the embodiments of the present application, there is provided a map construction device, which is applied to a first scenario server and includes:

[0011] A creation module, configured to create a first scenario map and determine at least one second scenario map adjacent to the first scenario map;

[0012] A determination module, configured to obtain the at least one second scenario map and determine a shared area between the first scenario map and the at least one second scenario map based on the boundaries of the first scenario map and the at least one second scenario map, where the first scenario server stores the scenario data of the at least one second scenario map located in the shared area.

[0013] According to a fourth aspect of the embodiments of the present application, there is provided a data synchronization device, which is applied to a first scenario server and includes:

[0014] An acquisition module, configured to acquire the to-be-synchronized scenario data that has changed when it is detected that the scenario data in the shared area has changed, where the shared area is determined based on the boundaries of the first scenario map and at least one second scenario map;

[0015] A sending module, configured to construct a data synchronization instruction based on the to-be-synchronized scenario data and send it to at least one second scenario server corresponding to the shared area, where the first scenario server stores the scenario data of the at least one second scenario map located in the shared area.

[0016] According to a fifth aspect of the embodiments of the present application, there is provided a computing device, including a memory, a processor, and computer instructions stored on the memory and executable on the processor, and when the processor executes the instructions, the steps of the methods described in the above aspects are implemented.

[0017] According to a sixth aspect of the embodiments of the present application, there is provided a computer-readable storage medium, which stores computer instructions, and when the instructions are executed by a processor, the steps of the methods described in the above aspects are implemented.

[0018] The map construction method provided by this application creates a first scene map and determines at least one second scene map adjacent to the first scene map; obtains the at least one second scene map and determines a shared area between the first scene map and the at least one second scene map based on the boundaries of the first scene map and the at least one second scene map. Among them, the first scene server stores the scene data of the at least one second scene map located in the shared area. In the embodiments of this application, a shared area can be set in the scene maps corresponding to adjacent scene servers, and the first scene server and the second scene server share the scene data of the shared area. In this way, it is not necessary to frequently obtain scene data from different scene servers. The scene data of the shared area can be obtained from the scene server corresponding to the scene map where the first object is located, reducing the operations of the computing device, thereby reducing the computing pressure of the computing device, increasing the efficiency of data acquisition, and further increasing the efficiency of displaying the scene map. BRIEF DESCRIPTION OF THE DRAWINGS

[0019] Figure 1 is a flowchart of a map construction method provided by an embodiment of this application;

[0020] Figure 2 is a schematic diagram of the correspondence between a scene server and a scene map provided by an embodiment of this application;

[0021] Figure 3 is a schematic diagram of the distribution of scene maps provided by an embodiment of this application;

[0022] Figure 4 is a schematic diagram of a shared area provided by an embodiment of this application;

[0023] Figure 5 is a processing flowchart of a map construction method applied to a game scene provided by an embodiment of this application;

[0024] Figure 6 is another schematic diagram of a shared area provided by an embodiment of this application;

[0025] Figure 7 is a flowchart of a data synchronization method provided by an embodiment of this application;

[0026] Figure 8 is a schematic diagram of a scene map provided by an embodiment of this application;

[0027] Figure 9 is a processing flowchart of a data synchronization method applied to a game scene provided by an embodiment of this application;

[0028] Figure 10It is a schematic structural diagram of a map construction device provided by an embodiment of the present application;

[0029] Figure 11 It is a schematic structural diagram of a data synchronization device provided by an embodiment of the present application;

[0030] Figure 12 It is a structural block diagram of a computing device provided by an embodiment of the present application. Detailed implementation manners

[0031] In the following description, many specific details are set forth in order to provide a thorough understanding of the present application. However, the present application can be implemented in many other ways different from those described herein, and those skilled in the art can make similar extensions without departing from the connotation of the present application. Therefore, the present application is not limited by the specific implementations disclosed below.

[0032] The terms used in one or more embodiments of the present application are for the purpose of describing specific embodiments only and are not intended to limit one or more embodiments of the present application. The singular forms "a", "the", and "said" used in one or more embodiments of the present application and the appended claims are also intended to include the plural forms unless the context clearly indicates otherwise. It should also be understood that the term "and / or" used in one or more embodiments of the present application refers to and includes any or all possible combinations of one or more of the associated listed items.

[0033] It should be understood that although the terms first, second, etc. may be used in one or more embodiments of the present application to describe various information, such information should not be limited to these terms. These terms are only used to distinguish the same type of information from each other. For example, without departing from the scope of one or more embodiments of the present application, the first may also be referred to as the second, and similarly, the second may also be referred to as the first. Depending on the context, the word "if" as used herein may be interpreted as "when" or "while" or "in response to determining".

[0034] First, the noun terms related to one or more embodiments of the present application are explained.

[0035] Scene server: Also known as Game_server (game server), it is a server that hosts a game scene. Each scene server can be a physical host and can be deployed across machines and computer rooms.

[0036] First scene server: A server that manages the first scene map.

[0037] Second scene server: A server that manages the second scene map, and the first scene map and the second scene map are adjacent.

[0038] Initial server: The server corresponding to the scene where the first object is located before switching, which can be the first scene server or the second scene server.

[0039] Target server: The server corresponding to the scene to which the first object needs to be switched, which can be the first scene server or the second scene server.

[0040] Shared server: The server that manages the shared area.

[0041] Shared area: It can be referred to as SA (Share Area), which is an area shared by at least two adjacent scene maps. The scene data of the shared area is stored in the scene servers corresponding to the at least two adjacent scene maps.

[0042] First object: A virtual object in the virtual scene. For example, the first object can be a game character or a game player in the game scene.

[0043] Scene data: It can include weather data, environmental data, object data, etc. of the scene in the scene map. For example, the scene data can include the weather, temperature, there is a mountain at a certain location, there is a tree at a certain location, etc. in the scene map.

[0044] Entity data: It can include the static attribute data and dynamic attribute data of the first object. For example, if the first object is a game character in the game scene, the entity data can be the model of the game character, the position of the game character, the attack value of the game character, etc.

[0045] In this application, a map construction method and a data synchronization method are provided. This application also involves a map construction device, a data synchronization device, a computing device, and a computer-readable storage medium, which will be described in detail one by one in the following embodiments.

[0046] Figure 1 The flowchart of a map construction method provided according to an embodiment of the present application is shown, which is applied to the first scene server and specifically may include the following steps:

[0047] Step 102: Create a first scene map and determine at least one second scene map adjacent to the first scene map.

[0048] In the embodiment of the present application, one scene map corresponds to one scene server, that is, each scene map is managed by a different scene server. For example, refer to Figure 2 , Figure 2 where scene server 1 manages scene Figure 1 number, scene server 2 manages scene Figure 2 number, scene server 3 manages scene Figure 3No., the scene server 4 manages the scene area Figure 4 No.

[0049] As an example, the scene map in the embodiments of the present application, whether it is the first scene map or the second scene map, is a three-dimensional space map in a virtual scene. Moreover, the sizes of the first scene map and the second scene map can be the same. For example, if the virtual scene is a game scene, then the scene map is the game map where players play in the game scene, that is, the game scene includes multiple game maps, and these multiple game maps form a seamless game map.

[0050] Specifically, the first scene server can create the first scene map, the second scene server can create the second scene map, and the first scene server can obtain the vertex coordinates of the second scene map. Based on the vertex coordinates of the second scene map and the vertex coordinates of the first scene map, at least one second scene map adjacent to the first scene map can be determined.

[0051] As an example, assume that the first scene map is an existing scene map, and this first scene map can be spliced with scene maps in any direction to obtain a larger seamless scene map. Therefore, the first scene map is adjacent to at least one second scene map and at most eight second scene maps.

[0052] For example, assume that a newly created second scene map is spliced in the x-axis direction and y-axis direction of the first scene map. Refer to Figure 3 Assume Figure 3 the scene area Figure 4 No. is the first scene map, and the scene areas Figure 1 No., No. 2, No. 3, No. x1, No. x2, No. x3, No. y1, and No. y2 are all second scene maps. Then the scene area Figure 4 No. is adjacent to 8 second scene maps. Moreover, the scene map No. y1 and the scene map No. y2 are second scene maps spliced in the y-axis direction, and the scene map No. x1, the scene map No. x2, and the scene map No. x3 are second scene maps spliced in the x-axis direction.

[0053] Step 104: Obtain the at least one second scene map and determine the shared area between the first scene map and the at least one second scene map based on the boundaries of the first scene map and the at least one second scene map, where the first scene server stores the scene data of the at least one second scene map located in the shared area.

[0054] Among them, the scene data can include weather data, environmental data, object data, etc. of the scene in the scene map. For example, the scene data can include the weather, temperature, there are mountains at a certain location, there are trees at a certain location, etc. in the scene map.

[0055] Specifically, the first scenario server may send a map acquisition request to at least one second scenario server corresponding to a second scenario map. The at least one second scenario server may send the second scenario map to the first scenario server, and then the first scenario server may acquire at least one second scenario map. For each second scenario map, the boundary between the second scenario map and the first scenario map may be determined. According to the field of view, a first sub-region may be determined in the first scenario map with this boundary as the side, and a second sub-region may be determined in the second scenario map with this boundary as the side. Then, the first sub-region and the second sub-region are combined to form the shared region of the first scenario map and the second scenario map.

[0056] As an example, the field of view is the range of the map area that can be displayed by the client corresponding to the first object, which can be understood as the range of the scenario map that the first object can see in the virtual scenario. For example, in the embodiments of the present application, taking a×a×a as one field-of-view unit, the range of the map area that the client can display is b×b×c field-of-view units.

[0057] Among them, the first object is a virtual object in the virtual scenario. For example, if the virtual scenario is a game scenario, the first object may be a game player or a game character.

[0058] In the embodiments of the present application, since the range of the geographical area displayed by the client may include multiple fields of view, when the first object is in a position with adjacent scenario maps, the client needs to display other scenario maps in addition to the currently displayed scenario map, so that the client where the first object is located can detect changes in the scenario data and changes in the second object in other scenario maps.

[0059] For example, referring to Figure 4 , Figure 4 are two cases of the shared region. Among them, the shared region in 4A is the region shared by scenario location Figure 1 and scenario location Figure 2 . 4B includes 5 shared regions, namely SA1, SA2, SA3, SA4, and SA5. And SA1 is the region shared by scenario location Figure 1 and scenario location Figure 2 , SA2 is the region shared by scenario location Figure 1 and scenario location Figure 3 , SA3 is the region shared by scenario location Figure 3 and scenario location Figure 4 , SA4 is the region shared by scenario location Figure 2 and scenario location Figure 4 , SA5 is the region shared by scenario location Figure 1 , scenario location Figure 2 , scenario location Figure 3 and scenario locationFigure 4 The shared area.

[0060] For Figure 4 4A in Figure 1 assuming the map number is the first scene map, and the scene map number Figure 2 is the second scene map. The first scene server can obtain the scene map number Figure 2 and determine the boundaries of the scene map number Figure 2 and the scene map number Figure 1 based on the vertex coordinates of the scene map number Figure 1 and the vertex coordinates of the scene map number Figure 2 . Assuming the width of the field of view is p, then the area in the scene map number Figure 1 with the boundary line as one side, the width of the scene map number Figure 1 as the length, and p as the width can be determined as the first sub-region, and the area in the scene map number Figure 2 with the boundary line as one side, the width of the scene map number Figure 2 as the length, and p as the width can be determined as the second sub-region. Then, the area composed of the first sub-region and the second sub-region is determined as the shared area of the scene map number Figure 1 and the scene map number Figure 2 .

[0061] For Figure 4 4B in Figure 1 , the shared area SA1 between the scene map number Figure 2 and the scene map number Figure 1 can be determined by the above method, the shared area SA2 between the scene map number Figure 3 and the scene map number Figure 2 , the shared area SA4 between the scene map number Figure 4 and the scene map number Figure 3 , and the shared area SA3 between the scene map number Figure 4 . Then, the overlapping part of these four shared areas is determined as the shared area SA5 of these four scene maps.

[0062] Further, after determining the shared area, in order to achieve cross-scenario map and synchronize the player's field of view, the scene data of each other can be stored in the scene servers corresponding to at least two scene maps in the shared area, so as to achieve the synchronization of the scene data between the scene servers with the shared area. In this way, scene data sharing can be achieved. When the first object is in the area of the first scene map in the shared area, the field of view that the client can display includes the area of the second scene map in the shared area. Therefore, the client can obtain the scene data of the second scene map in the shared area from the first scene server for display, so that the first object can see the game content in the second scene map within the range of the first scene map. For example, the movement of the second object, the change of the scene data in the second scene map, etc. can be seen.

[0063] That is to say, the first scene server needs to obtain and store the scene data of the second scene map in the shared area, and also needs to send the scene data of the first scene map in the shared area to the second scene map for storage.

[0064] In a possible implementation manner of the present application, the first scene server can directly communicate with the second scene server, which can improve the efficiency of data transmission. In this implementation manner, the first scene server can store the area range of the shared area, the shared area identifier, the server identifier of each second scene server, and the correspondence between the shared area identifier and the server identifier of the second scene server. In this way, the first server can determine to communicate with a certain second scene server each time.

[0065] In this implementation manner, after determining the shared area between the first scene map and the at least one second scene map based on the boundaries of the first scene map and the at least one second scene map, it may further include: receiving a data acquisition request; acquiring the scene data of the first scene map located in the shared area based on the data acquisition request and sending it to the at least one second scene map.

[0066] Specifically, the first scene server can receive a data acquisition request, which can be sent by at least one second scene server. After receiving the data acquisition request, the first scene server can acquire the scene data of the first scene map located in the shared area and send it to at least one second scene server, so that the second scene server can store the scene data of the first scene map located in the shared area.

[0067] Further, after sending the scene data of the first scene map to at least one second scene map, it may also receive a data reception feedback from the second scene server corresponding to the at least one second scene map for storing the scene data of the first scene map in the shared area.

[0068] As an example, the data reception feedback is generated by the second scenario server after receiving and storing the scenario data of the first scenario map. After receiving the data reception feedback, the first scenario server can confirm that the second scenario server has successfully received and stored the scenario data of the first scenario map.

[0069] Specifically, the first scenario server sends the scenario data of the first scenario map to at least one second scenario map. After receiving the scenario data, at least one second scenario map can store the scenario data, and after the storage is completed, it can send a data reception feedback to the initial server to notify the initial server that at least one second scenario server has successfully received and stored the scenario data of the first scenario map located in the shared area.

[0070] As an example, since one first scenario map is adjacent to at least one second scenario map and at most eight second scenario maps, therefore, the first scenario server needs to send the scenario data located in the shared area to at least one second scenario server at least, and at most needs to send the scenario data located in the shared area to eight second scenario servers.

[0071] In the above manner, at least one second scenario server can store the scenario data of the first scenario map located in the shared area. Then, when any second scenario server determines that the first object is in the shared area, the client can obtain the scenario data of the first scenario map located in the shared area from the second scenario server and display it, without the second scenario server obtaining the scenario data from the first scenario server, which improves the rate of obtaining scenario data, and thus can quickly display the shared area for the user.

[0072] In this implementation manner, after determining the shared area of the first scenario map and the at least one second scenario map based on the boundaries of the first scenario map and the at least one second scenario map, it may further include: sending a data acquisition request to the second scenario servers corresponding to the at least one second scenario map, and receiving and storing the scenario data of the at least one second scenario map located in the shared area sent by the at least one second scenario server in response to the data acquisition request.

[0073] Specifically, the first scenario server may send a data acquisition request to at least one second scenario server to request the scenario data of at least one second scenario map located in the shared area. For the target second scenario server, after receiving the data acquisition request, the target second scenario server may acquire the scenario data of the target second scenario server located in the shared area and send it to the first scenario server. Then, the first scenario server may receive and store the scenario data of the target second scenario map located in the shared area sent by the target second scenario server. For each of the at least one second scenario servers, the scenario data may be sent to the first server in the above manner. In this way, the first scenario server may store the scenario data of at least one second scenario map.

[0074] As an example, since one first scenario map is adjacent to at least one second scenario map and at most eight second scenario maps, in addition to storing the scenario data of the first scenario map, the first scenario server needs to store at least the scenario data of one second scenario map and at most the scenario data of eight second scenario maps.

[0075] Exemplarily, referring to Figure 4 4A in Figure 1 the scene area number may be adjacent only to the Figure 2 scene area number, then there is a shared area corresponding to the Figure 1 scene area number. In addition to storing the scenario data of the Figure 1 scene area number, the first scenario server also needs to store the scenario data of the Figure 2 scene area number.

[0076] Exemplarily, referring to Figure 3 , the Figure 4 scene area number may be adjacent to 8 scenario maps. Then there are 8 shared areas corresponding to the Figure 4 scene area number, namely Shared Area 1, Shared Area 2, Shared Area 3, Shared Area 4, Shared Area 5, Shared Area 6, Shared Area 7, and Shared Area 8. In addition to storing the scenario data of the Figure 1 scene area number, the first scenario server also needs to store the scenario data of the Figure 1 scene area number, the Figure 2 scene area number, the Figure 3 scene area number, and the scenario data of the eight scenario maps, namely Scenario Map x1, Scenario Map x2, Scenario Map x3, Scenario Map y1, and Scenario Map y1.

[0077] In the above manner, the first scenario server can store the scenario data of at least one second scenario map located in the shared area. When the first object is in the area of the first scenario map in the shared area, the client can obtain the scenario data of at least one second scenario map located in the shared area from the first scenario server and display it, without the first scenario server having to obtain the scenario data from at least one second scenario server again, improving the efficiency of data acquisition and thus being able to quickly display the shared area for the user.

[0078] Furthermore, the first scenario server can store the scenario data of the first sub-region and the scenario data of at least one second scenario map located in the shared area as the scenario data of the shared area.

[0079] In another possible implementation manner of the present application, the first scenario server can communicate with at least one second scenario map through a shared server. In this implementation manner, the shared server is used to manage the shared area, and the shared server can store multiple shared area identifiers, the server identifiers of the scenario servers corresponding to at least two scenario maps included in each shared area, and the correspondence between the shared area identifier and the server identifier. Then, the first scenario server can only store the shared area identifier and the area range of the shared area, which can reduce the storage burden of the first scenario server, and the first scenario server does not need to pay attention to which second scenario server to communicate with each time. It only needs to send the data to be sent to the shared server, which can also reduce the computing burden of the first scenario server.

[0080] As an example, the shared server can communicate with the scenario server through a socket connection and the TCP (Transmission Control Protocol) / IP (Internet Protocol) protocol to ensure the reliability of data transmission.

[0081] In this implementation manner, after determining the shared area of the first scenario map and the at least one second scenario map based on the boundaries of the first scenario map and the at least one second scenario map, it can further include: receiving a data acquisition request, where the data acquisition request includes the shared area identifier of the shared area; determining the first sub-region located in the shared area in the first scenario map based on the shared area identifier; obtaining the scenario data of the first sub-region and sending it to the shared server, where the shared server is used to manage the shared area.

[0082] Specifically, the first scenario server can receive a data acquisition request, which can be sent by the sharing server and includes a shared area identifier. After receiving the data acquisition request, the first scenario server determines a first sub-area within the shared area indicated by the shared area identifier based on the shared area identifier, acquires the scenario data of the first sub-area, and sends it to the sharing server. Further, when sending the scenario data of the first sub-area, the first scenario server can also send the shared area identifier to the sharing server. Then, the sharing server can determine at least one second scenario server based on the shared area identifier and send the scenario data of the first sub-area to at least one second scenario server. After receiving the scenario data of the first sub-area, at least one second scenario server can store the scenario data. In this way, the scenario data synchronization between scenario servers with shared areas can be achieved.

[0083] As an example, the sharing server can receive the scenario data of the first sub-area and the shared area identifier of the shared area. Since the correspondence between the shared area identifier stored in the shared area and the server identifier of the scenario server is stored in the shared area, at least two scenario servers corresponding to the shared area can be determined according to the shared area identifier. Among the at least two scenario servers, excluding the first scenario server that sends the scenario data of the first sub-area, the remaining scenario servers are the second scenario servers. The shared area can send the scenario data of the first sub-area to the remaining scenario servers.

[0084] For example, referring to Figure 4 4B in, assume that there are 5 shared identifiers stored in the sharing server, namely SA1, SA2, SA3, SA4, and SA5, and SA1 corresponds to server 1 and server 2, SA2 corresponds to server 1 and server 3, SA3 corresponds to server 3 and server 4, SA4 corresponds to server 2 and server 4, and SA5 corresponds to server 1, server 2, server 3, server 4, and server 5. The sharing server receives the scenario data of the first sub-area and the shared area identifier, and the shared area identifier is SA1. It can be determined that the shared area corresponds to server 1 and server 2, that is, corresponding to scenario server 1 and scenario server 2. Assume that the first scenario server that sends the scenario data of the first sub-area to the sharing server is scenario server 1. Then, the sharing server can determine that scenario server 2 is the second scenario server and send the scenario data of the first sub-area to scenario server 2.

[0085] Further, after the first scenario server sends the scenario data of the first sub-area to the sharing server, it can also receive the result of the second scenario server corresponding to at least one second scenario map storing the scenario data of the first sub-area feedback by the sharing server.

[0086] Specifically, after the first scenario server sends the scenario data of the first sub-region to the shared server, the shared server can send the scenario data of the first sub-region to at least one second scenario server. After receiving and storing the scenario data, the at least one second scenario server can send the result of storing the scenario data of the first sub-region to the shared server. The shared server can send the result to the first scenario server. After receiving the result, the first scenario server can determine that the at least one second scenario server has stored the scenario data of the first scenario map located in the shared area.

[0087] In the above manner, the at least one second scenario server can store the scenario data of the first scenario map located in the shared area. Then, when any second scenario server determines that the first object is in the shared area, the client can obtain and display the scenario data of the first scenario map located in the shared area from the second scenario server, without the second scenario server obtaining the scenario data from the first scenario server through the shared server, improving the efficiency of obtaining scenario data. In addition, in the above manner, the first scenario server can send the scenario data of the first sub-region to the shared server, and the shared server can determine which second scenario server needs to send the scenario data of the first sub-region, reducing the workload of the first scenario server and the resource consumption of the first scenario server.

[0088] In this implementation manner, after determining the shared area of the first scenario map and the at least one second scenario map based on the boundaries of the first scenario map and the at least one second scenario map, it may further include: sending a data acquisition request to the shared server, where the data acquisition request includes the shared area identifier of the shared area, and the shared server is used to manage the shared area; receiving and storing the scenario data of the at least one second scenario map located in the shared area, which is obtained by the at least one second scenario server in response to the data acquisition request and fed back by the shared server.

[0089] Specifically, the first scenario server may send a data acquisition request to the shared server. The data acquisition request may include the shared area identifier of the shared area. After receiving the data acquisition request, the shared server may determine at least one second scenario server according to the shared area identifier, and send the data acquisition request to the at least one second scenario server. At the same time, the shared area identifier may also be sent. For the target second scenario server, after receiving the data acquisition request and the shared area identifier, the target second scenario server may determine the scenario data of the target second scenario map located in the shared area based on the shared area identifier, and send the acquired scenario data to the shared server. At the same time, the shared area identifier is sent. After receiving the scenario data, the shared server determines the first scenario server based on the shared area identifier, and sends the scenario data of the target second scenario map located in the shared area to the first scenario server. Then, the first scenario server may store the scenario data of the target second scenario map in the received shared area. For each of the at least one second scenario servers, the scenario data may be sent to the shared server in the above manner. In this way, the first scenario server may store the scenario data of at least one second scenario map.

[0090] In the above manner, the first scenario server may store the scenario data of at least one second scenario map located in the shared area. Then, when the first object is in the area of the first scenario map in the shared area, the client may obtain and display the scenario data of at least one second scenario map located in the shared area from the first scenario server, without the first scenario server obtaining the scenario data from at least one second scenario server through the shared server, improving the efficiency of scenario data acquisition. In addition, in the above manner, the first scenario server may send the data acquisition request to the shared server, and the shared server determines which second scenario server the data acquisition request needs to be sent to, reducing the workload of the first scenario server and the resource consumption of the first scenario server. And at least one second scenario server sends the scenario data of at least one second scenario map located in the shared area to the shared server, and the shared server determines which first scenario server to send it to, also reducing the workload of the second scenario server and the resource consumption of the second scenario server.

[0091] It should be noted that the above is only an example in which the shared server includes the shared area identifiers of multiple shared areas, that is, one shared server manages multiple shared areas. In actual applications, different shared servers may manage different shared areas, and the shared area may determine which scenario server to send any received data to according to the stored shared area identifier. Exemplarily, see Figure 4 , Figure 4The 4B in it is a game map composed of 4 scene maps, including 5 shared areas, and 5 shared servers can be used for management.

[0092] In addition, in the embodiment of the present application, the shared server is started after the scene servers of at least two scene maps corresponding to the shared area it manages are started.

[0093] It should be noted that any scene server in the embodiment of the present application can be the first scene server or the second scene server, that is, for each scene server, the map construction can be carried out in the above manner.

[0094] Furthermore, the method further includes: when it is detected that the scene data in the shared area has changed, obtaining the to-be-synchronized scene data that has changed; constructing a data synchronization instruction based on the to-be-synchronized scene data and sending it to at least one second scene server corresponding to the shared area.

[0095] Specifically, if the first scene server detects that the scene data in the shared area has changed, in order to synchronize the scene data between different scenes corresponding to the shared area, the to-be-synchronized scene data that has changed can be obtained, and a data synchronization instruction can be generated based on the to-be-synchronized scene data, and the data synchronization instruction is sent to at least one second scene server corresponding to the shared area, so that at least one second scene server can update the stored scene data, realizing the synchronization of the scene data between different scene servers.

[0096] In the embodiment of the present application, during the map construction process, the scene data of at least two scene maps corresponding to the shared area can be stored with each other, and when the scene data changes, it can be updated in time, so that each scene server stores the latest scene data, and it can be avoided that problems occur in the game due to the asynchronization of the scene data of at least two scene maps in the shared area.

[0097] The map construction method provided by this application creates a first scenario map and determines at least one second scenario map adjacent to the first scenario map; obtains the at least one second scenario map and determines the shared area of the first scenario map and the at least one second scenario map based on the boundaries of the first scenario map and the at least one second scenario map. Among them, the first scenario server stores the scenario data of the at least one second scenario map located in the shared area. In the embodiments of this application, a shared area can be set in the scenario maps corresponding to adjacent scenario servers, and the first scenario server and the second scenario server share the scenario data of the shared area. In this way, it is not necessary to frequently obtain scenario data from different scenario servers. The scenario data of the shared area can be obtained from the scenario server corresponding to the scenario map where the first object is located, reducing the operations of the computing device, thereby reducing the computing pressure of the computing device, increasing the efficiency of data acquisition, and further increasing the efficiency of displaying the scenario map.

[0098] The following combines the attached Figure 5 , taking the application of the map construction method provided by this application in a game scenario as an example, to further illustrate the map construction method. Among them, Figure 5 shows a processing flow chart of a map construction method applied to a game scenario provided by an embodiment of this application, which may specifically include the following steps:

[0099] Step 502: The first scenario server creates a first game map, and the second scenario server creates a second game map.

[0100] Step 504: The first scenario server obtains the second game map and determines the shared area of the first game map and the second game map based on the boundaries of the first game map and the second game map.

[0101] Exemplarily, the width of the shared area can be set to twice the width of the field of view, and the widths of the areas of the first game map and the second game map in the shared area are the same. For example, referring to Figure 4 , assuming the width of the shared area is 64, the width of a partial area of the first game map in the shared area is 32, and the width of a partial area of the second game map in the shared area is 32.

[0102] Step 506: The shared server sends a first data acquisition request to the first scenario server, and the first data acquisition request includes the shared area identifier of the shared area.

[0103] It should be noted that the implementation environment of the map construction method provided in the embodiments of the present application may include a first scenario server and at least one second scenario server, or may include a first scenario server, at least one second scenario server, and a shared server. In this embodiment, the implementation environment including a first scenario server, a second scenario server, and a shared server is taken as an example to illustrate the map construction method.

[0104] Step 508: The shared server sends a second data acquisition request to the second scenario server, and the second data acquisition request includes the shared area identifier of the shared area.

[0105] It should be noted that there is no strict order of execution between step 506 and step 508.

[0106] Step 510: The first scenario server receives the data acquisition request and determines the first sub-region of the first game map located in the shared area based on the shared area identifier.

[0107] For example, referring to Figure 6 , the partial area of the first game map located in the shared area is called the first sub-region.

[0108] Step 512: The first scenario server acquires the scene data of the first sub-region and sends it to the shared server, and also sends the shared area identifier.

[0109] Step 514: The second scenario server receives the data acquisition request and determines the second sub-region of the second game map located in the shared area based on the shared area identifier.

[0110] For example, referring to Figure 6 , the partial area of the second game map located in the shared area is called the second sub-region.

[0111] It should be noted that there is no strict order of execution between step 514 and step 510.

[0112] Step 516: The second scenario server acquires the scene data of the second sub-region and sends it to the shared server, and also sends the shared area identifier.

[0113] Step 518: The shared server receives the scene data of the first sub-region and the shared area identifier.

[0114] It should be noted that there is no strict order of execution between step 518 and step 514.

[0115] Step 520: The shared server determines the second scenario server based on the shared area identifier and sends the scene data of the first sub-region to the second scenario server.

[0116] Step 522: The sharing server receives the scenario data of the second sub-region and the sharing region identifier.

[0117] It should be noted that there is no strict order of execution between Step 522 and Step 518.

[0118] Step 524: The sharing server determines the first scenario server based on the sharing region identifier, and sends the scenario data of the second sub-region to the first scenario server.

[0119] Step 526: The second scenario server receives the scenario data of the first sub-region and stores it.

[0120] It should be noted that there is no strict order of execution between Step 526 and Step 522.

[0121] Step 528: The first scenario server receives the scenario data of the second sub-region and stores it.

[0122] It should be noted that there is no strict order of execution between Step 528 and Step 526. Additionally, Steps 504 - 528 are lower-level descriptions of Step 104. For the specific implementation method, reference can be made to the relevant description of Step 104, and this embodiment does not make any limitations in this regard.

[0123] The map construction method provided by this application creates a first scenario map, determines at least one second scenario map adjacent to the first scenario map; obtains the at least one second scenario map and determines the sharing region between the first scenario map and the at least one second scenario map based on the boundaries of the first scenario map and the at least one second scenario map. Among them, the first scenario server stores the scenario data of the at least one second scenario map located in the sharing region. In the embodiments of this application, a sharing region can be set in the scenario maps corresponding to adjacent scenario servers, and the first scenario server and the second scenario server share the scenario data of the sharing region. In this way, it is not necessary to frequently obtain scenario data from different scenario servers. The scenario data of the sharing region can be obtained from the scenario server corresponding to the scenario map where the first object is located, reducing the operations of the computing device, thereby reducing the computing pressure of the computing device, increasing the efficiency of data acquisition, and further increasing the efficiency of displaying the scenario map.

[0124] Figure 7 The flowchart of a data synchronization method provided by an embodiment of this application is shown, which is applied to the first scenario server and specifically may include the following steps:

[0125] Step 702: When it is detected that the scene data in the shared area has changed, obtain the to-be-synchronized scene data that has changed, where the shared area is determined based on the boundaries of the first scene map and at least one second scene map.

[0126] Wherein, the to-be-synchronized scene data is the scene data after the change has occurred.

[0127] It should be noted that the specific implementation method for determining the shared area can be referred to Figure 1 or Figure 5 the relevant description of the corresponding map construction method, which will not be elaborated in this embodiment.

[0128] In implementation, when it is detected that the scene data in the shared area has changed, the specific implementation of obtaining the to-be-synchronized scene data that has changed may include: receiving a data processing instruction, where the data processing instruction includes the location information of the to-be-synchronized scene; if it is determined based on the location information that the to-be-synchronized scene is located in the first sub-region of the first scene map in the shared area, it is determined that the scene data in the shared area has changed; and processing the scene data of the to-be-synchronized scene based on the data processing instruction to obtain the to-be-synchronized scene data.

[0129] As an example, the first scene server may store the scene data of the first sub-region in the first scene map and the scene data of at least one second scene map located in the shared area as the scene data of the shared area. In addition, the first scene server may determine the area range of the first scene map according to the scene data of the first scene map, and determine the area range of the first sub-region according to the scene data of the first sub-region.

[0130] Specifically, the first scene server may receive a data processing instruction from the client corresponding to the first object, and the data processing instruction includes the location information of the to-be-synchronized scene. The first scene server may judge the area range where the to-be-synchronized scene is located based on the location information. If it is determined based on the location information that the to-be-synchronized scene is in the first sub-region of the first scene map in the shared area, it may be determined that the scene data in the shared area has changed. And the first scene server may process the scene data of the to-be-synchronized scene based on the data processing instruction to obtain the processed to-be-synchronized scene data.

[0131] That is, if the first scenario server receives a data processing instruction for the data of the to-be-synchronized scenario in the first scenario map located in the shared area, it can process the scenario data of the synchronized scenario based on this data processing instruction to obtain the to-be-synchronized scenario data. Since at least one second scenario server stores the scenario data of the first scenario map located in the shared area, it is necessary to synchronize the to-be-synchronized scenario data to at least one second scenario server to complete the scenario data synchronization between the scenario servers corresponding to the shared area.

[0132] For example, referring to Figure 8 , Figure 8 there is a tree in the first sub-region of the first scenario map located in the shared area in , assuming that the player wants to cut down this tree, a data processing instruction can be sent from the client to the first scenario server. The data processing instruction includes the location information of the scene where the tree is located. After the first scenario server receives this data processing instruction, it can determine that the tree is located in the first sub-region of the first scenario map in the shared area based on this location information, and then can delete the scenario data related to the tree in the scenario data of the scene where the tree is located based on this data processing instruction, and obtain the processed scenario data of the scene where the tree is located as the to-be-synchronized scenario data.

[0133] It should be noted that the above takes the direct interaction between the client of the first object and the first scenario server as an example. In some embodiments, the client of the first object can interact with the first scenario server through a gateway server, that is, the client sends the data processing instruction to the gateway server, and the gateway server sends the received data processing instruction to the first scenario server.

[0134] In the embodiments of the present application, after receiving the data processing instruction, if it is determined based on the location information that the to-be-synchronized scenario is in the first sub-region of the first scenario map in the shared area, the first scenario server can consider that the scenario data in the shared area has changed, and process the scenario data of the to-be-synchronized scenario based on the data processing instruction to obtain the to-be-synchronized scenario data. In this way, the modification of the scenario data in the shared area can be realized, so that the scenario data in the shared area is always the latest scenario data.

[0135] Step 704: Construct a data synchronization instruction based on the to-be-synchronized scenario data and send it to at least one second scenario server corresponding to the shared area, where the first scenario server stores the scenario data of the at least one second scenario map located in the shared area.

[0136] Among them, the data synchronization instruction is used to instruct at least one second scenario server to synchronize the to-be-synchronized scenario data to the scenario data of the first scenario map stored in at least one second server.

[0137] In the embodiments of the present application, the first scenario server may store the scenario data of at least one second scenario map located in the shared area. Similarly, the target second scenario map in the at least one second scenario map stores the scenario data of the first scenario map located in the shared area. That is, at least two scenario servers corresponding to the shared area store the scenario data of the scenario maps corresponding to each other located in the shared area. The specific implementation can refer to the relevant description of step 104 in the above map construction method, which will not be elaborated here in this embodiment.

[0138] In some embodiments, the to-be-synchronized scenario data and the location information of the to-be-synchronized scenario may be carried in a data synchronization instruction and sent to at least one second scenario server corresponding to the shared area. Correspondingly, for the target scenario server among the at least one second scenario servers, the target scenario server may receive the data synchronization instruction, and determine the to-be-synchronized scenario based on the location information of the to-be-synchronized scenario carried in the data synchronization instruction, and update the stored scenario data of the to-be-synchronized scenario to the to-be-synchronized scenario data.

[0139] In this way, the scenario data synchronization between the scenario maps corresponding to the shared area can be realized, and further, the problem of incorrect scenario data when obtaining the scenario data of the first scenario map from the target second scenario server can be avoided.

[0140] In other embodiments, the first scenario server may communicate with the second scenario server through a shared server. Specifically, the first scenario server may carry the to-be-synchronized scenario data, the location information of the to-be-synchronized scenario, and the shared area identifier of the shared area in a data synchronization instruction, and send the data synchronization instruction to the shared server. The shared server determines at least one second scenario server corresponding to the shared area based on the shared area identifier, and sends the data synchronization instruction to the at least one second scenario server. For the target scenario server among the at least one second scenario servers, the target scenario server may receive the data synchronization instruction, and determine the to-be-synchronized scenario based on the location information of the to-be-synchronized scenario carried in the data synchronization instruction, and update the stored scenario data of the to-be-synchronized scenario to the to-be-synchronized scenario data.

[0141] As an example, after receiving the data synchronization instruction, the shared server may determine the server identifier corresponding to the shared area identifier from the stored corresponding relationship between the shared area identifier and the server identifier, determine at least two scenario servers corresponding to the shared area, determine the scenario servers other than the first scenario server among the at least two scenario servers as the second scenario servers, and send the data synchronization instruction to the second scenario servers.

[0142] In this way, the first scenario server only needs to send the data synchronization instruction to the shared server, and the shared server determines to send the data synchronization instruction to a certain second scenario server, reducing the operations of the first scenario server. In addition, through the above method, the scenario data synchronization between adjacent scenario maps can be achieved, and thus the problem of scenario data errors when obtaining the scenario data of the first scenario map from the target second scenario server can be avoided.

[0143] Further, after sending the data synchronization instruction to at least one second scenario server corresponding to the shared area, the data synchronization result feedback by the at least one second scenario server in response to the data synchronization instruction can also be received.

[0144] In some embodiments, if the first scenario server directly communicates with at least one second scenario server for data, after the at least one second scenario server completes data synchronization in response to the data synchronization instruction, the data synchronization result can be fed back to the first scenario server. The data synchronization result can be that the data synchronization is completed, which is used to notify the first scenario server that the data synchronization has been completed.

[0145] In other embodiments, if the first scenario server and at least one second scenario server communicate for data through the shared server, after the at least one second scenario server completes data synchronization in response to the data synchronization instruction, the data synchronization result can be fed back to the shared server, and the shared area identifier is sent. The shared server determines the first scenario server based on the shared area identifier and sends the data synchronization result to the first scenario server. Then the first scenario server can receive the data synchronization result and can consider that the at least one second scenario server has completed data synchronization.

[0146] In this way, the first scenario server can receive the data synchronization result. If the data synchronization is not completed or fails, the first scenario server can know, and the first scenario server may continue to generate data synchronization instructions and send them to at least one second scenario server, improving the success rate of data synchronization.

[0147] Further, the method further includes: receiving a data processing instruction, where the data processing instruction includes location information of a scene to be synchronized; if it is determined based on the location information that the scene to be synchronized is located in a second sub-region of a target second scene map in the shared region, sending the data processing instruction to a target second scene server, and receiving the scene data of the scene to be synchronized fed back by the target second scene server based on the data processing instruction, where the target second scene server is one of the at least one second scene server, and the target second scene map is the second scene map managed by the target second scene server among the at least one second scene map; updating the stored scene data of the scene to be synchronized to the scene data of the scene to be synchronized.

[0148] Specifically, the first scene server can receive a data processing instruction from a client corresponding to a first object, and the data processing instruction includes location information of a scene to be synchronized. The first scene server can store the area range of the first scene map, the area range of the shared region, and the area range of the target second scene map located in the shared region. If the location information is within the area range of the shared region and within the area range of the target second scene map, it can be determined that the scene to be synchronized is in the second sub-region of the target second scene map in the shared region. Therefore, the data processing instruction can be sent to the target second scene server. After receiving the data synchronization instruction, the target second scene server can determine the scene to be synchronized according to the location information of the scene to be synchronized, and process the scene data of the stored scene to be synchronized based on the data synchronization instruction to obtain the processed scene data of the scene to be synchronized, and send the scene data of the scene to be synchronized to the first scene server. After receiving the scene data of the scene to be synchronized, the first scene server can update the stored scene data of the scene to be synchronized to the scene data of the scene to be synchronized.

[0149] That is, if the first scene server receives a data processing instruction for a scene to be synchronized in the target second scene map, it is necessary to send the data processing instruction to the target second scene server, and the target second scene server processes the scene data of the scene to be synchronized based on the data processing instruction to obtain the scene data of the scene to be synchronized, and synchronizes the scene data of the scene to be synchronized to the first scene server. In this way, the synchronization of scene data between scene maps corresponding to the shared region can be realized.

[0150] It should be noted that the above takes the direct interaction between the client of the first object and the first scene server as an example. In some other embodiments, the client of the first object can interact with the first scene server through a gateway server, that is, the client sends a data processing instruction to the gateway server, and the gateway server sends the received data processing instruction to the first scene server.

[0151] In the above - mentioned manner, the first - scene server can store the scene data of at least one second - scene map located in the shared area. And when the scene data of at least one second - scene map located in the shared area changes, the change can be synchronized to the first - scene server, so that the scene data of at least one second - scene map located in the shared area stored in the first - scene server is the same as the scene data stored in at least one second - scene server. Similarly, the target second - scene server can store the scene data of the first - scene map located in the shared area. And when the scene data of the first - scene map located in the shared area changes, the change can be synchronized to at least one second - scene server, so that the scene data of the first - scene map located in the shared area stored in at least one second - scene server is the same as the scene data stored in the first - scene server.

[0152] Further, when a first object enters the first - scene map, the position information of the first object can be received. If it is determined based on the position information that the first object enters the shared area for the first time, the scene data of at least one second - scene map in the shared area is sent to the client corresponding to the first object.

[0153] Specifically, the position information of the first object sent by the client corresponding to the first object can be received. If it is determined based on this position information that the first object enters the shared area for the first time, at this time, the client needs to display the second sub - area of the second - scene map in the shared area. Since the first - scene server stores the scene data of at least one second - scene map in the shared area, the first - scene server can send the scene data of at least one second - scene map in the shared area to the client corresponding to the first object. After receiving the scene data of at least one second - scene map in the shared area, the client corresponding to the first object can display the area of at least one second - scene map in the shared area while displaying the first - scene map, thus realizing the display of the shared area.

[0154] It should be noted that the above takes the direct interaction between the client of the first object and the first - scene server as an example. In some other embodiments, the client of the first object can interact with the first - scene server through a gateway server, that is, the first - scene server can send the scene data of at least one second - scene map in the shared area to the gateway server, and the gateway server sends the received scene data of at least one second - scene map in the shared area to the first - scene server, then the client of the first object can receive the scene data of at least one second - scene map in the shared area.

[0155] In this way, when the first object is in the shared area, the scene of the shared area can be displayed, that is, the partial scene of the first scene map in the shared area and the partial scene of the second scene map in the shared area can be displayed simultaneously, without waiting until the scene is switched to display the second scene map, which improves the flexibility of scene display. Moreover, the client corresponding to the first object can obtain the scene data of the second scene map located in the shared area from the first scene server, without obtaining it from the second scene server, reducing the steps of obtaining scene data and improving the efficiency of obtaining scene data.

[0156] It should be noted that, in the above embodiment, only the case where the scene data to be synchronized is in one shared area is taken as an example for scene data synchronization. In the embodiments of the present application, assuming that a game map of a game scene is composed of multiple scene maps, there may be multiple shared areas in the game map. Priorities can be set for the multiple shared areas in advance. When it is detected that the scene data in at least two shared areas has changed, that is, when the scene data to be synchronized is in two shared areas, the scene data can be synchronized in the order of priorities. For the specific synchronization process, reference can be made to the relevant descriptions in the above embodiments.

[0157] For example, referring to Figure 4 4B in, assuming that SA1, SA2, SA3, and SA4 are shared areas with priority level 1, and SA5 is a shared area with priority level 2. When the scene data to be synchronized is located in the circular area in the figure, this scene data to be synchronized belongs to SA1, SA2, and SA5. Since the priority of SA5 is higher than that of SA1 and SA2, the scene data in SA5 can be synchronized first, or the scene data in only SA1 or SA2 can be synchronized.

[0158] The data synchronization method provided in the present application, when it is detected that the scene data in the shared area has changed, obtains the scene data to be synchronized that has changed, where the shared area is determined based on the boundaries of the first scene map and at least one second scene map; constructs a data synchronization instruction based on the scene data to be synchronized and sends it to at least one second scene server corresponding to the shared area, where the first scene server stores the scene data of the at least one second scene map located in the shared area; and receives the data synchronization result feedback by the at least one second scene server in response to the data synchronization instruction. In the embodiments of the present application, the scene servers corresponding to at least two adjacent scene maps store the scene data of each other located in the shared area, and when the scene data of the first scene map located in the shared area has changed, the changed scene data to be synchronized can be sent to at least one second scene server, so that at least one second scene server can update the stored scene data of the first scene map located in the shared area, and the scene data synchronization between the scene servers corresponding to the shared area can be realized.

[0159] The following, in combination with the attached Figure 9 , taking the application of the data synchronization method provided in this application in a game scenario as an example, further illustrates the data synchronization method. Among them, Figure 9 FIG. shows a processing flow chart of a data synchronization method applied to a game scenario provided by an embodiment of this application, which may specifically include the following steps:

[0160] Step 902: The first scenario server receives a data processing instruction, where the data processing instruction includes the location information of the scenario to be synchronized.

[0161] For example, during the process that a game character is in the first game map, if the client corresponding to the game character detects a data processing instruction for the scenario to be synchronized, it can send the data processing instruction to the first scenario server, and then the first scenario server receives the data processing instruction.

[0162] Step 904: If the first scenario server determines based on the location information that the scenario to be synchronized is located in the first sub-region of the first game map in the shared area, it can process the scenario data of the scenario to be synchronized based on the data processing instruction to obtain the scenario data of the scenario to be synchronized after the change.

[0163] Among them, the shared area is determined based on the boundaries of the first game map and the target second game map.

[0164] Step 906: The first scenario server carries the scenario data to be synchronized and the location information of the scenario to be synchronized in a data synchronization instruction and sends it to the shared server, and sends a shared area identifier to the shared server.

[0165] It should be noted that the implementation environment of the data synchronization method provided in the embodiments of this application includes a first scenario server and at least one second scenario server, or may include a first scenario server, at least one second scenario server, and a shared server. This embodiment only takes the implementation environment including a first scenario server, a target second scenario server, and a shared server as an example to illustrate the data synchronization method.

[0166] Step 908: The shared server determines the target second scenario server corresponding to the shared area based on the shared area identifier, and sends the data synchronization instruction to the target second scenario server.

[0167] Specifically, the target second scenario server stores the scenario data of the first game map located in the shared area. Therefore, when the scenario data of the first game map located in the shared area changes, the changed scenario data needs to be synchronized to the target second scenario server through the shared server, so that the scenario data of the first game map located in the shared area stored in the target second scenario server is synchronized and updated.

[0168] As an example, the shared server can store the correspondence between the shared area identifier and the server identifier. The shared server can determine the server identifiers of the two scenario servers corresponding to the shared area based on the shared area identifier. One of them is the server identifier of the first scenario server, and the scenario server indicated by the other server identifier can be determined as the target second scenario server.

[0169] Step 910: The target second scenario server updates the scenario data of the to-be-synchronized scenario stored based on the data synchronization instruction to the to-be-synchronized scenario data, and sends the data synchronization result and the shared area identifier to the shared server.

[0170] Step 912: The shared server determines the first scenario server based on the shared area identifier and sends the data synchronization result to the first scenario server.

[0171] Step 914: The first scenario server receives the data synchronization result fed back by the shared server.

[0172] Step 916: If the first scenario server determines that the to-be-synchronized scenario is located in the second sub-region of the target second game map in the shared area based on the location information, it sends a data processing instruction to the shared server and sends the shared area identifier.

[0173] Specifically, if the first scenario server determines that the to-be-synchronized scenario is not in the first game map, the first scenario server cannot execute the data processing instruction and can send the data processing instruction to the shared server.

[0174] It should be noted that step 916 and step 904 are in a parallel relationship and there is no strict order of execution.

[0175] Step 918: The shared server determines the target second scenario server based on the shared area identifier and sends the data processing instruction to the target second scenario server, where the data synchronization instruction includes the location information of the to-be-synchronized scenario.

[0176] Step 920: The target second scenario server determines the to-be-synchronized scenario according to the location information of the to-be-synchronized scenario.

[0177] Step 922: The target second scenario server processes the scenario data of the to-be-synchronized scenario based on the data processing instruction to obtain the to-be-synchronized scenario data.

[0178] Step 924: The target second scenario server sends the to-be-synchronized scenario data to the shared server and sends the shared area identifier to the shared server.

[0179] Step 926: The shared server determines the first scenario server based on the shared area identifier and sends the to-be-synchronized scenario data to the first scenario server.

[0180] Specifically, the scenario data of the target second game map located in the shared area is stored in the first scenario server. Therefore, when the scenario data of the target second game map located in the shared area changes, the changed scenario data needs to be synchronized to the first scenario server through the shared server, so that the scenario data of the target second game map located in the shared area stored in the first scenario server is updated synchronously.

[0181] Step 928: The first scenario server receives the to-be-synchronized scenario data and updates the scenario data of the to-be-synchronized scenario stored therein to the to-be-synchronized scenario data.

[0182] In the data synchronization method provided by this application, in the case of detecting that the scenario data in the shared area has changed, the to-be-synchronized scenario data that has changed is obtained, where the shared area is determined based on the boundaries of the first scenario map and at least one second scenario map; a data synchronization instruction is constructed based on the to-be-synchronized scenario data and sent to at least one second scenario server corresponding to the shared area, where the first scenario server stores the scenario data of the at least one second scenario map located in the shared area; and the data synchronization result fed back by the at least one second scenario server in response to the data synchronization instruction is received. In the embodiments of this application, the scenario servers corresponding to at least two adjacent scenario maps store the scenario data of each other located in the shared area, and when the scenario data of the first scenario map located in the shared area changes, the changed to-be-synchronized scenario data can be sent to at least one second scenario server, so that at least one second scenario server can update the scenario data of the first scenario map located in the shared area stored therein, and the scenario data synchronization between the scenario servers corresponding to the shared area can be realized.

[0183] Corresponding to the above embodiment of the map construction method, this application also provides an embodiment of a map construction device. Figure 10 The structural schematic diagram of a map construction device provided by an embodiment of this application is shown. As Figure 10 shown, applied to the first scenario server, the device includes:

[0184] The creation module 1002 is configured to create a first scene map and determine at least one second scene map adjacent to the first scene map;

[0185] The determination module 1004 is configured to obtain the at least one second scene map and determine a shared area between the first scene map and the at least one second scene map based on the boundaries of the first scene map and the at least one second scene map, wherein a first scene server stores scene data of the at least one second scene map located in the shared area.

[0186] Optionally, the determination module 1004 is further configured to:

[0187] Receive a data acquisition request;

[0188] Obtain scene data of the first scene map located in the shared area based on the data acquisition request and send it to the at least one second scene map.

[0189] Optionally, the determination module 1004 is further configured to:

[0190] Receive a data acquisition request, wherein the data acquisition request includes a shared area identifier of the shared area;

[0191] Determine a first sub-region of the first scene map located in the shared area based on the shared area identifier;

[0192] Obtain scene data of the first sub-region and send it to a shared server, wherein the shared server is used to manage the shared area.

[0193] Optionally, the determination module 1004 is further configured to:

[0194] Send a data acquisition request to a second scene server corresponding to the at least one second scene map, and receive and store scene data of the at least one second scene map located in the shared area sent by the at least one second scene server in response to the data acquisition request.

[0195] Optionally, the determination module 1004 is further configured to:

[0196] Send a data acquisition request to a shared server, wherein the data acquisition request includes a shared area identifier of the shared area, and the shared server is used to manage the shared area;

[0197] Receive and store scene data of the at least one second scene map located in the shared area acquired by the at least one second scene server in response to the data acquisition request and fed back by the shared server.

[0198] Optionally, the determining module 1004 is further configured to:

[0199] When it is detected that the scene data in the shared area has changed, obtain the to-be-synchronized scene data that has changed;

[0200] Construct a data synchronization instruction based on the to-be-synchronized scene data and send it to at least one second scene server corresponding to the shared area.

[0201] The map construction method provided in this application creates a first scene map, determines at least one second scene map adjacent to the first scene map; obtains the at least one second scene map and determines a shared area between the first scene map and the at least one second scene map based on the boundaries of the first scene map and the at least one second scene map. Among them, the first scene server stores the scene data of the at least one second scene map located in the shared area. In the embodiments of this application, a shared area can be set in the scene maps corresponding to adjacent scene servers, and the first scene server and the second scene server share the scene data of the shared area. In this way, it is not necessary to frequently obtain scene data from different scene servers. The scene data of the shared area can be obtained from the scene server corresponding to the scene map where the first object is located, reducing the operations of the computing device, thereby reducing the computing pressure of the computing device, increasing the efficiency of data acquisition, and further increasing the efficiency of displaying the scene map.

[0202] The above is a schematic solution of a map construction device according to this embodiment. It should be noted that the technical solution of this map construction device and the technical solution of the above map construction method belong to the same concept. For the details not described in detail in the technical solution of the map construction device, reference can be made to the description of the technical solution of the above map construction method.

[0203] Corresponding to the above data synchronization method embodiment, this application also provides a data synchronization device embodiment. Figure 11 The structure diagram of a data synchronization device provided by an embodiment of this application is shown. As Figure 11 shown, applied to the first scene server, the device includes:

[0204] An obtaining module 1102, configured to obtain the to-be-synchronized scene data that has changed when it is detected that the scene data in the shared area has changed, where the shared area is determined based on the boundaries of the first scene map and at least one second scene map;

[0205] A sending module 1104, configured to construct a data synchronization instruction based on the to-be-synchronized scenario data and send it to at least one second scenario server corresponding to the shared area, where the first scenario server stores scenario data of the at least one second scenario map located in the shared area.

[0206] Optionally, the obtaining module 1102 is configured to:

[0207] Receive a data processing instruction, where the data processing instruction includes location information of the to-be-synchronized scenario;

[0208] If it is determined based on the location information that the to-be-synchronized scenario is located in a first sub-region of the first scenario map in the shared area, it is determined that the scenario data in the shared area has changed;

[0209] Process the scenario data of the to-be-synchronized scenario based on the data processing instruction to obtain the to-be-synchronized scenario data.

[0210] Optionally, the sending module 1104 is further configured to:

[0211] Receive a data processing instruction, where the data processing instruction includes location information of the to-be-synchronized scenario;

[0212] If it is determined based on the location information that the to-be-synchronized scenario is located in a second sub-region of a target second scenario map in the shared area, send the data processing instruction to the target second scenario server, and receive the to-be-synchronized scenario data fed back by the target second scenario server based on the data processing instruction, where the target second scenario server is one of the at least one second scenario server, and the target second scenario map is the second scenario map managed by the target second scenario server among the at least one second scenario map;

[0213] Update the stored scenario data of the to-be-synchronized scenario to the to-be-synchronized scenario data.

[0214] Optionally, the sending module 1104 is further configured to:

[0215] Receive location information of a first object;

[0216] If it is determined based on the location information that the first object enters the shared area for the first time, send the scenario data of the at least one second scenario map in the shared area to the client corresponding to the first object.

[0217] The data synchronization method provided by this application, in the case of detecting that the scenario data in the shared area has changed, obtains the to-be-synchronized scenario data that has changed, where the shared area is determined based on the boundaries of the first scenario map and at least one second scenario map; constructs a data synchronization instruction based on the to-be-synchronized scenario data and sends it to at least one second scenario server corresponding to the shared area, where the first scenario server stores the scenario data of the at least one second scenario map located in the shared area; receives the data synchronization result fed back by the at least one second scenario server in response to the data synchronization instruction. In the embodiments of this application, the scenario servers corresponding to at least two adjacent scenario maps store the scenario data of each other located in the shared area, and when the scenario data of the first scenario map located in the shared area changes, the changed to-be-synchronized scenario data can be sent to at least one second scenario server, so that at least one second scenario server can update the stored scenario data of the first scenario map located in the shared area, and the scenario data synchronization between the scenario servers corresponding to the shared area can be realized.

[0218] The above is a schematic solution of a data synchronization device in this embodiment. It should be noted that the technical solution of this data synchronization device and the technical solution of the above data synchronization method belong to the same concept. For the details not described in the technical solution of the data synchronization device, reference can be made to the description of the technical solution of the above data synchronization method.

[0219] Figure 12 FIG. shows a structural block diagram of a computing device 1200 according to an embodiment of the present application. The components of the computing device 1200 include, but are not limited to, a memory 1210 and a processor 1220. The processor 1220 is connected to the memory 1210 through a bus 1230, and a database 1250 is used to store data.

[0220] The computing device 1200 further includes an access device 1240, and the access device 1240 enables the computing device 1200 to communicate via one or more networks 1260. Examples of these networks include a public switched telephone network (PSTN), a local area network (LAN), a wide area network (WAN), a personal area network (PAN), or a combination of communication networks such as the Internet. The access device 1240 may include one or more of any type of wired or wireless network interfaces (for example, a network interface card (NIC)), such as an IEEE802.11 wireless local area network (WLAN) wireless interface, a worldwide interoperability for microwave access (Wi-MAX) interface, an Ethernet interface, a universal serial bus (USB) interface, a cellular network interface, a Bluetooth interface, a near field communication (NFC) interface, and so on.

[0221] In an embodiment of the present application, the above components of the computing device 1200 andFigure 12 Other components not shown may also be connected to each other, for example, via a bus. It should be understood that Figure 12 the block diagram of the computing device shown is for illustrative purposes only and is not a limitation on the scope of the present application. Those skilled in the art can add or replace other components as needed.

[0222] The computing device 1200 can be any type of stationary or mobile computing device, including a mobile computer or mobile computing device (e.g., a tablet computer, personal digital assistant, laptop computer, notebook computer, netbook, etc.), a mobile phone (e.g., a smart phone), a wearable computing device (e.g., a smart watch, smart glasses, etc.) or other types of mobile devices, or a stationary computing device such as a desktop computer or PC. The computing device 1200 can also be a mobile or stationary server.

[0223] Wherein, when the processor 1220 executes the instructions, it implements the steps of the map construction method described above, or implements the steps of the data synchronization method described above.

[0224] The above is a schematic solution of a computing device in this embodiment. It should be noted that the technical solution of the computing device for implementing the map construction method and the technical solution of the above map construction method belong to the same concept. For the detailed content not described in the technical solution of the computing device, reference can be made to the description of the technical solution of the above map construction method. Or, the technical solution of the computing device for implementing the data synchronization method and the technical solution of the above data synchronization method belong to the same concept. For the detailed content not described in the technical solution of the computing device, reference can be made to the description of the technical solution of the above data synchronization method.

[0225] An embodiment of the present application also provides a computer-readable storage medium, which stores computer instructions that, when executed by a processor, implement the steps of the map construction method as described above, or implement the steps of the data synchronization method as described above.

[0226] The above is a schematic solution of a computer-readable storage medium in this embodiment. It should be noted that the technical solution of the storage medium for implementing the map construction method and the technical solution of the above map construction method belong to the same concept. For the detailed content not described in the technical solution of the storage medium, reference can be made to the description of the technical solution of the above map construction method. Or, the technical solution of the storage medium for implementing the data synchronization method and the technical solution of the above data synchronization method belong to the same concept. For the detailed content not described in the technical solution of the storage medium, reference can be made to the description of the technical solution of the above data synchronization method.

[0227] The above describes specific embodiments of the present application. Other embodiments are within the scope of the appended claims. In some cases, the acts or steps recited in the claims may be performed in a different order than in the embodiments and still achieve the desired result. Additionally, the processes depicted in the accompanying drawings do not necessarily require the particular order or sequential order shown to achieve the desired result. In certain embodiments, multitasking and parallel processing are also possible or may be advantageous.

[0228] The computer instructions include computer program code, which may be in source code form, object code form, executable file, or some intermediate form, etc. The computer-readable medium may include: any entity or device capable of carrying the computer program code, recording medium, USB flash drive, removable hard disk, magnetic disk, optical disc, computer memory, read-only memory (ROM), random access memory (RAM), electrical carrier signal, telecommunication signal, and software distribution medium, etc. It should be noted that the content included in the computer-readable medium can be appropriately increased or decreased according to the requirements of legislation and patent practice in the jurisdiction. For example, in some jurisdictions, according to legislation and patent practice, the computer-readable medium does not include electrical carrier signals and telecommunication signals.

[0229] It should be noted that for the foregoing method embodiments, for the sake of simplicity of description, they are all expressed as a series of action combinations. However, those skilled in the art should be aware that the present application is not limited by the described order of actions, because according to the present application, certain steps can be performed in other orders or simultaneously. Secondly, those skilled in the art should also be aware that the embodiments described in the specification are all preferred embodiments, and the actions and modules involved are not necessarily essential to the present application.

[0230] In the above embodiments, the descriptions of the various embodiments have their own emphases. For the parts not detailed in a certain embodiment, reference can be made to the relevant descriptions of other embodiments.

[0231] The preferred embodiments of the present application disclosed above are only used to help explain the present application. The optional embodiments do not elaborate on all the details, nor do they limit the invention to the specific embodiments described. Obviously, many modifications and variations can be made according to the content of the present application. The present application selects and specifically describes these embodiments to better explain the principles and practical applications of the present application, so that those skilled in the art can understand and utilize the present application well. The present application is only limited by the claims and their full scope and equivalents.

Claims

1. A method for map construction, characterized in that, Applied to the first scenario server, the method includes: Create a first scenario map and determine at least one second scenario map adjacent to the first scenario map; Obtain the at least one second scenario map and determine the shared area of the first scenario map and the at least one second scenario map based on the boundaries of the first scenario map and the at least one second scenario map. Among them, the first scenario server stores the scenario data of the at least one second scenario map located in the shared area; Among them, after determining the shared area of the first scenario map and the at least one second scenario map based on the boundaries of the first scenario map and the at least one second scenario map, it further includes: Receive a data acquisition request; Obtain the scenario data of the first scenario map located in the shared area based on the data acquisition request and send it to the at least one second scenario map.

2. The map construction method according to claim 1, characterized in that, After determining the shared area of the first scenario map and the at least one second scenario map based on the boundaries of the first scenario map and the at least one second scenario map, it further includes: Receive a data acquisition request, where the data acquisition request includes a shared area identifier of the shared area; Determine a first sub-area located in the shared area in the first scenario map based on the shared area identifier; Obtain the scenario data of the first sub-area and send it to a shared server, where the shared server is used to manage the shared area.

3. The map construction method according to claim 1, wherein After determining the shared area of the first scenario map and the at least one second scenario map based on the boundaries of the first scenario map and the at least one second scenario map, it further includes: Send a data acquisition request to the second scenario server corresponding to the at least one second scenario map, and receive and store the scenario data of the at least one second scenario map located in the shared area sent by the at least one second scenario server in response to the data acquisition request.

4. The map construction method according to claim 1 or 2, characterized in that, After determining the shared area of the first scenario map and the at least one second scenario map based on the boundaries of the first scenario map and the at least one second scenario map, it further includes: Send a data acquisition request to a shared server, where the data acquisition request includes a shared area identifier of the shared area, and the shared server is used to manage the shared area; Receive and store the scenario data of the at least one second scenario map located in the shared area obtained by the at least one second scenario server in response to the data acquisition request and fed back by the shared server.

5. The map construction method according to claim 1, characterized in that The method further includes: In the case of detecting that the scenario data in the shared area has changed, obtain the to-be-synchronized scenario data that has changed; Construct a data synchronization instruction based on the to-be-synchronized scenario data and send it to at least one second scenario server corresponding to the shared area.

6. A data synchronization method, characterized in that, Applied to the first scenario server, the method includes: In the case of detecting that the scenario data in the shared area has changed, obtain the to-be-synchronized scenario data that has changed, where the shared area is determined based on the boundaries of the first scenario map and at least one second scenario map; Construct a data synchronization instruction based on the to-be-synchronized scenario data and send it to at least one second scenario server corresponding to the shared area, where the first scenario server stores the scenario data of the at least one second scenario map located in the shared area; Wherein, the first scenario server is further configured to: Receive a data acquisition request; Acquire the scenario data of the first scenario map located in the shared area based on the data acquisition request and send it to the at least one second scenario map.

7. The data synchronization method according to claim 6, characterized in that, In the case of detecting a change in the scenario data in the shared area, acquiring the to-be-synchronized scenario data that has changed, including: Receive a data processing instruction, where the data processing instruction includes the location information of the to-be-synchronized scenario; If it is determined based on the location information that the to-be-synchronized scenario is located in the first sub-region of the first scenario map in the shared area, it is determined that a change has occurred in the scenario data in the shared area; Process the scenario data of the to-be-synchronized scenario based on the data processing instruction to obtain the to-be-synchronized scenario data.

8. The data synchronization method according to claim 6, wherein The method further includes: Receive a data processing instruction, where the data processing instruction includes the location information of the to-be-synchronized scenario; If it is determined based on the location information that the to-be-synchronized scenario is located in the second sub-region of the target second scenario map in the shared area, send the data processing instruction to the target second scenario server, and receive the to-be-synchronized scenario data fed back by the target second scenario server based on the data processing instruction, where the target second scenario server is one of the at least one second scenario servers, and the target second scenario map is the second scenario map managed by the target second scenario server among the at least one second scenario maps; Update the stored scenario data of the to-be-synchronized scenario to the to-be-synchronized scenario data.

9. The data synchronization method according to any one of claims 6-8, characterized in that, The method further includes: Receive the location information of the first object; If it is determined based on the location information that the first object enters the shared area for the first time, send the scenario data of the at least one second scenario map in the shared area to the client corresponding to the first object.

10. A map construction device, characterized in that, Applied to a first scenario server, the device includes: A creation module, configured to create a first scenario map and determine at least one second scenario map adjacent to the first scenario map; A determination module, configured to acquire the at least one second scenario map and determine the shared area of the first scenario map and the at least one second scenario map based on the boundaries of the first scenario map and the at least one second scenario map, where the first scenario server stores the scenario data of the at least one second scenario map located in the shared area; Wherein, the determination module is further configured to: Receive a data acquisition request; Acquire the scenario data of the first scenario map located in the shared area based on the data acquisition request and send it to the at least one second scenario map.

11. A data synchronization device, characterized in that, Applied to a first scenario server, the device includes: An acquisition module, configured to acquire the to-be-synchronized scenario data that has changed when it is detected that the scenario data in the shared area has changed, wherein the shared area is determined based on the boundaries of a first scenario map and at least one second scenario map; A sending module, configured to construct a data synchronization instruction based on the to-be-synchronized scenario data and send it to at least one second scenario server corresponding to the shared area, wherein the first scenario server stores the scenario data of the at least one second scenario map located in the shared area; Wherein, the sending module is further configured to: Receive a data acquisition request; Acquire the scenario data of the first scenario map located in the shared area based on the data acquisition request and send it to the at least one second scenario map.

12. A computing device, comprising a memory, a processor, and computer instructions stored on the memory and executable on the processor, characterized in that, When the processor executes the instruction, it implements the steps of the map construction method according to any one of claims 1-5, or implements the steps of the data synchronization method according to any one of claims 7-10.

13. A computer-readable storage medium storing computer instructions, characterized in that, When the instruction is executed by the processor, it implements the steps of the map construction method according to any one of claims 1-5, or implements the steps of the data synchronization method according to any one of claims 6-9.

14. A computer program product, the computer program product comprising computer instructions, characterized in that, When the computer instruction is executed by the processor, it implements the steps of the map construction method according to any one of claims 1-5, or implements the steps of the method according to any one of claims 6-9.

Citation Information

Patent Citations

  • Cross server method and system of network game

    CN103795782A

  • Seamless world game server system

    CN106453223A

  • Method for processing the data distributed at online game server and a system thereof

    CN1918574A