HK40052795B - A virtual object delivery method, device, equipment and storage medium - Google Patents
A virtual object delivery method, device, equipment and storage medium Download PDFInfo
- Publication number
- HK40052795B HK40052795B HK42021042304.2A HK42021042304A HK40052795B HK 40052795 B HK40052795 B HK 40052795B HK 42021042304 A HK42021042304 A HK 42021042304A HK 40052795 B HK40052795 B HK 40052795B
- Authority
- HK
- Hong Kong
- Prior art keywords
- data
- virtual object
- service process
- transmission
- target
- Prior art date
Links
Description
技术领域Technical Field
本申请涉及计算机技术领域,尤其涉及一种虚拟对象传送方法、装置、设备及存储介质。This application relates to the field of computer technology, and in particular to a method, apparatus, device and storage medium for transmitting virtual objects.
背景技术Background Technology
大型多人在线角色扮演游戏(Massive Multiplayer Online Role Play Game,MMORPG)因具有玩法丰富、游戏情节引人入胜等特点,一直以来深受广大游戏玩家的喜爱。MMORPG的服务端架构通常包括至少一组服务,每组服务中包括若干场景服务(scene)进程和一个世界服务(world)进程;其中,scene进程用于承载对应的地图中的玩法逻辑、以及处于该地图中的各虚拟对象的相关数据;world进程用于管理用户的登录和登出、以及协调虚拟对象传送等。Massive Multiplayer Online Role-Playing Games (MMORPGs) have long been popular among gamers due to their rich gameplay and captivating storylines. The server-side architecture of an MMORPG typically includes at least one set of services. Each set includes several scene service processes and one world service process. The scene processes handle the gameplay logic within the corresponding map and the data related to the virtual objects within that map. The world processes manage user login and logout, and coordinate the teleportation of virtual objects.
目前,MMORPG支持的很多玩法都会涉及虚拟对象传送,所谓虚拟对象传送即是将虚拟对象从游戏世界的一个地图传送至另一个地图。MMORPG的服务端执行虚拟对象传送任务时,用于承载虚拟对象原本所处的地图的scene进程需要将该虚拟对象的虚拟对象数据发送给world进程,world进程基于其接收的虚拟对象数据进行相应的处理后,将该虚拟对象数据发送给用于承载该虚拟对象所要前往的地图的scene进程,如此实现虚拟对象传送。Currently, many gameplay elements supported by MMORPGs involve virtual object teleportation, which refers to moving a virtual object from one map in the game world to another. When the MMORPG server executes a virtual object teleportation task, the scene process of the map where the virtual object originally resides needs to send the virtual object data to the world process. The world process processes the received virtual object data and then sends it to the scene process of the map to which the virtual object is to be transported, thus realizing virtual object teleportation.
然而,执行虚拟对象传送任务时所需传输的虚拟对象数据通常较大,由world进程中转并处理该虚拟对象数据往往需要耗费较多的处理资源;在需要瞬时大规模传送虚拟对象的玩法中,world进程由于需要同时中转并处理大量的虚拟对象数据,往往难以支持较高的虚拟对象传送速度(即单位时间内处理的虚拟对象传送次数较少),用户所感知的虚拟对象传送体验往往也较差。However, the virtual object data that needs to be transferred when performing virtual object transfer tasks is usually large. The world process often needs to consume a lot of processing resources to transfer and process the virtual object data. In gameplay that requires the instantaneous transfer of a large number of virtual objects, the world process often cannot support a high virtual object transfer speed (i.e., fewer virtual object transfers are processed per unit time) because it needs to transfer and process a large amount of virtual object data at the same time. The user's perceived virtual object transfer experience is often poor.
发明内容Summary of the Invention
本申请实施例提供了一种虚拟对象传送方法、装置、设备及存储介质,能够支持较高的虚拟对象传送速度,提高用户所感知的虚拟对象传送体验。This application provides a method, apparatus, device, and storage medium for transmitting virtual objects, which can support higher virtual object transmission speeds and improve the user's perceived virtual object transmission experience.
有鉴于此,本申请第一方面提供了一种虚拟对象传送方法,所述方法应用于游戏服务端的服务进程组,所述服务进程组中包括一个世界服务进程和多个场景服务进程,所述方法包括:In view of this, the first aspect of this application provides a method for transmitting virtual objects, the method being applied to a service process group on a game server, the service process group including a world service process and multiple scene service processes, the method comprising:
通过原场景服务进程,拆分目标虚拟对象对应的原虚拟对象数据,得到第一传送数据和第二传送数据;所述原场景服务进程用于承载针对所述目标虚拟对象触发传送操作前所述目标虚拟对象所处的原地图;The original scene service process is used to split the original virtual object data corresponding to the target virtual object to obtain the first transmission data and the second transmission data; the original scene service process is used to carry the original map where the target virtual object is located before the transmission operation is triggered for the target virtual object.
通过所述原场景服务进程,将所述第一传送数据发送给消息队列,将所述第二传送数据发送给所述世界服务进程;The first transmitted data is sent to the message queue through the original scene service process, and the second transmitted data is sent to the world service process.
通过所述世界服务进程,根据所述第二传送数据确定第三传送数据;并根据所述第三传送数据生成传送通知消息;Through the world service process, the third transmission data is determined based on the second transmission data; and a transmission notification message is generated based on the third transmission data.
通过所述世界服务进程,将所述传送通知消息发送给目的场景服务进程;所述目的场景服务进程用于承载针对所述目标虚拟对象触发传送操作后所述目标虚拟对象所要前往的目的地图;The world service process sends the transmission notification message to the destination scene service process; the destination scene service process is used to carry the destination map that the target virtual object wants to go to after the transmission operation is triggered for the target virtual object;
通过所述目的场景服务进程,根据所述传送通知消息从所述消息队列中获取所述第一传送数据;并根据所述第一传送数据和所述第三传送数据确定所述目标虚拟对象对应的目的虚拟对象数据。The destination scenario service process retrieves the first transmission data from the message queue based on the transmission notification message; and determines the destination virtual object data corresponding to the target virtual object based on the first transmission data and the third transmission data.
本申请第二方面提供了一种虚拟对象传送装置,所述装置包括:A second aspect of this application provides a virtual object transfer device, the device comprising:
数据拆分模块,用于通过原场景服务进程,拆分目标虚拟对象对应的原虚拟对象数据,得到第一传送数据和第二传送数据;所述原场景服务进程用于承载针对所述目标虚拟对象触发传送操作前所述目标虚拟对象所处的原地图;The data splitting module is used to split the original virtual object data corresponding to the target virtual object through the original scene service process to obtain the first transmission data and the second transmission data; the original scene service process is used to carry the original map where the target virtual object is located before the transmission operation is triggered for the target virtual object.
第一发送模块,用于通过所述原场景服务进程,将所述第一传送数据发送给消息队列,将所述第二传送数据发送给世界服务进程;The first sending module is used to send the first transmission data to the message queue and the second transmission data to the world service process through the original scene service process.
数据处理模块,用于通过所述世界服务进程,根据所述第二传送数据确定第三传送数据;并根据所述第三传送数据生成传送通知消息;The data processing module is used to determine the third transmission data based on the second transmission data through the world service process; and to generate a transmission notification message based on the third transmission data.
第二发送模块,用于通过所述世界服务进程,将所述传送通知消息发送给目的场景服务进程;所述目的场景服务进程用于承载针对所述目标虚拟对象触发传送操作后所述目标虚拟对象所要前往的目的地图;The second sending module is used to send the transmission notification message to the destination scene service process through the world service process; the destination scene service process is used to carry the destination map that the target virtual object wants to go to after the transmission operation is triggered for the target virtual object;
数据还原模块,用于通过所述目的场景服务进程,根据所述传送通知消息从所述消息队列中获取所述第一传送数据;并根据所述第一传送数据和所述第三传送数据确定所述目标虚拟对象对应的目的虚拟对象数据。The data restoration module is used to obtain the first transmitted data from the message queue according to the transmission notification message through the destination scene service process; and to determine the destination virtual object data corresponding to the target virtual object according to the first transmitted data and the third transmitted data.
本申请第三方面提供了一种设备,所述设备包括处理器以及存储器:A third aspect of this application provides an apparatus comprising a processor and a memory:
所述存储器用于存储计算机程序;The memory is used to store computer programs;
所述处理器用于根据所述计算机程序,执行上述第一方面所述的虚拟对象传送方法的步骤。The processor is configured to execute the steps of the virtual object transfer method described in the first aspect, according to the computer program.
本申请第四方面提供了一种计算机可读存储介质,所述计算机可读存储介质用于存储计算机程序,所述计算机程序用于执行上述第一方面所述的虚拟对象传送方法的步骤。A fourth aspect of this application provides a computer-readable storage medium for storing a computer program for performing the steps of the virtual object transfer method described in the first aspect.
本申请第五方面提供了一种计算机程序产品或计算机程序,该计算机程序产品或计算机程序包括计算机指令,该计算机指令存储在计算机可读存储介质中。计算机设备的处理器从计算机可读存储介质读取该计算机指令,处理器执行该计算机指令,使得该计算机设备执行上述第一方面所述的虚拟对象传送方法的步骤。A fifth aspect of this application provides a computer program product or computer program including computer instructions stored in a computer-readable storage medium. A processor of a computer device reads the computer instructions from the computer-readable storage medium and executes the computer instructions, causing the computer device to perform the steps of the virtual object transfer method described in the first aspect.
从以上技术方案可以看出,本申请实施例具有以下优点:As can be seen from the above technical solutions, the embodiments of this application have the following advantages:
本申请实施例提供了一种虚拟对象传送方法,该方法利用服务进程组中的世界服务进程和消息队列协同完成虚拟对象传送任务,从而减少世界服务进程所需传输的数据量,提高虚拟对象传送效率。具体的,在服务进程组将目标虚拟对象从原地图传送至目的地图的过程中,先通过用于承载该原地图的原场景服务进程拆分目标虚拟对象对应的原虚拟对象数据,得到第一传送数据和第二传送数据,将该第一传送数据和该第二传送数据分别发送给消息队列和世界服务进程;然后,通过世界服务进程根据其接收的第二传送数据确定第三传送数据,并根据该第三传送数据生成传送通知消息,将该传送通知消息发送给用于承载目的地图的目的场景服务进程;进而,通过目的场景服务进程,根据该传送通知消息从消息队列中获取第一传送数据,并根据该第一传送数据和传送通知消息中的第三传送数据,确定目标虚拟对象在目的地图中使用的目的虚拟对象数据。上述方法创新性地将原虚拟对象数据拆分为两部分,一部分是不需要世界服务进程处理的数据(即第一传送数据),另一部分是需要世界服务进程处理的数据(即第二传送数据),利用消息队列中转第一传送数据,利用世界服务进程中转和处理第二传送数据,如此大幅减少世界服务进程所需耗费的处理资源,提高虚拟对象的传送速度和传送效率;在需要瞬时大规模传送虚拟对象的玩法中,上述方法可以在相同时间内传送更多的虚拟对象,对于用户来说其感知的虚拟对象传送体验更好。This application provides a virtual object transmission method. This method utilizes a world service process and a message queue within a service process group to collaboratively complete the virtual object transmission task, thereby reducing the amount of data that the world service process needs to transmit and improving the efficiency of virtual object transmission. Specifically, during the process of the service process group transmitting a target virtual object from the original map to the destination map, the original scene service process, which carries the original map, first splits the original virtual object data corresponding to the target virtual object to obtain first transmission data and second transmission data. The first and second transmission data are then sent to the message queue and the world service process, respectively. Next, the world service process determines third transmission data based on the received second transmission data and generates a transmission notification message based on the third transmission data. This transmission notification message is then sent to the destination scene service process, which carries the destination map. Finally, the destination scene service process retrieves the first transmission data from the message queue based on the transmission notification message and determines the destination virtual object data used by the target virtual object in the destination map based on the first transmission data and the third transmission data in the transmission notification message. The above method innovatively splits the original virtual object data into two parts: one part is data that does not require processing by the world service process (i.e., the first transmission data), and the other part is data that does require processing by the world service process (i.e., the second transmission data). The first transmission data is relayed using a message queue, and the second transmission data is relayed and processed by the world service process. This significantly reduces the processing resources required by the world service process and improves the transmission speed and efficiency of virtual objects. In gameplay that requires instantaneous large-scale transmission of virtual objects, the above method can transmit more virtual objects in the same amount of time, resulting in a better perceived virtual object transmission experience for users.
附图说明Attached Figure Description
图1为本申请实施例提供的虚拟对象传送方法的应用场景示意图;Figure 1 is a schematic diagram of an application scenario of the virtual object transfer method provided in the embodiments of this application;
图2为本申请实施例提供的一种虚拟对象传送方法的流程示意图;Figure 2 is a flowchart illustrating a virtual object transfer method provided in an embodiment of this application;
图3为本申请实施例提供的另一种虚拟对象传送方法的流程示意图;Figure 3 is a flowchart illustrating another virtual object transfer method provided in an embodiment of this application;
图4为本申请实施例提供的一种示例性的游戏活动列表示意图;Figure 4 is a schematic diagram of an exemplary game activity list provided in an embodiment of this application;
图5为本申请实施例提供的第一种虚拟对象传送装置的结构示意图;Figure 5 is a schematic diagram of the structure of the first virtual object transmission device provided in the embodiment of this application;
图6为本申请实施例提供的第二种虚拟对象传送装置的结构示意图;Figure 6 is a schematic diagram of the structure of the second virtual object transmission device provided in the embodiment of this application;
图7为本申请实施例提供的第三种虚拟对象传送装置的结构示意图;Figure 7 is a schematic diagram of the structure of the third virtual object transmission device provided in the embodiments of this application;
图8为本申请实施例提供的第四种虚拟对象传送装置的结构示意图;Figure 8 is a structural schematic diagram of the fourth virtual object transmission device provided in the embodiments of this application;
图9为本申请实施例提供的服务器的结构示意图。Figure 9 is a schematic diagram of the server structure provided in an embodiment of this application.
具体实施方式Detailed Implementation
为了使本技术领域的人员更好地理解本申请方案,下面将结合本申请实施例中的附图,对本申请实施例中的技术方案进行清楚、完整地描述,显然,所描述的实施例仅是本申请一部分实施例,而不是全部的实施例。基于本申请中的实施例,本领域普通技术人员在没有做出创造性劳动前提下所获得的所有其他实施例,都属于本申请保护的范围。To enable those skilled in the art to better understand the present application, the technical solutions in the embodiments of the present application will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present application, and not all embodiments. Based on the embodiments in the present application, all other embodiments obtained by those of ordinary skill in the art without creative effort are within the scope of protection of the present application.
本申请的说明书和权利要求书及上述附图中的术语“第一”、“第二”、“第三”、“第四”等(如果存在)是用于区别类似的对象,而不必用于描述特定的顺序或先后次序。应该理解这样使用的数据在适当情况下可以互换,以便这里描述的本申请的实施例能够以除了在这里图示或描述的那些以外的顺序实施。此外,术语“包括”和“具有”以及他们的任何变形,意图在于覆盖不排他的包含,例如,包含了一系列步骤或单元的过程、方法、系统、产品或设备不必限于清楚地列出的那些步骤或单元,而是可包括没有清楚地列出的或对于这些过程、方法、产品或设备固有的其它步骤或单元。The terms “first,” “second,” “third,” “fourth,” etc. (if present) in the specification, claims, and accompanying drawings of this application are used to distinguish similar objects and are not necessarily used to describe a particular order or sequence. It should be understood that such data can be interchanged where appropriate so that the embodiments of this application described herein can be implemented in orders other than those illustrated or described herein. Furthermore, the terms “comprising” and “having,” and any variations thereof, are intended to cover a non-exclusive inclusion; for example, a process, method, system, product, or apparatus that comprises a series of steps or units is not necessarily limited to those steps or units explicitly listed, but may include other steps or units not explicitly listed or inherent to such processes, methods, products, or apparatus.
相关技术中,虚拟对象传送任务通常由世界服务进程独立完成,由于虚拟对象传送任务中所需传输的数据量较大,且世界服务进程的处理资源有限,因此往往难以支持较高的虚拟对象传送效率,这种缺陷在需要瞬时大规模传送虚拟对象的玩法中表现得更为明显,用户所感知的虚拟对象传送体验更差。In related technologies, virtual object transfer tasks are usually completed independently by the world service process. Due to the large amount of data that needs to be transferred in virtual object transfer tasks and the limited processing resources of the world service process, it is often difficult to support high virtual object transfer efficiency. This defect is more obvious in gameplay that requires instantaneous large-scale transfer of virtual objects, and the user's perceived virtual object transfer experience is worse.
针对上述相关技术存在的问题,本申请实施例提供了一种虚拟对象传送方法,该方法可以有效地提高虚拟对象传送效率,进而提升用户感知的虚拟对象传送体验。To address the problems existing in the aforementioned related technologies, this application provides a virtual object transmission method, which can effectively improve the transmission efficiency of virtual objects and thus enhance the user's perceived virtual object transmission experience.
具体的,本申请实施例提供的虚拟对象传送方法应用于游戏服务端的服务进程组,该服务进程组中包括一个世界服务进程和多个场景服务进程。在该虚拟对象传送方法中,先通过原场景服务进程拆分目标虚拟对象对应的原虚拟对象数据,得到第一传送数据和第二传送数据,此处的原场景服务进程用于承载针对目标虚拟对象触发传送操作前该目标虚拟对象所处的原地图;然后,通过该原场景服务进程将该第一传送数据和该第二传送数据分别发送给消息队列和世界服务进程。接着,通过世界服务进程根据该第二传送数据确定第三传送数据,并根据该第三传送数据生成传送通知消息;通过该世界服务进程将该传送通知消息发送给目的场景服务进程,此处的目的场景服务进程用于承载针对目标虚拟对象触发传送操作后该目标虚拟对象所要前往的目的地图。进而,通过目的场景服务进程根据该传送通知消息从消息队列中获取第一传送数据,并根据该第一传送数据和第三传送数据确定目标虚拟对象对应的目的虚拟对象数据。Specifically, the virtual object teleportation method provided in this application is applied to a service process group on a game server, which includes a world service process and multiple scene service processes. In this virtual object teleportation method, the original virtual object data corresponding to the target virtual object is first split by the original scene service process to obtain first teleportation data and second teleportation data. The original scene service process carries the original map where the target virtual object was located before the teleportation operation was triggered. Then, the original scene service process sends the first teleportation data and the second teleportation data to the message queue and the world service process, respectively. Next, the world service process determines third teleportation data based on the second teleportation data and generates a teleportation notification message based on the third teleportation data. The world service process sends this teleportation notification message to the destination scene service process, which carries the destination map to which the target virtual object will go after the teleportation operation is triggered. Furthermore, the destination scene service process retrieves the first teleportation data from the message queue based on the teleportation notification message and determines the destination virtual object data corresponding to the target virtual object based on the first teleportation data and the third teleportation data.
本申请实施例提供的虚拟对象传送方法,利用服务进程组中的世界服务进程和消息队列协同完成虚拟对象传送任务。具体的,该方法将原虚拟对象数据拆分为两部分,一部分是不需要世界服务进程处理的数据(即第一传送数据),另一部分是需要世界服务进程处理的数据(即第二传送数据),利用消息队列中转第一传送数据,利用世界服务进程中转和处理第二传送数据;相比由世界服务进程独立中转和处理原虚拟对象数据的方案,本申请实施例提供的方法可以大幅减少虚拟对象传送过程中世界服务进程所需耗费的处理资源,提高虚拟对象的传送速度和传送效率;在需要瞬时大规模传送虚拟对象的玩法中,该方法可以在相同时间内传送更多的虚拟对象,传送单个虚拟对象的耗时也大大缩短,对于用户来说其感知的虚拟对象传送体验更好;并且该方法还可以为策划设计大规模传送虚拟对象的玩法提供更大的空间。The virtual object transmission method provided in this application utilizes the world service process and message queue in a service process group to collaboratively complete the virtual object transmission task. Specifically, the method splits the original virtual object data into two parts: one part is data that does not require processing by the world service process (i.e., the first transmission data), and the other part is data that requires processing by the world service process (i.e., the second transmission data). The message queue is used to relay the first transmission data, and the world service process is used to relay and process the second transmission data. Compared with the scheme where the world service process independently relays and processes the original virtual object data, the method provided in this application can significantly reduce the processing resources required by the world service process during virtual object transmission, and improve the transmission speed and efficiency of virtual objects. In gameplay that requires instantaneous large-scale transmission of virtual objects, this method can transmit more virtual objects in the same amount of time, and the time taken to transmit a single virtual object is also greatly shortened, resulting in a better virtual object transmission experience for users. Furthermore, this method can also provide greater flexibility in planning and designing gameplay that involves large-scale transmission of virtual objects.
需要说明的是,本申请实施例提供的虚拟对象传送方法可以应用于支持传送虚拟对象的游戏的后台服务器,该服务器可以是独立的物理服务器,也可以是多个物理服务器构成的服务器集群或者分布式系统,还可以是提供云计算服务的云服务器。该服务器与运行有该游戏的终端可以通过有线或无线通信方式进行直接或间接地连接,本申请在此不做限制。上述运行该游戏的终端可以是智能手机、平板电脑、笔记本电脑、台式计算机、智能音箱、智能手表、车载终端、智能电视等,但并不局限于此。It should be noted that the virtual object transmission method provided in this application can be applied to the backend server of a game that supports the transmission of virtual objects. This server can be an independent physical server, a server cluster or distributed system composed of multiple physical servers, or a cloud server providing cloud computing services. The server and the terminal running the game can be directly or indirectly connected via wired or wireless communication, and this application does not impose any limitations on this. The terminal running the game can be a smartphone, tablet, laptop, desktop computer, smart speaker, smartwatch, in-vehicle terminal, smart TV, etc., but is not limited to these.
本申请实施例中的服务进程组可以由部署在上述服务器中的若干软件服务进程构成;通常情况下,游戏服务端可以包括多个服务进程组,不同的服务进程组对应不同的游戏模式;例如,假设某MMORPG游戏支持游戏模式A、游戏模式B和游戏模式C,则该MMORPG游戏的游戏服务端可以包括三个服务进程组,这三个服务进程组分别对应于游戏模式A、游戏模式B和游戏模式C。In this embodiment of the application, the service process group can be composed of several software service processes deployed on the aforementioned server. Typically, the game server can include multiple service process groups, with different service process groups corresponding to different game modes. For example, assuming that a certain MMORPG game supports game mode A, game mode B, and game mode C, the game server of the MMORPG game can include three service process groups, which correspond to game mode A, game mode B, and game mode C, respectively.
一个服务进程组中通常包括一个世界服务进程和多个场景服务进程。其中,世界服务进程用于管理在该服务进程组对应的游戏模式下用户的登录和登出,还用于在该服务进程组对应的游戏模式下针对用户控制的虚拟对象执行虚拟对象传送任务,即将该虚拟对象从该游戏模式下的一个地图传送至另一个地图。服务进程组中的多个场景服务进程分别与该服务进程组对应的游戏模式下的多种地图相对应,场景服务进程用于承载其对应的地图、该地图中的玩法逻辑、以及该地图中各虚拟对象的虚拟对象数据,其是用户登录游戏后进行游戏体验主要涉及的服务进程。A service process group typically includes one world service process and multiple scene service processes. The world service process manages user login and logout within the corresponding game mode and performs virtual object teleportation tasks for user-controlled virtual objects within that game mode—transferring the virtual object from one map to another within that game mode. The multiple scene service processes within the service process group correspond to various maps within that game mode. Scene service processes carry their respective maps, the gameplay logic within those maps, and the virtual object data for each virtual object within those maps. These are the primary service processes involved in the user's game experience after logging in.
为了便于理解本申请实施例提供的虚拟对象传送方法,下面对本申请实施例提供的虚拟对象传送方法的应用场景进行示例性介绍。To facilitate understanding of the virtual object transmission method provided in the embodiments of this application, the application scenarios of the virtual object transmission method provided in the embodiments of this application will be described exemplarily below.
参见图1,图1为本申请实施例提供的虚拟对象传送方法的应用场景示意图。如图1所示,该应用场景中包括终端设备110和服务器120,终端设备110与服务器120之间可以通过网络进行通信。其中,终端设备110上运行有目标游戏应用,该目标游戏应用可以支持基于传送虚拟对象而实现的玩法。服务器120为目标游戏应用的后台服务器,其用于执行本申请实施例提供的虚拟对象传送方法;服务器120中部署有目标游戏应用支持的各种游戏模式各自对应的服务进程组,每个服务进程组包括一个世界服务进程以及若干个场景服务进程;图1所示以服务器120中部署有三个服务进程组,并且每个服务进程组中包括n(n为大于1的整数)个场景服务进程为例,应理解,在实际应用中,服务器120中可以部署有更多或更少的服务进程组,每个服务进程组中包括的场景服务进程的数目可以相同,也可以不同,本申请在此不对游戏服务端包括的服务进程组的数目、以及服务进程组中包括的场景服务进程的数目做任何限定。Referring to Figure 1, Figure 1 is a schematic diagram of an application scenario for the virtual object transmission method provided in this application embodiment. As shown in Figure 1, this application scenario includes a terminal device 110 and a server 120, and the terminal device 110 and the server 120 can communicate via a network. The terminal device 110 runs a target game application, which supports gameplay based on the transmission of virtual objects. Server 120 is the backend server of the target game application, which is used to execute the virtual object transmission method provided in the embodiments of this application. Server 120 is deployed with service process groups corresponding to various game modes supported by the target game application. Each service process group includes a world service process and several scene service processes. Figure 1 shows an example in which server 120 is deployed with three service process groups and each service process group includes n (n is an integer greater than 1) scene service processes. It should be understood that in actual applications, server 120 may be deployed with more or fewer service process groups. The number of scene service processes included in each service process group may be the same or different. This application does not limit the number of service process groups included in the game server or the number of scene service processes included in the service process groups.
在实际应用中,用户通过终端设备110上运行的目标游戏应用进行游戏前,可以先通过该目标游戏应用选择想要体验的游戏模式,相应地,服务器120中与该游戏模式对应的服务进程组将为该用户提供后续的游戏服务。用户通过终端设备110在目标游戏应用中的某种游戏模式下进行游戏时,可以针对其控制的目标虚拟对象触发传送操作,即控制目标虚拟对象从该游戏模式下的一个地图跳转至另一个地图;例如,假设用户控制的目标虚拟对象当前所处的地图为地图1,用户现欲控制该目标虚拟对象参加该游戏模式下设置于地图2中的游戏活动,此时,用户可以通过触发针对目标虚拟对象报名参加该游戏活动的操作,来触发针对该目标虚拟对象的传送操作,以控制该目标虚拟对象从地图1跳转至地图2。In practical applications, before a user starts playing a game through the target game application running on terminal device 110, they can select the desired game mode through the target game application. Correspondingly, the service process group in server 120 corresponding to that game mode will provide the user with subsequent game services. When a user plays a game in a certain game mode of the target game application through terminal device 110, they can trigger a teleportation operation for the target virtual object they control, that is, control the target virtual object to jump from one map to another in that game mode. For example, assuming the target virtual object currently located on map 1, and the user wants to control the target virtual object to participate in a game activity set on map 2 in that game mode, the user can trigger a teleportation operation for the target virtual object by triggering the operation of registering the target virtual object to participate in the game activity, thereby controlling the target virtual object to jump from map 1 to map 2.
服务器120检测到用户针对目标虚拟对象触发传送操作后,将相应地在该目标虚拟对象所处的游戏模式对应的服务进程组中确定原场景服务进程和目的场景服务进程,该原场景服务进程即为用于承载针对目标虚拟对象触发传送操作前目标虚拟对象所处的地图的场景服务进程,该目的场景服务进程即为用于承载针对该目标虚拟对象触发传送操作后目标虚拟对象所要前往的地图的场景服务进程;例如,假设针对目标虚拟对象触发的传送操作用于使该目标虚拟对象从地图1跳转至地图2,则用于承载地图1的场景服务进程即为原场景服务进程,用于承载地图2的场景服务进程即为目的场景服务进程。进而,利用该服务进程组中的原场景服务进程、世界服务进程以及目的场景服务进程,协同完成针对目标虚拟对象的传送操作。After server 120 detects that a user has triggered a teleportation operation on a target virtual object, it will determine the original scene service process and the destination scene service process in the service process group corresponding to the game mode in which the target virtual object is located. The original scene service process is the scene service process that carries the map where the target virtual object was located before the teleportation operation was triggered, and the destination scene service process is the scene service process that carries the map that the target virtual object will go to after the teleportation operation is triggered. For example, assuming that the teleportation operation triggered on the target virtual object is used to jump the target virtual object from map 1 to map 2, then the scene service process that carries map 1 is the original scene service process, and the scene service process that carries map 2 is the destination scene service process. Then, by using the original scene service process, the world service process, and the destination scene service process in this service process group, the teleportation operation on the target virtual object is completed in a coordinated manner.
具体的,服务器120可以先通过原场景服务进程拆分目标虚拟对象对应的原虚拟对象数据,得到第一传送数据和第二传送数据;其中,原虚拟对象数据为目标虚拟对象在原场景服务进程承载的原地图中使用的游戏数据,如虚拟资产数据、属性数据、虚拟装备数据、游戏任务数据等;第一传送数据可以包括无需世界服务进程做任何处理的数据,第二传送数据可以包括需要世界服务进程做相关处理的数据。进而,通过该原场景服务进程,将该第一传送数据和第二传送数据分别发送给消息队列和世界服务进程;其中,消息队列可以是针对该服务进程组单独设置的,也可以是允许游戏服务端的多个服务进行组共享的。Specifically, server 120 can first split the original virtual object data corresponding to the target virtual object through the original scene service process to obtain first transmission data and second transmission data. The original virtual object data refers to the game data used by the target virtual object in the original map carried by the original scene service process, such as virtual asset data, attribute data, virtual equipment data, and game quest data. The first transmission data may include data that does not require any processing by the world service process, and the second transmission data may include data that requires relevant processing by the world service process. Then, through the original scene service process, the first and second transmission data are sent to the message queue and the world service process respectively. The message queue can be set up separately for this service process group, or it can be shared by multiple services on the game server side.
服务器120通过该服务进程组中的世界服务进程接收到第二传送数据后,可以通过世界服务进程根据该第二传送数据确定第三传送数据;示例性的,世界服务进程可以基于自身管理的某种类型的标准数据,对该第二传送数据中该种类型的数据进行更新,从而得到第三传送数据。然后,通过世界服务进程根据该第三传送数据生成传送通知消息,使该传送通知消息携带该第三传送数据,进而将该传送通知消息发送给服务进程组中的目的场景服务进程。After receiving the second transmission data through the world service process in the service process group, server 120 can determine the third transmission data based on the second transmission data. For example, the world service process can update the data of that type in the second transmission data based on a certain type of standard data it manages, thereby obtaining the third transmission data. Then, the world service process generates a transmission notification message based on the third transmission data, carries the third transmission data in the transmission notification message, and sends the transmission notification message to the destination scenario service process in the service process group.
服务器120通过该服务进程组中的目的场景服务进程接收到传送通知消息后,可以根据该传送通知消息从消息队列中拉取原场景服务进程此前上传的第一传送数据。然后,通过该目的场景服务进程,根据所拉取的第一传送数据和传送通知消息中携带的第三传送数据,确定目标虚拟对象对应的目的虚拟对象数据,该目的虚拟对象数据即是目标虚拟对象在目的场景服务进程承载的目的地图中使用的游戏数据;如此完成针对目标虚拟对象的传送操作,将目标虚拟对象从原地图传送至目的地图。After receiving the transmission notification message through the destination scene service process in the service process group, server 120 can retrieve the first transmission data previously uploaded by the original scene service process from the message queue according to the transmission notification message. Then, through the destination scene service process, based on the retrieved first transmission data and the third transmission data carried in the transmission notification message, it determines the destination virtual object data corresponding to the target virtual object. This destination virtual object data is the game data used by the target virtual object in the destination map carried by the destination scene service process; thus, the transmission operation for the target virtual object is completed, and the target virtual object is transmitted from the original map to the destination map.
应理解,图1所示的应用场景仅为示例,在实际应用中,本申请实施例提供的虚拟对象传送方法还可以应用于其它场景,在此不对本申请实施例提供的虚拟对象传送方法适用的应用场景做任何限定。此外,本申请实施例提供的虚拟对象传输方法中涉及的虚拟对象数据可以存储于区块链。It should be understood that the application scenario shown in Figure 1 is merely an example. In practical applications, the virtual object transmission method provided in this application embodiment can also be applied to other scenarios. No limitations are made here regarding the applicable application scenarios of the virtual object transmission method provided in this application embodiment. Furthermore, the virtual object data involved in the virtual object transmission method provided in this application embodiment can be stored on a blockchain.
下面通过方法实施例对本申请提供的虚拟对象传送方法进行详细介绍。The virtual object transfer method provided in this application will be described in detail below through method embodiments.
参见图2,图2为本申请实施例提供的虚拟对象传送方法的流程示意图。该虚拟对象传送方法可以应用于游戏服务端的任一服务进程组,服务进程组中包括一个世界服务进程和多个场景服务进程,下文中的原场景服务进程、世界服务进程和目的场景服务进程均所属于同一服务进程组。如图2所示,该虚拟对象传送方法包括以下步骤:Referring to Figure 2, which is a flowchart illustrating the virtual object transfer method provided in this embodiment, this virtual object transfer method can be applied to any service process group on the game server. The service process group includes one world service process and multiple scene service processes. The original scene service process, world service process, and destination scene service process mentioned below all belong to the same service process group. As shown in Figure 2, the virtual object transfer method includes the following steps:
步骤201:通过原场景服务进程,拆分目标虚拟对象对应的原虚拟对象数据,得到第一传送数据和第二传送数据。Step 201: Through the original scene service process, split the original virtual object data corresponding to the target virtual object to obtain the first transmission data and the second transmission data.
用户通过终端设备上运行的目标游戏应用在某种游戏模式下进行游戏时,可以针对其控制的目标虚拟对象触发传送操作,以使该目标虚拟对象从当前所处的地图跳转至该游戏模式下的另一个地图;目标游戏应用的后台服务器检测到用户针对目标虚拟对象触发传送操作后,相应地通过用于承载该目标虚拟对象当前所处的地图的原场景服务进程,对该目标虚拟对象对应的原虚拟对象数据进行拆分处理,得到第一传送数据和第二传送数据。When a user plays a game in a certain game mode through a target game application running on a terminal device, they can trigger a teleportation operation on the target virtual object they control, so that the target virtual object jumps from the current map to another map in the same game mode. After the background server of the target game application detects that the user has triggered a teleportation operation on the target virtual object, it correspondingly splits the original virtual object data corresponding to the target virtual object through the original scene service process that carries the map where the target virtual object is currently located, to obtain the first teleportation data and the second teleportation data.
在一种可能的实现方式中,用户可以通过针对目标虚拟对象触发参加设置于另一地图中的游戏活动的操作,来实现针对目标虚拟对象触发传送操作;例如,假设用户控制的目标虚拟对象当前处于游戏模式A下的地图1中,现目标游戏应用向用户推送游戏活动列表,其中包括游戏模式A下设置于地图2中的游戏活动,用户可以针对目标虚拟对象触发报名参加该游戏活动的操作,进而可以相应地触发针对该目标虚拟对象的传送操作,以使该目标虚拟对象从地图1跳转至地图2。In one possible implementation, a user can trigger a teleportation operation on a target virtual object by triggering an action to participate in a game activity set in another map. For example, suppose the target virtual object controlled by the user is currently in map 1 under game mode A. The target game application pushes a list of game activities to the user, which includes game activities set in map 2 under game mode A. The user can trigger an action to register for the game activity on the target virtual object, and then trigger a teleportation operation on the target virtual object to make the target virtual object jump from map 1 to map 2.
在另一种可能的实现方式中,用户可以直接触发针对目标虚拟对象的传送操作;例如,假设用户控制的目标虚拟对象当前处于游戏模式A下的地图1中,若用户想要控制该目标虚拟对象跳转至游戏模式A下的其它地图,则可以触控游戏界面上的地图跳转控件,响应于用户针对地图跳转控件的触控操作,可以相应地显示游戏模式A下的各个地图,进而用户可以在这些地图中选择目标虚拟对象所要前往的地图,如选择地图2,如此触发针对目标虚拟对象的传送操作,使目标虚拟对象从地图1跳转至地图2。In another possible implementation, the user can directly trigger a teleportation operation for the target virtual object. For example, assuming the target virtual object controlled by the user is currently in map 1 under game mode A, if the user wants to control the target virtual object to jump to other maps under game mode A, they can touch the map jump control on the game interface. In response to the user's touch operation on the map jump control, various maps under game mode A can be displayed accordingly. Then, the user can select the map that the target virtual object wants to go to, such as selecting map 2, thus triggering a teleportation operation for the target virtual object, causing the target virtual object to jump from map 1 to map 2.
应理解,上述针对目标虚拟对象触发传送操作的实现方式仅为示例,在实际应用中,还可以通过其它方式针对目标虚拟对象触发传送操作,本申请在此不对针对目标虚拟对象触发传送操作的具体方式做任何限定。It should be understood that the above implementation of triggering a transmission operation for a target virtual object is only an example. In practical applications, other methods can also be used to trigger a transmission operation for a target virtual object. This application does not limit the specific method of triggering a transmission operation for a target virtual object.
需要说明的是,原场景服务进程是用于承载针对目标虚拟对象触发传送操作前该目标虚拟对象所处的原地图的场景服务进程;例如,假设针对目标虚拟对象触发的传送操作用于使目标虚拟对象从地图1跳转至地图2,则用于承载地图1的场景服务进程即为上述原场景服务进程。原场景服务进程除了可以承载原地图外,还可以承载该原地图中的玩法逻辑(如原地图中的游戏活动的游戏规则等)、以及处于该原场景地图中的各虚拟对象各自对应的虚拟对象数据,此处的虚拟对象数据是虚拟对象在该原地图中进行游戏时依据或使用的游戏数据,包括但不限于虚拟资产数据、角色属性数据、角色装备数据、角色玩法数据(如任务、副本、钓鱼、帮派等)。It should be noted that the original scene service process is the scene service process that carries the original map where the target virtual object was located before the teleportation operation was triggered for the target virtual object. For example, assuming that the teleportation operation triggered for the target virtual object is used to jump the target virtual object from map 1 to map 2, then the scene service process that carries map 1 is the aforementioned original scene service process. In addition to carrying the original map, the original scene service process can also carry the gameplay logic in the original map (such as the game rules of the game activities in the original map), as well as the virtual object data corresponding to each virtual object in the original scene map. The virtual object data here is the game data that the virtual object uses or relies on when playing the game in the original map, including but not limited to virtual asset data, character attribute data, character equipment data, and character gameplay data (such as quests, dungeons, fishing, guilds, etc.).
服务器检测到用户针对目标虚拟对象触发传送操作后,将通过该原场景服务进程获取该目标虚拟对象对应的虚拟对象数据,作为原虚拟对象数据;进而对该原虚拟对象数据进行拆分处理,得到第一传送数据和第二传送数据。After the server detects that the user has triggered a transmission operation for the target virtual object, it will obtain the virtual object data corresponding to the target virtual object through the original scene service process, and use it as the original virtual object data; then, it will split the original virtual object data to obtain the first transmission data and the second transmission data.
在一种可能的实现方式中,为了在传送虚拟角色的过程中尽可能地减少世界服务进程所需中转的数据量,原场景服务进程可以根据世界服务进程所管理的数据类型,对目标虚拟对象对应的原虚拟对象数据进行拆分。即,在世界服务进程用于管理目标类型的数据的情况下,服务器可以通过原场景服务进程,将原虚拟对象数据中属于目标类型的数据作为第二传送数据,将原虚拟对象数据中不属于目标类型的数据作为第一传送数据。In one possible implementation, to minimize the amount of data transferred by the world service process during the transmission of virtual characters, the original scene service process can split the original virtual object data corresponding to the target virtual object based on the data types managed by the world service process. That is, if the world service process manages data of the target type, the server can use the original scene service process to transmit the data of the target type from the original virtual object data as the second transmission data, and the data of the non-target type from the original virtual object data as the first transmission data.
示例性的,假设世界服务进程管理的数据为虚拟对象对应的组织数据,如虚拟对象所属的组织帮派、虚拟对象在其所属的帮派组织中的级别、虚拟对象在其所属的帮派组织中的职位等,相应地,原场景服务进程对目标虚拟对象对应的原虚拟对象数据进行拆分时,可以将该原虚拟对象数据中该目标虚拟对象对应的组织数据,作为需要由世界服务进程中转的第二传送数据,将该原虚拟对象数据中除该目标虚拟对象对应的组织数据以外的其它数据,作为需要由消息队列中转的第一传送数据。For example, suppose the data managed by the world service process is the organizational data corresponding to the virtual object, such as the organization or gang to which the virtual object belongs, the virtual object's level in the organization or gang, and the virtual object's position in the organization or gang. Accordingly, when the original scene service process splits the original virtual object data corresponding to the target virtual object, it can use the organizational data corresponding to the target virtual object in the original virtual object data as the second transmission data that needs to be transferred by the world service process, and use the other data in the original virtual object data other than the organizational data corresponding to the target virtual object as the first transmission data that needs to be transferred by the message queue.
由于通常情况下世界服务进程管理的数据类型较少,因此通过上述拆分数据的方式,将原虚拟对象数据中属于世界服务进程管理的数据类型的数据单独拆分出来,作为需要由世界服务进程中转的第二传送数据,可以在最大程度上减少需要由世界服务进程中转的数据量,降低世界服务进程的数据中转压力,从而有助于提高虚拟对象的传送速度。Since the world service process typically manages relatively few data types, the aforementioned data splitting method separates the data belonging to the world service process from the original virtual object data and uses it as secondary transmission data that needs to be relayed by the world service process. This minimizes the amount of data that needs to be relayed by the world service process, reduces the data relay pressure on the world service process, and thus helps to improve the transmission speed of virtual objects.
应理解,在实际应用中,考虑到消息队列的数据承载能力有限,原场景服务进程也可以适当地将原虚拟对象数据中不属于世界服务进程管理的数据类型的数据划分到第二传送数据中,本申请在此不对原场景服务进程拆分第一传送数据和第二传送数据的方式做任何限定。It should be understood that in practical applications, considering the limited data carrying capacity of message queues, the original scene service process may also appropriately divide the data of data types that do not belong to the world service process management in the original virtual object data into the second transmission data. This application does not impose any restrictions on the way the original scene service process splits the first transmission data and the second transmission data.
步骤202:通过所述原场景服务进程,将所述第一传送数据发送给消息队列,将所述第二传送数据发送给所述世界服务进程。Step 202: The first transmission data is sent to the message queue and the second transmission data is sent to the world service process through the original scene service process.
服务器通过原场景服务进程将目标虚拟对象对应的原虚拟对象数据拆分为第一传送数据和第二传送数据后,可以将第一传送数据发送至消息队列,将第二传送数据发送至原场景服务进程所属的服务进程组中的世界服务进程。After the server splits the original virtual object data corresponding to the target virtual object into first transmission data and second transmission data through the original scene service process, it can send the first transmission data to the message queue and send the second transmission data to the world service process in the service process group to which the original scene service process belongs.
需要说明的是,消息队列可以被理解为用于缓存待中转的虚拟对象数据的数据库,消息发送进程(即原场景服务进程)可以将虚拟对象数据发送到该消息队列,消息接收进程(即目的场景服务进程)可以从该消息队列中提取对应的虚拟对象数据。该消息队列可以是针对某服务进程组专门设置的,即某服务进程组中的场景服务进程可以在传送虚拟对象时,向该消息队列发送虚拟对象数据,该服务进程组中的其它场景服务进程可以从该消息队列中提取对应的虚拟对象数据。该消息队列也可以是游戏服务端上多个服务进程组共享的,即多个服务进程组中的场景服务进程均可以向该消息队列发送虚拟对象数据,并从该消息队列中提取对应的虚拟对象数据。本申请在此不对该消息队列所对应的服务进程组做任何限定。It should be noted that a message queue can be understood as a database used to cache virtual object data awaiting transfer. The message sending process (i.e., the original scene service process) can send virtual object data to this message queue, and the message receiving process (i.e., the destination scene service process) can retrieve the corresponding virtual object data from this message queue. This message queue can be specifically set up for a particular service process group; that is, scene service processes within a certain service process group can send virtual object data to this message queue when transferring virtual objects, and other scene service processes within the same service process group can retrieve the corresponding virtual object data from this message queue. Alternatively, this message queue can be shared by multiple service process groups on the game server; that is, scene service processes in multiple service process groups can all send virtual object data to this message queue and retrieve the corresponding virtual object data from it. This application does not impose any limitations on the service process group corresponding to this message queue.
需要说明的是,服务进程组中的世界服务进程通常用于负责该服务进程组对应的游戏模式下用户的登录和登出,该世界服务进程还用于协调执行虚拟对象传送任务。本申请在此不对世界服务进程的功能做任何限定。It should be noted that the world service process in the service process group is typically responsible for user login and logout in the game mode corresponding to that service process group. This world service process also coordinates the execution of virtual object teleportation tasks. This application does not impose any limitations on the function of the world service process.
服务器通过原场景服务进程发送第一传送数据时,可以先对该第一传送数据进行序列化处理得到第一传送序列数据,进而将该第一传送序列数据发送给消息队列。具体的,服务器可以按照预先设置的数据格式,将拆分出来的第一传送数据转换为符合该数据格式的数据,即第一传送序列数据,进而将该第一传送序列数据发送给消息队列。如此,可以保证传送虚拟对象时向消息队列发送的数据规范且完整,并且能够有效地避免发生数据丢包,从而有助于保证顺利完成虚拟对象传送任务。When the server sends the first transmission data through the original scene service process, it can first serialize the first transmission data to obtain the first transmission sequence data, and then send the first transmission sequence data to the message queue. Specifically, the server can convert the split first transmission data into data conforming to a pre-set data format, i.e., the first transmission sequence data, and then send the first transmission sequence data to the message queue. In this way, it can ensure that the data sent to the message queue when transmitting virtual objects is standardized and complete, and can effectively avoid data packet loss, thereby helping to ensure the successful completion of the virtual object transmission task.
服务器通过原场景服务进程发送第二传送数据时,可以将该第二传送数据添加到地图离开通知消息中发送给世界服务进程;一方面,通过该地图离开通知消息告知世界服务进程目标虚拟对象已离开原地图,另一方面,将需要由该世界服务进程进行后续处理的数据传输给该世界服务进程。When the server sends the second transmission data through the original scene service process, it can add the second transmission data to the map leave notification message and send it to the world service process. On the one hand, the map leave notification message informs the world service process that the target virtual object has left the original map. On the other hand, the data that needs to be processed by the world service process is transmitted to the world service process.
需要说明的是,为了保证目的场景服务进程后续可以从消息队列中准确地提取出从目标虚拟对象对应的原虚拟对象数据中拆分出的第一传送数据,原场景服务进程、世界服务进程和目的场景服务进程协同执行虚拟对象传送任务时,可以将目标虚拟对象的身份标识作为表示所传输的数据与目标虚拟对象之间具有对应关系的标志,即目的场景服务进程可以依据目标虚拟对象的身份标识,从消息队列中准确地提取从该目标虚拟对象对应的原虚拟对象数据中拆分出的第一传送数据。It should be noted that, in order to ensure that the destination scene service process can accurately extract the first transmission data split from the original virtual object data corresponding to the target virtual object from the message queue, when the original scene service process, the world service process, and the destination scene service process jointly execute the virtual object transmission task, the identity identifier of the target virtual object can be used as a sign indicating that there is a corresponding relationship between the transmitted data and the target virtual object. That is, the destination scene service process can accurately extract the first transmission data split from the original virtual object data corresponding to the target virtual object from the message queue based on the identity identifier of the target virtual object.
具体实现时,服务器可以通过原场景服务进程,将包括有目标虚拟对象的身份标识的第一传送数据发送给消息队列,即目标虚拟对象的身份标识是第一传送数据的一部分。服务器可以通过原场景服务进程,将第二传送数据和目标虚拟对象的身份标识同时发送给世界服务进程,例如,将第二传送数据和目标虚拟对象的身份标识均添加至地图离开通知消息中,进而将该地图离开通知消息发送给世界服务进程。In practice, the server can send the first transmission data, including the identity identifier of the target virtual object, to the message queue through the original scene service process; that is, the identity identifier of the target virtual object is part of the first transmission data. The server can also send the second transmission data and the identity identifier of the target virtual object to the world service process simultaneously through the original scene service process. For example, the server can add both the second transmission data and the identity identifier of the target virtual object to the map departure notification message, and then send the map departure notification message to the world service process.
应理解,在实际应用中,服务器也可以通过原场景服务进程,将第一传送数据和目标虚拟对象的身份标识发送至消息队列,并构建二者之间的关联关系;服务器也可以将目标虚拟对象的身份标识作为第二传送数据的一部分,将该包括目标虚拟对象的身份标识的第二传送数据发送给世界服务进程。本申请在此不对该目标虚拟对象的身份标识的传输方式做任何限定。It should be understood that in practical applications, the server can also send the first transmitted data and the identity identifier of the target virtual object to the message queue through the original scene service process, and establish the association between the two; the server can also send the identity identifier of the target virtual object as part of the second transmitted data to the world service process. This application does not impose any restrictions on the transmission method of the identity identifier of the target virtual object.
可选的,服务器通过原场景服务进程,将第一传送数据和第二传送数据分别发送给消息队列和世界服务进程后,可以进一步通过该原场景服务进程,针对目标虚拟对象执行地图离开操作;地图离开操作可以包括以下至少一种:删除目标虚拟对象对应的原虚拟对象数据、在原地图对应的原社交网络中删除目标虚拟对象对应的节点、在原地图对应的原社交网络中删除该目标虚拟对象对应的节点与其他虚拟对象对应的节点之间的关联关系。Optionally, after the server sends the first and second transmission data to the message queue and the world service process respectively through the original scene service process, it can further perform a map leave operation on the target virtual object through the original scene service process. The map leave operation may include at least one of the following: deleting the original virtual object data corresponding to the target virtual object, deleting the node corresponding to the target virtual object in the original social network corresponding to the original map, and deleting the association relationship between the node corresponding to the target virtual object and the node corresponding to other virtual objects in the original social network corresponding to the original map.
具体的,服务器通过原场景服务进程将第一传送数据和第二传送数据分别发送给消息队列和世界服务进程后,即可认为原场景服务进程已完成其在目标虚拟对象传送任务中所需执行的工作,进而,服务器可以通过该原场景服务进程执行针对目标虚拟对象的地图离开操作,以清除原地图中目标虚拟对象相关的信息。Specifically, after the server sends the first and second transmission data to the message queue and the world service process respectively through the original scene service process, it can be considered that the original scene service process has completed the work required in the target virtual object transmission task. Then, the server can perform a map leave operation for the target virtual object through the original scene service process to clear the information related to the target virtual object in the original map.
示例性的,服务器可以通过原场景服务进程删除该原场景服务进程管理的目标虚拟对象对应的原虚拟对象数据,以避免原场景服务进程管理无用的数据,浪费数据管理资源。在原场景服务进程还用于维护原地图对应的原社交网络的情况下,服务器还可以通过该原场景服务进程删除该原社交网络中目标虚拟对象对应的节点、以及该原社交网络中该目标虚拟对象对应的节点与其他虚拟对象对应的节点之间的关联关系,从而清除该目标虚拟对象在该原地图中的存在痕迹,也避免因原场景服务进程和目的场景服务进程同时对目标虚拟对象进行管理而出现问题。For example, the server can delete the original virtual object data corresponding to the target virtual object managed by the original scene service process, thereby avoiding the management of useless data and wasting data management resources. If the original scene service process is also used to maintain the original social network corresponding to the original map, the server can also delete the node corresponding to the target virtual object in the original social network, as well as the association between the node corresponding to the target virtual object and the nodes corresponding to other virtual objects in the original social network. This clears the trace of the target virtual object in the original map and avoids problems arising from the simultaneous management of the target virtual object by both the original scene service process and the target scene service process.
应理解,在实际应用中,服务器也可以通过原场景服务进程执行其它地图离开操作,本申请在此不对上述地图离开操作做具体限定。It should be understood that in practical applications, the server can also perform other map departure operations through the original scene service process. This application does not specifically limit the above map departure operations.
步骤203:通过所述世界服务进程,根据所述第二传送数据确定第三传送数据;并根据所述第三传送数据生成传送通知消息。Step 203: Through the world service process, determine the third transmission data based on the second transmission data; and generate a transmission notification message based on the third transmission data.
服务器通过服务进程组中的世界服务进程接收到原场景服务进程发送的第二传送数据后,可以根据该第二传送数据确定第三传送数据,进而根据该第三传送数据生成用于通知目的场景服务进程的传送通知消息。After receiving the second transmission data sent by the original scene service process through the world service process in the service process group, the server can determine the third transmission data based on the second transmission data, and then generate a transmission notification message to notify the destination scene service process based on the third transmission data.
需要说明的是,之所以需要通过世界服务进程对第二传送数据进行处理,是因为世界服务进程所管理的一些数据类型的数据通常为标准数据,而场景服务进程所管理的这些数据类型的数据可能不是标准数据,为了保证后续的目的场景服务进程可以依据完全标准的虚拟对象数据对虚拟对象的活动进行处理,因此此处可以先通过世界服务进程对第二传送数据中的数据进行校验和标准化处理。It should be noted that the reason why the second transmission data needs to be processed through the world service process is that the data types managed by the world service process are usually standard data, while the data types managed by the scene service process may not be standard data. In order to ensure that the subsequent destination scene service process can process the activities of virtual objects based on completely standard virtual object data, the data in the second transmission data can be verified and standardized through the world service process first.
应理解,本申请实施例中的标准数据是与虚拟对象当前所处的状态准确对应的数据,即标准数据会跟随用户对于虚拟对象的控制操作而实时改变,也会跟随游戏系统对于虚拟对象的管理操作而实时改变;相对应地,本申请实施例中的非标准数据是可能没有与虚拟对象当前所处的状态准确对应的数据,即非标准数据不会跟随用户对于虚拟对象的控制操作而实时改变,和/或不会跟随游戏系统对于虚拟对象的管理操作而实时改变,通常情况下,服务器需要对非标准数据进行定时或不定时的校准处理。It should be understood that the standard data in the embodiments of this application is data that accurately corresponds to the current state of the virtual object. That is, the standard data will change in real time with the user's control operation on the virtual object, and will also change in real time with the game system's management operation on the virtual object. In contrast, the non-standard data in the embodiments of this application may not accurately correspond to the current state of the virtual object. That is, the non-standard data will not change in real time with the user's control operation on the virtual object, and/or will not change in real time with the game system's management operation on the virtual object. Under normal circumstances, the server needs to perform periodic or irregular calibration processing on the non-standard data.
在一种可能的实现方式中,世界服务进程管理的第一目标类型的数据为标准数据,而场景服务进程管理的该第一目标类型的数据为非标准数据,在世界服务进程接收的第二传送数据中包括原虚拟对象数据中属于该第一目标类型的数据的情况下,服务器可以通过世界服务进程,从该第二传送数据中提取该第一目标类型的数据作为第一待处理数据,并且获取该世界服务进程管理的目标虚拟对象对应的该第一目标类型的数据作为第一参考标准数据。进而,通过世界服务进程对比该第一待处理数据与第一参考标准数据是否一致,若一致,则确定该第二传送数据本身即为第三传送数据,若不一致,则利用第一参考标准数据和第二传送数据中除第一待处理数据外的其它数据,组成第三传送数据。In one possible implementation, the data of the first target type managed by the world service process is standard data, while the data of the same first target type managed by the scene service process is non-standard data. If the second transmitted data received by the world service process includes data of the first target type from the original virtual object data, the server can extract the data of the first target type from the second transmitted data as first data to be processed through the world service process, and obtain the data of the first target type corresponding to the target virtual object managed by the world service process as first reference standard data. Then, the world service process compares whether the first data to be processed is consistent with the first reference standard data. If they are consistent, the second transmitted data itself is determined to be the third transmitted data. If they are inconsistent, the third transmitted data is composed of the other data in the first reference standard data and the second transmitted data, excluding the first data to be processed.
示例性的,假设世界服务进程管理的虚拟对象与各帮派之间的所属关系为标准数据,而场景服务进程管理的虚拟对象与各帮派之间的所属关系为非标准数据,在原场景服务进程发送过来的第二传送数据中包括目标虚拟对象与各帮派之间的所属关系的情况下,服务器可以通过以下方式确定第三传送数据:服务器可以通过世界服务进程,先从该第二传送数据中提取目标虚拟与各帮派之间的所属关系作为第一待处理数据,并且获取世界服务进程自身管理的目标虚拟对象与各帮派之间的所属关系作为第一参考标准数据;若该第一待处理数据表示目标虚拟对象同时所属于帮派a、帮派b和帮派c,并且第一参考标准数据也表示目标虚拟对象同时所属于帮派a、帮派b和帮派c,则无需更改第二传送数据,可以直接将该第二传送数据作为第三传送数据;若该第一待处理数据表示目标虚拟对象同时所属于帮派a、帮派b和帮派c,而第一参考标准数据表示目标虚拟对象所属于帮派a和帮派b,而不属于帮派c,则可以利用该第一参考标准数据替换第二传送数据中的第一待处理数据,即利用该第一参考标准数据和第二传送数据中除第一待处理数据外的其它数据组成第三传送数据。For example, assuming the affiliation between virtual objects managed by the world service process and various gangs is standard data, while the affiliation between virtual objects managed by the scene service process and various gangs is non-standard data, if the second transmission data sent by the original scene service process includes the affiliation between the target virtual object and various gangs, the server can determine the third transmission data in the following way: The server can use the world service process to first extract the affiliation between the target virtual object and various gangs from the second transmission data as the first data to be processed, and obtain the affiliation between the target virtual object and various gangs managed by the world service process itself as the first reference standard data; if the first data to be processed table If the target virtual object simultaneously belongs to gangs a, b, and c, and the first reference standard data also indicates that the target virtual object simultaneously belongs to gangs a, b, and c, then there is no need to change the second transmission data, and the second transmission data can be directly used as the third transmission data. If the first data to be processed indicates that the target virtual object simultaneously belongs to gangs a, b, and c, while the first reference standard data indicates that the target virtual object belongs to gangs a and b, but not to gang c, then the first reference standard data can be used to replace the first data to be processed in the second transmission data. That is, the third transmission data is composed of the first reference standard data and the other data in the second transmission data except for the first data to be processed.
应理解,上述第一目标类型仅为示例,在实际应用中第一目标类型也可以为其它类型,本申请在此不对该第一目标类型做任何限定。It should be understood that the above-mentioned first target type is only an example. In actual applications, the first target type can also be other types. This application does not impose any limitation on the first target type.
如此通过上述操作,可以保证向目的场景服务进程提供的虚拟对象数据为标准数据,从而有利于该目的场景服务进程基于该标准数据为目标虚拟对象提供相应的服务,确保完成虚拟对象传送后用户能够获得较好的游戏体验。By performing the above operations, it can be ensured that the virtual object data provided to the target scene service process is standard data. This allows the target scene service process to provide corresponding services to the target virtual object based on the standard data, ensuring that the user can obtain a better gaming experience after the virtual object is transmitted.
服务器通过世界服务进程得到第三传送数据后,可以将该第三传送数据添加至传送通知消息中,即通过该传送通知消息携带该第三传送数据。After the server obtains the third transmission data through the world service process, it can add the third transmission data to the transmission notification message, that is, carry the third transmission data through the transmission notification message.
此外,正如上文所提及的,原场景服务进程、世界服务进程和目的场景服务进程协同执行虚拟对象传送任务时,可以将目标虚拟对象的身份标识作为表示所传输的数据与目标虚拟对象之间具有对应关系的标志,因此,服务器通过世界服务进程生成传送通知消息时,可以根据该第三传送数据以及其在接收到第二传送数据的同时接收到的目标虚拟对象的身份标识,生成传送通知消息,即将第三传送数据和目标虚拟对象的身份标识均添加至传送通知消息中。Furthermore, as mentioned above, when the original scene service process, the world service process, and the destination scene service process collaborate to execute the virtual object transmission task, the identity identifier of the target virtual object can be used as a marker indicating that there is a corresponding relationship between the transmitted data and the target virtual object. Therefore, when the server generates a transmission notification message through the world service process, it can generate a transmission notification message based on the third transmission data and the identity identifier of the target virtual object received at the same time as the second transmission data, that is, add the third transmission data and the identity identifier of the target virtual object to the transmission notification message.
在一些情况下,世界服务进程所管理的一些数据类型的数据并非标准数据,而场景服务进程所管理的这些数据类型为标准数据,为了保证世界服务进程管理的数据的准确性,世界服务进程还可以利用第二传送数据中属于这些数据类型的数据,对自身管理的这些数据类型数据进行校验和标准化处理。In some cases, the data of certain data types managed by the World Service Process is not standard data, while the data of these data types managed by the Scene Service Process is standard data. In order to ensure the accuracy of the data managed by the World Service Process, the World Service Process can also use the data of these data types in the second transmission data to verify and standardize the data of these data types managed by itself.
在一种可能的实现方式中,世界服务进程管理的第二目标类型的数据为非标准数据,而场景服务进程管理的该第二目标类型的数据为标准数据,在世界服务进程接收的第二传送数据中包括原虚拟对象数据中属于该第二目标类型的数据的情况下,服务器可以通过世界服务进程,从该第二传送数据中提取该第二目标类型的数据作为第二参考标准数据,并且获取世界服务进程自身管理的目标虚拟对象对应的该第二目标类型的数据作为第二待处理数据。进而,通过世界服务进程对比该第二待处理数据与该第二参考标准数据是否一致,若不一致,则利用该第二参考标准数据替换该世界服务进程管理的该目标虚拟对象对应的第二目标类型的数据。In one possible implementation, the data of the second target type managed by the world service process is non-standard data, while the data of the second target type managed by the scene service process is standard data. If the second transmitted data received by the world service process includes data of the second target type from the original virtual object data, the server can extract the data of the second target type from the second transmitted data through the world service process as second reference standard data, and obtain the data of the second target type corresponding to the target virtual object managed by the world service process itself as second data to be processed. Then, the world service process compares the second data to be processed with the second reference standard data. If they are inconsistent, the second reference standard data is used to replace the data of the second target type corresponding to the target virtual object managed by the world service process.
示例性的,假设世界服务进程管理的虚拟对象在其所属的帮派中的级别为非标准数据,而场景服务进程管理的虚拟对象在其所属的帮派中的级别为标准数据,在原场景服务进程发送过来的第二传送数据中包括目标虚拟对象在帮派a中的级别的情况下,服务器可以通过以下方式对世界服务进程管理的目标虚拟对象在帮派a中的级别进行校验和标准化处理:服务器可以通过世界服务进程,从第二传送数据中提取目标虚拟对象在帮派a中的级别作为第二参考标准数据,并且获取世界服务进程自身管理的目标虚拟对象在帮派a中的级别作为第二待处理数据;若该第二待处理数据表示目标虚拟对象在帮派a中的级别为第二级,并且该第二参考标准数据也表示目标虚拟对象在帮派a中的级别为第二级,则说明世界服务进程当前管理的目标虚拟对象在帮派a中的级别是标准的,无需对其进行更新处理;若该第二待处理数据表示目标虚拟对象在帮派a中的级别为第二级,而该第二参考标准数据表示目标虚拟对象在帮派a中的级别为第三级,则说明世界服务进程当前管理的目标虚拟对象在帮派a中的级别是不标准的,此时需要将该世界服务进程管理的目标虚拟对象在帮派a中的级别更新为第三级,以实现数据的标准化处理。For example, assuming the virtual object managed by the world service process has a non-standard level in its respective gang, while the virtual object managed by the scene service process has a standard level in its respective gang, and the second transmission data sent by the original scene service process includes the level of the target virtual object in gang a, the server can verify and standardize the level of the target virtual object managed by the world service process in gang a in the following way: the server can extract the level of the target virtual object in gang a from the second transmission data through the world service process as the second reference standard data, and obtain the level of the target virtual object managed by the world service process itself in gang a as the second data to be processed; if the second... If the second set of data to be processed indicates that the target virtual object's level in gang A is level two, and the second reference standard data also indicates that the target virtual object's level in gang A is level two, then the level of the target virtual object currently managed by the world service process in gang A is standard and does not require updating. If the second set of data to be processed indicates that the target virtual object's level in gang A is level two, but the second reference standard data indicates that the target virtual object's level in gang A is level three, then the level of the target virtual object currently managed by the world service process in gang A is non-standard. In this case, the level of the target virtual object managed by the world service process in gang A needs to be updated to level three to achieve data standardization.
应理解,上述第二目标类型仅为示例,在实际应用中第二目标类型也可以为其它类型,本申请在此不对该第二目标类型做任何限定。It should be understood that the above-mentioned second target type is only an example. In practical applications, the second target type can also be other types. This application does not impose any limitations on the second target type.
如此通过上述操作,可以对世界服务进程管理的数据进行标准化处理,从而使得世界服务进程管理的数据更标准,从而有利于世界服务进程为用户提供更准确的相关服务,如提供更准确的道具推荐服务等。Through the above operations, the data of the World Service Process Management can be standardized, making the data more standardized and thus enabling the World Service Process to provide users with more accurate related services, such as providing more accurate item recommendation services.
步骤204:通过所述世界服务进程,将所述传送通知消息发送给目的场景服务进程。Step 204: Send the transmission notification message to the destination scene service process through the world service process.
服务器通过世界服务进程生成传送通知消息后,可以将该传送通知消息发送给目的场景服务进程。该目的场景服务进程即是用于承载针对目标虚拟对象触发传送操作后该目标虚拟对象所要前往的目的地图的服务进程;例如,假设针对目标虚拟对象触发的传送操作用于使该目标虚拟对象从地图1跳转至地图2,则用于承载地图2的场景服务进程即为上述目的场景服务进程;该目的场景服务进程与原场景服务进程相类似,即该目的场景服务进程除了可以承载目的地图外,还可以承载该目的地图中的玩法逻辑(如目的地图中的游戏活动的游戏规则等)、以及处于该目的场景地图中的各虚拟对象各自对应的虚拟对象数据。After the server generates a teleportation notification message through the world service process, it can send the teleportation notification message to the destination scene service process. The destination scene service process is the service process used to carry the destination map that the target virtual object will go to after a teleportation operation is triggered for the target virtual object; for example, assuming that the teleportation operation triggered for the target virtual object is used to jump the target virtual object from map 1 to map 2, then the scene service process used to carry map 2 is the aforementioned destination scene service process; the destination scene service process is similar to the original scene service process, that is, in addition to carrying the destination map, the destination scene service process can also carry the gameplay logic in the destination map (such as the game rules of the game activities in the destination map), as well as the virtual object data corresponding to each virtual object in the destination scene map.
步骤205:通过所述目的场景服务进程,根据所述传送通知消息从所述消息队列中获取所述第一传送数据。Step 205: The first transmission data is obtained from the message queue according to the transmission notification message through the destination scenario service process.
步骤206:通过所述目的场景服务进程,根据所述第一传送数据和所述第三传送数据确定所述目标虚拟对象对应的目的虚拟对象数据。Step 206: Through the target scene service process, determine the target virtual object data corresponding to the target virtual object based on the first transmitted data and the third transmitted data.
服务器通过目的场景服务进程接收到传送通知消息后,可以根据该传送通知消息从消息队列中拉取对应的第一传送数据,进而融合该第一传送数据和传送通知消息中携带的第三传送数据,得到目标虚拟对象对应的目的虚拟对象数据,该目的虚拟对象数据是目标虚拟对象在目的地图中进行游戏时所依据或使用的游戏数据,其中包括但不限于虚拟资产数据、角色属性数据、角色装备数据、角色玩法数据(如任务、副本、钓鱼、帮派等)。此后,用户即可控制目标虚拟对象在该目的地图中进行游戏活动。After receiving the transmission notification message through the destination scene service process, the server can retrieve the corresponding first transmission data from the message queue based on the transmission notification message. Then, it merges this first transmission data with the third transmission data carried in the transmission notification message to obtain the destination virtual object data corresponding to the target virtual object. This destination virtual object data is the game data that the target virtual object relies on or uses when playing the game in the destination map, including but not limited to virtual asset data, character attribute data, character equipment data, and character gameplay data (such as quests, dungeons, fishing, guilds, etc.). Afterward, the user can control the target virtual object to perform game activities in the destination map.
正如上文所提及的,原场景服务进程、世界服务进程和目的场景服务进程协同执行虚拟对象传送任务时,可以将目标虚拟对象的身份标识作为表示所传输的数据与目标虚拟对象之间具有对应关系的标志,因此,在通过世界服务进程发送的传送通知消息中携带有目标虚拟对象的身份标识的情况下,服务器通过目的场景服务进程接收到传送通知消息后,可以通过目的场景服务进程根据该传送通知消息中携带的目标虚拟对象的身份标识,从消息队列中拉取包括该目标虚拟对象的身份标识的第一传送数据。As mentioned above, when the original scene service process, the world service process, and the destination scene service process collaborate to execute the virtual object transmission task, the identity identifier of the target virtual object can be used as a marker indicating that there is a corresponding relationship between the transmitted data and the target virtual object. Therefore, when the transmission notification message sent through the world service process carries the identity identifier of the target virtual object, after the server receives the transmission notification message through the destination scene service process, it can retrieve the first transmission data including the identity identifier of the target virtual object from the message queue based on the identity identifier of the target virtual object carried in the transmission notification message.
即,在原场景服务进程向消息队列发送的第一传送数据中包括目标虚拟对象的身份标识,且世界服务进程向目的场景服务进程发送的传送通知消息中也包括目标虚拟对象的身份标识的情况下,服务器可以通过目的场景服务进程,从该传送通知消息中提取出目标虚拟对象的身份标识,进而,在消息队列中查找包括该目标虚拟对象的身份标识的第一传送数据,并拉取该第一传送数据。That is, if the first transmission data sent by the original scene service process to the message queue includes the identity identifier of the target virtual object, and the transmission notification message sent by the world service process to the destination scene service process also includes the identity identifier of the target virtual object, the server can extract the identity identifier of the target virtual object from the transmission notification message through the destination scene service process, and then search for the first transmission data including the identity identifier of the target virtual object in the message queue and pull the first transmission data.
如此,可以保证目的场景服务进程拉取的第一传送数据、及其接收的传送通知消息中的第三传送数据均是与目标虚拟对象对应的,进而保证最终融合得到的目的虚拟对象数据与目标虚拟对象准确对应,即保证了目的虚拟对象数据的准确性,从而有助于目的场景服务进程后续针对目标虚拟对象可以准确地提供游戏服务。In this way, it can be ensured that the first transmission data pulled by the target scene service process and the third transmission data in the transmission notification message it receives are both corresponding to the target virtual object. This ensures that the final merged target virtual object data accurately corresponds to the target virtual object, thus guaranteeing the accuracy of the target virtual object data. This helps the target scene service process to accurately provide game services to the target virtual object in the future.
此外,若服务器通过原场景服务进程向消息队列发送的数据,是对第一传送数据进行序列化处理得到的第一传送序列数据,相应地,服务器通过目的场景服务进程从消息队列中拉取的数据也是该第一传送序列数据,此时,还需要通过目的场景服务进程对该第一传送序列数据进行反序列化处理,即按照预设的数据格式(即对第一传送数据进行序列化处理时依据的数据格式),从该第一传送序列数据的各个字段中提取数据,从而还原得到第一传送数据。Furthermore, if the data sent by the server to the message queue through the original scenario service process is the first transmission sequence data obtained by serializing the first transmission data, then the data pulled by the server from the message queue through the destination scenario service process is also the first transmission sequence data. In this case, the destination scenario service process also needs to perform deserialization processing on the first transmission sequence data, that is, extract data from each field of the first transmission sequence data according to the preset data format (i.e., the data format used when serializing the first transmission data), so as to restore the first transmission data.
可选的,服务器通过目的场景服务进程,根据第一传送数据和第三传送数据确定出目标虚拟对象对应的目的虚拟对象数据后,还可以进一步通过该目的场景服务进程,针对目标虚拟对象执行地图达到操作;该地图到达操作可以包括以下至少一种:保存目标虚拟对象对应的目的虚拟对象数据、在目的地图对应的目的社交网络中建立目标虚拟对象对应的节点、在目的地图对应的目的社交网络中建立目标虚拟对象对应的节点与其他虚拟对象对应的节点之间的关联关系。Optionally, after the server determines the target virtual object data corresponding to the target virtual object based on the first transmitted data and the third transmitted data through the target scene service process, it can further perform a map arrival operation on the target virtual object through the target scene service process. The map arrival operation may include at least one of the following: saving the target virtual object data corresponding to the target virtual object, establishing a node corresponding to the target virtual object in the target social network corresponding to the destination map, and establishing an association relationship between the node corresponding to the target virtual object and the nodes corresponding to other virtual objects in the target social network corresponding to the destination map.
具体的,服务器通过目的场景服务进程,根据第一传送数据和第三传送数据确定出目标虚拟对象在目的地图中使用的目的虚拟对象数据后,服务器可以通过该目的场景服务进程进一步执行针对目标虚拟对象的地图达到操作,以使用户可以在该目的地图中正常控制该目标虚拟对象执行各种游戏操作。Specifically, after the server determines the target virtual object data used by the target virtual object in the destination map based on the first and third transmitted data through the destination scene service process, the server can further execute map operations for the target virtual object through the destination scene service process, so that the user can normally control the target virtual object to perform various game operations in the destination map.
示例性的,服务器可以通过目的场景服务进程保存该目标虚拟对象对应的目的虚拟对象数据,从而为目的场景服务进程支持用户在目的地图中正常操控目标虚拟对象提供数据支撑。在目的场景服务进程还用于维护目的地图对应的目的社交网络的情况下,服务器还可以通过目的场景服务进程,在该目的地图对应的目的社交网络中建立目标虚拟对象对应的节点,并且根据该目标虚拟对象在该目的地图中产生的社交操作(如对话、加好友、共同执行游戏任务等操作),在该目的社交网络中建立该目标虚拟对象对应的节点与其他虚拟对象对应的节点之间的关联关系,从而使得目的场景服务进程实现在目的地图中对传送过来的目标虚拟对象的正常管理。For example, the server can store the target virtual object data corresponding to the target virtual object through the target scene service process, thereby providing data support for the target scene service process to support users in normally manipulating the target virtual object in the destination map. If the target scene service process is also used to maintain the target social network corresponding to the destination map, the server can also establish a node corresponding to the target virtual object in the target social network corresponding to the destination map through the target scene service process. Furthermore, based on the social operations generated by the target virtual object in the destination map (such as chatting, adding friends, jointly performing game tasks, etc.), the server can establish associations between the node corresponding to the target virtual object and the nodes corresponding to other virtual objects in the target social network, thereby enabling the target scene service process to normally manage the transmitted target virtual object in the destination map.
应理解,在实际应用中,服务器也可以通过目的场景服务进程执行其它地图到达操作,本申请在此不对上述地图到达操作做具体限定。It should be understood that in practical applications, the server can also perform other map arrival operations through the destination scenario service process. This application does not specifically limit the above map arrival operations.
可选的,服务器通过目的场景服务进程,根据第一传送数据和第三传送数据确定出目标虚拟对象对应的目的虚拟对象数据后,还可以通过目的场景服务进程生成传送完成通知消息,并将该传送完成通知消息发送给世界服务进程;进而,服务器可以通过世界服务进程,更新目标虚拟对象当前所处的地图。Optionally, after the server determines the target virtual object data corresponding to the target virtual object based on the first and third transmission data through the target scene service process, it can also generate a transmission completion notification message through the target scene service process and send the transmission completion notification message to the world service process; then, the server can update the map where the target virtual object is currently located through the world service process.
具体的,服务器通过目的场景服务进程,融合第一传送数据和第三传送数据得到目标虚拟对象对应的目的虚拟对象数据后,可以生成携带目标虚拟对象的身份标识的传送完成通知消息,并将该传送完成通知消息发送给世界服务进程。世界服务进程接收到目的场景服务进程发送的传送完成通知消息后,即可获知当前已完成针对目标虚拟对象的传送操作,进而,可以相应地更新该目标虚拟对象当前所处的地图;例如,假设针对目标虚拟对象触发的传送操作用于使该目标虚拟对象从地图1跳转至地图2,世界服务进程接收到来自用于承载地图2的场景服务进程的传送完成通知消息后,可以相应地更新该目标虚拟对象当前所处的地图为地图2。Specifically, after the server obtains the target virtual object data corresponding to the target virtual object by integrating the first and third transmission data through the target scene service process, it can generate a transmission completion notification message carrying the identity identifier of the target virtual object and send the transmission completion notification message to the world service process. After receiving the transmission completion notification message sent by the target scene service process, the world service process can know that the transmission operation for the target virtual object has been completed, and then update the map where the target virtual object is currently located accordingly; for example, assuming that the transmission operation triggered for the target virtual object is used to jump the target virtual object from map 1 to map 2, after the world service process receives the transmission completion notification message from the scene service process that carries map 2, it can update the map where the target virtual object is currently located to map 2 accordingly.
如此,保证虚拟对象传送任务的完整性,便于世界服务进程更好地管理记录各虚拟对象实际所处的地图,有利于软件系统的整体维护。This ensures the integrity of virtual object transmission tasks, facilitates better management and recording of the actual location of each virtual object on the map in the global service process, and is beneficial to the overall maintenance of the software system.
本申请实施例提供的虚拟对象传送方法,利用服务进程组中的世界服务进程和消息队列协同完成虚拟对象传送任务。具体的,该方法将原虚拟对象数据拆分为两部分,一部分是不需要世界服务进程处理的数据(即第一传送数据),另一部分是需要世界服务进程处理的数据(即第二传送数据),利用消息队列中转第一传送数据,利用世界服务进程中转和处理第二传送数据;相比由世界服务进程独立中转和处理原虚拟对象数据的方案,本申请实施例提供的方法可以大幅减少虚拟对象传送过程中世界服务进程所需耗费的处理资源,提高虚拟对象的传送速度和传送效率;在需要瞬时大规模传送虚拟对象的玩法中,该方法可以在相同时间内传送更多的虚拟对象,传送单个虚拟对象的耗时也大大缩短,对于用户来说其感知的虚拟对象传送体验更好;并且该方法还可以为策划设计大规模传送虚拟对象的玩法提供更大的空间。The virtual object transmission method provided in this application utilizes the world service process and message queue in a service process group to collaboratively complete the virtual object transmission task. Specifically, the method splits the original virtual object data into two parts: one part is data that does not require processing by the world service process (i.e., the first transmission data), and the other part is data that requires processing by the world service process (i.e., the second transmission data). The message queue is used to relay the first transmission data, and the world service process is used to relay and process the second transmission data. Compared with the scheme where the world service process independently relays and processes the original virtual object data, the method provided in this application can significantly reduce the processing resources required by the world service process during virtual object transmission, and improve the transmission speed and efficiency of virtual objects. In gameplay that requires instantaneous large-scale transmission of virtual objects, this method can transmit more virtual objects in the same amount of time, and the time taken to transmit a single virtual object is also greatly shortened, resulting in a better virtual object transmission experience for users. Furthermore, this method can also provide greater flexibility in planning and designing gameplay that involves large-scale transmission of virtual objects.
为了便于进一步理解本申请实施例提供的技术方案,下面结合图3所示的流程示意图,对本申请实施例提供的虚拟对象传送方法进行整体示例性介绍。To facilitate a further understanding of the technical solutions provided in the embodiments of this application, the virtual object transmission method provided in the embodiments of this application will be described in its entirety below with reference to the flowchart shown in Figure 3.
假设用户控制的目标虚拟对象当前在scene1进程承载的地图中进行游戏,目标游戏应用可以向用户推送如图4所示的游戏活动列表,用户可以根据自身喜好选择参加其中任一游戏活动;例如,假设用户选择针对其控制的目标虚拟对象报名参加游戏活动“天地风云联赛”,而该游戏活动设置于由scene2进程承载的地图,则此时需要针对目标虚拟对象执行虚拟对象传送任务。Suppose that the target virtual object controlled by the user is currently playing a game on the map hosted by the scene1 process. The target game application can push a list of game activities to the user as shown in Figure 4. The user can choose to participate in any of the game activities according to their own preferences. For example, suppose the user chooses to register for the game activity "Sky and Earth League" for the target virtual object controlled by them. This game activity is set on the map hosted by the scene2 process. At this time, a virtual object teleportation task needs to be performed for the target virtual object.
针对目标虚拟对象执行虚拟对象传送任务时,scene1进程可以将其承载的目标虚拟对象对应的原虚拟对象数据拆分为第一传送数据和第二传送数据;示例性的,scene1进程可以将原虚拟对象数据中所属于world进程管理的数据类型的数据作为第二传送数据,如将组队数据、好友数据、帮派数据等作为第二传送数据,将原虚拟对象数据中其余不属于world进程管理的数据类型的数据作为第一传送数据,如将虚拟资产数据、角色属性数据、角色装备数据以及各类玩法数据(如任务、副本、钓鱼、帮派等)。When performing a virtual object transfer task for a target virtual object, the scene1 process can split the original virtual object data corresponding to the target virtual object it carries into first transfer data and second transfer data. For example, the scene1 process can use data of data types managed by the world process in the original virtual object data as second transfer data, such as team data, friend data, guild data, etc., and use other data of data types in the original virtual object data that do not belong to the world process as first transfer data, such as virtual asset data, character attribute data, character equipment data, and various gameplay data (such as quests, dungeons, fishing, guilds, etc.).
进而,scene1进程可以对包括目标虚拟对象的身份标识的第一传送数据进行序列化处理,得到第一传送序列数据,并将该第一传送序列数据发送至消息队列。scene1进程可以将第二传送数据和目标虚拟对象的身份标识添加至地图离开通知消息中,进而将该地图离开通知消息发送给world进程,相对于目标虚拟对象对应的原虚拟对象数据来说,该第二传送数据的数据量很小,因此可以大大减少数据传输的相关开销。与此同时,scene1进程还可以执行针对目标虚拟对象的地图离开操作,如删除该目标虚拟对象对应的原虚拟对象数据、删除原地图对应的原社交网络中该目标虚拟对象对应的节点、删除原地图对应的原社交网络中该目标虚拟对象对应的节点与其他虚拟对象对应的节点之间的关联关系等。Furthermore, the scene1 process can serialize the first transmitted data, including the identity identifier of the target virtual object, to obtain the first transmitted sequence data, and send this first transmitted sequence data to the message queue. The scene1 process can add the second transmitted data and the identity identifier of the target virtual object to the map leave notification message, and then send the map leave notification message to the world process. Compared with the original virtual object data corresponding to the target virtual object, the amount of the second transmitted data is very small, thus greatly reducing the data transmission overhead. At the same time, the scene1 process can also perform map leave operations for the target virtual object, such as deleting the original virtual object data corresponding to the target virtual object, deleting the node corresponding to the target virtual object in the original social network corresponding to the original map, and deleting the association between the node corresponding to the target virtual object and the nodes corresponding to other virtual objects in the original social network corresponding to the original map.
world进程接收到scene1进程发送的地图离开通知消息后,可以从该地图离开通知消息携带的第二传送数据中提取第一目标类型的数据(即由scene1进程管理的第一目标类型的数据),如目标虚拟对象与帮派间的所属关系等,进而对比提取出的该第一目标类型的数据与自身管理的第一目标类型的数据是否一致,并根据对比结果确定第三传送数据;例如,若一致,则直接确定第二传送数据为第三传送数据,若不一致,则利用自身管理的第一目标类型的数据替换第二传送数据中该第一目标类型的数据得到第三传送数据。此外,world进程还可以从第二传送数据中提取第二目标类型的数据(即由scene1进程管理的第二目标类型的数据),如目标虚拟对象在帮派中的级别、职务等,进而对比所提取出的第二目标类型的数据与自身管理的第二目标类型的数据是否一致,若不一致,则利用提取出的该第二目标类型的数据替换自身管理的该第二目标类型的数据。进而,world进程可以将上述第三传送数据和目标虚拟对象的身份标识添加至传送通知消息中,并将该传送通知消息发送给scene2进程。After receiving the map departure notification message from the scene1 process, the world process can extract data of the first target type (i.e., data of the first target type managed by the scene1 process) from the second transmission data carried in the map departure notification message. This data includes information such as the target virtual object's affiliation with a gang. The world process then compares the extracted data of the first target type with its own managed data of the first target type, and determines the third transmission data based on the comparison result. For example, if they match, the second transmission data is directly determined as the third transmission data; if they do not match, the world process replaces the data of the first target type in the second transmission data with its own managed data of the first target type to obtain the third transmission data. Furthermore, the world process can also extract data of the second target type (i.e., data of the second target type managed by the scene1 process) from the second transmission data, such as the target virtual object's level and position in a gang. This extracted data is then compared with its own managed data of the second target type. If they do not match, the world process replaces its managed data with the extracted data of the second target type. Finally, the world process can add the aforementioned third transmission data and the target virtual object's identity identifier to the transmission notification message and send the transmission notification message to the scene2 process.
scene2进程接收到world进程发送的传送通知消息后,可以根据该传送通知消息中的目标虚拟对象的身份标识,从消息队列中提取出包括该目标虚拟对象的身份标识的第一传送序列数据,并对该第一传送序列数据进行反序列化处理,还原得到第一传送数据。进而,融合该第一传送数据和传送通知消息中携带的第三传送数据,得到目标虚拟对象对应的目的虚拟对象数据,该目的虚拟对象数据可以为目标虚拟对象在scene2进程承载的地图中活动提供数据支撑。进而,scene2进程可以执行针对目标虚拟对象的地图到达操作,如保存目标虚拟对象对应的目的虚拟对象数据、在目的地图对应的目的社交网络中建立目标虚拟对象对应的节点、在目的地图对应的目的社交网络中建立目标虚拟对象对应的节点与其他虚拟对象对应的节点之间的关联关系等。After receiving a transmission notification message from the world process, the scene2 process can extract first transmission sequence data, including the target virtual object's identity, from the message queue based on the target virtual object's identity identifier in the transmission notification message. This first transmission sequence data is then deserialized to reconstruct the first transmission data. Next, the first transmission data is fused with the third transmission data carried in the transmission notification message to obtain the destination virtual object data corresponding to the target virtual object. This destination virtual object data provides data support for the target virtual object's activities within the map hosted by the scene2 process. Furthermore, the scene2 process can perform map arrival operations for the target virtual object, such as saving the destination virtual object data, establishing a node corresponding to the target virtual object in the destination social network corresponding to the destination map, and establishing associations between the node corresponding to the target virtual object and nodes corresponding to other virtual objects in the destination social network corresponding to the destination map.
此后,scene2进程还可以向world进程发送传送完成通知消息,world进程接收到该传送完成通知消息后,可以更新目标虚拟对象当前所处的地图,如此确认完成针对目标虚拟对象的传送操作。Afterward, the scene2 process can send a teleportation completion notification message to the world process. Upon receiving this notification message, the world process can update the map where the target virtual object is currently located, thus confirming the completion of the teleportation operation for the target virtual object.
针对上文描述的虚拟对象传送方法,本申请还提供了对应的虚拟对象传送装置,以使上述虚拟对象传送方法在实际中得以应用及实现。In response to the virtual object transmission method described above, this application also provides a corresponding virtual object transmission device so that the above virtual object transmission method can be applied and implemented in practice.
参见图5,图5是与上文图2所示的虚拟对象传送方法对应的一种虚拟对象传送装置500的结构示意图。如图5所示,该虚拟对象传送装置1100包括:Referring to Figure 5, Figure 5 is a structural schematic diagram of a virtual object transfer device 500 corresponding to the virtual object transfer method shown in Figure 2 above. As shown in Figure 5, the virtual object transfer device 1100 includes:
数据拆分模块501,用于通过原场景服务进程,拆分目标虚拟对象对应的原虚拟对象数据,得到第一传送数据和第二传送数据;所述原场景服务进程用于承载针对所述目标虚拟对象触发传送操作前所述目标虚拟对象所处的原地图;The data splitting module 501 is used to split the original virtual object data corresponding to the target virtual object through the original scene service process to obtain the first transmission data and the second transmission data; the original scene service process is used to carry the original map where the target virtual object is located before the transmission operation is triggered for the target virtual object.
第一发送模块502,用于通过所述原场景服务进程,将所述第一传送数据发送给消息队列,将所述第二传送数据发送给世界服务进程;The first sending module 502 is used to send the first transmission data to the message queue and the second transmission data to the world service process through the original scene service process.
数据处理模块503,用于通过所述世界服务进程,根据所述第二传送数据确定第三传送数据;并根据所述第三传送数据生成传送通知消息;Data processing module 503 is used to determine third transmission data based on the second transmission data through the world service process; and to generate a transmission notification message based on the third transmission data;
第二发送模块504,用于通过所述世界服务进程,将所述传送通知消息发送给目的场景服务进程;所述目的场景服务进程用于承载针对所述目标虚拟对象触发传送操作后所述目标虚拟对象所要前往的目的地图;The second sending module 504 is used to send the transmission notification message to the destination scene service process through the world service process; the destination scene service process is used to carry the destination map that the target virtual object wants to go to after the transmission operation is triggered for the target virtual object;
数据还原模块505,用于通过所述目的场景服务进程,根据所述传送通知消息从所述消息队列中获取所述第一传送数据;并根据所述第一传送数据和所述第三传送数据确定所述目标虚拟对象对应的目的虚拟对象数据。The data restoration module 505 is used to obtain the first transmitted data from the message queue according to the transmission notification message through the destination scene service process; and to determine the destination virtual object data corresponding to the target virtual object according to the first transmitted data and the third transmitted data.
可选的,在图5所示的虚拟对象传送装置的基础上,所述世界服务进程用于管理目标类型的数据;则所述数据拆分模块501具体用于:Optionally, based on the virtual object transfer device shown in Figure 5, the world service process is used to manage target type data; then the data splitting module 501 is specifically used for:
通过所述原场景服务进程,将所述原虚拟对象数据中属于所述目标类型的数据作为所述第二传送数据,将所述原虚拟对象数据中不属于所述目标类型的数据作为所述第一传送数据。Through the original scene service process, data belonging to the target type in the original virtual object data is used as the second transmitted data, and data not belonging to the target type in the original virtual object data is used as the first transmitted data.
可选的,在图5所示的虚拟对象传送装置的基础上,所述世界服务进程管理的第一目标类型的数据为标准数据,所述场景服务进程管理的所述第一目标类型的数据为非标准数据;所述第二传送数据中包括所述原虚拟对象数据中属于所述第一目标类型的数据;则所述数据处理模块503具体用于:Optionally, based on the virtual object transmission device shown in Figure 5, the data of the first target type managed by the world service process is standard data, and the data of the first target type managed by the scene service process is non-standard data; the second transmission data includes data belonging to the first target type in the original virtual object data; then the data processing module 503 is specifically used for:
通过所述世界服务进程,从所述第二传送数据中提取所述第一目标类型的数据,作为第一待处理数据;获取所述世界服务进程管理的所述目标虚拟对象对应的所述第一目标类型的数据,作为第一参考标准数据;Through the world service process, data of the first target type is extracted from the second transmitted data as first data to be processed; data of the first target type corresponding to the target virtual object managed by the world service process is obtained as first reference standard data.
通过所述世界服务进程,对比所述第一待处理数据与所述第一参考标准数据是否一致;若一致,则确定所述第二传送数据作为所述第三传送数据;若不一致,则利用所述第一参考标准数据和所述第二传送数据中除所述第一待处理数据外的其它数据,组成所述第三传送数据。The world service process compares whether the first data to be processed is consistent with the first reference standard data. If they are consistent, the second transmitted data is determined as the third transmitted data. If they are inconsistent, the third transmitted data is composed of the first reference standard data and other data in the second transmitted data except for the first data to be processed.
可选的,在图5所示的虚拟对象传送装置的基础上,所述世界服务进程管理的第二目标类型的数据为非标准数据,所述场景服务进程管理的所述第二目标类型的数据为标准数据;所述第二传送数据中包括所述原虚拟对象数据中属于所述第二目标类型的数据;则所述数据处理模块503还用于:Optionally, based on the virtual object transmission device shown in Figure 5, the data of the second target type managed by the world service process is non-standard data, while the data of the second target type managed by the scene service process is standard data; the second transmission data includes data belonging to the second target type from the original virtual object data; then the data processing module 503 is further used for:
通过所述世界服务进程,从所述第二传送数据中提取所述第二目标类型的数据,作为第二参考标准数据;获取所述世界服务进程管理的所述目标虚拟对象对应的所述第二目标类型的数据,作为第二待处理数据;Through the world service process, data of the second target type is extracted from the second transmitted data and used as the second reference standard data; data of the second target type corresponding to the target virtual object managed by the world service process is obtained and used as the second data to be processed.
通过所述世界服务进程,对比所述第二待处理数据与所述第二参考标准数据是否一致;若不一致,则利用所述第二参考标准数据替换所述世界服务进程管理的所述目标虚拟对象对应的所述第二目标类型的数据。The world service process compares whether the second data to be processed is consistent with the second reference standard data; if they are inconsistent, the second reference standard data is used to replace the data of the second target type corresponding to the target virtual object managed by the world service process.
可选的,在图5所示的虚拟对象传送装置的基础上,所述第一发送模块502具体用于:Optionally, based on the virtual object transmission device shown in Figure 5, the first sending module 502 is specifically used for:
通过所述原场景服务进程,对所述第一传送数据进行序列化处理,得到第一传送序列数据,并将所述第一传送序列数据发送给所述消息队列;The original scene service process serializes the first transmitted data to obtain the first transmitted sequence data, and then sends the first transmitted sequence data to the message queue.
所述数据还原模块505具体用于:The data restoration module 505 is specifically used for:
通过所述目的场景服务进程,根据所述传送通知消息从所述消息队列中获取所述第一传送序列数据,对所述第一传送序列数据进行反序列化处理,得到所述第一传送数据。The destination scenario service process retrieves the first transmission sequence data from the message queue according to the transmission notification message, and performs deserialization processing on the first transmission sequence data to obtain the first transmission data.
可选的,在图5所示的虚拟对象传送装置的基础上,所述第一发送模块502具体用于:Optionally, based on the virtual object transmission device shown in Figure 5, the first sending module 502 is specifically used for:
通过所述原场景服务进程,将所述第一传送数据发送给所述消息队列,所述第一传送数据包括所述目标虚拟对象的身份标识;将所述第二传送数据和所述目标虚拟对象的身份标识发送给所述世界服务进程;The first transmission data, including the identity identifier of the target virtual object, is sent to the message queue through the original scene service process; the second transmission data and the identity identifier of the target virtual object are then sent to the world service process.
所述数据处理模块503具体用于:The data processing module 503 is specifically used for:
通过所述世界服务进程,根据所述第三传送数据和所述目标虚拟对象的身份标识,生成所述传送通知消息;The transmission notification message is generated through the world service process based on the third transmitted data and the identity identifier of the target virtual object;
所述数据还原模块505具体用于:The data restoration module 505 is specifically used for:
通过所述目的场景服务进程,根据所述传送通知消息中的所述目标虚拟对象的身份标识,从所述消息队列中获取包括所述目标虚拟对象的身份标识的所述第一传送数据。The first transmission data, including the identity identifier of the target virtual object, is obtained from the message queue through the destination scenario service process based on the identity identifier of the target virtual object in the transmission notification message.
可选的,在图5所示的虚拟对象传送装置的基础上,参见图6,图6为本申请实施例提供的另一种虚拟对象传送装置600的结构示意图。如图6所示,该装置还包括:Optionally, based on the virtual object transfer device shown in Figure 5, and referring to Figure 6, which is a structural schematic diagram of another virtual object transfer device 600 provided in an embodiment of this application, the device further includes:
离开操作模块601,用于在所述通过所述原场景服务进程,将所述第一传送数据发送给消息队列,将所述第二传送数据发送给所述世界服务进程之后,通过所述原场景服务进程,针对所述目标虚拟对象执行地图离开操作;所述地图离开操作包括以下至少一种:删除所述目标虚拟对象对应的原虚拟对象数据、在所述原地图对应的原社交网络中删除所述目标虚拟对象对应的节点、在所述原社交网络中删除所述目标虚拟对象对应的节点与其他虚拟对象对应的节点之间的关联关系。The departure operation module 601 is used to perform a map departure operation on the target virtual object through the original scene service process after the first transmission data is sent to the message queue and the second transmission data is sent to the world service process through the original scene service process. The map departure operation includes at least one of the following: deleting the original virtual object data corresponding to the target virtual object, deleting the node corresponding to the target virtual object in the original social network corresponding to the original map, and deleting the association relationship between the node corresponding to the target virtual object and the nodes corresponding to other virtual objects in the original social network.
可选的,在图5所示的虚拟对象传送装置的基础上,参见图7,图7为本申请实施例提供的另一种虚拟对象传送装置700的结构示意图。如图7所示,该装置还包括:Optionally, based on the virtual object transfer device shown in Figure 5, and referring to Figure 7, which is a structural schematic diagram of another virtual object transfer device 700 provided in an embodiment of this application, the device further includes:
到达操作模块701,用于通过所述目的场景服务进程,针对所述目标虚拟对象执行地图到达操作;所述地图到达操作包括以下至少一种:保存所述目标虚拟对象对应的目的虚拟对象数据、在所述目的地图对应的目的社交网络中建立所述目标虚拟对象对应的节点、在所述目的社交网络中建立所述目标虚拟对象对应的节点与其他虚拟对象对应的节点之间的关联关系。The arrival operation module 701 is used to perform a map arrival operation on the target virtual object through the destination scene service process; the map arrival operation includes at least one of the following: saving the destination virtual object data corresponding to the target virtual object, establishing the node corresponding to the target virtual object in the destination social network corresponding to the destination map, and establishing the association relationship between the node corresponding to the target virtual object and the nodes corresponding to other virtual objects in the destination social network.
可选的,在图5所示的虚拟对象传送装置的基础上,参见图8,图8为本申请实施例提供的另一种虚拟对象传送装置800的结构示意图。如图8所示,该装置还包括:Optionally, based on the virtual object transfer device shown in Figure 5, and referring to Figure 8, which is a structural schematic diagram of another virtual object transfer device 800 provided in an embodiment of this application, the device further includes:
第三发送模块801,用于通过所述目的场景服务进程,生成传送完成通知消息;通过所述目的场景服务进程,将所述传送完成通知消息发送给所述世界服务进程;The third sending module 801 is used to generate a transmission completion notification message through the destination scene service process; and send the transmission completion notification message to the world service process through the destination scene service process.
地图更新模块802,用于通过所述世界服务进程,更新所述目标虚拟对象当前所处的地图。The map update module 802 is used to update the map where the target virtual object is currently located through the world service process.
本申请实施例提供的虚拟对象传送装置,利用服务进程组中的世界服务进程和消息队列协同完成虚拟对象传送任务。具体的,该装置将原虚拟对象数据拆分为两部分,一部分是不需要世界服务进程处理的数据(即第一传送数据),另一部分是需要世界服务进程处理的数据(即第二传送数据),利用消息队列中转第一传送数据,利用世界服务进程中转和处理第二传送数据;本申请实施例提供的装置可以大幅减少虚拟对象传送过程中世界服务进程所需耗费的处理资源,提高虚拟对象的传送速度和传送效率;在需要瞬时大规模传送虚拟对象的玩法中,该装置可以在相同时间内传送更多的虚拟对象,传送单个虚拟对象的耗时也大大缩短,对于用户来说其感知的虚拟对象传送体验更好;并且该装置还可以为策划设计大规模传送虚拟对象的玩法提供更大的空间。The virtual object transmission device provided in this application embodiment utilizes the world service process and message queue in the service process group to collaboratively complete the virtual object transmission task. Specifically, the device splits the original virtual object data into two parts: one part is data that does not require processing by the world service process (i.e., the first transmission data), and the other part is data that requires processing by the world service process (i.e., the second transmission data). The message queue is used to relay the first transmission data, and the world service process is used to relay and process the second transmission data. The device provided in this application embodiment can significantly reduce the processing resources required by the world service process during virtual object transmission, and improve the transmission speed and efficiency of virtual objects. In gameplay that requires instantaneous large-scale transmission of virtual objects, the device can transmit more virtual objects in the same amount of time, and the time taken to transmit a single virtual object is also greatly shortened, resulting in a better virtual object transmission experience for users. Furthermore, the device can also provide greater flexibility in planning and designing gameplay that involves large-scale transmission of virtual objects.
本申请实施例还提供了一种用于传送虚拟对象的设备,该设备具体可以是服务器,下面将从硬件实体化的角度对本申请实施例提供的服务器进行介绍。This application also provides a device for transmitting virtual objects. Specifically, the device may be a server. The server provided in this application will be described below from the perspective of hardware physicalization.
参见图9,图9为本申请实施例提供的一种服务器900的结构示意图。该服务器900可因配置或性能不同而产生比较大的差异,可以包括一个或一个以上中央处理器(centralprocessing units,CPU)922(例如,一个或一个以上处理器)和存储器932,一个或一个以上存储应用程序942或数据944的存储介质930(例如一个或一个以上海量存储设备)。其中,存储器932和存储介质930可以是短暂存储或持久存储。存储在存储介质930的程序可以包括一个或一个以上模块(图示没标出),每个模块可以包括对服务器中的一系列指令操作。更进一步地,中央处理器922可以设置为与存储介质930通信,在服务器900上执行存储介质930中的一系列指令操作。Referring to Figure 9, which is a schematic diagram of the structure of a server 900 provided in an embodiment of this application, the server 900 can vary considerably due to different configurations or performance. It may include one or more central processing units (CPUs) 922 (e.g., one or more processors) and memory 932, and one or more storage media 930 (e.g., one or more mass storage devices) for storing application programs 942 or data 944. The memory 932 and storage media 930 can be temporary or persistent storage. The program stored in the storage media 930 may include one or more modules (not shown in the figure), each module including a series of instruction operations on the server. Furthermore, the CPU 922 may be configured to communicate with the storage media 930 and execute the series of instruction operations in the storage media 930 on the server 900.
服务器900还可以包括一个或一个以上电源926,一个或一个以上有线或无线网络接口950,一个或一个以上输入输出接口958,和/或,一个或一个以上操作系统,例如Windows ServerTM,Mac OS XTM,UnixTM,LinuxTM,FreeBSDTM等等。Server 900 may also include one or more power supplies 926, one or more wired or wireless network interfaces 950, one or more input/output interfaces 958, and/or one or more operating systems, such as Windows Server™, Mac OS X™, Unix™, Linux™, FreeBSD™, etc.
上述实施例中由服务器所执行的步骤可以基于该图9所示的服务器结构。The steps performed by the server in the above embodiments can be based on the server structure shown in Figure 9.
其中,CPU 922用于执行如下步骤:The CPU 922 is used to perform the following steps:
通过原场景服务进程,拆分目标虚拟对象对应的原虚拟对象数据,得到第一传送数据和第二传送数据;所述原场景服务进程用于承载针对所述目标虚拟对象触发传送操作前所述目标虚拟对象所处的原地图;The original scene service process is used to split the original virtual object data corresponding to the target virtual object to obtain the first transmission data and the second transmission data; the original scene service process is used to carry the original map where the target virtual object is located before the transmission operation is triggered for the target virtual object.
通过所述原场景服务进程,将所述第一传送数据发送给消息队列,将所述第二传送数据发送给所述世界服务进程;The first transmitted data is sent to the message queue through the original scene service process, and the second transmitted data is sent to the world service process.
通过所述世界服务进程,根据所述第二传送数据确定第三传送数据;并根据所述第三传送数据生成传送通知消息;Through the world service process, the third transmission data is determined based on the second transmission data; and a transmission notification message is generated based on the third transmission data.
通过所述世界服务进程,将所述传送通知消息发送给目的场景服务进程;所述目的场景服务进程用于承载针对所述目标虚拟对象触发传送操作后所述目标虚拟对象所要前往的目的地图;The world service process sends the transmission notification message to the destination scene service process; the destination scene service process is used to carry the destination map that the target virtual object wants to go to after the transmission operation is triggered for the target virtual object;
通过所述目的场景服务进程,根据所述传送通知消息从所述消息队列中获取所述第一传送数据;并根据所述第一传送数据和所述第三传送数据确定所述目标虚拟对象对应的目的虚拟对象数据。The destination scenario service process retrieves the first transmission data from the message queue based on the transmission notification message; and determines the destination virtual object data corresponding to the target virtual object based on the first transmission data and the third transmission data.
可选的,CPU 922还可以用于执行本申请实施例提供的虚拟对象传送方法的任意一种实现方式的步骤。Optionally, the CPU 922 can also be used to execute the steps of any implementation of the virtual object transfer method provided in the embodiments of this application.
本申请实施例还提供一种计算机可读存储介质,用于存储计算机程序,该计算机程序用于执行前述各个实施例所述的一种虚拟对象传送方法中的任意一种实施方式。This application also provides a computer-readable storage medium for storing a computer program that executes any one of the implementation methods of the virtual object transfer method described in the foregoing embodiments.
本申请实施例还提供了一种计算机程序产品或计算机程序,该计算机程序产品或计算机程序包括计算机指令,该计算机指令存储在计算机可读存储介质中。计算机设备的处理器从计算机可读存储介质读取该计算机指令,处理器执行该计算机指令,使得该计算机设备执行前述各个实施例所述的一种虚拟对象传送方法中的任意一种实施方式。This application also provides a computer program product or computer program that includes computer instructions stored in a computer-readable storage medium. A processor of a computer device reads the computer instructions from the computer-readable storage medium and executes the computer instructions, causing the computer device to perform any of the implementation methods of the virtual object transfer method described in the foregoing embodiments.
所属领域的技术人员可以清楚地了解到,为描述的方便和简洁,上述描述的系统,装置和单元的具体工作过程,可以参考前述方法实施例中的对应过程,在此不再赘述。Those skilled in the art will clearly understand that, for the sake of convenience and brevity, the specific working processes of the systems, devices, and units described above can be referred to the corresponding processes in the foregoing method embodiments, and will not be repeated here.
在本申请所提供的几个实施例中,应该理解到,所揭露的系统,装置和方法,可以通过其它的方式实现。例如,以上所描述的装置实施例仅仅是示意性的,例如,所述单元的划分,仅仅为一种逻辑功能划分,实际实现时可以有另外的划分方式,例如多个单元或组件可以结合或者可以集成到另一个系统,或一些特征可以忽略,或不执行。另一点,所显示或讨论的相互之间的耦合或直接耦合或通信连接可以是通过一些接口,装置或单元的间接耦合或通信连接,可以是电性,机械或其它的形式。In the several embodiments provided in this application, it should be understood that the disclosed systems, apparatuses, and methods can be implemented in other ways. For example, the apparatus embodiments described above are merely illustrative; for instance, the division of units is only a logical functional division, and in actual implementation, there may be other division methods. For example, multiple units or components may be combined or integrated into another system, or some features may be ignored or not executed. Furthermore, the coupling or direct coupling or communication connection shown or discussed may be an indirect coupling or communication connection between apparatuses or units through some interfaces, and may be electrical, mechanical, or other forms.
所述作为分离部件说明的单元可以是或者也可以不是物理上分开的,作为单元显示的部件可以是或者也可以不是物理单元,即可以位于一个地方,或者也可以分布到多个网络单元上。可以根据实际的需要选择其中的部分或者全部单元来实现本实施例方案的目的。The units described as separate components may or may not be physically separate. The components shown as units may or may not be physical units; that is, they may be located in one place or distributed across multiple network units. Some or all of the units can be selected to achieve the purpose of this embodiment according to actual needs.
另外,在本申请各个实施例中的各功能单元可以集成在一个处理单元中,也可以是各个单元单独物理存在,也可以两个或两个以上单元集成在一个单元中。上述集成的单元既可以采用硬件的形式实现,也可以采用软件功能单元的形式实现。Furthermore, the functional units in the various embodiments of this application can be integrated into one processing unit, or each unit can exist physically separately, or two or more units can be integrated into one unit. The integrated unit can be implemented in hardware or as a software functional unit.
所述集成的单元如果以软件功能单元的形式实现并作为独立的产品销售或使用时,可以存储在一个计算机可读取存储介质中。基于这样的理解,本申请的技术方案本质上或者说对现有技术做出贡献的部分或者该技术方案的全部或部分可以以软件产品的形式体现出来,该计算机软件产品存储在一个存储介质中,包括若干指令用以使得一台计算机设备(可以是个人计算机,服务器,或者网络设备等)执行本申请各个实施例所述方法的全部或部分步骤。而前述的存储介质包括:U盘、移动硬盘、只读存储器(英文全称:Read-OnlyMemory,英文缩写:ROM)、随机存取存储器(英文全称:Random Access Memory,英文缩写:RAM)、磁碟或者光盘等各种可以存储计算机程序的介质。If the integrated unit is implemented as a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of this application, in essence, or the part that contributes to the prior art, or all or part of the technical solution, can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) to execute all or part of the steps of the methods described in the various embodiments of this application. The aforementioned storage medium includes: USB flash drives, portable hard drives, read-only memory (ROM), random access memory (RAM), magnetic disks, optical disks, and other media capable of storing computer programs.
应当理解,在本申请中,“至少一个(项)”是指一个或者多个,“多个”是指两个或两个以上。“和/或”,用于描述关联对象的关联关系,表示可以存在三种关系,例如,“A和/或B”可以表示:只存在A,只存在B以及同时存在A和B三种情况,其中A,B可以是单数或者复数。字符“/”一般表示前后关联对象是一种“或”的关系。“以下至少一项(个)”或其类似表达,是指这些项中的任意组合,包括单项(个)或复数项(个)的任意组合。例如,a,b或c中的至少一项(个),可以表示:a,b,c,“a和b”,“a和c”,“b和c”,或“a和b和c”,其中a,b,c可以是单个,也可以是多个。It should be understood that in this application, "at least one (item)" means one or more, and "more than one" means two or more. "And/or" is used to describe the relationship between related objects, indicating that three relationships can exist. For example, "A and/or B" can represent three cases: only A exists, only B exists, and both A and B exist simultaneously, where A and B can be singular or plural. The character "/" generally indicates that the preceding and following related objects are in an "or" relationship. "At least one (item) of the following" or similar expressions refer to any combination of these items, including any combination of single or plural items. For example, at least one (item) of a, b, or c can represent: a, b, c, "a and b", "a and c", "b and c", or "a and b and c", where a, b, and c can be single or multiple.
以上所述,以上实施例仅用以说明本申请的技术方案,而非对其限制;尽管参照前述实施例对本申请进行了详细的说明,本领域的普通技术人员应当理解:其依然可以对前述各实施例所记载的技术方案进行修改,或者对其中部分技术特征进行等同替换;而这些修改或者替换,并不使相应技术方案的本质脱离本申请各实施例技术方案的精神和范围。The above-described embodiments are only used to illustrate the technical solutions of this application, and are not intended to limit them. Although this application has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that modifications can still be made to the technical solutions described in the foregoing embodiments, or equivalent substitutions can be made to some of the technical features. Such modifications or substitutions do not cause the essence of the corresponding technical solutions to deviate from the spirit and scope of the technical solutions of the embodiments of this application.
Claims (11)
Publications (2)
| Publication Number | Publication Date |
|---|---|
| HK40052795A HK40052795A (en) | 2022-01-28 |
| HK40052795B true HK40052795B (en) | 2023-12-15 |
Family
ID=
Similar Documents
| Publication | Publication Date | Title |
|---|---|---|
| CN112650730B (en) | Game data migration method and device, storage medium, and computer equipment | |
| US9560131B2 (en) | Efficient synchronization of behavior trees using network significant nodes | |
| JP2015524677A (en) | System and method for interactive gameplay | |
| JP7111822B2 (en) | Group gameplay with users in close proximity using gaming platforms | |
| US20240307789A1 (en) | Spectator system in online games | |
| JP2023516523A (en) | Peer-to-peer multiplayer cloud gaming architecture | |
| WO2022007394A1 (en) | Game data processing method and apparatus, and storage medium and electronic apparatus | |
| CN103281346A (en) | Disconnection reconnection method, network system and proxy server | |
| JP7403715B2 (en) | Data processing methods, devices, equipment, storage media | |
| CN110113414B (en) | Method, device, server and storage medium for managing copies | |
| US11925861B2 (en) | System for multiview games experience | |
| CN116363286A (en) | Game processing method, game processing device, storage medium and program product | |
| CN113413586B (en) | Virtual object transmission method, device, equipment and storage medium | |
| US11531685B2 (en) | Addressing data skew using map-reduce | |
| HK40052795B (en) | A virtual object delivery method, device, equipment and storage medium | |
| US20240382850A1 (en) | Skill acquisition based on virtual scene | |
| US20250083040A1 (en) | Matchmaking architecture for online game platform | |
| WO2024055811A1 (en) | Message display method and apparatus, device, medium, and program product | |
| CN116351069A (en) | Game information processing method, game information processing device, electronic equipment and storage medium | |
| HK40052795A (en) | A virtual object delivery method, device, equipment and storage medium | |
| WO2020159829A1 (en) | Computing cross products using map reduce | |
| CN113509719A (en) | Computer system, running method, device and medium for multi-version application | |
| JP2021089509A (en) | Information processing device and program | |
| US12544659B2 (en) | Non-transitory computer-readable storage medium with executable information processing program stored thereon, game system, game device, and information processing method | |
| CN116650942A (en) | Business processing method, device, computer equipment and business processing system |