[go: up one dir, main page]

CN112675538B - Data synchronization method, device, equipment and medium - Google Patents

Data synchronization method, device, equipment and medium Download PDF

Info

Publication number
CN112675538B
CN112675538B CN202011582049.4A CN202011582049A CN112675538B CN 112675538 B CN112675538 B CN 112675538B CN 202011582049 A CN202011582049 A CN 202011582049A CN 112675538 B CN112675538 B CN 112675538B
Authority
CN
China
Prior art keywords
modification
scene
control process
value
client
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN202011582049.4A
Other languages
Chinese (zh)
Other versions
CN112675538A (en
Inventor
谢亚晋
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Tencent Technology Shenzhen Co Ltd
Original Assignee
Tencent Technology Shenzhen Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Tencent Technology Shenzhen Co Ltd filed Critical Tencent Technology Shenzhen Co Ltd
Priority to CN202011582049.4A priority Critical patent/CN112675538B/en
Publication of CN112675538A publication Critical patent/CN112675538A/en
Application granted granted Critical
Publication of CN112675538B publication Critical patent/CN112675538B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02PCLIMATE CHANGE MITIGATION TECHNOLOGIES IN THE PRODUCTION OR PROCESSING OF GOODS
    • Y02P90/00Enabling technologies with a potential contribution to greenhouse gas [GHG] emissions mitigation
    • Y02P90/02Total factory control, e.g. smart factories, flexible manufacturing systems [FMS] or integrated manufacturing systems [IMS]

Landscapes

  • Information Transfer Between Computers (AREA)

Abstract

The application discloses a data synchronization method, a device, equipment and a medium, and relates to the field of data processing. The method is applied to a server, a main control process and at least two scene processes are arranged in the server, and the method comprises the following steps: synchronizing attribute information of a target virtual object through a scene process and a client, wherein the clients corresponding to different scene processes are different; and synchronizing attribute information of the target virtual object through the master control process and the scene process. According to the data synchronization method disclosed by the application, the attribute information of the target virtual object is issued to a plurality of scene processes through the master control process, so that the target virtual objects in at least two different scene processes can share the same attribute information.

Description

Data synchronization method, device, equipment and medium
Technical Field
The present invention relates to the field of data processing, and in particular, to a data synchronization method, apparatus, device, and medium.
Background
In a network game with a virtual environment, such as a multiplayer online role playing game, a player may play one or more virtual roles and control the activities and behaviors of the virtual roles in the virtual world in the game.
In a player engagement environment, a player controls a virtual character to challenge a virtual object controlled by a game program in a game, the virtual object having one or more attribute information, and a server synchronously updates the attribute information of the virtual object in response to an operation of the player. For example, the virtual object is a monster, the attribute information of which is a blood volume value, which decreases after a player attacks the monster, and which dies when the blood volume value decreases to 0.
When the number of players is large, a plurality of players are scattered in different scene processes, and the server synchronizes the attribute information of the virtual object through the scene process where the player is located. Because the data synchronization among different scene processes is not interfered and influenced, the different scene processes respectively carry out injury statistics and rewarding settlement, so that the attribute information of the same virtual object is different in the different scene processes, and players in the different scene processes cannot fight with the same virtual object together.
Disclosure of Invention
The embodiment of the application provides a data synchronization method, a device, equipment and a medium, which realize that target virtual objects in a plurality of scene processes share the same attribute information, so that a plurality of players can fight with the same virtual object together. The technical scheme is as follows:
According to one aspect of the present application, a data synchronization method is provided, which is applied to a server, wherein a master control process and at least two scene processes are provided in the server, and the method includes:
synchronizing attribute information of a target virtual object through a scene process and a client, wherein the clients corresponding to different scene processes are different;
and synchronizing attribute information of the target virtual object through the master control process and the scene process.
According to one aspect of the present application, there is provided a data synchronization device, applied to a server, where a master control process and at least two scene processes are disposed in the server, the device includes:
the scene process synchronization module is used for synchronizing attribute information of a target virtual object with the client through scene processes, and clients corresponding to different scene processes are different;
and the master control process synchronization module is used for synchronizing attribute information of the target virtual object with the scene process through the master control process.
According to one aspect of the present application, there is provided a computer device comprising a processor and a memory, the memory having stored therein at least one program code loaded by the processor and performing the data synchronization method as described above.
According to one aspect of the present application, there is provided a computer readable storage medium having stored therein at least one program code loaded and executed by a processor to implement the data synchronization method as described above.
The beneficial effects that technical scheme that this application embodiment provided include at least:
according to the data synchronization method provided by the embodiment of the invention, the attribute information of the target virtual object is issued to the plurality of scene processes through the master control process, so that the target virtual objects in at least two different scene processes can share the same attribute information, and a plurality of clients in the plurality of scene processes can acquire the same attribute information of the same target virtual object at the same moment or in the same time period, thereby realizing that the plurality of scene processes share the same attribute information of the same target virtual object, and ensuring synchronous sharing and timely updating of the attribute information of the target virtual object. Even when the number of players is large, it is ensured that a plurality of players can fight the same target virtual object.
Drawings
In order to more clearly illustrate the technical solutions of the embodiments of the present application, the drawings that are needed in the description of the embodiments will be briefly introduced below, and it is obvious that the drawings in the following description are only some embodiments of the present application, and that other drawings may be obtained according to these drawings without inventive effort for a person skilled in the art.
Fig. 1 is a schematic structural view of a terminal according to an exemplary embodiment of the present application;
FIG. 2 is a block diagram of a computer system provided in an exemplary embodiment of the present application;
FIG. 3 is a method flow diagram of a data synchronization method provided by an exemplary embodiment of the present application;
FIG. 4 is a method flow diagram of a data synchronization method provided by an exemplary embodiment of the present application;
FIG. 5 is a method flow diagram of a data synchronization method provided by an exemplary embodiment of the present application;
FIG. 6 is a method flow diagram of a data synchronization method provided by an exemplary embodiment of the present application;
FIG. 7 is a method flow diagram of a data synchronization method provided by an exemplary embodiment of the present application;
FIG. 8 is an interface diagram of a data synchronization method provided in an exemplary embodiment of the present application;
FIG. 9 is a method flow diagram of a data synchronization method provided by an exemplary embodiment of the present application;
FIG. 10 is a technical flow chart of a data synchronization method provided by an exemplary embodiment of the present application;
FIG. 11 is a technical flow chart of a data synchronization method provided by an exemplary embodiment of the present application;
FIG. 12 is a technical flow chart of a data synchronization method provided by an exemplary embodiment of the present application;
FIG. 13 is a technical flow chart of a data synchronization method provided by an exemplary embodiment of the present application;
FIG. 14 is a block diagram of a data synchronization device provided in an exemplary embodiment of the present application;
FIG. 15 is a block diagram of a data sharing system provided by an exemplary embodiment of the present application;
fig. 16 is a block diagram of a terminal provided in an exemplary embodiment of the present application.
Detailed Description
For the purpose of making the objects, technical solutions and advantages of the present application more apparent, the embodiments of the present application will be described in further detail below with reference to the accompanying drawings.
First, the terms involved in the embodiments of the present application will be described:
the process comprises the following steps: the program with a certain independent function refers to one-time operation activity of a certain data set, and is a basic unit for dynamic execution of an operating system, and the processes involved in the embodiment of the application are divided into a main control process and a scene process.
Scene process: refers to a process that includes at least virtual objects. Virtual objects refer to virtual entities in a scene process in which various entities, such as map entities and monster entities, may be created. The virtual objects in different scene processes are the same, but the clients corresponding to the different scene processes are different. A player is randomly assigned to one of the scene processes after entering the virtual environment, and all of the player's combat logic is completed in this scene process.
And (3) a main control process: refers to a process for coordinating data synchronization and management among the above-described plurality of scene processes. The server can report the modification information of the client to the virtual object in the scene process to the master control process through the scene process, and can also send the attribute information of the virtual object to the scene process through the master control process.
Virtual environment: is a virtual environment that an application displays (or provides) while running on a terminal. The virtual environment may be a simulated world of the real world, a semi-simulated and semi-imaginary world, or a purely imaginary world. The virtual environment may be any one of a two-dimensional virtual environment, a 2.5-dimensional virtual environment, and a three-dimensional virtual environment, which is not limited in this application.
Virtual roles: refers to movable objects in a virtual environment. The movable object may be a virtual character, a virtual animal, a cartoon character, etc., such as: characters, animals, plants, oil drums, walls, stones, etc. displayed in the three-dimensional virtual environment. Optionally, the virtual character is a three-dimensional stereoscopic model created based on an animated skeleton technique. Each virtual character has its own shape and volume in the three-dimensional virtual environment, occupying a portion of the space in the three-dimensional virtual environment.
The method provided by the application can be applied to the application program with the virtual environment and the virtual role. The virtual environment enabled application is, for example, an application that a user can control the movement of a virtual character within the virtual environment. By way of example, the methods provided in the present application may be applied to: virtual Reality (VR) application programs, augmented Reality (Augmented Reality, AR) programs, three-dimensional map programs, virtual Reality games, augmented Reality games, first-person shooting games (FPS), third-person shooting games (Third-Person Shooting Game, TPS), multiplayer online tactical Game games (Multiplayer Online Battle Arena Games, MOBA), strategy games (SLG).
By way of example, a game in a virtual environment is composed of one or more maps of the game world, the virtual environment in the game simulates a real world scene, a user can manipulate virtual characters in the game to walk, run, jump, shoot, fight, drive, etc. in the virtual environment, the interactivity is high, and multiple users can play a competitive game in an online team.
In some embodiments, the application may be a shooting game, a racing game, a role playing game, a adventure game, a sandbox game, a tactical game. The client can support at least one of Windows operating system, apple operating system, android operating system, IOS operating system and LINUX operating system, and clients of different operating systems can be interconnected and intercommunicated. In some embodiments, the above-described client is a program suitable for use on a mobile terminal having a touch screen.
In some embodiments, the client is an application developed based on a three-dimensional engine, such as a Unity engine.
The terminals in this application may be desktop computers, laptop portable computers, cell phones, tablet computers, e-book readers, MP3 (Moving Picture Experts Group Audio Layer III, moving picture experts compression standard audio layer 3) players, MP4 (Moving Picture Experts Group Audio Layer IV, moving picture experts compression standard audio layer 4) players, and the like. The terminal has installed and running therein a client supporting a virtual environment, such as a client supporting an application program of a three-dimensional virtual environment. The application may be any one of a tactical game survival (BR) game, a virtual reality application, an augmented reality application, a three-dimensional map application, a third person shooter game, a first person shooter game, and a multiplayer online tactical game. Alternatively, the application may be a stand-alone application, such as a stand-alone 3D game, or a network-on-line application.
Fig. 1 is a schematic structural diagram of a terminal according to an exemplary embodiment of the present application, where the terminal includes a processor 101, a touch screen 102, and a memory 103.
Processor 101 may be at least one of a single core processor, a multi-core processor, an embedded chip, and a processor with instruction execution capabilities.
The touch screen 102 comprises a conventional touch screen or a pressure sensitive touch screen. A general touch screen may measure a pressing operation or a sliding operation applied to the touch screen 102; the pressure sensitive touch screen may measure the force of a press applied to the touch screen 102.
The memory 103 stores an executable program of the processor 101. Illustratively, the memory 103 stores a virtual environment program A, an application program B, an application program C, a touch pressure sensing module 18, and a kernel layer 19 of an operating system. The virtual environment program a is an application program developed based on the three-dimensional virtual environment module 17. Alternatively, the virtual environment program a includes, but is not limited to, at least one of a game program, a virtual reality program, a three-dimensional map program, and a three-dimensional presentation program developed by a three-dimensional virtual environment module (also referred to as a virtual environment module) 17. For example, when an operating system of the terminal adopts an android operating system, a virtual environment program A is developed by adopting Java programming language and C# language; for another example, when the operating system of the terminal adopts the IOS operating system, the virtual environment program a is developed in the Object-C programming language and the c# language.
The three-dimensional Virtual environment module 17 is a module supporting multiple operating system platforms, and illustratively, the three-dimensional Virtual environment module can be used for program development in multiple fields such as a game development field, a Virtual Reality (VR) field, and a three-dimensional map field.
The touch (and pressure) sensing module 18 is a module for receiving touch events (and pressure touch events) reported by the touch screen driver 191, alternatively, the touch sensing module may not have a pressure sensing function and not receive pressure touch events. The touch event includes: the type of touch event and the coordinate values, the type of touch event includes, but is not limited to: a touch start event, a touch move event, and a touch drop event. The pressure touch event includes: the pressure value and the coordinate value of the pressure touch event. The coordinate value is used for indicating the touch position of the pressure touch operation on the display screen. Optionally, establishing an abscissa axis in the horizontal direction of the display screen, and establishing an ordinate axis in the vertical direction of the display screen to obtain a two-dimensional coordinate system.
Illustratively, the kernel layer 19 includes a touch screen driver 191 and other drivers 192. The touch screen driver 191 is a module for detecting a pressure touch event, and when the touch screen driver 191 detects the pressure touch event, the pressure touch event is transferred to the pressure sensing module 18.
Other drivers 192 may be drivers associated with processor 101, drivers associated with memory 103, drivers associated with network components, drivers associated with sound components, and the like.
Those skilled in the art will appreciate that the foregoing is merely a generalized illustration of the structure of a terminal. In different embodiments, the terminal may have more or fewer components. For example, the terminal may further include a gravitational acceleration sensor, a gyro sensor, a power source, and the like.
FIG. 2 shows a block diagram of a computer system provided in an exemplary embodiment of the present application, the computer system 200 comprising: terminal 210, server cluster 220.
The terminal 210 is installed and operated with a client 211 supporting a virtual environment, and the client 211 may be an application supporting the virtual environment. When the terminal runs the client 211, a user interface of the client 211 is displayed on a screen of the terminal 210. The client may be any one of an FPS game, a TPS game, a MOBA game, a tactical game play, a SLG game. In this embodiment, the client is exemplified as an FPS game. The terminal 210 is a terminal used by the first user 212, and the first user 212 uses the terminal 210 to control a first virtual character located in the virtual environment to perform an activity, and the first virtual character may be referred to as a first virtual character of the first user 212. The activity of the first avatar includes, but is not limited to: adjusting at least one of body posture, crawling, walking, running, riding, flying, jumping, driving, picking up, shooting, attacking, throwing. Illustratively, the first avatar is a first avatar, such as an emulated persona or a cartoon persona.
The device types of the terminal 210 include: at least one of a smart phone, a tablet computer, an electronic book reader, an MP3 player, an MP4 player, a laptop portable computer, and a desktop computer.
Only one terminal is shown in fig. 2, but in different embodiments there are a plurality of other terminals 240. In some embodiments, there is also at least one other terminal 240 that is a terminal corresponding to the developer, where the other terminal 240 is provided with a development and editing platform for the client of the virtual environment, the developer may edit and update the client on the other terminal 240, and transmit the updated client installation package to the server cluster 220 through a wired or wireless network, and the terminal 210 may download the client installation package from the server cluster 220 to implement the update for the client.
Terminal 210 and other terminals 240 are connected to server cluster 220 via a wireless network or a wired network.
Server cluster 220 includes at least one of a server, a plurality of servers, a cloud computing platform, and a virtualization center. Server cluster 220 is used to provide background services for clients that support a three-dimensional virtual environment. Optionally, server cluster 220 performs primary computing tasks and the terminals perform secondary computing tasks; alternatively, server cluster 220 performs the secondary computing job and the terminal performs the primary computing job; alternatively, a distributed computing architecture is used for collaborative computing between server cluster 220 and the terminals.
Optionally, the terminal and the server are both computer devices.
In one illustrative example, server cluster 220 includes server 221 and server 226, and server 221 includes processor 222, user account database 223, combat service module 224, and user-oriented Input/Output Interface (I/O Interface) 225. Wherein the processor 222 is configured to load instructions stored in the server 221, process data in the user account database 223 and the combat service module 224; the user account database 223 is used for storing data of user accounts used by the terminal 210 and other terminals 240, such as head images of the user accounts, nicknames of the user accounts, combat power indexes of the user accounts, and service areas where the user accounts are located; the combat service module 224 is configured to provide a plurality of combat rooms for users to combat; user-oriented I/O interface 225 is used to establish communication exchanges of data with terminal 210 via a wireless or wired network.
The data synchronization method provided by the embodiment of the application is described with reference to the description of the virtual environment and the description of the implementation environment. As schematically shown in fig. 3, an embodiment of the present application provides a data synchronization method, where the method is applied to a server, and a master control process and at least two scene processes are disposed in the server. The data synchronization method provided by the embodiment of the application comprises the following steps:
Step 302: and synchronizing attribute information of the target virtual object through the scene process and the client, wherein the clients corresponding to different scene processes are different.
A process refers to a running activity of a program with a certain independent function with respect to a certain data set, and is a basic unit for dynamically executing an operating system. Illustratively, the processes involved in the embodiments of the present application are divided into a master process and a scene process. The scene process refers to a process at least comprising a target virtual object.
The target virtual object refers to a virtual entity in a scene process. Illustratively, the target virtual object includes one virtual entity, or includes a plurality of virtual entities. Illustratively, the target virtual object is controlled by the client, or by other clients, or by the game program currently in place. For example, the target virtual object is a plurality of monster entities controlled by a game program; as another example, the target virtual object is a virtual character controlled by other clients. In the embodiment of the present application, the data synchronization method is exemplified by taking one or more monster entities controlled by a game program as an example. Illustratively, various entities may be created in the scene process, such as map entities and monster entities. The virtual objects in different scene processes are the same, and the clients corresponding to the different scene processes are different. A player is randomly assigned to one of the scene processes after entering the virtual environment, and all of the player's combat logic is completed in this scene process. Illustratively, the number of corresponding clients in a scene process may be one or more.
The attribute information of the target virtual object refers to a feature or property related to the target virtual object. The attribute information of the target virtual object is illustratively displayed in a numerical form or in other manifestations that may embody the characteristics or properties of the target virtual object. For example, the attribute information of the target virtual object refers to blood volume, level, attack force, defense force, hit rate, avoidance rate, attack speed, injury value, rewarding settlement information, and the like of the target virtual object.
Illustratively, the scene process set in the server displays the attribute information of the target virtual object in the user interface of the corresponding client. When a server receives a request of a certain player to enter a scene process, the server randomly distributes virtual roles controlled by the player to one scene process, a target virtual object is created in the scene process, and the scene process displays a virtual entity of the target virtual object and attribute information thereof in a user interface of a client corresponding to the player.
Schematically, at least two scene processes are set in the server, and the number of the scene processes, the number of clients accommodated by each scene process and the virtual entity created in each scene process can be set according to actual needs.
Taking a multiplayer online role playing game as an example, a player logs into the virtual environment of the game at a client and is randomly allocated to a scene process. Illustratively, the scene process is created with a map entity and at least one monster entity, which is the target virtual object. Wherein the attribute information of the monster entity is blood volume, and the blood volume is displayed in the periphery of the monster entity in a numerical form. For example, 20 players can be accommodated in each scene process to operate, after 100 players enter the virtual environment, 100 players are randomly allocated to 5 scene processes, virtual entities in 5 scene processes are the same, each virtual entity comprises a map entity and at least one monster entity, and blood volume values of monster entities in different scene processes are the same.
Illustratively, step 302 includes the client reporting a first modified value to the scene process and the scene process issuing a second modified cumulative value to the client. The first modification value refers to a change value of attribute information of the target virtual object, wherein the change value is changed according to the operation of the client; the first modification accumulated value is obtained according to accumulation of one or more first modification values, at least one first modification accumulated value of attribute information of the target virtual object, reported by at least two scene processes, is accumulated in the second modification accumulated value, and specific explanation of the first modification accumulated value and the second modification accumulated value is developed below.
Step 304: and synchronizing attribute information of the target virtual object through the master control process and the scene process.
The master control process refers to a process for coordinating data synchronization and management in a plurality of scene processes. In step 304, the server reports the attribute information of the target virtual object to the master control process through the scene process, or sends the attribute information of the target virtual object to the scene process through the master control process.
The step of reporting the attribute information of the target virtual object to the master control process by the server through the scene process is schematically performed after a single operation performed by the client or performed under the condition that the client meets the corresponding uplink synchronization condition. Illustratively, the uplink synchronization condition refers to a condition that the server reports attribute information of the target virtual object to the master control process through the scene process.
For example, after a player enters a scene process, an attack is performed on monster entities in the scene process, and the blood volume of the monster entities is reduced by 5%. At this time, the server reports the 5% decrease in blood volume of the monster entity to the master control process through the scene process.
As another example, the uplink synchronization condition corresponding to the client is that the blood volume of the monster entity decreases by more than 100. After a player enters a scene progress, after a plurality of attacks on monster entities in the scene progress, the total blood volume reduction value of the monster entities is 150. At this time, the server reports the reduced blood volume value 150 of the monster entity to the master process through the scene process.
Illustratively, the step of the server sending the attribute information of the target virtual object to the scene process through the master control process is performed after a single change of the attribute information of the target virtual object in the master control process, or performed under the condition that the downlink synchronization condition corresponding to the master control process is reached. Illustratively, the downlink synchronization condition refers to a condition that the server issues attribute information of the target virtual object to at least two scene processes through the master control process.
For example, in the master control process, the blood volume value of monster entity changes from 500 to 490. At this time, the server issues the modified value of the blood volume of the monster entity to the scene process through the master control process as 10, and the scene process transmits the modified value of the blood volume as 10 to the client.
As another example, the downstream synchronization condition of the master control process is that the number of modifications of the modified value of the blood volume of the monster entity is greater than 5. In a certain scenario, a plurality of players attack one monster entity for 6 attacks, so that the blood volume of the monster entity is reduced by 10, 15, 20, 10, 20 in turn. At this time, the total modification values of the blood volume of the monster entity reported by the client side received by the master control process are 10, 25, 45, 55, 75 and 95 in sequence. Since the number of times of modification of the total modification value of the blood volume of the monster entity is larger than 5 times, the server issues the total modification value of the blood volume of the monster entity to the scene process through the master control process as 95, and the scene process sends the total modification value of the blood volume as 95 to the client.
For another example, the downlink synchronization condition of the master control process is that the time interval between the current time and the last synchronization time of the master control process is greater than 5 seconds. In one scenario, multiple players attack a monster entity within 6 seconds, causing the monster entity's blood volume to drop by 60%. At this time, the modified value of the reported blood volume of the monster entity received by the master control process was 60%. Since the time interval between the last synchronization time of the master control process and the current time is 6 seconds and more than 5 seconds. At this time, the server transmits the modified value of the blood volume of the monster entity to the scene process through the master control process to be 60%, and the scene process transmits the modified value of the blood volume to the client by 60%.
In summary, according to the data synchronization method provided by the embodiment of the present application, the master control process issues the attribute information of the target virtual object to the plurality of scene processes, so that the target virtual objects in at least two different scene processes can share the same attribute information, so that the plurality of clients in the plurality of scene processes can acquire the same attribute information of the same target virtual object at the same time or in the same time period, and the plurality of scene processes can share the same attribute information of the same target virtual object, thereby ensuring synchronous sharing and timely updating of the attribute information of the target virtual object. Even when the number of players is large, it is ensured that a plurality of players can fight the same target virtual object.
According to the above, the server reports the attribute information of the target virtual object to the master control process through the scene process, or sends the attribute information of the target virtual object to the scene process through the master control process. Schematically, the data synchronization method provided in the embodiment of the present application at least includes the following two types of optional implementation manners:
1. and reporting the first modified accumulated value of the client to the master control process through the scene process.
As shown schematically in fig. 4, the data synchronization method provided in the embodiment of the present application includes the following steps:
step 402: and synchronizing attribute information of the target virtual object through the scene process and the client, wherein the clients corresponding to different scene processes are different.
Illustratively, step 402 is the same as step 302, and reference is made thereto, and no further description is given.
Step 403: and judging whether an uplink synchronization condition corresponding to the client is reached.
Illustratively, the uplink synchronization condition refers to a condition that the server reports attribute information of the target virtual object to the master control process through the scene process, and the uplink synchronization condition corresponds to the operation of the client.
The operation of the client refers to an operation performed by a player corresponding to the client on the target virtual object, including but not limited to at least one of the following operations: attack operation, pick operation, touch operation, click operation, double click operation, and slide operation. Illustratively, the uplink synchronization condition corresponding to the client may be set according to actual needs.
Step 404: and under the condition that the uplink synchronization condition corresponding to the client is met, reporting a first modification accumulated value of the client to the master control process through the scene process.
And under the condition that the uplink synchronization condition corresponding to the client is met, the client sends the first modification accumulated value to the scene process, and the scene process reports the first modification accumulated value of the client to the master control process.
For example, the uplink synchronization condition corresponding to the client is that the first modification accumulated value is greater than 500. In the case that the first modification accumulated value is 600, the client sends the first modification accumulated value 600 to the scene process, and the server reports the first modification accumulated value 600 to the master control process through the scene process.
Step 405: and under the condition that the uplink synchronous condition corresponding to the client is not met, caching a first modification accumulated value of the attribute information of the client corresponding to the scene process to the target virtual object through the scene process, wherein at least one first modification value of the attribute information of the client to the target virtual object is accumulated in the first modification accumulated value.
Illustratively, the first modified accumulated value refers to an accumulation of change values in which attribute information of the target virtual object changes according to an operation of the client. The first modified cumulative value may be a cumulative amount of a numerical value, a change number of a level, or other information that may embody a change in attribute information of the target virtual object. For example, the first modified cumulative value is a value of blood volume decline of the target virtual object; as another example, the first modified cumulative value is a change value of the number of levels of the target virtual object.
Illustratively, the first modification value refers to a change value in which attribute information of the target virtual object is changed according to an operation of the client. At least one first modification value of the attribute information of the client to the target virtual object is accumulated in the first modification accumulated value. That is, the first modified cumulative value is generated from a cumulative superposition of the plurality of first modified values.
For example, 3 players enter the virtual environment through different clients, are randomly allocated to different scene processes, attack the same monster entity in the corresponding scene processes, and sequentially reduce blood volume of the monster entity by 100, 200 and 300. That is, the 3 clients respectively registered with the virtual characters of the 3 players have three first modification values of the blood volume of the monster entity, 100, 200, 300 respectively. The above three first modification values are accumulated, and a first modification value of 600 can be obtained.
In the case that the uplink synchronization condition corresponding to the client is not reached, the server caches the first modification accumulated value through the scene process, that is, the first modification accumulated value is stored in the scene process. For example, the uplink synchronization condition corresponding to the client is that the first modification cumulative value is greater than 500, and in the case that the first modification cumulative value is 350, the server caches the first modification cumulative value 350 in the context process.
Illustratively, steps 404 and 405 may be performed only alternatively, and may not be performed simultaneously.
In the process that the scene process reports the first modified accumulated value of the client to the master control process, uplink synchronization conditions corresponding to the client have various setting modes. As shown in fig. 5 schematically, in the data synchronization method provided in the embodiment of the present application, at least three optional conditions of the uplink synchronization condition corresponding to the client are given, where the method includes the following steps:
step 502: and synchronizing attribute information of the target virtual object through the scene process and the client, wherein the clients corresponding to different scene processes are different.
Step 503: and judging whether an uplink synchronization condition corresponding to the client is reached.
Illustratively, step 502 and step 503 are the same as step 402 and step 403, and reference may be made thereto, and detailed description thereof will be omitted.
Illustratively, at least one of the following three steps may be selected for execution according to the uplink synchronization condition corresponding to the client.
Step 5041: and when the difference value between the first moment and the last synchronization moment corresponding to the client is larger than a first threshold value, reporting a first modification accumulated value of the client to the master control process through the scene process, and clearing the first modification accumulated value after reporting.
Illustratively, the uplink synchronization condition corresponding to the client is that the difference between the first time and the last synchronization time corresponding to the client is greater than a first threshold. The first time is the current time or the time of the last received first modification value of the attribute information of the target virtual object by the client.
Illustratively, the first time is the current time. The uplink synchronization condition corresponding to the client is that the difference between the current time and the last synchronization time corresponding to the client is greater than a first threshold.
For example, the current time is 19 hours, 19 minutes and 28 seconds, the last synchronization time corresponding to the client is 19 hours, 19 minutes and 20 seconds, and the first threshold is 5 seconds. At this time, the difference between the current time and the last synchronization time corresponding to the client is 8 seconds and greater than 5 seconds, so that the uplink synchronization condition corresponding to the client is satisfied.
Illustratively, the first time is a time when the last received first modified value of the attribute information of the target virtual object by the client. The uplink synchronization condition corresponding to the client is that the difference between the last time of the last received first modification value of the attribute information of the client to the target virtual object and the last synchronization time corresponding to the current time and the client is greater than a first threshold.
For example, the last time the client received the first modification value of the attribute information of the target virtual object is 19 hours 19 minutes 28 seconds, the last synchronization time corresponding to the client is 19 hours 19 minutes 20 seconds, and the first threshold is 5 seconds. At this time, the difference between the time of the last received first modification value of the attribute information of the target virtual object by the client and the last synchronization time corresponding to the client is 8 seconds and more than 5 seconds, so that the uplink synchronization condition corresponding to the client is satisfied.
After the server reports the first modified accumulated value of the client, the first modified accumulated value is cleared, that is, after the client finishes reporting once, the first modified accumulated value is accumulated again from zero. For example, the first modification accumulated value reported to the master control process by the server through the scene process is 500, and after the first modification accumulated value is reported, the server updates the first modification accumulated value of the client to 0.
Step 5042: and under the condition that the first modification accumulated value of the client is larger than the second threshold value, reporting the first modification accumulated value of the client to the master control process through the scene process, and clearing the first modification accumulated value after reporting.
Illustratively, the uplink synchronization condition corresponding to the client is that the first modified cumulative value of the client is greater than the second threshold. For example, the second threshold is 500, the first modification accumulated value of the client is 550, and at this time, the server reports the first modification accumulated value 550 to the master process through the scene process.
After the server reports the first modified accumulated value of the client, the first modified accumulated value is cleared, that is, after the client finishes reporting once, the first modified accumulated value is accumulated again from zero.
Step 5043: and under the condition that the accumulated times of the first modification accumulated values of the client are larger than a third threshold value, reporting the first modification accumulated values of the client to the master control process through the scene process, and clearing the first modification accumulated values after reporting.
Illustratively, the uplink synchronization condition corresponding to the client is that the cumulative number of times of the first modification cumulative value of the client is greater than the third threshold. Wherein the accumulated number is used to indicate the number of first modification values accumulated by the first modification accumulated value.
According to the foregoing, the first modification value refers to a change value in which attribute information of the target virtual object is changed according to an operation of the client. That is, there is at least one first modification value.
Illustratively, the cumulative number of first modification cumulative values is used to refer to the number of first modification values that the first modification cumulative values accumulate, i.e., the cumulative number of first modification cumulative values is the number of first modification values that the first modification cumulative values include.
For example, the third threshold is 5. The first modification accumulated values accumulate first modification values of 10, 20, 30, 40, 50, 60, and the number of the first modification values is 6, exceeding the third threshold. At this point, the server reports the first modified cumulative value 210 of the client to the master process through the scene process.
After the server reports the first modified accumulated value of the client, the first modified accumulated value is cleared, that is, after the client finishes reporting once, the first modified accumulated value is accumulated again from zero.
Illustratively, steps 5041, 5042, and 5043 may be performed only alternatively, and may not be performed simultaneously.
Step 505: and under the condition that the uplink synchronous condition corresponding to the client is not met, caching a first modification accumulated value of the attribute information of the client corresponding to the scene process to the target virtual object through the scene process, wherein at least one first modification value of the attribute information of the client to the target virtual object is accumulated in the first modification accumulated value.
Illustratively, step 505 is the same as step 405 and is not described in detail.
Illustratively, step 505 and step 5041 may be performed only alternatively, and may not be performed simultaneously, step 505 and step 5042 may be performed only alternatively, and may not be performed simultaneously, and step 505 and step 5043 may be performed only alternatively, and may not be performed simultaneously.
In summary, in the data synchronization method provided in the embodiment of the present application, uplink synchronization conditions are set for a time node of a last synchronization time corresponding to a client, a size of a first modification cumulative value of the client, and a cumulative number of times of the first modification value of the client, so that corresponding uplink synchronization conditions of at least three optional clients are provided.
2. And issuing a second modified accumulated value to at least two scene processes through the master control process.
As shown schematically in fig. 6, the data synchronization method provided in the embodiment of the present application includes the following steps:
step 602: and synchronizing attribute information of the target virtual object through the scene process and the client, wherein the clients corresponding to different scene processes are different.
Illustratively, step 602 is the same as step 402, and reference is made thereto, and details thereof will not be repeated.
Step 603: and judging whether the downlink synchronous condition corresponding to the main control process is reached.
Illustratively, the downlink synchronization condition refers to a condition that the server issues attribute information of the target virtual object to at least two scene processes through the master control process.
Illustratively, the second modified cumulative value accumulates at least one first modified cumulative value of attribute information of the target virtual object reported by at least two scene processes. According to the foregoing, the first modification accumulated value refers to accumulation of a change value in which attribute information of the target virtual object changes according to an operation of the client. The second modified cumulative value is a cumulative of the plurality of first modified cumulative values.
For example, if the first modification cumulative value of the client in one scene process is 200 and the first modification cumulative value of the client in another scene process is 400, the second modification cumulative value is 600.
Step 604: and under the condition that the downlink synchronous condition corresponding to the main control process is reached, the second modification accumulated value is issued to at least two scene processes through the main control process.
And under the condition that the downlink synchronous condition corresponding to the main control process is met, the server transmits a second modification accumulated value to at least two scene processes through the main control process, and the at least two scene processes transmit the second modification accumulated value to the corresponding client.
For example, the downlink synchronization condition corresponding to the master process is that the second modification accumulated value is greater than 500. The server reports two first modification accumulated values to the master control process through the scene process, wherein the two first modification accumulated values are 400 and 200 respectively, and the second modification accumulated value is 600. At this time, the server transmits the second modified cumulative value 600 to the corresponding client by issuing the second modified cumulative value to at least two scene processes.
Step 605: and under the condition that the downlink synchronous condition corresponding to the main control process is not reached, caching second modification accumulated values of the attribute information of the target virtual object by at least two scene processes through the main control process, wherein the second modification accumulated values are accumulated with at least one first modification accumulated value of the attribute information of the target virtual object, which is reported by at least two scene processes.
And under the condition that the downlink synchronization condition corresponding to the main control process is not met, the server caches second modification accumulated values of the attribute information of the target virtual object by at least two scene processes through the main control process, namely, the second modification is accumulated to be stored in the main control process.
For example, the downlink synchronization condition corresponding to the master process is that the second modification accumulated value is greater than 500. The server reports two first modification accumulated values to the main control process through the scene process, wherein the two first modification accumulated values are respectively 100 and 200, and the second modification accumulated value is 300. At this time, the server caches the second modified cumulative value in the master process.
Illustratively, step 604 and step 605 may be performed only alternatively, and may not be performed simultaneously.
In the process that the master control process transmits the second modified accumulated value to at least two scene processes, the downlink synchronization condition corresponding to the master control process has a plurality of setting modes. As shown in fig. 7 schematically, in combination with the setting of the uplink synchronization condition corresponding to the client, in the data synchronization method provided in the embodiment of the present application, at least three optional conditions of the downlink synchronization condition corresponding to the master control process are given, and the method includes the following steps:
step 702: and synchronizing attribute information of the target virtual object through the scene process and the client, wherein the clients corresponding to different scene processes are different.
Step 703: and judging whether the downlink synchronous condition corresponding to the main control process is reached.
Illustratively, step 702 and step 703 are the same as step 602 and step 603, and reference may be made thereto, and detailed description thereof will be omitted.
Illustratively, according to the difference of the downlink synchronization conditions corresponding to the master control process, at least one of the following three steps may be selected to be executed.
Step 7041: and when the difference value between the last synchronization time corresponding to the second time and the main control process is larger than a fourth threshold value, transmitting a second modification accumulated value of the main control process to at least two scene processes through the main control process, and resetting the second modification accumulated value after transmitting.
Illustratively, the downlink synchronization condition corresponding to the master control process is that the difference between the second time and the last synchronization time corresponding to the master control process is greater than a fourth threshold. The second time is the current time or the time when the second modification value of the attribute information of the client to the target virtual object is received last time.
For example, if the second time is the current time, the downlink synchronization condition corresponding to the master process is that the difference between the current time and the last synchronization time corresponding to the master process is greater than the fourth threshold.
Illustratively, the second modification value refers to a change value by which the attribute information of the target virtual object is changed according to the operation of the client. The last time the second modification value of the attribute information of the client to the target virtual object is received in the step refers to the last time the second modification value is reported by the server through the scene process received last time by the master control process. Illustratively, the second modification value may be the same as the first modification value or may be different. For example, the second time is a time when the second modification value of the attribute information of the client to the target virtual object is received last time, and the downlink synchronization condition corresponding to the master process is that a difference between a time when the second modification value of the attribute information of the client to the target virtual object is received last time and a last synchronization time corresponding to the master process is greater than a fourth threshold.
After the server issues the second modified accumulated value of the master control process, the second modified accumulated value is cleared, that is, after the master control process issues the second modified accumulated value once, the second modified accumulated value is accumulated again from zero.
Illustratively, step 7041 is similar to step 5041 and reference is made thereto for brevity.
Step 7042: and under the condition that the second modification accumulated value of the main control process is larger than a fifth threshold value, issuing the second modification accumulated value of the main control process to at least two scene processes through the main control process, and clearing the second modification accumulated value after issuing.
Illustratively, the downlink synchronization condition corresponding to the master process is that the second modified cumulative value of the master process is greater than the fifth threshold.
After the server issues the second modified accumulated value of the master control process, the second modified accumulated value is cleared, that is, after the master control process issues the second modified accumulated value once, the second modified accumulated value is accumulated again from zero.
Illustratively, step 7042 is similar to step 5042 and reference is made thereto for brevity.
Step 7043: and under the condition that the accumulated times of the second modification accumulated values of the main control process are larger than a sixth threshold value, issuing the second modification accumulated values of the main control process to at least two scene processes through the main control process, and clearing the second modification accumulated values after issuing.
Illustratively, the downlink synchronization condition corresponding to the master process is that the cumulative number of times of the second modification cumulative value of the master process is greater than the sixth threshold. Wherein the number of accumulations is used to indicate the number of first modification accumulated values accumulated by the second modification accumulated value.
After the server issues the second modified accumulated value of the master control process, the second modified accumulated value is cleared, that is, after the master control process issues the second modified accumulated value once, the second modified accumulated value is accumulated again from zero.
Illustratively, step 7043 is similar to step 5043 and reference is made thereto for brevity.
Illustratively, step 7041, step 7042, and step 7043 may be performed only alternatively, and may not be performed simultaneously.
Step 705: and under the condition that the downlink synchronous condition corresponding to the main control process is not reached, caching second modification accumulated values of the attribute information of the target virtual object by at least two scene processes through the main control process, wherein the second modification accumulated values are accumulated with at least one first modification accumulated value of the attribute information of the target virtual object, which is reported by at least two scene processes.
Illustratively, step 705 is identical to step 605 and is not described in detail.
Illustratively, step 705 and step 7041 may be performed only alternatively, and may not be performed simultaneously, step 705 may be performed only alternatively, and step 7042 may be performed simultaneously, and step 705 may be performed only alternatively, and may not be performed simultaneously with step 7043.
In summary, in the data synchronization method provided in the embodiment of the present application, the downlink synchronization conditions are set for the time node of the last synchronization time corresponding to the master process, the size of the second modification cumulative value of the master process, and the cumulative number of times of the second modification value of the master process, which give at least three optional corresponding downlink synchronization conditions of the master process.
Taking an example that the data synchronization method provided by the application is applied to a multiplayer online role playing game, as schematically shown in fig. 8, a plurality of players enter a virtual environment through a plurality of clients respectively, each player controls a virtual role, and the plurality of players are distributed to different scene processes.
The client, where the multiplayer online role playing game is located, is illustratively connected, via a wired or wireless network, to a server provided with a master control process and at least two scene processes. The map entity and the monster entity are established in at least two scene processes, the main control process is used for coordinating data synchronization and management of a plurality of scene processes, and the monster attributes, the injury statistics and the ranking of the players in different processes are also synchronized and managed by the main control process. The players are randomly distributed to different scene processes, and the server can perform agreed injury statistics and prize issuing on the players in the different scene processes through the main control process, wherein monster entities in the different scene processes share the same blood volume.
In the display interface 810 of the client, player a, player B, player C, player D, player E, and monster 811 are displayed. Wherein, player A, player B, player C are in one scene process, and player D, player E are in another scene process. Illustratively, a blood volume bar control 812 is shown on top of the monster 811, with a monster blood volume value of 96% shown in the blood volume bar control 812.
When multiple players did not attack the monster 811, the blood volume value in the blood volume bar control 812 remains displayed as 96%. When player a, player B, player C, player D, player E attack monster 811, the blood volume value displayed in blood volume bar control 812 of monster 811 changes accordingly, and eventually monster 811 disappears from display interface 810 when the blood volume value becomes 0%.
According to the foregoing, as schematically shown in fig. 9, in the data synchronization method provided in the embodiment of the present application, the interaction between the server and the client includes the following steps:
step 901: and the server sends the attribute information of the target virtual object through the scene process, and the clients corresponding to different scene processes are different.
Step 902: the client synchronizes attribute information of the target virtual object.
Step 903: and under the condition that the client reaches the uplink synchronous condition, reporting a first modification accumulated value of the client to the main control process through the scene process.
Step 904: the server acquires a first modification accumulated value reported by the client.
Step 905: and under the condition that the downlink synchronous condition corresponding to the main control process is reached, the server transmits a second modification accumulated value to at least two scene processes through the main control process, and the at least two scene processes transmit the second modification accumulated value to the client, wherein the second modification accumulated value is accumulated with at least one first modification accumulated value.
Step 906: and the client synchronously updates the attribute information of the target virtual object according to the second modification accumulated value.
Wherein the target virtual object is monster 811.
As schematically shown in fig. 10, the master process exhibits phase state transitions, including a receive state and a transmit state.
In the receiving state, the data synchronization method optionally includes the following steps:
step 1001: and the server performs staged injury statistics through the scene process A, the scene process B and the scene process C.
Step 1002: and the server reports the blood volume deduction value to the main control process through the scene process A, the scene process B and the scene process C.
Step 1003: the server deducts the blood volume of the monster through the main control process.
Under the accepted state, different players of the scene process A, the scene process B and the scene process C attack monsters, the scene process A, the scene process B and the scene process C respectively carry out staged injury statistics on the attacks of the corresponding players, and the statistics result is reported to the main control process. The main control process manages injury statistics, rewarding stages and monster attributes in at least two scene processes. Map entities and monster entities are created in the scene process A, the scene process B and the scene process C, and different players correspond to different scene processes.
As shown in fig. 11, the difference between the current time and the last synchronization time corresponding to the client is greater than a first threshold by using the uplink synchronization condition corresponding to the client as the current time. According to the attack of a single player on a monster, the data synchronization method in the receiving state optionally comprises the following steps:
step 1101: player a releases skill on the monster and displays the output injury value.
Step 1102: the server determines whether the time interval between the current time and the last injury synchronization of player a is greater than a threshold T.
Step 1103: and when the time interval between the current moment and the last injury synchronization of the player A is larger than the threshold value T, reporting and outputting an injury value to the main control process by the server through the scene process.
Step 1104: and under the condition that the time interval of the current moment and the last injury synchronization of the player A is not greater than the threshold value T, the server records the output injury value of the player A through the scene progress.
Illustratively, the output injury value of player A is the sum of the last output injury value and the current output injury value. In the event that the time interval between the current time and the last injury of player a is not greater than threshold T, player a continues to output, releasing skill for the monster multiple times, thereby proceeding to step 1101. For example, through the master control process and the scene process, in the case that the number of players is large, each player maintains an unsynchronized output injury value and the last injury synchronization time of the player. Judging the time interval between the current moment and the last injury synchronous time when the player releases skills on monsters each time, and if the time interval exceeds a threshold value T, reporting an output injury value to a main control process by a scene process; if the threshold value T is not exceeded, the scene process accumulates the output injury value into the last output injury value to obtain a new output injury value.
In the transmission state, the data synchronization method optionally includes the following steps:
step 1004: the server performs the step monster blood volume synchronization through the main control process.
Step 1005: and the server transmits the blood volume synchronization value to the scene process A, the scene process B and the scene process C through the master control process.
Step 1006: and the server deducts the blood volume of the monster through the scene process A, the scene process B and the scene process C.
And in the transmitting state, after receiving the reported blood volume deduction value, the main control process performs the step monster blood volume synchronization. And then, the master control process transmits the synchronized blood volume synchronization values to the scene process A, the scene process B and the scene process C, and the scene process A, the scene process B and the scene process C deduct the blood volume of the monster according to the transmitted blood volume synchronization values.
As shown in fig. 12, the difference between the current time and the last synchronization time corresponding to the master process is greater than a fourth threshold value by using the downlink synchronization condition corresponding to the master process as the difference. After the main control process receives the blood volume deduction values reported by a plurality of scene processes, the data synchronization method in the receiving state optionally comprises the following steps:
step 1201: the server receives the player staged output injury value through the main control process.
Step 1202: the server judges whether the difference value between the current moment and the last synchronous moment corresponding to the main control process is larger than a threshold value P.
Step 1203: and under the condition that the difference value between the last synchronization time corresponding to the current time and the main control process is larger than the threshold value P, the server synchronizes the monster blood volume value to all scene processes.
Step 1204: the server adjusts monster blood volume values through the scene progression.
Step 1205: the server sends monster blood volume values to the client through the scene process.
Step 1206: and under the condition that the difference value between the current moment and the last synchronous moment corresponding to the main control process is not greater than the threshold value P, the server records the blood volume injury value of the monster through the main control process.
Illustratively, the monster blood volume injury value is the sum of the last blood volume injury value and the current blood volume injury value. And when the difference value between the current moment and the last synchronous moment corresponding to the main control process is not greater than the threshold value P, the main control process continuously accumulates the blood volume injury value of the monster. For example, the master control process synchronizes blood volume values after receiving the stepwise output injury values of the player, and reduces the sharing blood volume bar of the monster. The master control process judges the difference value between the current moment and the synchronous time of the blood volume of the last monster, if the difference value exceeds a threshold value P, the master control process changes into a sending state from a receiving state, the blood volume of the monster is sent to all scene processes, and then the master control process continues to change into the receiving state. And all scene processes simultaneously change the blood volume value of the monster entity in the corresponding scene process according to the blood volume value of the monster issued by the main control process, and synchronize the blood volume value to the corresponding client. If the difference does not exceed the threshold value P, the monster blood volume value is accumulated into the last monster blood volume value to obtain a new monster blood volume value.
In addition, there may be a possibility of a drop in the line game when the player plays the online game in the virtual environment. As schematically shown in FIG. 13, the data synchronization method optionally includes the following steps when the player re-enters the virtual environment:
step 1301: and the server transmits the blood volume synchronization value to the scene process A, the scene process B and the scene process C through the master control process.
Step 1302: the server sends a monster data request and sync to the master process through the scene process D.
Step 1303: the server sends a monster blood volume synchronization value to the scene process D through the main control process.
Illustratively, after the player in the scene process C drops, the player reenters the virtual environment and is randomly allocated to the scene process D. At this time, the server sends a monster data request and synchronization to the master control process through the scene process D, and the master control process sends a monster blood volume synchronization value to the scene process D, and creates a corresponding monster entity to ensure the monster playing progress of the player. For example, after the master control process completes the synchronization of the staged monster blood volume values, the monster blood volume values are respectively issued to the scene process A, the scene process B and the scene process C, and the monster blood volume is deducted by the three scene processes. At this time, after the player in the scene process C goes offline, the player enters the scene process D, the scene process sends a monster data request and synchronization to the master control process, the master control process privately sends a monster blood volume synchronization value to the scene process D and creates a monster entity, and the scene process D synchronizes the monster blood volume value.
In a multiplayer online role playing game, a large number of players are specified in the same map. The server creates map entities and monster entities in a plurality of scene processes by randomly assigning a large number of players to the plurality of scene processes. The server performs a stepwise accumulation method through the master control process, so that monster entities in different scene processes share the same attribute information, such as blood volume value. Meanwhile, the server performs the same injury statistics and rewards release through the main control process, so that players in different scene processes can have game interaction experience of a monster entity, the interactivity among users is improved, and the experience of the users is also improved. In addition, after the player drops the line, the player reenters the virtual environment, the server transmits attribute information of the monster to the new scene process through the main control process, and the player can perform monster playing progress before the line drop, so that disaster tolerance of the server is improved to a certain extent.
In summary, according to the data synchronization method provided by the embodiment of the present application, the master control process issues the attribute information of the target virtual object to the plurality of scene processes, so that the target virtual objects in at least two different scene processes can share the same attribute information, so that the plurality of clients in the plurality of scene processes can acquire the same attribute information of the same target virtual object at the same time or in the same time period, and the plurality of scene processes can share the same attribute information of the same target virtual object, thereby ensuring synchronous sharing and timely updating of the attribute information of the target virtual object. Even when the number of players is large, it is ensured that a plurality of players can fight the same target virtual object.
The following are device embodiments of the present application, reference being made to the above-described method embodiments for details of the device embodiments that are not described in detail.
Fig. 14 shows a block diagram of a data synchronization apparatus provided in an embodiment of the present application. The data synchronization device is applied to a server, a main control process and at least two scene processes are arranged in the server, and the device comprises: a scene process synchronization module 1420 and a master process synchronization module 1440, wherein:
the scene process synchronization module 1420 is configured to synchronize attribute information of a target virtual object with a client through a scene process, where clients corresponding to different scene processes are different;
the master process synchronization module 1440 is configured to synchronize attribute information of the target virtual object with the scene process through the master process.
In one possible implementation manner of the present application, the master process synchronization module 1440 includes an accumulating unit and a reporting unit. Wherein, accumulation unit is used for: under the condition that the uplink synchronization condition corresponding to the client is not met, caching a first modification accumulated value of the attribute information of the client corresponding to the scene process on the target virtual object through the scene process, wherein at least one first modification value of the attribute information of the client on the target virtual object is accumulated in the first modification accumulated value; reporting unit, for: and under the condition that the uplink synchronization condition corresponding to the client is met, reporting a first modification accumulated value of the client to the master control process through the scene process.
In one possible implementation manner of the present application, the reporting unit is further configured to: reporting a first modification accumulated value of the client to the master control process through the scene process under the condition that the difference value between the first moment and the last synchronization moment corresponding to the client is larger than a first threshold value, and clearing the first modification accumulated value after reporting; the first time is the current time or the time when the first modification value of the attribute information of the client to the target virtual object is received last time.
In one possible implementation manner of the present application, the reporting unit is further configured to: and under the condition that the first modification accumulated value of the client is larger than the second threshold value, reporting the first modification accumulated value of the client to the master control process through the scene process, and clearing the first modification accumulated value after reporting.
In one possible implementation manner of the present application, the reporting unit is further configured to: reporting the first modification accumulated value of the client to the main control process through the scene process under the condition that the accumulated times of the first modification accumulated value of the client is larger than a third threshold value, and resetting the first modification accumulated value after reporting; wherein the accumulated number is used to indicate the number of first modification values accumulated by the first modification accumulated value.
In one possible implementation manner of the present application, the master process synchronization module 1440 further includes a transmitting unit. Wherein, the accumulation unit is further used for: under the condition that the downlink synchronous condition corresponding to the main control process is not reached, caching second modification accumulated values of the attribute information of the target virtual object by at least two scene processes through the main control process, wherein the second modification accumulated values are accumulated with at least one first modification accumulated value of the attribute information of the target virtual object, which is reported by at least two scene processes; the issuing unit is used for: and under the condition that the downlink synchronous condition corresponding to the main control process is reached, the second modification accumulated value is issued to at least two scene processes through the main control process.
In one possible implementation manner of the present application, the issuing unit is further configured to: when the difference value between the last synchronization time corresponding to the second time and the main control process is larger than a fourth threshold value, transmitting a second modification accumulated value of the main control process to at least two scene processes through the main control process, and resetting the second modification accumulated value after transmitting; the second time is the current time or the time when the second modification value of the attribute information of the client to the target virtual object is received last time.
In one possible implementation manner of the present application, the issuing unit is further configured to: and under the condition that the second modification accumulated value of the main control process is larger than a fifth threshold value, issuing the second modification accumulated value of the main control process to at least two scene processes through the main control process, and clearing the second modification accumulated value after issuing.
In one possible implementation manner of the present application, the issuing unit is further configured to: under the condition that the accumulated times of the second modification accumulated values of the main control process are larger than a sixth threshold value, issuing the second modification accumulated values of the main control process to at least two scene processes through the main control process, and resetting the second modification accumulated values after issuing; wherein the number of accumulations is used to indicate the number of first modification accumulated values accumulated by the second modification accumulated value.
FIG. 15 illustrates a block diagram of a data sharing system provided by an exemplary embodiment of the present application.
Referring to the data sharing system shown in fig. 15 (a), the data sharing system 1500 refers to a system for performing data sharing between nodes, and the data sharing system may include a plurality of nodes 1501, and the plurality of nodes 1501 may be respective clients in the data sharing system. Each node 1501 may receive input information while operating normally and maintain shared data within the data sharing system based on the received input information. In order to ensure the information intercommunication in the data sharing system, information connection can exist between each node in the data sharing system, and the nodes can transmit information through the information connection. For example, when any node in the data sharing system receives input information, other nodes in the data sharing system acquire the input information according to a consensus algorithm, and store the input information as data in the shared data, so that the data stored on all nodes in the data sharing system are consistent.
Each node in the data sharing system has a node identifier corresponding to the node identifier, and each node in the data sharing system can store the node identifiers of other nodes in the data sharing system, so that the generated block can be broadcast to other nodes in the data sharing system according to the node identifiers of other nodes. Each node can maintain a node identification list shown in the following table, and the node names and the node identifications are correspondingly stored in the node identification list. The node identifier may be an IP (Internet Protocol, protocol of interconnection between networks) address, and any other information that can be used to identify the node, which is only illustrated in the following table by way of example.
Each node in the data sharing system stores one and the same blockchain. The blockchain is composed of a plurality of blocks, see fig. 15 (b), and the starting block includes a block header in which the input information feature value, version number, time stamp and difficulty value are stored and a block body in which the input information is stored; the next block of the starting block takes the starting block as a father block, the next block also comprises a block head and a block main body, the block head stores the input information characteristic value of the current block, the block head characteristic value of the father block, the version number, the timestamp and the difficulty value, and the like, so that the block data stored in each block in the block chain are associated with the block data stored in the father block, and the safety of the input information in the block is ensured.
When each block in the blockchain is generated, referring to (c) of fig. 15, when the node where the blockchain is located receives the input information, checking the input information, storing the input information into the memory pool after the checking is completed, and updating the hash tree used for recording the input information; then, updating the update time stamp to the time of receiving the input information, trying different random numbers, and calculating the characteristic value for a plurality of times, so that the calculated characteristic value can meet the following formula:
wherein SHA256 is a eigenvalue algorithm used to calculate eigenvalues; version (version number) is version information of the related block protocol in the block chain; the prev_hash is the block header characteristic value of the parent block of the current block; the merkle_root is a characteristic value of input information; ntime is the update time of the update timestamp; the nbits is the current difficulty, is a fixed value in a period of time, and is determined again after exceeding a fixed period of time; x is a random number; TARGET is a eigenvalue threshold that can be determined from nbits.
Thus, when the random number meeting the formula is calculated, the information can be correspondingly stored to generate the block head and the block main body, and the current block is obtained. And then, the node where the blockchain is located sends the newly generated blocks to other nodes in the data sharing system where the newly generated blocks are located according to the node identification of other nodes in the data sharing system, the other nodes verify the newly generated blocks, and the newly generated blocks are added into the blockchain stored in the newly generated blocks after the verification is completed.
Fig. 16 shows a block diagram of a terminal 2000 according to an exemplary embodiment of the present application. The terminal 2000 may be: a smart phone, a tablet computer, an MP3 player (Moving Picture Experts Group Audio Layer III, motion picture expert compression standard audio plane 3), an MP4 (Moving Picture Experts Group Audio Layer IV, motion picture expert compression standard audio plane 4) player, a notebook computer, or a desktop computer. Terminal 2000 may also be referred to by other names of user devices, portable terminals, laptop terminals, desktop terminals, etc.
In general, the terminal 2000 includes: a processor 2001 and a memory 2002.
Processor 2001 may include one or more processing cores, such as a 4-core processor, an 8-core processor, and so forth. The processor 2001 may be implemented in at least one hardware form of DSP (Digital Signal Processing ), FPGA (Field-Programmable Gate Array, field programmable gate array), PLA (Programmable Logic Array ). Processor 2001 may also include a main processor, which is a processor for processing data in an awake state, also called a CPU (Central Processing Unit ), and a coprocessor; a coprocessor is a low-power processor for processing data in a standby state. In some embodiments, the processor 2001 may integrate a GPU (Graphics Processing Unit, image processor) for rendering and drawing of content required to be displayed by the display screen. In some embodiments, the processor 2001 may also include an AI (Artificial Intelligence ) processor for processing computing operations related to machine learning.
Memory 2002 may include one or more computer-readable storage media, which may be non-transitory. Memory 2002 may also include high-speed random access memory, as well as non-volatile memory, such as one or more magnetic disk storage devices, flash memory storage devices. In some embodiments, a non-transitory computer readable storage medium in memory 2002 is used to store at least one instruction for execution by processor 2001 to implement the virtual character control methods provided by the method embodiments herein.
In some embodiments, the terminal 2000 may further optionally include: a peripheral interface 2003 and at least one peripheral. The processor 2001, memory 2002, and peripheral interface 2003 may be connected by a bus or signal line. The respective peripheral devices may be connected to the peripheral device interface 2003 through a bus, signal line, or circuit board. Specifically, the peripheral device includes: at least one of radio frequency circuitry 2004, a touch display 2005, a camera assembly 2006, audio circuitry 2007, a positioning assembly 2008, and a power supply 2009.
Peripheral interface 2003 may be used to connect I/O (Input/Output) related at least one peripheral device to processor 2001 and memory 2002. In some embodiments, processor 2001, memory 2002, and peripheral interface 2003 are integrated on the same chip or circuit board; in some other embodiments, either or both of the processor 2001, memory 2002, and peripheral interface 2003 may be implemented on separate chips or circuit boards, which is not limited in this embodiment.
The Radio Frequency circuit 2004 is used to receive and transmit RF (Radio Frequency) signals, also known as electromagnetic signals. The radio frequency circuit 2004 communicates with a communication network and other communication devices via electromagnetic signals. The radio frequency circuit 2004 converts an electrical signal into an electromagnetic signal for transmission, or converts a received electromagnetic signal into an electrical signal. Optionally, the radio frequency circuit 2004 includes: antenna systems, RF transceivers, one or more amplifiers, tuners, oscillators, digital signal processors, codec chipsets, subscriber identity module cards, and so forth. The radio frequency circuitry 2004 may communicate with other terminals via at least one wireless communication protocol. The wireless communication protocol includes, but is not limited to: the world wide web, metropolitan area networks, intranets, generation mobile communication networks (2G, 3G, 4G, and 5G), wireless local area networks, and/or WiFi (Wireless Fidelity ) networks. In some embodiments, the radio frequency circuitry 2004 may also include NFC (Near Field Communication, short range wireless communication) related circuitry, which is not limited in this application.
The display 2005 is used to display a UI (User Interface). The UI may include graphics, text, icons, video, and any combination thereof. When the display 2005 is a touch display, the display 2005 also has the ability to capture touch signals at or above the surface of the display 2005. The touch signal may be input to the processor 2001 as a control signal for processing. At this point, the display 2005 may also be used to provide virtual buttons and/or virtual keyboards, also referred to as soft buttons and/or soft keyboards. In some embodiments, the display 2005 may be one, providing a front panel of the terminal 2000; in other embodiments, the display 2005 may be at least two, respectively disposed on different surfaces of the terminal 2000 or in a folded design; in still other embodiments, the display 2005 may be a flexible display disposed on a curved surface or a folded surface of the terminal 2000. Even more, the display 2005 may be arranged in an irregular pattern that is not rectangular, i.e., a shaped screen. The display 2005 can be made of LCD (Liquid Crystal Display ), OLED (Organic Light-Emitting Diode) or other materials.
The camera assembly 2006 is used to capture images or video. Optionally, the camera assembly 2006 includes a front camera and a rear camera. Typically, the front camera is disposed on the front panel of the terminal and the rear camera is disposed on the rear surface of the terminal. In some embodiments, the at least two rear cameras are any one of a main camera, a depth camera, a wide-angle camera and a tele camera, so as to realize that the main camera and the depth camera are fused to realize a background blurring function, and the main camera and the wide-angle camera are fused to realize that panoramic shooting is realized with a Virtual Reality (VR) shooting function or other fusion shooting functions. In some embodiments, the camera assembly 2006 may also include a flash. The flash lamp can be a single-color temperature flash lamp or a double-color temperature flash lamp. The dual-color temperature flash lamp refers to a combination of a warm light flash lamp and a cold light flash lamp, and can be used for light compensation under different color temperatures.
Audio circuitry 2007 may include a microphone and a speaker. The microphone is used for collecting sound waves of users and the environment, converting the sound waves into electric signals, and inputting the electric signals to the processor 2001 for processing, or inputting the electric signals to the radio frequency circuit 2004 for voice communication. For purposes of stereo acquisition or noise reduction, a plurality of microphones may be respectively disposed at different portions of the terminal 2000. The microphone may also be an array microphone or an omni-directional pickup microphone. The speaker is then used to convert electrical signals from the processor 2001 or the radio frequency circuit 2004 into sound waves. The speaker may be a conventional thin film speaker or a piezoelectric ceramic speaker. When the speaker is a piezoelectric ceramic speaker, not only the electric signal can be converted into a sound wave audible to humans, but also the electric signal can be converted into a sound wave inaudible to humans for ranging and other purposes. In some embodiments, audio circuit 2007 may also include a headphone jack.
The locating component 2008 is used to locate the current geographic location of the terminal 2000 to enable navigation or LBS (Location Based Service, location-based services). A power supply 2009 is used to power the various components in terminal 2000. The power source 2009 may be alternating current, direct current, disposable or rechargeable. When the power source 2009 comprises a rechargeable battery, the rechargeable battery may be a wired rechargeable battery or a wireless rechargeable battery. The wired rechargeable battery is a battery charged through a wired line, and the wireless rechargeable battery is a battery charged through a wireless coil. The rechargeable battery may also be used to support fast charge technology.
In some embodiments, terminal 2000 can further include one or more sensors 2010. The one or more sensors 2010 include, but are not limited to: acceleration sensor 2011, gyroscope sensor 2012, pressure sensor 2013, fingerprint sensor 2014, optical sensor 2015, and proximity sensor 2016.
The acceleration sensor 2011 may detect the magnitudes of accelerations on three coordinate axes of a coordinate system established with the terminal 2000. For example, the acceleration sensor 2011 may be used to detect components of gravitational acceleration on three coordinate axes. The processor 2001 may control the touch display 2005 to display a user interface in a landscape view or a portrait view according to the gravitational acceleration signal acquired by the acceleration sensor 2011. The acceleration sensor 2011 may also be used for the acquisition of motion data of a game or a user.
The gyro sensor 2012 may detect a body direction and a rotation angle of the terminal 2000, and the gyro sensor 2012 may cooperate with the acceleration sensor 2011 to collect a 3D motion of the user to the terminal 2000. The processor 2001 may implement the following functions based on the data collected by the gyro sensor 2012: motion sensing (e.g., changing UI according to a tilting operation by a user), image stabilization at shooting, game control, and inertial navigation.
Pressure sensor 2013 may be disposed at a side frame of terminal 2000 and/or at a lower layer of touch display 2005. When the pressure sensor 2013 is disposed at a side frame of the terminal 2000, a grip signal of the user to the terminal 2000 may be detected, and the processor 2001 performs left-right hand recognition or shortcut operation according to the grip signal collected by the pressure sensor 2013. When the pressure sensor 2013 is disposed at the lower layer of the touch display 2005, the processor 2001 controls the operability control on the UI interface according to the pressure operation of the user on the touch display 2005. The operability controls include at least one of a button control, a scroll bar control, an icon control, and a menu control.
The fingerprint sensor 2014 is used for collecting the fingerprint of the user, and the processor 2001 identifies the identity of the user according to the fingerprint collected by the fingerprint sensor 2014, or the fingerprint sensor 2014 identifies the identity of the user according to the collected fingerprint. Upon recognizing that the user's identity is a trusted identity, the processor 2001 authorizes the user to perform relevant sensitive operations including unlocking the screen, viewing encrypted information, downloading software, paying for and changing settings, and the like. The fingerprint sensor 2014 may be provided on the front, back, or side of the terminal 2000. When a physical key or a vendor Logo is provided on the terminal 2000, the fingerprint sensor 2014 may be integrated with the physical key or the vendor Logo.
The optical sensor 2015 is used to collect ambient light intensity. In one embodiment, the processor 2001 may control the display brightness of the touch display 2005 based on the ambient light intensity collected by the optical sensor 2015. Specifically, when the intensity of the ambient light is high, the display brightness of the touch display 2005 is turned up; when the ambient light intensity is low, the display brightness of the touch display 2005 is turned down. In another embodiment, the processor 2001 may also dynamically adjust the shooting parameters of the camera assembly 2006 based on the ambient light intensity collected by the optical sensor 2015.
The proximity sensor 2016, also referred to as a distance sensor, is typically disposed on the front panel of the terminal 2000. The proximity sensor 2016 is used to collect the distance between the user and the front of the terminal 2000. In one embodiment, when the proximity sensor 2016 detects that the distance between the user and the front surface of the terminal 2000 gradually decreases, the processor 2001 controls the touch display 2005 to switch from the bright screen state to the off screen state; when the proximity sensor 2016 detects that the distance between the user and the front surface of the terminal 2000 becomes gradually larger, the processor 2001 controls the touch display 2005 to switch from the off-screen state to the on-screen state.
Those skilled in the art will appreciate that the structure shown in fig. 16 is not limiting of terminal 2000 and may include more or fewer components than shown, or may combine certain components, or may employ a different arrangement of components.
The present application also provides a computer device comprising a processor and a memory, the memory storing at least one program code loaded and executed by the processor to implement the data synchronization method as above.
The present application also provides a computer readable storage medium having at least one program code stored therein, the program code being loaded and executed by a processor to implement the data synchronization method as above.
The present application also provides a computer program product or computer program comprising computer instructions stored in a computer readable storage medium. The computer instructions are read from the computer-readable storage medium by a processor of a computer device, and executed by the processor, cause the computer device to perform the data synchronization method provided in the alternative implementations described above.
It should be understood that references herein to "a plurality" are to two or more. "and/or", describes an association relationship of an association object, and indicates that there may be three relationships, for example, a and/or B, and may indicate: a exists alone, A and B exist together, and B exists alone. The character "/" generally indicates that the context-dependent object is an "or" relationship.
It will be understood by those skilled in the art that all or part of the steps for implementing the above embodiments may be implemented by hardware, or may be implemented by a program for instructing relevant hardware, where the program may be stored in a computer readable storage medium, and the storage medium may be a read-only memory, a magnetic disk or an optical disk, etc.
The foregoing description of the preferred embodiments is merely exemplary in nature and is in no way intended to limit the invention, since it is intended that all modifications, equivalents, improvements, etc. that fall within the spirit and scope of the invention.

Claims (12)

1. The data synchronization method is characterized by being applied to a server, wherein a main control process and at least two scene processes are arranged in the server, and the method comprises the following steps:
Synchronizing attribute information of a target virtual object with a client through the scene process, wherein the clients corresponding to different scene processes are different; the main control process presents stage state conversion, the main control process receives the attribute information of the target virtual object reported by the scene process in an accepted state, and the main control process transmits the updated attribute information to the scene process in a transmitting state;
when the master control process is in the accepting state and the client side does not reach the uplink synchronous condition corresponding to the client side, caching a first modification accumulated value of the attribute information of the target virtual object, corresponding to the scene process, of the client side through the scene process, wherein the first modification accumulated value is accumulated with at least one first modification value of the attribute information of the target virtual object, corresponding to the client side, of the client side;
when the master control process is in the accepting state and the accumulated times of the first modification accumulated values of the client are larger than a third threshold value, reporting the first modification accumulated values of the client to the master control process through the scene process, and clearing the first modification accumulated values after reporting, wherein the accumulated times of the first modification accumulated values are used for indicating the number of the first modification values accumulated by the first modification accumulated values;
When the master control process is in the sending state and the master control process does not reach the downlink synchronous condition corresponding to the master control process, caching second modification accumulated values of the attribute information of the target virtual object by the at least two scene processes through the master control process, wherein the second modification accumulated values accumulate at least one first modification accumulated value of the attribute information of the target virtual object, which is reported by the at least two scene processes;
when the master control process is in the sending state and the accumulated number of the second modification accumulated values of the master control process is larger than a sixth threshold value, issuing the second modification accumulated values to at least two scene processes through the master control process, and clearing the second modification accumulated values after issuing, wherein the accumulated number of the second modification accumulated values is used for indicating the number of the first modification accumulated values accumulated by the second modification accumulated values;
the player in the scene process reenters the virtual environment after being disconnected from the scene process and is randomly distributed into a new scene process, and the master control process independently transmits attribute information of the target virtual object to the new scene process and creates the target virtual object;
And the data synchronization between the master control process and at least two scene processes is performed in the same server.
2. The method according to claim 1, wherein the method further comprises:
reporting the first modification accumulated value of the client to the master control process through the scene process under the condition that the difference value between the first moment and the last synchronization moment corresponding to the client is larger than a first threshold value, and resetting the first modification accumulated value after reporting;
the first time is the current time or the first time is the time when the first modification value of the attribute information of the client to the target virtual object is received last time.
3. The method according to claim 1, wherein the method further comprises:
and reporting the first modification accumulated value of the client to the master control process through the scene process under the condition that the first modification accumulated value of the client is larger than a second threshold value, and clearing the first modification accumulated value after reporting.
4. The method according to claim 1, wherein the method further comprises:
When the difference value between the last synchronization time corresponding to the main control process at the second time is larger than a fourth threshold value, issuing the second modification accumulated value of the main control process to the at least two scene processes through the main control process, and resetting the second modification accumulated value after issuing;
the second time is the current time or the time when the second modification value of the attribute information of the target virtual object by the client is received last time.
5. The method according to claim 1, wherein the method further comprises:
and under the condition that the second modification accumulated value of the master control process is larger than a fifth threshold value, issuing the second modification accumulated value of the master control process to the at least two scene processes through the master control process, and clearing the second modification accumulated value after issuing.
6. The data synchronization device is characterized by being applied to a server, wherein a main control process and at least two scene processes are arranged in the server, and the device comprises:
the scene process synchronization module is used for synchronizing attribute information of a target virtual object with a client through the scene process, and the clients corresponding to different scene processes are different; the main control process presents stage state conversion, the main control process receives the attribute information of the target virtual object reported by the scene process in an accepted state, and the main control process transmits the updated attribute information to the scene process in a transmitting state;
A master control process synchronization module, configured to cache, by the scene process, a first modification accumulated value of attribute information of the target virtual object by a client corresponding to the scene process, where the first modification accumulated value accumulates at least one first modification value of attribute information of the target virtual object by the client when the master control process is in the accepted state and the client does not reach an uplink synchronization condition corresponding to the client; when the master control process is in the accepting state and the accumulated times of the first modification accumulated values of the client are larger than a third threshold value, reporting the first modification accumulated values of the client to the master control process through the scene process, and clearing the first modification accumulated values after reporting, wherein the accumulated times of the first modification accumulated values are used for indicating the number of the first modification values accumulated by the first modification accumulated values;
the master control process synchronization module is configured to cache, by using the master control process, a second modification accumulated value of attribute information of the target virtual object by the at least two scene processes when the master control process is in the sending state and the master control process does not reach a downlink synchronization condition corresponding to the master control process, where the second modification accumulated value is accumulated with at least one first modification accumulated value of attribute information of the target virtual object reported by the at least two scene processes; when the master process is in the sending state and the accumulated number of the second modification accumulated values of the master process is larger than a sixth threshold value, issuing the second modification accumulated values to the at least two scene processes through the master process, and clearing the second modification accumulated values after issuing, wherein the accumulated number of the second modification accumulated values is used for indicating the number of the first modification accumulated values accumulated by the second modification accumulated values;
The master control process synchronization module is used for enabling a player in the scene process to reenter the virtual environment after being disconnected from the scene process, and randomly distributing the virtual environment to a new scene process, and the master control process independently transmits attribute information of the target virtual object to the new scene process and creates the target virtual object;
and the data synchronization between the master control process and at least two scene processes is performed in the same server.
7. The apparatus of claim 6, wherein the master process synchronization module comprises a reporting unit;
the reporting unit is configured to report, when a difference between a first time and a last synchronization time corresponding to the client is greater than a first threshold, the first modification accumulated value of the client to the master control process through the scene process, and clear the first modification accumulated value after the reporting;
the first time is the current time or the first time is the time when the first modification value of the attribute information of the client to the target virtual object is received last time.
8. The apparatus of claim 6, wherein the reporting unit is further configured to report, by the scene process, the first modification cumulative value of the client to the master process if the first modification cumulative value of the client is greater than a second threshold value, and clear the first modification cumulative value after reporting.
9. The apparatus of claim 6, wherein the master process synchronization module comprises a issuing unit;
the issuing unit is configured to issue, to the at least two scene processes, the second modified accumulated value of the master process through the master process, and clear the second modified accumulated value after issuing, if a difference between a second time and a last synchronization time corresponding to the master process is greater than a fourth threshold;
the second time is the current time or the time when the second modification value of the attribute information of the target virtual object by the client is received last time.
10. The apparatus of claim 6, wherein the issuing unit is further configured to issue the second modified cumulative value of the master process to the at least two scene processes through the master process and clear the second modified cumulative value after issuing if the second modified cumulative value of the master process is greater than a fifth threshold value.
11. A computer device comprising a processor and a memory, wherein the memory has stored therein at least one program code that is loaded and executed by the processor to implement the data synchronization method of any of claims 1 to 5.
12. A computer readable storage medium having stored therein at least one program code loaded and executed by a processor to implement the data synchronization method of any one of claims 1 to 5.
CN202011582049.4A 2020-12-28 2020-12-28 Data synchronization method, device, equipment and medium Active CN112675538B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202011582049.4A CN112675538B (en) 2020-12-28 2020-12-28 Data synchronization method, device, equipment and medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202011582049.4A CN112675538B (en) 2020-12-28 2020-12-28 Data synchronization method, device, equipment and medium

Publications (2)

Publication Number Publication Date
CN112675538A CN112675538A (en) 2021-04-20
CN112675538B true CN112675538B (en) 2023-08-01

Family

ID=75453922

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202011582049.4A Active CN112675538B (en) 2020-12-28 2020-12-28 Data synchronization method, device, equipment and medium

Country Status (1)

Country Link
CN (1) CN112675538B (en)

Families Citing this family (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114210066B (en) * 2021-12-08 2025-01-24 腾讯科技(深圳)有限公司 Virtual object position synchronization method, device and electronic device applied to server
CN116208623B (en) * 2023-05-04 2023-07-14 腾讯科技(深圳)有限公司 Information synchronization method, device, engine server and storage medium

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106407321A (en) * 2016-08-31 2017-02-15 东软集团股份有限公司 Data synchronization method and device
CN110314373A (en) * 2019-07-08 2019-10-11 网易(杭州)网络有限公司 Information synchronization method, device, storage medium, processor and server
CN110898428A (en) * 2019-11-12 2020-03-24 腾讯科技(深圳)有限公司 Multi-virtual object interaction method, device, server and storage medium
CN111111162A (en) * 2019-12-24 2020-05-08 北京像素软件科技股份有限公司 Data synchronization method and device of game NPC, storage medium and server

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US8005710B2 (en) * 2004-09-28 2011-08-23 Microsoft Corporation Methods and systems for caching and synchronizing project data

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106407321A (en) * 2016-08-31 2017-02-15 东软集团股份有限公司 Data synchronization method and device
CN110314373A (en) * 2019-07-08 2019-10-11 网易(杭州)网络有限公司 Information synchronization method, device, storage medium, processor and server
CN110898428A (en) * 2019-11-12 2020-03-24 腾讯科技(深圳)有限公司 Multi-virtual object interaction method, device, server and storage medium
CN111111162A (en) * 2019-12-24 2020-05-08 北京像素软件科技股份有限公司 Data synchronization method and device of game NPC, storage medium and server

Also Published As

Publication number Publication date
CN112675538A (en) 2021-04-20

Similar Documents

Publication Publication Date Title
CN109876438B (en) User interface display method, device, equipment and storage medium
CN112494955B (en) Skill releasing method, device, terminal and storage medium for virtual object
CN111596838B (en) Service processing method and device, computer equipment and computer readable storage medium
CN111589167A (en) Event fighting method, device, terminal, server and storage medium
CN111462307A (en) Virtual image display method, device, equipment and storage medium of virtual object
CN112843679B (en) Skill release method, device, equipment and medium for virtual object
CN111589141B (en) Virtual environment picture display method, device, equipment and medium
CN111672110B (en) Control method, device, storage medium and equipment for virtual role in virtual world
CN111744185B (en) Virtual object control method, device, computer equipment and storage medium
CN111921197A (en) Method, device, terminal and storage medium for displaying game playback picture
CN113058264A (en) Display method of virtual scene, processing method, device and equipment of virtual scene
CN112675538B (en) Data synchronization method, device, equipment and medium
CN111589116B (en) Method, device, terminal and storage medium for displaying function options
CN112755517B (en) Virtual object control method, device, terminal and storage medium
CN112274936B (en) Method, device, equipment and storage medium for supplementing sub-props of virtual props
CN114404972A (en) Display method, device and equipment for visual field screen
CN111589117B (en) Method, device, terminal and storage medium for displaying function options
CN111265867B (en) Method and device for displaying game picture, terminal and storage medium
CN112156454A (en) Virtual object generation method and device, terminal and readable storage medium
HK40042448A (en) Data synchronization method and device, apparatus and medium
CN117298568B (en) Virtual scene synchronization method, virtual scene display method, device and equipment
CN117085325A (en) Method, device, equipment and product for realizing gain effect of virtual character
HK40028386A (en) Method and device for displaying function option, terminal and storage medium
HK40043851B (en) Method and apparatus for controlling virtual object, terminal and storage medium
HK40044182A (en) Method and device for releasing skills of virtual object, apparatus and medium

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
REG Reference to a national code

Ref country code: HK

Ref legal event code: DE

Ref document number: 40042448

Country of ref document: HK

GR01 Patent grant
GR01 Patent grant