Object synchronization method, computing device, storage medium and computer program product
By calculating the association weights of the target object and its associated objects in the virtual scene and generating a synchronization queue, the performance degradation and network congestion caused by the synchronization of a large number of roles in the virtual scene are solved, and a more stable virtual reality experience is achieved.
Patent Information
- Application Number
- CN202411501658.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-10-25
- Publication Date
- 2025-02-07
AI Technical Summary
In a virtual scene, when a large number of virtual characters are within the field of view of the target virtual characters, the client needs to load and render these characters, resulting in performance degradation, increased network traffic, which may lead to network congestion or delay, affecting the virtual reality experience.
By determining multiple associated objects of the target object and calculating the association weight according to the association relationship between them, sorting the associated objects, generating an object synchronization queue, and sending it to the client, so that the client can associate the associated objects according to the queue. Synchronize.
By filtering associated objects, this method reduces the number of objects that need to be synchronized, reduces the CPU and memory burden of the client, avoids network congestion or delay, and enables the virtual scene to run stably.
Smart Images

Figure CN119386456A_ABST
Abstract
Description
Technical Field
[0001] The embodiments of this specification relate to the field of computer technology, and in particular, to object synchronization methods, computing devices, storage media, and computer program products. Background Art
[0002] In a virtual scene, when a large number of virtual characters are within the field of vision of a target virtual character, the client of the target virtual character can load and render these characters to ensure the authenticity of the user's virtual reality experience. However, this will cause the client's performance to degrade. Synchronizing the status information of a large number of characters to the client will increase network traffic, which may cause network congestion or delay, thereby affecting the virtual reality experience. The client also needs to parse and manage a large amount of received character data, which increases the burden on the client's CPU and memory, resulting in unstable operation of the virtual scene. Therefore, an effective technical solution is urgently needed to solve the above problems. Summary of the invention
[0003] In view of this, an embodiment of this specification provides an object synchronization method. One or more embodiments of this specification also relate to an object synchronization device, a game object synchronization method, a game object synchronization device, a computing device, a computer-readable storage medium and a computer program product to solve the technical defects existing in the prior art.
[0004] According to a first aspect of an embodiment of this specification, there is provided an object synchronization method, including: Determine multiple associated objects of the target object; Determining, according to the association relationship between the target object and the multiple associated objects, an association weight of each associated object in the multiple associated objects relative to the target object; Sorting the plurality of associated objects according to an association weight of each associated object relative to the target object to obtain an object sorting queue; An object synchronization queue is determined according to the object sorting queue, and the object synchronization queue is sent to a client of the target object, so that the client synchronizes the multiple associated objects according to the object synchronization queue.
[0005] According to a second aspect of an embodiment of this specification, there is provided an object synchronization device, including: A first determining module is configured to determine a plurality of associated objects of a target object; A second determining module is configured to determine an association weight of each associated object in the multiple associated objects relative to the target object according to an association relationship between the target object and the multiple associated objects; A sorting module is configured to sort the multiple associated objects according to the association weight of each associated object relative to the target object to obtain an object sorting queue; The sending module is configured to determine an object synchronization queue according to the object sorting queue, and send the object synchronization queue to the client of the target object, so that the client synchronizes the multiple associated objects according to the object synchronization queue.
[0006] According to a third aspect of an embodiment of this specification, a game object synchronization method is provided, comprising: Determine multiple associated game objects of the target game object; Determine, according to the association relationship between the target game object and the multiple associated game objects, an association weight of each associated game object in the multiple associated game objects relative to the target game object; Sorting the plurality of associated game objects according to the associated weights of the associated game objects relative to the target game object to obtain an object sorting queue; An object synchronization queue is determined according to the object sorting queue, and the object synchronization queue is sent to the client of the target game object, so that the client synchronizes the multiple associated game objects according to the object synchronization queue.
[0007] According to a fourth aspect of an embodiment of this specification, a game object synchronization device is provided, comprising: A first determination module is configured to determine a plurality of associated game objects of a target game object; A second determination module is configured to determine an association weight of each associated game object relative to the target game object in the multiple associated game objects according to an association relationship between the target game object and the multiple associated game objects; A sorting module is configured to sort the multiple associated game objects according to the association weight of each associated game object relative to the target game object to obtain an object sorting queue; The sending module is configured to determine an object synchronization queue according to the object sorting queue, and send the object synchronization queue to the client of the target game object, so that the client synchronizes the multiple associated game objects according to the object synchronization queue.
[0008] According to a fifth aspect of an embodiment of this specification, a computing device is provided, including: Memory and processor; The memory is used to store computer programs / instructions, and the processor is used to execute the computer programs / instructions. When the computer programs / instructions are executed by the processor, the steps of the above method are implemented.
[0009] According to a sixth aspect of the embodiments of this specification, a computer-readable storage medium is provided, which stores a computer program / instruction, and the steps of the above method are implemented when the computer program / instruction is executed by a processor.
[0010] According to a seventh aspect of the embodiments of this specification, a computer program product is provided, comprising a computer program / instruction, which implements the steps of the above method when executed by a processor.
[0011] An embodiment of the present specification provides an object synchronization method, including: determining multiple associated objects of a target object; determining, based on the association relationship between the target object and the multiple associated objects, the association weight of each associated object relative to the target object; sorting the multiple associated objects based on the association weight of each associated object relative to the target object to obtain an object sorting queue; determining an object synchronization queue based on the object sorting queue, and sending the object synchronization queue to a client of the target object, so that the client synchronizes the multiple associated objects based on the object synchronization queue.
[0012] The above method calculates the association weight of each associated object relative to the target object in multiple associated objects according to the association relationship between the target object and multiple associated objects, and sorts the multiple associated objects according to the association weight to obtain an object sorting queue, determines an object synchronization queue according to the object sorting queue, and sends the object synchronization queue to the client of the target object, so that the client of the target object synchronizes the multiple associated objects according to the object synchronization queue, screens the multiple associated objects of the target object, and does not need to synchronize all the associated objects of the target object. In addition, screening according to the association weight can ensure that the association relationship between the synchronized associated objects and the target object is relatively close, while ensuring the user's virtual scene experience, it can reduce the burden on the client's CPU and memory, avoid network congestion or delay, and make the virtual scene run stably. BRIEF DESCRIPTION OF THE DRAWINGS
[0013] Figure 1 is a flow chart of an object synchronization method provided by an embodiment of this specification; Figure 2 is a processing flow chart of an object synchronization method provided by an embodiment of this specification; Figure 3 is a structural diagram of an object synchronization device provided by an embodiment of this specification; Figure 4 is a flowchart of a game object synchronization method provided by an embodiment of this specification; Figure 5 It is a structural schematic diagram of a game object synchronization device provided by an embodiment of this specification; Figure 6 It is a structural block diagram of a computing device provided by an embodiment of this specification. DETAILED DESCRIPTION
[0014] Many specific details are described in the following description to facilitate a full understanding of this specification. However, this specification can be implemented in many other ways than those described herein, and those skilled in the art can make similar generalizations without violating the connotation of this specification, so this specification is not limited to the specific implementation disclosed below.
[0015] The terms used in one or more embodiments of this specification are only for the purpose of describing specific embodiments, and are not intended to limit one or more embodiments of this specification. The singular forms of "a", "said" and "the" used in one or more embodiments of this specification and the appended claims are also intended to include plural forms, unless the context clearly indicates other meanings. It should also be understood that the term "and / or" used in one or more embodiments of this specification refers to and includes any or all possible combinations of one or more associated listed items.
[0016] It should be understood that although the terms first, second, etc. may be used to describe various information in one or more embodiments of this specification, this information should not be limited to these terms. These terms are only used to distinguish the same type of information from each other. For example, without departing from the scope of one or more embodiments of this specification, the first may also be referred to as the second, and similarly, the second may also be referred to as the first. Depending on the context, the word "if" as used herein may be interpreted as "at the time of" or "when" or "in response to determining".
[0017] In addition, it should be noted that the user information (including but not limited to user device information, user personal information, etc.) and data (including but not limited to data used for analysis, stored data, displayed data, etc.) involved in one or more embodiments of this specification are all information and data authorized by the user or fully authorized by all parties, and the collection, use and processing of relevant data must comply with the relevant laws, regulations and standards of the relevant countries and regions, and provide corresponding operation entrances for users to choose to authorize or refuse.
[0018] First, the terms involved in one or more embodiments of this specification are explained.
[0019] CPU: Central Processing Unit, is one of the main hardware of the computer, responsible for executing instructions and processing data in the computer.
[0020] NPC: Non-Player Character, a character controlled by the game, not directly controlled by the player. They are usually part of the game, providing tasks, dialogue or other interactive elements.
[0021] GPU: Graphics Processing Unit, a processor specifically used to accelerate image rendering and graphics-related calculations.
[0022] AOI: Area of Interest, usually refers to the attention and management of a specific area in a specific field. In games, AOI management may refer to the optimization of game objects within the player's activity range. For example, in massively multiplayer online games (MMORPGs), only objects within the player's visible range (i.e., AOI) will be fully loaded and rendered, which can reduce unnecessary computing load and improve game performance.
[0023] MMORPG: Massively Multiplayer Online Role-Playing Game, a type of game that allows thousands of players to play simultaneously on the same server. Such games usually have a continuously evolving virtual world where players can explore, fight, complete quests, etc.
[0024] In practical applications, virtual scenes can be multiplayer online games, for example. In multiplayer MMORPGs, synchronization of game players has always been a big problem. Usually, all players within the field of view can be synchronized to the client, and the client adopts different resource loading strategies to reduce the problem of excessive resource loading on the client, which causes lag. However, if there are many game players, the game will still be stuck, because synchronizing too many characters will also put pressure on network transmission, and the client has a large overhead for character data analysis and management, which will cause a burden on the client's CPU and memory. Therefore, an effective technical solution is urgently needed to solve the above problems.
[0025] In this specification, an object synchronization method is provided. This specification also relates to an object synchronization device, a game object synchronization method, a game object synchronization device, a computing device, a computer-readable storage medium and a computer program product, which are described in detail one by one in the following embodiments.
[0026] See also Figure 1 , Figure 1 A flowchart of an object synchronization method provided according to an embodiment of the present specification is shown, which specifically includes the following steps.
[0027] Step 102: Determine multiple associated objects of the target object.
[0028] Specifically, the object synchronization method provided in the embodiments of this specification can be applied to the field of virtual scenes, such as games, virtual animations, virtual reality, etc. In the field of games, the object synchronization method can be used to synchronize the display interface of the player's client with the status of other players or NPC characters within the player's field of view. Then, in the field of virtual reality, the user can enter the virtual scene by wearing a virtual reality device, then the object synchronization method can be used to synchronize the status of other virtual reality users within the user's field of view in the virtual scene entered by the user.
[0029] For ease of understanding, the embodiments of this specification are described using the object synchronization method applied to a game scenario as an example, which does not affect the application of the object synchronization method provided in the embodiments of this specification to other scenarios.
[0030] Among them, the target object can be understood as the virtual character of the target game user in the game scene, and the multiple associated objects of the target object can be understood as other game characters within the field of view of the target object. The associated objects can include the virtual characters of other game users in the game scene, and can also include game NPC characters in the target game.
[0031] In a specific implementation, objects within a preset distance range corresponding to the target object can be determined as multiple associated objects of the target object according to the preset distance range. The preset distance range can be set according to the target game.
[0032] In practical applications, all objects within the field of view of the target object can be determined as multiple associated objects of the target object. An object synchronization list can be established in AOI management, and the associated objects can be added to the object synchronization list. Furthermore, the object synchronization list can include a player synchronization list and an NPC synchronization list. Then, the virtual characters of other game users in the game scene included in the associated objects can be added to the player synchronization list, and the game NPC characters in the target game included in the associated objects can be added to the NPC synchronization list.
[0033] Step 104: Determine an association weight of each associated object in the multiple associated objects relative to the target object according to the association relationship between the target object and the multiple associated objects.
[0034] Specifically, after determining the multiple associated objects of the target object, the association weight of each associated object relative to the target object may be determined according to the association relationship between the target object and each of the multiple associated objects.
[0035] In actual applications, in each game frame of the target game, the player synchronization list and the NPC synchronization list will be refreshed and detected, and the player synchronization list and the NPC synchronization list will be traversed. According to the traversal results, multiple associated objects of the target object that need to be synchronized are obtained, and the association weights of the associated objects and the target objects in the player synchronization list and the NPC synchronization list are calculated.
[0036] In a specific implementation, determining the association weight of each associated object relative to the target object in the multiple associated objects according to the association relationship between the target object and the multiple associated objects includes: Determine whether the association relationship between the target object and the multiple associated objects and between the associated objects satisfies a preset association rule, and obtain a determination result; According to the judgment result, an association weight of each of the multiple associated objects relative to the target object is determined.
[0037] Among them, the preset association rule can be understood as whether there is a preset association relationship between the target object and the associated object. The preset association relationship can include a combat relationship, a teammate relationship, an attack relationship, etc.
[0038] Specifically, for each associated object, it can be determined whether the associated object has a preset association relationship with the target object, and a determination result can be obtained. If the determination result is yes, the association weight of the associated object relative to the target object is increased. For example, if it is determined that the associated object has a teammate relationship with the target object, the association weight of the associated object relative to the target object is increased by 2.
[0039] In practical applications, an association weight can be given according to the distance between the target object and the associated object. For example, the closer the distance between the target object and the associated object, the higher the association weight given, and the farther the distance, the lower the association weight given. An association weight of 1 to 2 can be given according to the distance. When the associated player has multiplayer interactive actions or has special functions (such as the associated object transforming into an escort NPC), the association weight of the associated object can be increased by 10. When it is determined that there is a mandatory combat relationship between the target object and the associated object, the association weight can be increased by 10. When it is determined that there is a teammate relationship between the target object and the associated object, The associated object is given an association weight of 7. If it is determined that there is a community relationship between the target object and the associated object, the associated object can be given an association weight of 2. If it is determined that there is an attacked relationship or an attack relationship between the target object and the associated object, the associated object can be given an association weight of 1 to 2. On this basis, if it is determined according to the synchronization mark of the associated object that the associated object has been synchronized before and marked as an attack relationship, then the associated object can be given an association weight of 4 to 6. For the associated objects that have been synchronized (that is, already in the object synchronization queue), the association weight will also be increased by 1 to 2. For inactive associated objects, the association weight can be reduced by 1 to 5. Among them, inactive associated objects can be understood as other game players who have not performed any operations within the preset time period. It can be judged that the associated object is in an idle state or an abnormal connection state. Then, according to the above calculation rules, the maximum weight is 10.
[0040] For example, for the target object, the associated objects include: game player A, with an associated weight of 10, game player B, with an associated weight of 9, game player C, with an associated weight of 4, game NPC character D, with an associated weight of 7, and game NPC character E, with an associated weight of 5.
[0041] In summary, by calculating the association weight, it is convenient to synchronize the associated objects according to the association weight, so that other virtual characters closely related to the target object can be displayed on the client display interface of the target object.
[0042] Step 106: Sort the multiple associated objects according to the association weight of each associated object relative to the target object to obtain an object sorting queue.
[0043] The object sorting queue may be understood as a queue for sorting all associated objects of a target object.
[0044] Using the above example, multiple associated objects can be sorted according to the associated weight of each associated object, and the obtained object sorting queue includes: game player A, game player B, game NPC character D, game NPC character E, game player C.
[0045] Furthermore, after determining the association weight of each of the multiple associated objects relative to the target object, the method further includes: According to a preset adjustment rule, adjusting the association weight of each associated object among the multiple associated objects relative to the target object to obtain an adjusted association weight; The step of sorting the plurality of associated objects according to the association weight of each associated object relative to the target object to obtain an object sorting queue includes: The plurality of associated objects are sorted according to the adjusted associated weights to obtain an object sorting queue.
[0046] The preset adjustment rule may be understood as a rule for making adjustments based on the association relationship between the associated object and the target object.
[0047] Specifically, according to preset adjustment rules, N associated objects that are teammates with the target object and are closest to the target object can be determined from multiple associated objects, the association weights of the N associated objects can be adjusted to obtain adjusted association weights, and the multiple associated objects can be reordered according to the adjusted association weights to obtain an object sorting queue.
[0048] In actual applications, in order to avoid the situation where all other players displayed in the target object's client display interface are enemies, with too many enemies and no teammates or family members displayed, the weights of nearby teammates and family members will be increased to the maximum value of 11 to avoid blank friendly lists.
[0049] Step 108: Determine an object synchronization queue according to the object sorting queue, and send the object synchronization queue to the client of the target object, so that the client synchronizes the multiple associated objects according to the object synchronization queue.
[0050] Among them, the object synchronization queue may include associated objects that need to be synchronized after being screened according to the associated weight. In actual applications, similar to the object synchronization list, the object synchronization queue may also include a player synchronization queue and an NPC synchronization queue. Then, the virtual characters of other game users in the game scene that have been screened can be added to the player synchronization queue, and the game NPC characters in the target game that have been screened can be added to the NPC synchronization queue. The client synchronizes multiple associated objects according to the object synchronization queue, which can be understood as the client rendering and displaying multiple associated objects in the object synchronization queue on the client's display interface.
[0051] Optionally, the player synchronization queue and the NPC synchronization queue can be sent to the client based on a preset ratio between the number of additional other characters and the number of enemies, so that the client takes the preset ratio between the number of additional other characters and the number of enemies into consideration when rendering and displaying, thereby avoiding too many enemies and too few teammates on the display interface of the target object.
[0052] In a specific implementation, determining the object synchronization queue according to the object sorting queue includes: Determine the object sorting queue as the object synchronization queue; or According to the arrangement order of the multiple associated objects in the object sorting queue, the multiple associated objects in the object sorting queue are screened to obtain a screening result; An object synchronization queue is determined according to the screening result, wherein the number of the associated objects included in the object synchronization queue is less than the number of the associated objects included in the object sorting queue.
[0053] Specifically, in one embodiment of the present specification, the object sorting queue can be directly determined as the object synchronization queue. For example, when the number of associated objects included in the object sorting queue is less than a preset number threshold, the object sorting queue can be directly determined as the object synchronization queue. The preset number threshold can be determined based on the device performance information of the client of the target object. For example, the preset number threshold is 10, that is, the device performance of the client of the target object can support the simultaneous rendering and display of 10 associated objects on the display interface without freezing.
[0054] In another embodiment of the present specification, multiple associated objects in the object sorting queue may be screened according to the arrangement order of the multiple associated objects in the object sorting queue to obtain a screening result, and an object synchronization queue may be determined based on the screening result, so that the number of associated objects included in the object synchronization queue is less than a preset number threshold. For example, if the object sorting queue contains 50 associated objects, the first 10 associated objects in the object sorting queue may be added to the object synchronization queue according to the arrangement order of the 50 associated objects.
[0055] In summary, by screening according to the association weights, associated objects that are closely related to the target object are obtained for synchronization, the number of associated objects that need to be synchronized is reduced, and the CPU and memory burden of the client is further reduced.
[0056] In practical applications, the multiple associated objects of the target object are determined, including: Determining a plurality of associated objects of the target object according to a first time interval; The step of determining the object synchronization queue according to the object sorting queue includes: An object synchronization queue corresponding to a current time interval is determined according to the object sorting queue.
[0057] The first time interval may be determined according to the synchronization requirements of the target game, for example, 1 second, 5 seconds, etc.
[0058] Specifically, according to the first time interval, multiple associated objects of the target object in the current time interval may be determined (ie, an object synchronization list may be constructed), and according to the object sorting queue, an object synchronization queue corresponding to the current time interval may be determined.
[0059] For example, the first time interval can be 5 seconds. For example, every 5 seconds, 100 associated objects of the target object in the current time interval can be determined, and the association weight of each associated object can be calculated to obtain the object sorting queue, and based on the object sorting queue, the object synchronization queue within the current 5 seconds can be determined.
[0060] Further, the determining, according to the association relationship between the target object and the multiple associated objects, an association weight of each associated object in the multiple associated objects relative to the target object includes: dividing the first time interval into a plurality of second time intervals; At each second time interval, according to the association relationship between the target object and the plurality of associated objects, an association weight of each associated object relative to the target object is determined.
[0061] The first time interval is, for example, 5 seconds, and the second time interval may be 1 second, that is, the first time interval is divided into 5 second time intervals.
[0062] Based on this, the association weights of the multiple associated objects associated with the target object can be calculated respectively according to each second time interval, so as to obtain an object sorting queue. Specifically, the multiple associated objects associated with the target object can be divided to obtain multiple object groups, each of which includes one or more associated objects, and the association weights of the associated objects included in each object group are calculated at each second time interval. This realizes the construction of the object sorting queue and the object synchronization queue.
[0063] Using the above example, 100 associated objects can be divided into 4 object groups, each object group includes 25 associated objects. Then, within the first time interval of 5 seconds, 100 associated objects can be obtained in the first second, and in the second second (i.e., a second time interval), the association weights of the 25 associated objects included in the first object group can be calculated. In the third second, the association weights of the 25 associated objects included in the second object group can be calculated. In the fourth second, the association weights of the 25 associated objects included in the third object group can be calculated. In the fifth second, the association weights of the 25 associated objects included in the fourth object group can be calculated.
[0064] In addition, in the case where the target object moves too fast in the target game, it can be determined whether to rebuild the object synchronization list according to the distance difference between the target object and the associated object.
[0065] In summary, by splitting the synchronization list into different frame intervals (for example, 2-8 frames) and rebuilding it, the excessive load caused by the need to synchronously calculate the list of each player in each frame can be effectively reduced.
[0066] In practical applications, after determining the object synchronization queue corresponding to the current time interval according to the object sorting queue, the method further includes: When it is determined that any one of the multiple associated objects exists in the object synchronization queue of the previous time interval according to the synchronization status of the multiple associated objects in the object sorting queue, determining the association weight of the associated object relative to the target object; When it is determined that the association weight satisfies a preset removal condition, the associated object is added to an object clipping queue.
[0067] The preset removal condition may be understood as the associated weight being less than the preset weight threshold. The previous time interval may be understood as the previous time interval of the current time interval. The synchronization status of each associated object may be marked in the object synchronization list and / or the object sorting queue.
[0068] Based on this, it is possible to determine whether any of the multiple associated objects are already in the object synchronization queue of the previous time interval based on the synchronization status of the multiple associated objects marked in the object synchronization list and / or the object sorting queue. If so, it means that the associated object has been synchronized in the previous time interval. At this time, the association weight of the associated object relative to the target object can be determined. When it is determined that the association weight is less than the preset weight threshold, it is determined that the association weight meets the preset removal condition, and the associated object is added to the object pruning queue, so that the client of the subsequent target object can remove the associated object according to the object pruning queue.
[0069] Alternatively, the object synchronization queue of the current time interval can be adjusted directly according to the associated objects contained in the object clipping queue. Specifically, the associated objects contained in the object clipping queue can be removed from the object synchronization queue of the current time interval to obtain an adjusted object synchronization queue, and the adjusted object synchronization queue can be sent to the client of the target object.
[0070] In actual applications, after calculating the association weight of the associated object, the associated object will be placed in the corresponding bucket sorting queue (i.e., object sorting queue) according to the association weight, and the synchronization status of the associated object will be marked. The synchronization status may include: whether it is in the synchronization list, whether it has been synchronized to the client (frame synchronization), whether it has been synchronized before and is within the synchronization range (it will not be cleared during reconstruction, and additional weight will be added to avoid jitter), subscription synchronization (no matter how it is sorted, it will be added to the synchronization list), attacker flag (will be cleared during reconstruction), attacked flag (will be cleared during reconstruction) / , enemy flag (when there are attacker and attacked flags during reconstruction, this flag will be set until the next reconstruction is cleared to avoid jitter). If it is already in the synchronization queue, first add the player to the clipping queue (when the clipping queue reaches the client, the player / character will be directly removed, indicating that the player has left the field of view). Select from the highest priority of the bucket sorting queue downwards. If it has been synchronized, the clipping queue will be removed. For special subscription flags (such as subscription synchronization), it will be added to the synchronization queue by default without considering the weight relationship.
[0071] In summary, by determining whether an associated object has been synchronized according to the synchronization status of the associated object, the synchronized associated object can be removed, thereby further reducing the computing resource burden of the client of the target object.
[0072] Then, after adding the associated object to the object clipping queue, the method further includes: The object clipping queue is sent to the client of the target object, so that the client removes the associated object according to the object clipping queue.
[0073] Specifically, the object clipping queue may be sent to the client of the target object, so that the client of the target object removes the associated objects contained in the object clipping queue from the client's display interface according to the object clipping queue.
[0074] In one embodiment of this specification, the data processing method further includes: Determine device performance information of the client of the target object; Determining the number of the associated objects included in the object synchronization queue according to the device performance information; or In response to an instruction to adjust the number of clients of the target object, the number of the associated objects included in the object synchronization queue is determined.
[0075] Among them, the device performance information may include but is not limited to the client's CPU performance, GPU performance, memory capacity, storage capacity, operating system version information, etc.
[0076] Specifically, in one embodiment of the present specification, the number of associated objects included in the object synchronization queue can be determined according to the device performance information of the target object's client. It is understandable that the better the device performance of the target object's client, the more associated objects included in the object synchronization queue.
[0077] In another embodiment of the present specification, the number of associated objects included in the object synchronization queue can be adjusted according to the number adjustment instruction of the game player in the game setting interface of the client, and this embodiment of the present specification does not limit this.
[0078] In actual applications, the number of synchronizations depends on the basic configuration number of the current scene and the synchronization added value given by the machine performance of the player's mobile phone (this value may be positive or negative), and the player can adjust it at will in the settings.
[0079] In summary, by determining the number of associated objects included in the object synchronization queue according to device performance information or quantity adjustment instructions, a better object synchronization effect can be obtained based on the client's device performance information, and it can also support game player customization to meet the personalized needs of different game players.
[0080] In addition, the data processing method also includes: Determining a target number according to the number of the associated objects included in the object synchronization queue and the number of the associated objects included in the object sorting queue; The target quantity is sent to the client of the target object, so that the client randomly scatters points on the display interface according to the target quantity.
[0081] The target number can be understood as the difference between the number of associated objects included in the object synchronization queue and the number of associated objects included in the object sorting queue. For example, the object sorting queue includes 100 associated objects, which means that there are 100 associated objects near the target object that need to be synchronized. The object synchronization queue includes 20 associated objects, which means that only 20 associated objects are actually synchronized on the client side of the target object, that is, 80 associated objects will not be synchronized on the client side. Then, the target number is 80.
[0082] Specifically, the difference between the number of associated objects included in the object synchronization queue and the number of associated objects included in the object sorting queue can be calculated, and the difference can be used as the target number. The target number is sent to the client of the target object, and the client of the target object can randomly scatter points on the client's display interface according to the target number. For example, 80 points can be displayed in the form of points on the client's display interface, thereby displaying 80 associated objects that have not been synchronized.
[0083] In actual applications, in some places where there are a lot of group battles, the green / red dot synchronization solution of the small map is used to supplement the multi-person sense of players who are not synchronized (the green and red dots only need quantity, and the client uses a random scattering method to reduce the synchronization information).
[0084] To summarize, the above method calculates the association weight of each associated object relative to the target object among multiple associated objects according to the association relationship between the target object and multiple associated objects, and sorts the multiple associated objects according to the association weight to obtain an object sorting queue, determines the object synchronization queue according to the object sorting queue, and sends the object synchronization queue to the client of the target object, so that the client of the target object synchronizes the multiple associated objects according to the object synchronization queue, and screens the multiple associated objects of the target object without synchronizing all the associated objects of the target object. In addition, screening according to the association weight can ensure that the association relationship between the synchronized associated objects and the target object is relatively close, while ensuring the gaming experience of the game players, it can reduce the burden on the client's CPU and memory, avoid network congestion or delay, and make the game run stably.
[0085] The following combination Figure 2 , taking the application of the object synchronization method provided in this specification in a game scene as an example, the object synchronization method is further described. Figure 2 A processing flow chart of an object synchronization method provided by an embodiment of the present specification is shown, which specifically includes the following steps.
[0086] Step 202: When it is determined that other players and NPC characters have entered the field of vision of the target player, the other players are added to the player synchronization list, and the NPC characters are added to the NPC synchronization list.
[0087] Step 204: Calculate association weights for NPC characters in the NPC synchronization list and other players in the player synchronization list.
[0088] Step 206: Add other players and NPC characters to the bucket sorting queue according to the associated weights.
[0089] Step 208: Screen other players and NPC characters according to their order of arrangement in the bucket sorting queue, add other players with higher association weights to the player synchronization queue, and add NPC characters with higher association weights to the NPC synchronization queue.
[0090] Step 210: According to a preset ratio between the number of additional other characters and the number of enemies, the player synchronization queue and the NPC synchronization queue are sent to the client of the target player, so that the client of the target player is synchronized according to the player synchronization queue and the NPC synchronization queue.
[0091] Corresponding to the above method embodiment, this specification also provides an object synchronization device embodiment, Figure 3 FIG. 2 shows a schematic diagram of the structure of an object synchronization device provided by an embodiment of the present specification. Figure 3 As shown, the device comprises: A first determining module 302 is configured to determine a plurality of associated objects of a target object; A second determination module 304 is configured to determine an association weight of each associated object in the multiple associated objects relative to the target object according to the association relationship between the target object and the multiple associated objects; A sorting module 306 is configured to sort the multiple associated objects according to the association weight of each associated object relative to the target object to obtain an object sorting queue; The sending module 308 is configured to determine an object synchronization queue according to the object sorting queue, and send the object synchronization queue to the client of the target object, so that the client synchronizes the multiple associated objects according to the object synchronization queue.
[0092] In an optional embodiment, the second determining module 304 is further configured to: Determine whether the association relationship between the target object and the multiple associated objects and between the associated objects satisfies a preset association rule, and obtain a determination result; According to the judgment result, an association weight of each of the multiple associated objects relative to the target object is determined.
[0093] In an optional embodiment, the sending module 308 is further configured to: Determine the object sorting queue as the object synchronization queue; or According to the arrangement order of the multiple associated objects in the object sorting queue, the multiple associated objects in the object sorting queue are screened to obtain a screening result; An object synchronization queue is determined according to the screening result, wherein the number of the associated objects included in the object synchronization queue is less than the number of the associated objects included in the object sorting queue.
[0094] In an optional embodiment, the sending module 308 is further configured to: According to a preset adjustment rule, adjusting the association weight of each associated object among the multiple associated objects relative to the target object to obtain an adjusted association weight; The plurality of associated objects are sorted according to the adjusted associated weights to obtain an object sorting queue.
[0095] In an optional embodiment, the first determining module 302 is further configured to: Determining a plurality of associated objects of the target object according to a first time interval; The sending module 308 is further configured to: An object synchronization queue corresponding to a current time interval is determined according to the object sorting queue.
[0096] In an optional embodiment, the sending module 308 is further configured to: When it is determined that any one of the multiple associated objects exists in the object synchronization queue of the previous time interval according to the synchronization status of the multiple associated objects in the object sorting queue, determining the association weight of the associated object relative to the target object; When it is determined that the association weight satisfies a preset removal condition, the associated object is added to an object clipping queue.
[0097] In an optional embodiment, the sending module 308 is further configured to: The object clipping queue is sent to the client of the target object, so that the client removes the associated object according to the object clipping queue.
[0098] In an optional embodiment, the first determining module 302 is further configured to: Determine device performance information of the client of the target object; Determining the number of the associated objects included in the object synchronization queue according to the device performance information; or In response to an instruction to adjust the number of clients of the target object, the number of the associated objects included in the object synchronization queue is determined.
[0099] In an optional embodiment, the sending module 308 is further configured to: Determining a target number according to the number of the associated objects included in the object synchronization queue and the number of the associated objects included in the object sorting queue; The target quantity is sent to the client of the target object, so that the client randomly scatters points on the display interface according to the target quantity.
[0100] In an optional embodiment, the second determining module 304 is further configured to: dividing the first time interval into a plurality of second time intervals; At each second time interval, according to the association relationship between the target object and the plurality of associated objects, an association weight of each associated object relative to the target object is determined.
[0101] The above-mentioned device calculates the association weight of each associated object relative to the target object in multiple associated objects according to the association relationship between the target object and multiple associated objects, and sorts the multiple associated objects according to the association weight to obtain an object sorting queue, determines an object synchronization queue according to the object sorting queue, and sends the object synchronization queue to the client of the target object, so that the client of the target object synchronizes the multiple associated objects according to the object synchronization queue, and screens the multiple associated objects of the target object without synchronizing all the associated objects of the target object. In addition, by screening according to the association weight, it is possible to ensure that the association relationship between the synchronized associated objects and the target object is relatively close, while ensuring the user's virtual scene experience, it is possible to reduce the burden on the client's CPU and memory, avoid network congestion or delay, and make the game run stably.
[0102] The above is a schematic scheme of an object synchronization device of this embodiment. It should be noted that the technical scheme of the object synchronization device and the technical scheme of the object synchronization method described above are of the same concept, and the details not described in detail in the technical scheme of the object synchronization device can be found in the description of the technical scheme of the object synchronization method described above.
[0103] Corresponding to the above method embodiment, see Figure 4 , Figure 4 A flowchart of a game object synchronization method provided according to an embodiment of the present specification is shown, which specifically includes the following steps.
[0104] Step 402: Determine multiple associated game objects of the target game object; Step 404: determining an association weight of each associated game object relative to the target game object among the multiple associated game objects according to the association relationship between the target game object and the multiple associated game objects; Step 406: Sort the multiple associated game objects according to the association weight of each associated game object relative to the target game object to obtain an object sorting queue; Step 408: Determine an object synchronization queue according to the object sorting queue, and send the object synchronization queue to the client of the target game object, so that the client synchronizes the multiple associated game objects according to the object synchronization queue.
[0105] The above is a schematic scheme of a game object synchronization method of this embodiment. It should be noted that the technical scheme of the game object synchronization method and the technical scheme of the above object synchronization method belong to the same concept, and the details of the technical scheme of the game object synchronization method that are not described in detail can be found in the description of the technical scheme of the above object synchronization method.
[0106] Corresponding to the above method embodiment, this specification also provides a game object synchronization device embodiment, Figure 5 FIG. 2 shows a schematic diagram of the structure of a game object synchronization device provided by an embodiment of the present specification. Figure 5 As shown, the device comprises: A first determination module 502 is configured to determine a plurality of associated game objects of a target game object; The second determination module 504 is configured to determine the association weight of each associated game object in the multiple associated game objects relative to the target game object according to the association relationship between the target game object and the multiple associated game objects; A sorting module 506 is configured to sort the multiple associated game objects according to the association weight of each associated game object relative to the target game object to obtain an object sorting queue; The sending module 508 is configured to determine an object synchronization queue according to the object sorting queue, and send the object synchronization queue to the client of the target game object, so that the client synchronizes the multiple associated game objects according to the object synchronization queue.
[0107] The above is a schematic scheme of a game object synchronization device of this embodiment. It should be noted that the technical scheme of the game object synchronization device and the technical scheme of the game object synchronization method described above belong to the same concept, and the details not described in detail in the technical scheme of the game object synchronization device can be referred to the description of the technical scheme of the game object synchronization method described above.
[0108] Figure 6The block diagram of a computing device 600 according to an embodiment of the present specification is shown. The components of the computing device 600 include but are not limited to a memory 610 and a processor 620. The processor 620 is connected to the memory 610 via a bus 630, and the database 650 is used to store data.
[0109] The computing device 600 also includes an access device 640 that enables the computing device 600 to communicate via one or more networks 660. Examples of these networks include a public switched telephone network (PSTN), a local area network (LAN), a wide area network (WAN), a personal area network (PAN), or a combination of communication networks such as the Internet. The access device 640 may include one or more of any type of network interface (e.g., a network interface card (NIC)) that is wired or wireless, such as an IEEE 802.11 wireless local area network (WLAN) wireless interface, a world-wide interoperability for microwave access (Wi-MAX) interface, an Ethernet interface, a universal serial bus (USB) interface, a cellular network interface, a Bluetooth interface, a near field communication (NFC) interface, and the like.
[0110] In one embodiment of the present application, the above components of the computing device 600 and Figure 6 Other components not shown in the figure may also be connected to each other, for example, via a bus. It should be understood that Figure 6 The computing device structure block diagram shown is only for the purpose of illustration, and is not intended to limit the scope of the present application. Those skilled in the art may add or replace other components as needed.
[0111] The computing device 600 may be any type of stationary or mobile computing device, including a mobile computer or mobile computing device (e.g., a tablet computer, a personal digital assistant, a laptop computer, a notebook computer, a netbook, etc.), a mobile phone (e.g., a smart phone), a wearable computing device (e.g., a smart watch, smart glasses, etc.), or other types of mobile devices, or a stationary computing device such as a desktop computer or a personal computer (PC). The computing device 600 may also be a mobile or stationary server.
[0112] The processor 620 is used to execute the following computer program / instructions, which implement the steps of the above method when executed by the processor.
[0113] Each embodiment in this specification is described in a progressive manner, and the same or similar parts between the embodiments can be referred to each other, and each embodiment focuses on the differences from other embodiments. In particular, for the computing device embodiment, since it is basically similar to the method embodiment, the description is relatively simple, and the relevant parts can be referred to the partial description of the method embodiment.
[0114] An embodiment of the present specification further provides a computer-readable storage medium storing a computer program / instruction, which implements the steps of the above method when executed by a processor.
[0115] Each embodiment in this specification is described in a progressive manner, and the same or similar parts between the embodiments can be referred to each other, and each embodiment focuses on the differences from other embodiments. In particular, for the computer-readable storage medium embodiment, since it is basically similar to the method embodiment, the description is relatively simple, and the relevant parts can be referred to the partial description of the method embodiment.
[0116] An embodiment of the present specification also provides a computer program product, including a computer program / instruction, which implements the steps of the above method when executed by a processor.
[0117] The above is a schematic solution of a computer program product of this embodiment. It should be noted that the technical solution of the computer program product and the technical solution of the above method belong to the same concept, and the details not described in detail in the technical solution of the computer program product can be referred to the description of the technical solution of the above method.
[0118] The above is a description of a specific embodiment of the specification. Other embodiments are within the scope of the appended claims. In some cases, the actions or steps recorded in the claims can be performed in an order different from that in the embodiments and still achieve the desired results. In addition, the processes depicted in the drawings do not necessarily require the specific order or continuous order shown to achieve the desired results. In some embodiments, multitasking and parallel processing are also possible or may be advantageous.
[0119] The computer instructions include computer program codes, which may be in source code form, object code form, executable files or some intermediate forms, etc. The computer-readable medium may include: any entity or device capable of carrying the computer program code, recording medium, USB flash drive, mobile hard disk, magnetic disk, optical disk, computer memory, read-only memory (ROM), random access memory (RAM), electric carrier signal, telecommunication signal and software distribution medium, etc. It should be noted that the content contained in the computer-readable medium may be appropriately increased or decreased according to the requirements of patent practice. For example, in some regions, according to patent practice, computer-readable media do not include electric carrier signals and telecommunication signals.
[0120] It should be noted that, for the above-mentioned method embodiments, for the sake of simplicity of description, they are all expressed as a series of action combinations, but those skilled in the art should be aware that the embodiments of this specification are not limited by the order of the actions described, because according to the embodiments of this specification, some steps can be performed in other orders or simultaneously. Secondly, those skilled in the art should also be aware that the embodiments described in the specification are all preferred embodiments, and the actions and modules involved are not necessarily required by the embodiments of this specification.
[0121] In the above embodiments, the description of each embodiment has its own emphasis. For parts that are not described in detail in a certain embodiment, reference can be made to the relevant descriptions of other embodiments.
[0122] The preferred embodiments of this specification disclosed above are only used to help explain this specification. The optional embodiments do not describe all the details in detail, nor do they limit the invention to only the specific implementation methods described. Obviously, many modifications and changes can be made according to the content of the embodiments of this specification. This specification selects and specifically describes these embodiments in order to better explain the principles and practical applications of the embodiments of this specification, so that technicians in the relevant technical field can well understand and use this specification. This specification is only limited by the claims and their full scope and equivalents.
Claims
1. An object synchronization method, comprising: Determine multiple associated objects of the target object; Determining, according to the association relationship between the target object and the multiple associated objects, an association weight of each associated object in the multiple associated objects relative to the target object; Sorting the plurality of associated objects according to an association weight of each associated object relative to the target object to obtain an object sorting queue; An object synchronization queue is determined according to the object sorting queue, and the object synchronization queue is sent to a client of the target object, so that the client synchronizes the multiple associated objects according to the object synchronization queue.
2. The method according to claim 1, wherein determining the association weight of each associated object relative to the target object in the multiple associated objects according to the association relationship between the target object and the multiple associated objects comprises: Determine whether the association relationship between the target object and the multiple associated objects and between the associated objects satisfies a preset association rule, and obtain a determination result; According to the judgment result, an association weight of each of the multiple associated objects relative to the target object is determined.
3. The method according to claim 1 or 2, wherein determining the object synchronization queue according to the object sorting queue comprises: Determine the object sorting queue as the object synchronization queue; or According to the arrangement order of the multiple associated objects in the object sorting queue, the multiple associated objects in the object sorting queue are screened to obtain a screening result; An object synchronization queue is determined according to the screening result, wherein the number of the associated objects included in the object synchronization queue is less than the number of the associated objects included in the object sorting queue.
4. The method according to claim 1, after determining the association weight of each of the multiple associated objects relative to the target object, further comprising: According to a preset adjustment rule, adjusting the association weight of each associated object among the multiple associated objects relative to the target object to obtain an adjusted association weight; The step of sorting the plurality of associated objects according to the association weight of each associated object relative to the target object to obtain an object sorting queue includes: The plurality of associated objects are sorted according to the adjusted associated weights to obtain an object sorting queue.
5. The method according to claim 1, wherein determining a plurality of associated objects of the target object comprises: Determining a plurality of associated objects of the target object according to a first time interval; The step of determining the object synchronization queue according to the object sorting queue includes: An object synchronization queue corresponding to a current time interval is determined according to the object sorting queue.
6. The method according to claim 5, after determining the object synchronization queue corresponding to the current time interval according to the object sorting queue, further comprising: When it is determined that any one of the multiple associated objects exists in the object synchronization queue of the previous time interval according to the synchronization status of the multiple associated objects in the object sorting queue, determining the association weight of the associated object relative to the target object; When it is determined that the association weight satisfies a preset removal condition, the associated object is added to an object clipping queue.
7. The method according to claim 6, after adding the associated object to the object clipping queue, further comprising: The object clipping queue is sent to the client of the target object, so that the client removes the associated object according to the object clipping queue.
8. The method according to claim 3, further comprising: Determine device performance information of the client of the target object; Determining the number of the associated objects included in the object synchronization queue according to the device performance information; or In response to an instruction to adjust the number of clients of the target object, the number of the associated objects included in the object synchronization queue is determined.
9. The method according to claim 3, further comprising: Determining a target number according to the number of the associated objects included in the object synchronization queue and the number of the associated objects included in the object sorting queue; The target quantity is sent to the client of the target object, so that the client randomly scatters points on the display interface according to the target quantity.
10. The method according to claim 5, wherein determining the association weight of each associated object relative to the target object in the multiple associated objects according to the association relationship between the target object and the multiple associated objects comprises: dividing the first time interval into a plurality of second time intervals; At each second time interval, according to the association relationship between the target object and the plurality of associated objects, an association weight of each associated object relative to the target object is determined.
11. A computing device comprising: Memory and processor; The memory is used to store computer programs / instructions, and the processor is used to execute the computer programs / instructions. When the computer programs / instructions are executed by the processor, the steps of the method described in any one of claims 1 to 10 are implemented.
12. A computer-readable storage medium storing a computer program / instruction, wherein the computer program / instruction, when executed by a processor, implements the steps of the method according to any one of claims 1 to 10.
13. A computer program product, comprising a computer program / instruction, which, when executed by a processor, implements the steps of the method according to any one of claims 1 to 10.