Network Synchronization Method, Apparatus, Device, and Storage Medium

By creating composite synchronization objects and subordinate synchronization objects in online online games, the problem of other components not receiving signals when component destruction is solved, and reasonable correlation and efficient synchronization of components are achieved.

CN116170452BActive Publication Date: 2025-07-29SHENZHEN YIHAI MUTUAL ENTERTAINMENT INFORMATION TECH CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202211556486.8
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-12-06
Publication Date
2025-07-29
Estimated Expiration
2042-12-06

AI Technical Summary

Technical Problem

In online games, other components do not receive signals when they are destroyed, causing problems with spam objects in the network object management system.

Method used

By obtaining the target component corresponding to the loading resource, scanning and creating the composite synchronization object and subordinate synchronization object of the target composite component, and syncing it to the target server for entity creation, the component association management is realized.

Benefits of technology

It improves network synchronization efficiency, solves the problem that components cannot be properly processed when creating them, and avoids spam objects in the network object management system.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN116170452B_ABST
    Figure CN116170452B_ABST
Patent Text Reader

Abstract

The present invention relates to the field of network synchronization technology, and discloses a network synchronization method, device, equipment and storage medium. The method includes: obtaining a target component corresponding to a loaded resource, and scanning the target component; when the target component scanned is a target composite component, creating a composite synchronization object corresponding to the target composite component; obtaining subordinate components corresponding to the target composite component, and creating subordinate synchronization objects corresponding to the subordinate components; synchronizing the composite synchronization object and the subordinate synchronization objects to a target server, so that the target server synchronizes the composite synchronization object and the subordinate synchronization objects to a slave client for entity creation. Since the present invention can create a composite synchronization object and subordinate synchronization objects of a component corresponding to a loaded resource, enabling the slave client to perform entity creation, it can thus associate with other components when creating a certain component and perform reasonable and effective processing through corresponding network objects.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of network synchronization, and in particular, to a network synchronization method, apparatus, device, and storage medium. Background Art

[0002] With the development of mobile networks and the widespread use of client engines, the component development model has been widely applied. However, since multiple clients are usually required for online games in the game market, and in the network online mode, each component has its own object management during separate development. If a component with network synchronization capabilities triggers the destruction of an object, but at this time other components do not receive the signal of the object destruction, it is easy to cause the situation of garbage objects in the network object management system. Therefore, how to associate a certain component with other components during creation and perform reasonable and effective processing through corresponding network objects has become an urgent problem to be solved.

[0003] The above content is only used to assist in understanding the technical solution of the present invention, and does not represent an admission that the above content is prior art. Summary of the Invention

[0004] The main object of the present invention is to provide a network synchronization method, apparatus, device, and storage medium, aiming to solve the technical problem in the prior art that it is impossible to associate a certain component with other components during creation and perform reasonable and effective processing through corresponding network objects.

[0005] To achieve the above object, the present invention provides a network synchronization method, and the method includes the following steps:

[0006] Obtain a target component corresponding to the loaded resource, and scan the target component;

[0007] When it is scanned that the target component is a target composite component, create a composite synchronization object corresponding to the target composite component;

[0008] Obtain subordinate components corresponding to the target composite component, and create subordinate synchronization objects corresponding to the subordinate components;

[0009] Synchronize the composite synchronization object and the subordinate synchronization objects to a target server, so that the target server synchronizes the composite synchronization object and the subordinate synchronization objects to a slave client for entity creation.

[0010] Optionally, after the step of creating a composite synchronization object corresponding to the target composite component when it is scanned that the target component is a target composite component, the method further includes:

[0011] Obtain a target node corresponding to the node where the target composite component is located, and the target node includes: sibling nodes, a parent node, and child nodes;

[0012] Correspondingly, the step of obtaining the subordinate components corresponding to the target composite component and creating the subordinate synchronization objects corresponding to the subordinate components includes:

[0013] Obtaining the subordinate components corresponding to the target composite component based on the target node, and creating the subordinate synchronization objects corresponding to the subordinate components.

[0014] Optionally, after the step of synchronizing the composite synchronization object and the subordinate synchronization object to the target server, so that the target server synchronizes the composite synchronization object and the subordinate synchronization object to the slave client for entity creation, the method further includes:

[0015] When detecting that the target synchronization component triggers destruction, obtaining the target composite synchronization object corresponding to the target synchronization component and the destruction instruction;

[0016] Synchronizing the destruction instruction to other synchronization components through the target composite synchronization object;

[0017] When the other synchronization components need to be destroyed, synchronizing the destruction instruction to the target composite synchronization object;

[0018] Synchronizing the destruction instruction to the target server, so that the target server synchronizes the destruction instruction to the slave client for component destruction.

[0019] Optionally, the step of obtaining the target composite synchronization object corresponding to the target synchronization component when detecting that the target synchronization component triggers destruction includes:

[0020] When detecting that the target synchronization component triggers destruction, obtaining the target tree structure corresponding to the target synchronization component;

[0021] Obtaining the target composite synchronization object corresponding to the target synchronization component based on the target tree structure.

[0022] Optionally, before the step of obtaining the target tree structure corresponding to the target synchronization component when detecting that the target synchronization component triggers destruction, the method further includes:

[0023] Obtaining the target synchronization node corresponding to the node where the target synchronization component is located;

[0024] Creating the target tree structure corresponding to the target synchronization component based on the target synchronization node.

[0025] Optionally, the slave client is used to obtain the corresponding target loading resources according to the composite synchronization object and the subordinate synchronization object, and obtain the slave synchronization component according to the target loading resources;

[0026] The slave client is further configured to mount the slave synchronization component to the composite synchronization object, and manage the slave synchronization component through the composite synchronization object.

[0027] Optionally, when receiving the destruction instruction, the slave client is configured to destroy the other synchronization components and the target composite synchronization object subordinate to the target composite synchronization object according to the destruction instruction.

[0028] In addition, to achieve the above object, the present invention further provides a network synchronization device, which includes:

[0029] A component scanning module, configured to obtain a target component corresponding to a loaded resource, and scan the target component;

[0030] An object creation module, configured to create a composite synchronization object corresponding to the target composite component when the target component is scanned as the target composite component;

[0031] A component obtaining module, configured to obtain subordinate components corresponding to the target composite component, and create subordinate synchronization objects corresponding to the subordinate components;

[0032] An entity creation module, configured to synchronize the composite synchronization object and the subordinate synchronization objects to a target server, so that the target server synchronizes the composite synchronization object and the subordinate synchronization objects to a slave client for entity creation.

[0033] In addition, to achieve the above object, the present invention further provides a network synchronization device, which includes: a memory, a processor, and a network synchronization program stored on the memory and executable on the processor, where the network synchronization program is configured to implement the steps of the network synchronization method as described above.

[0034] In addition, to achieve the above object, the present invention further provides a storage medium, on which a network synchronization program is stored, and when the network synchronization program is executed by a processor, the steps of the network synchronization method as described above are implemented.

[0035] In the present invention, it is disclosed to obtain a target component corresponding to a loaded resource and scan the target component; when the target component is scanned as a target composite component, create a composite synchronization object corresponding to the target composite component; obtain subordinate components corresponding to the target composite component and create subordinate synchronization objects corresponding to the subordinate components; synchronize the composite synchronization object and the subordinate synchronization objects to a target server, so that the target server synchronizes the composite synchronization object and the subordinate synchronization objects to a slave client for entity creation; compared with the prior art in which when a certain component is destroyed, other components do not receive a signal indicating the existence of component destruction, resulting in the existence of garbage objects in the network object management system, since in the present invention, when the component corresponding to the loaded resource is a composite component, a corresponding composite synchronization object is created, and subordinate synchronization objects of the subordinate components corresponding to the composite component are created, enabling the slave client to perform entity creation based on the composite synchronization object and the subordinate synchronization objects, thereby solving the technical problem in the prior art that it is impossible to associate with other components when a certain component is created and perform reasonable and effective processing through corresponding network objects, and further improving the network synchronization efficiency. BRIEF DESCRIPTION OF THE DRAWINGS

[0036] Figure 1 FIG. is a schematic structural diagram of a network synchronization device in a hardware operating environment related to the solution of an embodiment of the present invention;

[0037] Figure 2 FIG. is a flowchart of a first embodiment of a network synchronization method of the present invention;

[0038] Figure 3 FIG. is a flowchart of network synchronization for a network synchronization method of the present invention;

[0039] Figure 4 FIG. is a flowchart of a second embodiment of a network synchronization method of the present invention;

[0040] Figure 5 FIG. is a structural block diagram of a first embodiment of a network synchronization device of the present invention.

[0041] The implementation, functional features, and advantages of the object of the present invention will be further described with reference to the embodiments and the accompanying drawings. DETAILED DESCRIPTION OF THE EMBODIMENTS

[0042] It should be understood that the specific embodiments described herein are only used to explain the present invention and are not used to limit the present invention.

[0043] Refer to Figure 1 , Figure 1 FIG. is a schematic structural diagram of a network synchronization device in a hardware operating environment related to the solution of an embodiment of the present invention.

[0044] Such as Figure 1As shown in the figure, the network synchronization device may include: a processor 1001, such as a Central Processing Unit (CPU), a communication bus 1002, a user interface 1003, a network interface 1004, and a memory 1005. Among them, the communication bus 1002 is used to realize the connection and communication between these components. The user interface 1003 may include a display screen and an input unit such as a keyboard. Optionally, the user interface 1003 may also include a standard wired interface and a wireless interface. The network interface 1004 may optionally include a standard wired interface and a wireless interface (such as a Wireless-Fidelity (Wi-Fi) interface). The memory 1005 may be a high-speed Random Access Memory (RAM) or a stable Non-Volatile Memory (NVM), such as a disk memory. Optionally, the memory 1005 may also be a storage device independent of the aforementioned processor 1001.

[0045] Those skilled in the art can understand that Figure 1 the structure shown in the figure does not constitute a limitation on the network synchronization device, and it may include more or fewer components than shown in the figure, or combine some components, or have different component arrangements.

[0046] As Figure 1 shown, in the memory 1005 as a storage medium, there may be included an operating system, a network communication module, a user interface module, and a network synchronization program.

[0047] In Figure 1 the network synchronization device shown in the figure, the network interface 1004 is mainly used for data communication with a network server; the user interface 1003 is mainly used for data interaction with a user; the processor 1001 and the memory 1005 in the network synchronization device of the present invention may be arranged in the network synchronization device. The network synchronization device calls the network synchronization program stored in the memory 1005 through the processor 1001 and executes the network synchronization method provided by the embodiments of the present invention.

[0048] The embodiments of the present invention provide a network synchronization method. Referring to Figure 2 , Figure 2 it is a schematic flowchart of the first embodiment of the network synchronization method of the present invention.

[0049] In this embodiment, the network synchronization method includes the following steps:

[0050] Step S10: Obtain a target component corresponding to a loaded resource and scan the target component.

[0051] It should be noted that the execution subject of the method in this embodiment can be a client in a network synchronization system, or other network synchronization devices or network synchronization systems that can implement the same or similar functions and include this client. Here, the network synchronization method provided in this embodiment and the following embodiments will be specifically described by taking a network synchronization system (hereinafter referred to as the system) as an example.

[0052] It should be understood that client engines (such as Cocos Creator) are all based on a component-based development model. There will be multiple resources in the client engine. If resources need to be controlled, corresponding components need to be added to the resources. Therefore, the above-mentioned loaded resources can be the resources existing in the client engine. One or more components can exist on each resource. For example, if the client engine is a game engine, the corresponding loaded resources can be the wheels, vehicle shells, or engines of a vehicle in a certain game.

[0053] It can be understood that the above-mentioned target component can be one or several components existing in the above-mentioned loaded resources that control the loaded resources. For example: if the loaded resource is the wheel of a vehicle, the target component can be the component that controls the movement and rotation of the wheel.

[0054] In a specific implementation, loading a resource in a game engine can be the wheel of a vehicle. If you want to control the movement or rotation of the vehicle wheel, etc., you need to add a component that controls the movement or rotation of the wheel to the wheel to achieve the control of the vehicle wheel. Therefore, when the client engine loads a resource, if there is a component in the loaded resource, it can obtain the component and scan the component to determine whether the component belongs to a composite component. Check the component. If it exists, it means that the component is a composite component.

[0055] Step S20: When it is scanned that the target component is a target composite component, create a composite synchronization object corresponding to the target composite component.

[0056] It should be noted that in this embodiment, the above-mentioned target component can be scanned to determine whether the above-mentioned target component is a composite component. If it can be scanned whether there are other components in the parent node or child node corresponding to the node loaded by the above-mentioned target component, it means that the above-mentioned target component belongs to a composite component. If no other components are scanned, it means that the above-mentioned target component does not belong to a composite component.

[0057] It should be understood that each component has corresponding attributes. Therefore, the above-mentioned composite synchronization object can be an object created to represent that one or more attributes of a component reference other components.

[0058] Step S30: Obtain the subordinate components corresponding to the target composite component, and create subordinate synchronization objects corresponding to the subordinate components.

[0059] It is understandable that there are other components among the parent node, child node, sibling node, etc. corresponding to the node loaded by the above-mentioned target composite component, which can be expressed as the subordinate components of the composite component. In practical applications, the sibling node, parent node, and child node corresponding to the node loaded by the target composite component can be obtained, so that the subordinate nodes of the target composite component can be obtained according to the components corresponding to the sibling node, parent node, and child node.

[0060] It should be noted that after creating the composite synchronization object corresponding to the target composite component, the subordinate synchronization object corresponding to the subordinate component of the target composite component can be automatically triggered and created through the network, and the creation of the subordinate synchronization object is based on the composite synchronization object.

[0061] Step S40: Synchronize the composite synchronization object and the subordinate synchronization object to the target server, so that the target server synchronizes the composite synchronization object and the subordinate synchronization object to the slave client for entity creation.

[0062] It should be understood that after creating the above-mentioned composite synchronization object and the above-mentioned subordinate synchronization object, the composite synchronization object and the subordinate synchronization object can be synchronized to the slave client corresponding to the host client. After receiving the creation of these components and the composite synchronization object, the slave client performs corresponding entity creation.

[0063] Furthermore, in order to automatically trigger the network creation of the composite object after the single component triggers the entity creation of the client, the above method further includes: the slave client is used to obtain the corresponding target loading resource according to the composite synchronization object and the subordinate synchronization object, and obtain the slave synchronization component according to the target loading resource; the slave client is also used to mount the slave synchronization component to the composite synchronization object and manage the slave synchronization component through the composite synchronization object.

[0064] It is understandable that after the target server creates the created composite synchronization object, it can synchronize the created composite synchronization object to the slave client. After receiving the message of the component creation synchronized by the server, the slave client obtains the corresponding loading resource based on the composite synchronization object, can obtain the created component through the loading resource, and mount the created component into the above-mentioned composite synchronization object, so as to manage the created component through the above-mentioned composite synchronization object. In practical applications, such as Figure 3As shown in the figure, when the client engine is the game engine, first, the host client game logic can trigger the loading of resources to create a client entity (target component) based on a certain component, and scan all nodes and hierarchies of the client entity. When the target component is a composite component, a composite synchronization object is created, and synchronization objects for all subordinate components of the composite component are created, and then synchronized to the server. After receiving the creation of the component, the server synchronizes the signal to the slave client, and the slave client creates an entity after receiving the signal.

[0065] In the specific implementation, if the current game in the client engine is a client-to-server game with the client as the host, and the host client needs to synchronize the car created in the game to other clients through the server so that other clients can also load this car. Since the logic of the car needs to be controlled in the network environment (such as the movement and rotation of the car wheels, etc.), at this time, the message of the car moving in the host client needs to be synchronized to other clients through the server, and other clients can also control the movement of the car after receiving the message of the car moving. Therefore, the components that control the movement and rotation of the vehicle in the wheels of the loaded resources can be obtained according to the loaded resources, and all nodes and hierarchies of the components that control the movement and rotation of the vehicle are scanned. If there are subordinate components of other components, it means that the component that controls the movement and rotation of the vehicle is a composite component. At this time, a corresponding composite synchronization object for this component is created, and at the same time, the creation of the corresponding subordinate synchronization object for the subordinate component is triggered, and the created composite synchronization object and subordinate synchronization object are synchronized to the server. After receiving the composite synchronization object and subordinate synchronization object, the server synchronizes them to the corresponding slave clients, so that the slave clients can load the wheel resources of the car according to the composite object, and obtain the synchronization components corresponding to the wheel resources according to the composite synchronization object and subordinate synchronization object, and mount the synchronization components to the composite synchronization object, so that the network creation of the composite object can be automatically triggered after the creation of the client entity by a single component, and the created synchronization components can be managed through the composite synchronization object.

[0066] This embodiment discloses obtaining a target component corresponding to a loaded resource and scanning the target component; when the target component is scanned as a target composite component, creating a composite synchronization object corresponding to the target composite component; obtaining subordinate components corresponding to the target composite component and creating subordinate synchronization objects corresponding to the subordinate components; synchronizing the composite synchronization object and the subordinate synchronization objects to a target server, so that the target server synchronizes the composite synchronization object and the subordinate synchronization objects to a slave client for entity creation; compared with the prior art where when a certain component is destroyed, other components do not receive a signal indicating the existence of component destruction, resulting in the presence of garbage objects in the network object management system. Since in this embodiment, when the component corresponding to the loaded resource is a composite component, a corresponding composite synchronization object is created, and subordinate synchronization objects of the subordinate components corresponding to the composite component are created, the slave client can perform entity creation based on the composite synchronization object and the subordinate synchronization objects, thereby solving the technical problem in the prior art that it is impossible to associate with other components when a certain component is created and perform reasonable and effective processing through corresponding network objects, and further improving the network synchronization efficiency.

[0067] Reference Figure 4 , Figure 4 is a schematic flowchart of the second embodiment of the network synchronization method of the present invention.

[0068] Based on the above first embodiment, in order to automatically trigger the management destruction of composite objects when a single component is destroyed, in this embodiment, after the step S40, the above method further includes:

[0069] Step S50: When detecting that a target synchronization component triggers destruction, obtain the target composite synchronization object corresponding to the target synchronization component and a destruction instruction.

[0070] It should be noted that the above target synchronization component can be a component that triggers destruction in the host client. For example: in a game, if a car explodes, the car needs to be destroyed. At this time, the event that triggers the destruction of the car can be that the car wheel is shot and exploded by a bullet.

[0071] It should be understood that when a component triggers destruction, the composite synchronization object to which the component belongs can be found in reverse according to the component that triggers destruction.

[0072] It can be understood that the above destruction instruction can be triggered by several events, such as blood deduction or vehicle movement in a game. This embodiment does not limit this.

[0073] Step S60: Synchronize the destruction instruction to other synchronization components through the target composite synchronization object.

[0074] It should be noted that the above other synchronization components can be components in the resource loaded by the host client except for the components triggered for destruction. In actual applications, when a certain synchronization component in the host client is used up and triggered for destruction, the composite synchronization object to which the synchronization component belongs can be reversely searched based on the synchronization component, and the destruction instructions for all subordinate synchronization components of the synchronization component can be synchronized, that is, the message of triggering the destruction of the synchronization component is passed to all subordinate synchronization components of the synchronization component, and the message of triggering the destruction of the synchronization component is synchronized to the server.

[0075] Step S70: When the other synchronization components need to be destroyed, synchronize the destruction instruction to the target composite synchronization object.

[0076] It should be understood that when a certain synchronization component in the host client is triggered for destruction, the destruction signal of the synchronization component can be passed to all components. However, at this time, all components only need to pay attention to whether they should be destroyed. If they need to be destroyed, the destruction instruction can be synchronized to the target composite synchronization object and synchronized to the server.

[0077] Step S80: Synchronize the destruction instruction to the target server so that the target server synchronizes the destruction instruction to the slave client for component destruction.

[0078] It should be noted that when the slave client receives the above destruction synchronization instruction, it can destroy all other synchronization components subordinate to the target composite synchronization object and the target composite synchronization object according to the above destruction instruction.

[0079] It can be understood that in actual applications, if the car body of a vehicle catches fire in a game, at this time, the composite synchronization object corresponding to the car body can be found through the car body component, and the signal of the car body catching fire can be passed to all components through the composite synchronization object of the car body. After all components receive this signal, they check whether the vehicle needs to be destroyed. If only the car body catches fire, the vehicle will not be destroyed at this time. If the car body is completely burned out and scrapped after a period of time, it will be destroyed. In actual applications, as Figure 3 shown, when a certain synchronization component in the host client is used up and triggered for destruction, the corresponding composite synchronization object can be reversely searched based on this component, and the destruction instructions of all subordinate synchronization components of this component and the destruction instruction of the composite synchronization object can be synchronized, and the destruction signal is synchronized to the server. After the server receives this signal, it synchronizes it to the slave client, and the slave client can destroy the corresponding synchronization components and composite components according to this signal.

[0080] Further, to reverse-lookup the composite synchronization object corresponding to the synchronization component through the synchronization component, the above step S50 includes: when detecting that the target synchronization component triggers destruction, obtaining the target tree structure corresponding to the target synchronization component; and obtaining the target composite synchronization object corresponding to the target synchronization component based on the target tree structure.

[0081] It should be noted that the target synchronization node corresponding to the node loaded by the above target synchronization component can be obtained, that is, the parent node, child node, and sibling node corresponding to the above target synchronization component, and the target tree structure corresponding to the above target synchronization component can be created based on the parent node, child node, and sibling node corresponding to the above target synchronization component. When it is necessary to find the composite synchronization object corresponding to the synchronization component, the composite synchronization object of the synchronization component can be obtained through the created target tree structure.

[0082] In a specific implementation, if the car wheel is shot and exploded and the car needs to be destroyed, at this time, the car wheel being shot and exploded can trigger the destruction of the component. First, the tree structure corresponding to the exploded wheel can be obtained to obtain other components corresponding to the parent node, child node, and sibling node of the wheel, and the composite synchronization object corresponding to the component can be obtained. The destruction instructions of all subordinate synchronization components of the component are synchronized through the composite synchronization object, and then the destruction instruction of the composite synchronization object is synchronized. After synchronization, the message of component destruction can be synchronized to the target server. After receiving the message, the target server notifies the corresponding slave client. The slave client derives events downward based on the sequence object to each component, so that each component can make corresponding events for the wheel explosion through reflection.

[0083] In this embodiment, when detecting that the target synchronization component triggers destruction, the corresponding composite synchronization object and destruction instruction are obtained based on the tree structure corresponding to the node where the target synchronization component is located. The destruction instruction is synchronized to other synchronization components through the target composite synchronization object. When other synchronization components need to be destroyed, the destruction instruction is synchronized to the composite synchronization object and the target server. After receiving the destruction instruction, the target server synchronizes the destruction instruction to the slave client. When receiving the destruction instruction, the slave client destroys other synchronization components and the target composite synchronization object subordinate to the target composite synchronization object according to the destruction instruction, so that the management destruction of the composite object can be automatically triggered when a single component is destroyed in the host client.

[0084] In addition, an embodiment of the present invention further provides a storage medium, on which a network synchronization program is stored. When the network synchronization program is executed by a processor, the steps of the network synchronization method described above are implemented.

[0085] Refer to Figure 5 , Figure 5 which is the structural block diagram of the first embodiment of the network synchronization device of the present invention.

[0086] As Figure 5 shown, the network synchronization device proposed in the embodiment of the present invention includes:

[0087] A component scanning module 501, configured to obtain a target component corresponding to a loaded resource and scan the target component;

[0088] An object creation module 502, configured to create a composite synchronization object corresponding to the target composite component when the target component is scanned as the target composite component;

[0089] A component acquisition module 503, configured to acquire subordinate components corresponding to the target composite component and create subordinate synchronization objects corresponding to the subordinate components;

[0090] An entity creation module 504, configured to synchronize the composite synchronization object and the subordinate synchronization objects to a target server, so that the target server synchronizes the composite synchronization object and the subordinate synchronization objects to a slave client for entity creation.

[0091] The network synchronization device of this embodiment discloses obtaining a target component corresponding to a loaded resource and scanning the target component; when the target component is scanned as the target composite component, creating a composite synchronization object corresponding to the target composite component; obtaining subordinate components corresponding to the target composite component and creating subordinate synchronization objects corresponding to the subordinate components; synchronizing the composite synchronization object and the subordinate synchronization objects to a target server, so that the target server synchronizes the composite synchronization object and the subordinate synchronization objects to a slave client for entity creation; compared with the situation in the prior art where when a certain component is destroyed, other components do not receive a signal indicating the existence of component destruction, resulting in garbage objects in the network object management system, since in this embodiment, when the component corresponding to the loaded resource is a composite component, a corresponding composite synchronization object is created, and subordinate synchronization objects of the subordinate components corresponding to the composite component are created, enabling the slave client to perform entity creation based on the composite synchronization object and the subordinate synchronization objects, thereby solving the technical problem in the prior art that it is impossible to associate with other components when a certain component is created and perform reasonable and effective processing through corresponding network objects, and further improving the network synchronization efficiency.

[0092] For other embodiments or specific implementation manners of the network synchronization device of the present invention, reference may be made to the above method embodiments, which will not be elaborated herein.

[0093] It should be noted that in this article, the terms "include", "comprise" or any other variants thereof are intended to cover non-exclusive inclusion, such that a process, method, article or system including a series of elements not only includes those elements but also includes other elements not expressly listed, or further includes elements inherent to such process, method, article or system. Without further limitation, an element defined by the statement "including one..." does not exclude the existence of additional identical elements in the process, method, article or system including such element.

[0094] The serial numbers of the above embodiments of the present invention are only for description and do not represent the superiority or inferiority of the embodiments.

[0095] Through the description of the above embodiments, those skilled in the art can clearly understand that the above embodiment methods can be implemented by means of software plus a necessary general hardware platform. Of course, they can also be implemented by hardware, but in many cases the former is a better implementation method. Based on such an understanding, the technical solution of the present invention, in essence, or the part that contributes to the prior art can be embodied in the form of a software product. This computer software product is stored in a storage medium (such as a read-only memory / random access memory, magnetic disk, optical disk) and includes several instructions for causing a terminal device (which can be a mobile phone, computer, server, or network device, etc.) to execute the methods described in the various embodiments of the present invention.

[0096] The above are only the preferred embodiments of the present invention and do not limit the patent scope of the present invention accordingly. Any equivalent structure or equivalent process transformation made by using the content of the specification and drawings of the present invention, or directly or indirectly applied in other related technical fields, shall be equally included in the patent protection scope of the present invention.

Claims

1. A network synchronization method, characterized in that, The network synchronization method includes: Obtain a target component corresponding to a loaded resource, and scan the target component; When it is scanned that the target component is a target composite component, create a composite synchronization object corresponding to the target composite component; Obtain subordinate components corresponding to the target composite component, and create subordinate synchronization objects corresponding to the subordinate components; Synchronize the composite synchronization object and the subordinate synchronization objects to a target server, so that the target server synchronizes the composite synchronization object and the subordinate synchronization objects to a slave client for entity creation.

2. The network synchronization method according to claim 1, characterized in that After the step of creating a composite synchronization object corresponding to the target composite component when it is scanned that the target component is a target composite component, it further includes: Obtain a target node corresponding to the node where the target composite component is located, and the target node includes: sibling nodes, parent nodes, and child nodes; Correspondingly, the step of obtaining subordinate components corresponding to the target composite component and creating subordinate synchronization objects corresponding to the subordinate components includes: Based on the target node, obtain subordinate components corresponding to the target composite component, and create subordinate synchronization objects corresponding to the subordinate components.

3. The network synchronization method according to claim 1, wherein After the step of synchronizing the composite synchronization object and the subordinate synchronization objects to a target server, so that the target server synchronizes the composite synchronization object and the subordinate synchronization objects to a slave client for entity creation, it further includes: When it is detected that a target synchronization component triggers destruction, obtain a target composite synchronization object corresponding to the target synchronization component and a destruction instruction; Synchronize the destruction instruction to other synchronization components through the target composite synchronization object; When other synchronization components need to be destroyed, synchronize the destruction instruction to the target composite synchronization object; Synchronize the destruction instruction to the target server, so that the target server synchronizes the destruction instruction to the slave client for component destruction.

4. The network synchronization method according to claim 3, wherein The step of obtaining a target composite synchronization object corresponding to the target synchronization component when it is detected that the target synchronization component triggers destruction includes: When it is detected that a target synchronization component triggers destruction, obtain a target tree structure corresponding to the target synchronization component; Based on the target tree structure, obtain a target composite synchronization object corresponding to the target synchronization component.

5. The network synchronization method according to claim 4, wherein Before the step of obtaining a target tree structure corresponding to the target synchronization component when it is detected that the target synchronization component triggers destruction, it further includes: Obtain a target synchronization node corresponding to the node where the target synchronization component is located; Based on the target synchronization node, create a target tree structure corresponding to the target synchronization component.

6. The network synchronization method according to any one of claims 1 to 5, characterized in that, The slave client is used to obtain corresponding target loaded resources according to the composite synchronization object and the subordinate synchronization objects, and obtain slave synchronization components according to the target loaded resources; The slave client is further used to mount the slave synchronization components to the composite synchronization object, and manage the slave synchronization components through the composite synchronization object.

7. The network synchronization method according to claim 3, characterized in that, The slave machine client is used to destroy the other synchronization components and the target composite synchronization object subordinate to the target composite synchronization object according to the destruction instruction when receiving the destruction instruction.

8. A network synchronization device, characterized in that, The device includes: A component scanning module, configured to obtain a target component corresponding to a loaded resource and scan the target component; An object creation module, configured to create a composite synchronization object corresponding to the target composite component when the target component is scanned as the target composite component; A component acquisition module, configured to acquire subordinate components corresponding to the target composite component and create subordinate synchronization objects corresponding to the subordinate components; An entity creation module, configured to synchronize the composite synchronization object and the subordinate synchronization object to a target server, so that the target server synchronizes the composite synchronization object and the subordinate synchronization object to a slave machine client for entity creation.

9. A network synchronization device, characterized in that, The device includes: a memory, a processor, and a network synchronization program stored on the memory and executable on the processor, where the network synchronization is configured to implement the steps of the network synchronization method according to any one of claims 1 to 7.

10. A storage medium, characterized in that, A network synchronization program is stored on the storage medium, and when the network synchronization program is executed by a processor, it implements the steps of the network synchronization method according to any one of claims 1 to 7.

Citation Information

Patent Citations

  • Game data synchronization method and device, storage medium and processor

    CN110639206A

  • Game data synchronization method and device, storage medium and processor

    CN110639207A