WO2015081907A1 - 一种角色对象管理的方法、装置和服务器 - Google Patents

一种角色对象管理的方法、装置和服务器 Download PDF

Info

Publication number
WO2015081907A1
WO2015081907A1 PCT/CN2015/072098 CN2015072098W WO2015081907A1 WO 2015081907 A1 WO2015081907 A1 WO 2015081907A1 CN 2015072098 W CN2015072098 W CN 2015072098W WO 2015081907 A1 WO2015081907 A1 WO 2015081907A1
Authority
WO
WIPO (PCT)
Prior art keywords
role object
role
server
information
request
Prior art date
Application number
PCT/CN2015/072098
Other languages
English (en)
French (fr)
Inventor
钟勇
王旭新
姚建辉
邱林辉
杨敏
Original Assignee
腾讯科技(深圳)有限公司
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by 腾讯科技(深圳)有限公司 filed Critical 腾讯科技(深圳)有限公司
Publication of WO2015081907A1 publication Critical patent/WO2015081907A1/zh

Links

Images

Classifications

    • AHUMAN NECESSITIES
    • A63SPORTS; GAMES; AMUSEMENTS
    • A63FCARD, BOARD, OR ROULETTE GAMES; INDOOR GAMES USING SMALL MOVING PLAYING BODIES; VIDEO GAMES; GAMES NOT OTHERWISE PROVIDED FOR
    • A63F13/00Video games, i.e. games using an electronically generated display having two or more dimensions
    • A63F13/55Controlling game characters or game objects based on the game progress

Definitions

  • the present invention relates to the field of Internet technologies, and in particular, to a method and apparatus for managing a role object.
  • one or more scenes are generally set, for example, a copy scene in a role-playing game, a scene in the field, a desktop scene in a board game, and the like.
  • One or more character objects may be included in the scene, and the character objects may include ordinary character objects and AI (Artificial Intelligence) character objects.
  • a normal character object is a game character controlled by a player.
  • the AI character object is a game character controlled by a computer using artificial intelligence.
  • the AI character object can realize the interaction with the common character object controlled by the player, such as dialogue, competition, collaboration, etc., so that the content of the online game is richer and more diversified.
  • the AI character object is a part of the scene of the game, and in the scene server of the game, status information of the AI character object such as the rank, position, blood volume, etc. of the character is solidified in the main program.
  • the main program is difficult to modify dynamically, some dynamic AI character object scheduling methods cannot be implemented. For example, dynamically adding new AI character objects (that is, randomly requesting AI character objects by managers or player users), or different Dynamically migrating AI role objects between servers (that is, randomly requesting an arbitrary destination migration of an AI character object by an administrator or a player user), etc., these scheduling methods are difficult to implement dynamically. Thus, the flexibility of scheduling the AI character object is poor.
  • embodiments of the present invention provide a method and apparatus for managing a role object to improve flexibility in scheduling an AI role object.
  • the technical solution is as follows:
  • a method for managing a role object which is applied to a server, where the server includes a logical platform and a scenario server, where the logical platform is respectively connected to the client and the artificial intelligence AI processing platform via the interface, And the method includes:
  • the scenario server receives a request to add an artificial intelligence AI role object to a local scenario
  • the scenario server allocates a corresponding cache space for the AI role object, and stores state information of the AI role object in the cache space.
  • a device for managing a role object which is applied to a server, the server further includes a logic platform, wherein the logic platform is respectively connected to the client and the artificial intelligence AI processing platform via the interface through the interface server, and
  • the device for managing the role object includes:
  • a receiving module configured to receive a request to add an artificial intelligence AI role object to a local scenario
  • An obtaining module configured to acquire state information of the AI role object
  • a storage module configured to allocate a corresponding cache space for the AI role object, and store state information of the AI role object in the cache space.
  • a server comprising a logical platform and a device for character object management as described above, wherein the logical platform is respectively associated with a client and an artificial intelligence AI via an interface via the interface server Processing platform connections.
  • the request for adding an AI character object to a local scene is received, the state information of the AI character object is obtained, the corresponding cache space is allocated for the AI character object, and the state information of the AI character object is stored in the cache space.
  • the AI character object can be added at any time, thereby improving the flexibility of scheduling the AI character object.
  • FIG. 1 is a flowchart of a method for managing a role object according to an embodiment of the present invention
  • FIG. 2 is a schematic structural diagram of a network system according to an embodiment of the present invention.
  • FIG. 3 is a schematic structural diagram of an apparatus for managing a role object according to an embodiment of the present invention.
  • FIG. 4 is a schematic structural diagram of an apparatus for managing a role object according to another embodiment of the present invention.
  • FIG. 5 is a schematic structural diagram of a server according to an embodiment of the present invention.
  • Embodiments of the present invention provide a method for managing a role object.
  • the method of the role object management is applicable to a server, where the server includes a logical platform and a scenario server, and the logical platform is respectively connected to the client and the artificial intelligence AI processing platform via the interface through the interface.
  • the processing flow of the method may include the following steps:
  • Step 101 The scenario server receives a request to add an AI role object to a local scene.
  • Step 102 The scene server acquires state information of the AI role object.
  • Step 103 The scenario server allocates a corresponding cache space for the AI role object, and stores state information of the AI role object in the cache space.
  • the scenario server receives the request to add the AI role object to the local scene, obtains the state information of the AI character object, allocates a corresponding cache space for the AI role object, and stores the AI character object in the cache space. status information.
  • the AI character object can be added at any time, thereby improving the flexibility of scheduling the AI character object.
  • the embodiment of the invention provides a method for managing a character object
  • the execution body of the method may be a server
  • the server may be a server for web application background interaction between users and interaction between the user and the computer, such as a network game background.
  • the server performs a detailed description of the scenario in which the execution subject is a scenario server in the background of a network game (such as a board game, a role-playing game, etc.), and in the case of other execution subjects, the present embodiment does not. Let me repeat.
  • the scenario server is a server used to manage scenario information in a certain scenario (such as a desktop scenario, a replica scenario, and the like).
  • the scene information is used to reflect the state and change of the character object, the environment, and the like in the scene (such as in the table, in the middle of the copy), and the scene information includes the state information of the character object.
  • Step 101 The scenario server receives a request to add an AI role object to a local scene.
  • Step 102 The scene server acquires state information of the AI role object.
  • the role object is a collective name of a character or other thing in the network application that can be controlled by the user or the AI.
  • the AI character object is a character object controlled by a computer using artificial intelligence
  • the ordinary role object is a user (a user of the network application, A character object controlled by a game player.
  • the local scene is the scene managed by this server.
  • the status information is the sum of the information used to describe the attributes of a certain character object, and is one of the scene information.
  • the status information of the character object in the chess game may include hand information, level information, prop information, etc., role playing class.
  • the status information of the character object in the game may include shape information, master skill information, attack power information, defense power information, level information, and the like.
  • the state information of the first AI role object is obtained from the cache space allocated by the other server for the first AI role object.
  • the first AI role object may be an AI role object in a scenario corresponding to some other server.
  • the other server may process according to the embodiment of the present invention.
  • the first AI role object allocates a cache space and stores state information of the first AI role object in a cache space allocated thereto.
  • an administrator or user requests to migrate a first AI role object from a scenario of the other server to a local scene to interact with the user, or when the first AI role object moves in the scene of the other server, The boundary between the scene and the local scene is reached, the scene switching needs to be performed, and so on.
  • the other server may send a migration request to the server for requesting to migrate the first AI role object from the scene of the other server to the local scene.
  • the local server may obtain status information of the first AI role object cached therein.
  • the state information of the first AI role object carried in the request is obtained.
  • the administrator can request to add the first AI role object in a certain scenario.
  • the scenario server Before the scenario server starts to operate, the user cannot log in to the scenario server through the client.
  • the administrator can perform data configuration on the scenario server. For example, create several AI character objects, or load several pre-configured AI character objects.
  • the administrator can configure the state information of the first AI role object through the management terminal used by the administrator, and can select the shape of the first AI role object, input its name, Blood, attack, defense, and other information, and click to confirm to add this AI role object, at this time, the management terminal can generate a request to create a first AI role object, carrying the status information of the AI role object, and the The request is sent to the scenario server, and when the scenario server receives the request, the state information of the first AI role object may be obtained from the request.
  • Step 103 The scenario server allocates a corresponding cache space for the AI role object, and stores state information of the AI role object in the cache space.
  • the scenario server may preset a certain amount of cache space according to its load capacity, and each cache space is allocated to a common role user or an AI role object to store state information of the corresponding role object.
  • the scenario server can also maintain a cache state table that records which cache spaces are idle and which cache spaces are used.
  • a cache space may be selected in each cache space that is in an idle state, and allocated to the corresponding AI role object or a normal role object, and the corresponding state information is stored in the selected cache space.
  • the scenario server can also record the correspondence between each role object and the cache space address, so as to facilitate the management of the state information of each role object.
  • the scenario server adjusts the state information in the corresponding cache space according to the state change of the role object (the normal role user or the AI role object), for example, If the AI character object is attacked with a damage of 1 and there is no defense, the scene server reduces the blood volume value in the state information in the cache space corresponding to the AI character object by one.
  • the role object the normal role user or the AI role object
  • the scenario server adopts the same management mode for the state information of the normal character object and the AI character object.
  • the method for managing a character object according to the present invention may further include the following steps:
  • Step 104 The scenario server acquires a request that the AI character object leaves the local scene.
  • Step 105 The scenario server deletes state information of an AI character stored in the cache space.
  • a scenario is a scenario in which a first AI role object is migrated from a local scenario to some other server.
  • the other server obtains the attribute information of the first AI role object from the scenario server and stores it in the scenario.
  • the scenario server can delete the attribute information of the first AI role object stored in the local cache space.
  • the manager requests to cancel the first AI role object.
  • the server can directly delete the state information of the first AI role object from the cache space.
  • an independent AI processing platform may be provided for processing the behavior logic of the AI character object to control each AI character object.
  • the AI processing platform can be a module of the above scenario server or a standalone server.
  • the scenario server can perform the following processing:
  • Step 1 When the scene information changes, determine the associated role object in the local scene corresponding to the changed scene information.
  • the associated role object may be a role object that can be aware of the changed scene information based on a preset rule in the network application, and the preset rule may be arbitrarily set according to requirements.
  • the scene information when the user performs an action by controlling the normal character object by the client, or when the AI processing platform controls the AI character object to perform an action, the scene information is triggered to change, for example, the user controls an ordinary character object to “kill” the card. It will trigger the change of the scene information, including the change of the status information of the normal character object (there is a "kill" card in the hand), and also includes a "kill” card on the desktop, and so on.
  • the scene information may also be triggered to change. For example, if a bomb is dropped at a specified position every 20 minutes, then every 20 minutes will be at the specified position. Dropping a bomb, the scene information changes, including changes in environmental information (generating a bomb).
  • the method for determining the associated role object corresponding to the changed scene information may be various, for example, determining that the visual range can include the scene information according to the location of the changed scene information and the visual range of the character object.
  • the role object, as the associated role object, for example, may be associated with a specific event (the event occurs, that is, the scene information changes).
  • the server determines other scene information that needs to be changed according to the changed scene information, and adjusts the other scene information accordingly.
  • Other scene information may include environmental information, status information of a character object, and the like.
  • Step 2 If the associated role object includes a normal role object, the change information of the changed scene information is sent to the client corresponding to the common role object in the associated role object; if the associated role object includes the AI role object, then the AI is sent to the AI.
  • the processing platform sends the change information of the changed scene information and the role object identifier of the associated role object including the AI role object.
  • the change information may be a value after the changed scene information changes, or may be a change value. For example, if the original blood volume of a character object is 3, and the changed blood volume is 4, then the change information of the scene information is It can be 4 or it can be increased by 1.
  • the scenario server may record the correspondence between the common role object and the client. If the associated role object includes a common role object, the client corresponding to the corresponding normal role object may be determined according to the corresponding relationship, and the determined client is determined. Sending the above change information, the client can display the corresponding animation effect in the scene displayed by the client according to the change information, for example, in front of When the house collapses, the user can judge the response that needs to be made after the scene changes. If it is decided that an action needs to be performed, the client can further send an action request to the scenario server.
  • the processing request may be sent to the AI processing platform, where the processing request carries the change information and the role object identifier of each AI role object included in the associated role object, in the AI processing platform.
  • the behavior logic rules corresponding to each AI character object can be recorded in advance.
  • the behavior logic rule may be determined by the AI processing platform according to information such as the scene and state in which the AI character object is located, or may be specified by the administrator in advance for the AI character object.
  • the AI processing platform may search for the corresponding behavior logic rule according to the role object identifier therein, and perform behavior decision based on the change information and the found behavior logic rule, and if it is determined that an action needs to be performed, according to the behavior
  • the decision sends an action request to the server.
  • behavior decision making if certain scene information is required according to the logic rule, the corresponding scene information may be obtained from the scene server.
  • the scenario server when receiving the action request sent by the client or the AI processing platform, the scenario server may control the corresponding scenario information according to the action request, and the process may be as follows:
  • the client when receiving the action request that is sent by the client and carrying the action information and the role object identifier, verify the feasibility of the action information according to the preset rule, and if the verification passes, control the common role corresponding to the role object identifier.
  • the object performs an action corresponding to the action information.
  • the feasibility of the action information is verified according to the preset rule, and if the verification is passed, the role object identifier is controlled to be corresponding.
  • the AI character object performs an action corresponding to the action information.
  • the process of verifying the feasibility of the action information according to the preset rule may be as follows: sending the action request to the logic platform, and the logic platform verifies the feasibility of the action information according to the stored preset rule, and feeds back the verification result.
  • the action request is used to request the server to control the role object to perform a specified action.
  • the default rule may be a basic behavior rule based on natural rules and/or artificial rules in a web application.
  • an independent logic platform can be set for processing the basic logic of the network application, such as determining whether the execution of an action is feasible, for example, a user requests to move a certain box, and based on the game.
  • the default rule is that the current state of the box cannot be moved, and it is determined that the action request is rejected.
  • the logical platform can be a module of the scenario server or a standalone server.
  • the server may send the action request to the logic platform, and the logic platform verifies the feasibility of the action information in the action request according to the preset rule, and sends the verification result feedback.
  • the server may reject the action. request.
  • the corresponding information may be executed to change the scene information, and the change information may be notified according to the above method in this embodiment.
  • the server adopts the same processing method for the action request of the normal character object and the AI character object.
  • a schematic diagram of a network system structure provided by an embodiment of the present invention may be as shown in FIG. 2 .
  • the AI processing platform and the logical platform are independent of the server of the scene server, so that the AI processing platform and the logical platform can provide services for one or more scene servers.
  • the scenario server may record the role type of each role object in which the state information is stored in the local cache space, and may record the role type of the AI role object locally allocated with the cache space as an AI type, and record the local allocated cache space.
  • the role type of a normal role object is a normal type.
  • a role type table can be created to record the role type of each role.
  • the role type of the first normal character object recorded locally is changed from the normal type to the AI type.
  • the smart hosting function can be provided to the user on the client.
  • the client can trigger the client to send a smart hosting request to the scenario server.
  • the scenario server can In the above role type table, the role type of the common role object corresponding to the client is changed from the normal type to the AI type.
  • the scenario server can also actively take a common corner when a trigger condition occurs according to a pre-defined rule. Color objects are converted to AI character objects.
  • the role type of the locally recorded AI character object is modified from the AI type to the normal type.
  • the client when the user ends the smart hosting in the client, the client may be triggered to send a smart hosting termination request to the scenario server.
  • the scenario server may, in the role type table, the client.
  • the role type of the normal role object corresponding to the end is changed from the AI type to the normal type.
  • the scenario server may also actively convert an AI character object into a normal role object when a trigger condition occurs according to a predetermined rule.
  • the scenario server receives the request to add the AI role object to the local scene, obtains the state information of the AI character object, allocates a corresponding cache space for the AI role object, and stores the AI character object in the cache space. status information.
  • the AI character object can be added at any time, thereby improving the flexibility of scheduling the AI character object.
  • an embodiment of the present invention further provides an apparatus for managing a role object.
  • the device for managing the role object is applied to a server, and the server further includes a logical platform, and the logical platform is respectively connected to the client and the artificial intelligence AI processing platform via the interface through the interface.
  • the device for managing a role object includes:
  • the receiving module 310 is configured to receive a request to add an AI role object to a local scenario.
  • the obtaining module 320 is configured to acquire state information of the AI role object
  • the storage module 330 is configured to allocate a corresponding cache space for the AI role object, and store state information of the AI role object in the cache space.
  • the obtaining module 320 is further configured to obtain a request that the AI character object leaves the local scene; and the device for managing the role object further includes: a deleting module 340, configured to delete the storage in the cache space Status information of the AI character.
  • the receiving module 310 is further configured to: receive a request for migrating the AI role object from a scenario of another server to a local scenario; and the obtaining module 320, One step is to: obtain state information of the AI role object from a cache space allocated by the other server for the AI role object.
  • the receiving module 310 is further configured to: receive a request for newly creating the AI role object in a local scenario; and the acquiring module 320 is further configured to acquire the AI carried in the request Status information for the role object.
  • the device further comprises:
  • the determining module 350 is configured to determine an associated role object in the local scene corresponding to the changed scene information when the scene information changes;
  • the sending module 360 is configured to: if the common role object includes the normal role object, send the change information of the changed scene information to a client corresponding to the common role object in the associated role object;
  • the AI character object is included in the role object, and the change information and the role object identifier of the changed scene information are sent to the AI processing platform.
  • the role object identifier is used in the associated role object including the AI character object.
  • the receiving module is further configured to: receive an action request that is sent by the client and that carries the action information and the role object identifier;
  • the device further includes a control module 370, configured to verify the feasibility of the action information according to a preset rule, and if the verification passes, control the normal role object corresponding to the role object identifier to perform an action corresponding to the action information.
  • a control module 370 configured to verify the feasibility of the action information according to a preset rule, and if the verification passes, control the normal role object corresponding to the role object identifier to perform an action corresponding to the action information.
  • the receiving module is further configured to receive an action request that is sent by the AI processing platform and carries the action information and the role object identifier;
  • the device further includes a control module 370, configured to verify the feasibility of the action information according to a preset rule, and if the verification passes, control an AI character object corresponding to the role object identifier to perform an action corresponding to the action information.
  • a control module 370 configured to verify the feasibility of the action information according to a preset rule, and if the verification passes, control an AI character object corresponding to the role object identifier to perform an action corresponding to the action information.
  • control module 370 is configured to send the action request to the logic platform, and the logic platform verifies the feasibility of the action information according to a stored preset rule thereof, and provides feedback verification. result.
  • the apparatus further includes a conversion module 380 for:
  • the role type of the first normal role object recorded locally is changed from the normal type to the AI type;
  • the role type of the locally recorded AI character object is modified from the AI type to the normal type.
  • the device for managing the role object receives the request for adding the AI character object to the local scene, acquires the state information of the AI character object, allocates a corresponding cache space for the AI character object, and stores the AI character object in the cache space. status information. In this way, during the running of the main program of the server, the AI character object can be added at any time, thereby improving the flexibility of scheduling the AI character object.
  • FIG. 4 is a schematic structural diagram of a server (which can be used as a scenario server of the above network application) in the embodiment of the present invention.
  • the server 1900 can vary considerably depending on configuration or performance, and can include one or more central processing units (CPUs) 1922 (eg, one or more processors) and memory 1932, one or one The above storage medium 1942 or storage medium 1930 of data 1944 (eg, one or one storage device in Shanghai).
  • the memory 1932 and the storage medium 1930 may be short-term storage or persistent storage.
  • the program stored on storage medium 1930 may include one or more modules (not shown), each of which may include a series of instruction operations in the server.
  • central processor 1922 can be configured to communicate with storage medium 1930, which performs a series of instruction operations in storage medium 1930.
  • Server 1900 may also include one or more power sources 1926, one or more wired or wireless network interfaces 1950, one or more input and output interfaces 1958, one or more keyboards 1956, and/or one or more operating systems 1941.
  • power sources 1926 For example, Windows ServerTM, Mac OS XTM, UnixTM, LinuxTM, FreeBSDTM, etc.
  • Server 1900 can include a memory, and one or more programs, one or more programs stored in memory for implementing a logical platform and a scenario server.
  • the logical platform passes through the input and output interface 1958 through the scenario server, respectively, with the client and the manual Intelligent AI processing platform connection.
  • the one or more programs configured to be executed by one or more processors include instructions for performing the following operations to implement a scenario server:
  • the method further includes:
  • the receiving a request to add an AI role object to a local scene includes:
  • the scenario server acquires state information of the AI role object, including:
  • the receiving, by the request for adding an AI role object to a local scenario includes: receiving a request for newly creating an AI role object in a local scenario;
  • the scenario server acquires state information of the AI role object, including:
  • executing the one or more programs by one or more processors includes instructions for performing the following operations:
  • executing the one or more programs by one or more processors includes instructions for performing the following operations:
  • the feasibility of the action information is verified according to a preset rule. If the verification is passed, the normal role object corresponding to the role object identifier is controlled to perform an action corresponding to the action information.
  • executing the one or more programs by one or more processors includes instructions for performing the following operations:
  • the feasibility of the action information is verified according to a preset rule. If the verification is passed, the AI character object corresponding to the role object identifier is controlled to perform an action corresponding to the action information.
  • the verifying the feasibility of the action information according to a preset rule includes:
  • executing the one or more programs by one or more processors includes instructions for performing the following operations:
  • the role type of the first normal role object recorded locally is changed from the normal type to the AI type;
  • the role type of the locally recorded AI character object is modified from the AI type to the normal type.
  • the request for adding an AI character object to a local scene is received, the state information of the AI character object is obtained, the corresponding cache space is allocated for the AI character object, and the state information of the AI character object is stored in the cache space.
  • the AI character object can be added at any time, thereby improving the flexibility of scheduling the AI character object.
  • the device for managing the role object of the foregoing embodiment is only illustrated by the division of the above functional modules. In actual application, the function may be allocated according to needs. It is completed by different functional modules, that is, the internal structure of the device is divided into different functional modules to complete all or part of the functions described above.
  • the apparatus for managing the role object provided by the foregoing embodiment is the same as the method embodiment of the role object management, and the specific implementation process is described in detail in the method embodiment, and details are not described herein again.
  • a person skilled in the art may understand that all or part of the steps of implementing the above embodiments may be completed by hardware, or may be instructed by a program to execute related hardware, and the program may be stored in a computer readable storage medium.
  • the storage medium mentioned may be a read only memory, a magnetic disk or an optical disk or the like.

Landscapes

  • Engineering & Computer Science (AREA)
  • Multimedia (AREA)
  • Human Computer Interaction (AREA)
  • Information Transfer Between Computers (AREA)

Abstract

一种角色对象管理的方法,装置和服务器,所述角色对象管理的方法包括:接收将人工智能AI角色对象加入本地场景的请求(101),获取所述AI角色对象的状态信息(102);为所述AI角色对象分配对应的缓存空间,并在所述缓存空间中存储所述AI角色对象的状态信息(103)。采用所述角色对象管理的方法,装置和服务器,可以提高对AI角色对象进行调度的灵活性。

Description

一种角色对象管理的方法、装置和服务器
本申请要求于2013年12月3日提交中国专利局、申请号为201310643217.X、发明名称为“一种角色对象管理的方法和装置”的中国专利申请的优先权,其全部内容通过引用结合在本申请中。
技术领域
本发明涉及互联网技术领域,特别涉及一种角色对象管理的方法和装置。
背景技术
随着互联网技术的不断发展,互联网已经成为了人们生活和工作中非常重要的组成部分,随着互联网的普及,网络游戏得到了快速的推广,成为了人们主要的娱乐方式之一。
在网络游戏中,一般都会设置一个或多个场景,例如,角色扮演类游戏中的副本场景、野外场景等,棋牌类游戏中的桌面场景等。在场景中可以包括一个或多个角色对象(游戏人物),角色对象可以包括普通角色对象和AI(Artificial Intelligence,人工智能)角色对象。普通角色对象是由玩家控制的游戏人物。AI角色对象是由计算机采用人工智能方式控制的游戏人物。AI角色对象可以实现与玩家控制的普通角色对象的交互,如对话、对战、协作等,使网络游戏的内容更加丰富、更加多元化。
在实现本发明的过程中,发明人发现现有技术至少存在以下问题:
在现有技术中,AI角色对象是游戏的场景的一部分,在游戏的场景服务器中,诸如人物的等级、位置、血量等的AI角色对象的状态信息是固化在主程序中的。因为主程序是很难动态修改的,所以导致一些动态的AI角色对象调度方式无法实现,例如,动态添加新AI角色对象(即由管理人员或玩家用户随机请求添加AI角色对象),或在不同服务器之间动态迁移AI角色对象(即由管理人员或玩家用户随机请求对某AI角色对象进行任意目的地的迁移)等,这些调度方式都很难动态实现。从而,导致对AI角色对象的进行调度的灵活性较差。
发明内容
为了解决现有技术的问题,本发明实施例提供了一种角色对象管理的方法和装置,以提高对AI角色对象的进行调度的灵活性。所述技术方案如下:
一方面,提供了一种角色对象管理的方法,应用于服务器,所述服务器包括逻辑平台和场景服务器,所述逻辑平台通过所述场景服务器经由接口分别与客户端和人工智能AI处理平台连接,以及所述方法包括:
所述场景服务器接收将人工智能AI角色对象加入本地场景的请求;
所述场景服务器获取所述AI角色对象的状态信息;以及
所述场景服务器为所述AI角色对象分配对应的缓存空间,并在所述缓存空间中存储所述AI角色对象的状态信息。
另一方面,提供了一种角色对象管理的装置,应用于服务器,所述服务器还包括逻辑平台,所述逻辑平台通过所述场景服务器经由接口分别与客户端和人工智能AI处理平台连接,以及所述角色对象管理的装置包括:
接收模块,用于接收将人工智能AI角色对象加入本地场景的请求;
获取模块,用于获取所述AI角色对象的状态信息;
存储模块,用于为所述AI角色对象分配对应的缓存空间,并在所述缓存空间中存储所述AI角色对象的状态信息。
根据本发明的另一方面,提供了一种服务器,其包括逻辑平台和如上所述的角色对象管理的装置,其中,所述逻辑平台通过所述场景服务器经由接口分别与客户端和人工智能AI处理平台连接。
本发明实施例提供的技术方案带来的有益效果是:
本发明实施例中,接收将AI角色对象加入本地场景的请求,获取AI角色对象的状态信息,为AI角色对象分配对应的缓存空间,并在缓存空间中存储AI角色对象的状态信息。这样,在服务器的主程序运行过程中,可以随时对AI角色对象进行添加操作,从而,可以提高对AI角色对象进行调度的灵活性。
附图说明
为了更清楚地说明本发明实施例中的技术方案,下面将对实施例描述中所需要使用的附图作简单地介绍,显而易见地,下面描述中的附图仅仅是本发明的一些实施例,对于本领域普通技术人员来讲,在不付出创造性劳动的前提下,还可以根据这些附图获得其他的附图。
图1是本发明实施例提供的角色对象管理的方法流程图;
图2是本发明实施例提供的网络系统结构示意图;
图3是本发明实施例提供的角色对象管理的装置结构示意图;
图4是本发明另一实施例提供的角色对象管理的装置结构示意图;以及
图5是本发明实施例的服务器的结构示意图。
具体实施方式
为使本发明的目的、技术方案和优点更加清楚,下面将结合附图对本发明实施方式作进一步地详细描述。
实施例一
本发明实施例提供了一种角色对象管理的方法。该角色对象管理的方法可应用于服务器,所述服务器包括逻辑平台和场景服务器,所述逻辑平台通过所述场景服务器经由接口分别与客户端和人工智能AI处理平台连接。如图1所示,该方法的处理流程可以包括如下的步骤:
步骤101,场景服务器接收将AI角色对象加入本地场景的请求。
步骤102,场景服务器获取该AI角色对象的状态信息。
步骤103,场景服务器为该AI角色对象分配对应的缓存空间,并在缓存空间中存储该AI角色对象的状态信息。
本发明实施例中,场景服务器接收将AI角色对象加入本地场景的请求,获取该AI角色对象的状态信息,为该AI角色对象分配对应的缓存空间,并在缓存空间中存储该AI角色对象的状态信息。这样,在服务器的主程序运行过程中,可以随时对AI角色对象进行添加操作,从而,可以提高对AI角色对象进行调度的灵活性。
实施例二
本发明实施例提供了一种角色对象管理的方法,该方法的执行主体可以为服务器,该服务器可以是用于用户之间互动以及用户与计算机互动的网络应用后台的服务器,如网络游戏后台的服务器,本实施例以执行主体为网络游戏(如棋牌类游戏、角色扮演类游戏等)后台的场景服务器为例进行方案的详细说明,其它执行主体的情况下与此类似,本实施例中不再赘述。
在一个网络应用中,可以将用户能够控制角色对象进入的区域划分为多个场景,分别设置不同的场景服务器来管理。其中,场景服务器是用于对某个场景(如某个桌面场景、副本场景等)中的场景信息进行管理的服务器。场景信息是用于反映场景中(如牌桌中、副本中等)角色对象、环境等的状态、变化的信息,场景信息中包括角色对象的状态信息。
下面将结合具体实施方式,对图1所示的处理流程进行详细的说明,内容可以如下:
步骤101,场景服务器接收将AI角色对象加入本地场景的请求。
步骤102,场景服务器获取该AI角色对象的状态信息。
其中,角色对象是网络应用中的可以由用户或AI控制的人物或其它事物的统称,AI角色对象是由计算机采用人工智能方式控制的角色对象,普通角色对象是用户(网络应用的使用者,如游戏玩家)控制的角色对象。本地场景是本服务器所管理的场景。状态信息是用于描述某个角色对象属性的信息的总和,是场景信息中的一种,如棋牌类游戏中角色对象的状态信息可以包括手牌信息、级别信息、道具信息等,角色扮演类游戏中角色对象的状态信息可以包括外形信息、掌握技能信息、攻击力信息、防御力信息、级别信息等。
在实施中,请求将第一AI角色对象加入本地场景的情况可能有很多种,相应的获取第一AI角色对象的状态信息的方式可能也有所不同,以下给出了其中几种可能的情况下步骤101和102的处理过程:
情况一
当接收到将第一AI角色对象从其它服务器的场景迁移到本地场景的请求时,从该其它服务器为第一AI角色对象分配的缓存空间中,获取第一AI角色对象的状态信息。
在实施中,第一AI角色对象可以是某其它服务器对应的场景中的AI角色对象,在之前第一AI角色对象加入该其它服务器时,该其它服务器可以按照本发明实施例的处理流程,为第一AI角色对象分配缓存空间,并将第一AI角色对象的状态信息存储在为其分配的缓存空间中。在某些情况下,例如,管理人员或用户请求将第一AI角色对象从该其它服务器的场景迁移到本地场景中与用户互动,或者,第一AI角色对象在该其它服务器的场景中移动时,到达了该场景与本地场景的边界,需要进行场景切换,等等,这些情况下该其它服务器可以向本服务器发送迁移请求,用于请求将第一AI角色对象从其它服务器的场景迁移到本地场景,本地服务器接收到该请求时,可以向该其它服务器获取其中缓存的第一AI角色对象的状态信息。
情况二
当接收到在本地场景中新创建第一AI角色对象的请求时,获取该请求中携带的第一AI角色对象的状态信息。
在实施中,管理人员可以请求在某个场景中添加第一AI角色对象,在场景服务器开始运营之前,用户还不能通过客户端登陆场景服务器的阶段,这个阶段管理人员可以对场景服务器进行数据配置,例如创建若干个AI角色对象,或加载若干个预先配置好的AI角色对象。因此在场景服务器开始运营之前或在场景服务器运营过程中,管理人员可以通过其使用的管理终端,配置第一AI角色对象的状态信息,可以选择此第一AI角色对象的外形,输入其名称、血量、攻击力、防御力等信息,并点击确认添加此AI角色对象,这时,管理终端可以生成创建第一AI角色对象的请求,在其中携带此AI角色对象的状态信息,并将该请求发送给本场景服务器,本场景服务器接收该请求时,可以从该请求中获取第一AI角色对象的状态信息。
步骤103,场景服务器为AI角色对象分配对应的缓存空间,并在缓存空间中存储该AI角色对象的状态信息。
在实施中,场景服务器可以根据其载荷能力,预先设置一定数量的缓存空间,每个缓存空间用于分配给一个普通角色用户或AI角色对象,以存储相应角色对象的状态信息。场景服务器还可以维护一个缓存状态表,用于记录哪些缓存空间处于空闲状态,哪些缓存空间被使用。当某个AI角色对象或普 通角色对象加入本地场景时,可以在各个处于空闲状态的缓存空间中,选择一个缓存空间,分配给相应的AI角色对象或普通角色对象,将相应的状态信息存储到选择的缓存空间中。场景服务器还可以记录各角色对象与缓存空间地址的对应关系,以便于对各角色对象的状态信息的管理。
在场景服务器运营时,对场景信息进行维护管理的过程中,场景服务器会根据角色对象(普通角色用户或AI角色对象)的状态变化,对相应的缓存空间中的状态信息进行调整,例如,某AI角色对象受到伤害力为1的攻击且没有防御措施,那么,场景服务器就将该AI角色对象对应的缓存空间中的状态信息中的血量数值降低1。
这里,场景服务器对普通角色对象和AI角色对象的状态信息采用相同的管理方式。
在另一实施例中,根据本发明的角色对象管理的方法还可以包括以下步骤:
步骤104,所述场景服务器获取AI角色对象离开本地场景的请求。
步骤105,所述场景服务器删除缓存空间中存储的AI角色的状态信息。
在实施中,第一AI角色对象离开本地场景的情况有很多种可能。例如,一种情况是,将第一AI角色对象从本地场景迁移到某其它服务器的场景,该情况下,在此其它服务器从本场景服务器中获取第一AI角色对象的属性信息并存储在其自身的缓存空间中之后,本场景服务器可以对本地缓存空间中存储的第一AI角色对象的属性信息进行删除。还有一种情况是,管理人员请求取消第一AI角色对象,这时,服务器可以直接将第一AI角色对象的状态信息从缓存空间中删除。
本发明实施例中,可以设置独立的AI处理平台,用于处理AI角色对象的行为逻辑以对各AI角色对象进行控制。AI处理平台可以是上述场景服务器的一个模块,也可以是一个独立的服务器。
在场景信息发生变化时,场景服务器可以进行如下的处理:
步骤一,当场景信息发生变化时,确定发生变化的场景信息所对应的本地场景中的关联角色对象。
其中,关联角色对象可以是基于网络应用中的预设规则能够感知到上述发生变化的场景信息的角色对象,预设规则可以根据需求任意设置。
在实施中,用户通过客户端控制普通角色对象执行动作时,或AI处理平台控制AI角色对象执行动作时,则会触发场景信息发生变化,例如,用户控制某普通角色对象出“杀”牌,则会触发场景信息发生变化,其中包括该普通角色对象的状态信息发生变化(手牌少了一张“杀”牌),还包括桌面上多了一张“杀”牌,等。根据服务器中预先制定的场景变化规则,也可以触发场景信息发生变化,例如,预先设置每间隔20分钟在某指定位置掉落一颗炸弹,那么每到20分钟的时候,在该指定位置就会掉落一个炸弹,这时场景信息发生变化,其中包括环境信息的变化(生成一个炸弹)等。
在实施中,确定发生变化的场景信息所对应的关联角色对象的方法可以多种多样,例如,可以根据发生变化的场景信息的位置以及角色对象的视觉范围,确定视觉范围能包含该场景信息的角色对象,作为关联角色对象,又例如,可以针对特殊的事件(该事件发生即场景信息发生变化)预先设置对应的关联角色对象。
另外,服务器还根据发生变化的场景信息,确定受到影响需要随之发生变化的其它场景信息,并对此其它场景信息进行相应的调整。其他场景信息可以包括环境信息、角色对象的状态信息等。
步骤二,如果关联角色对象中包括普通角色对象,则向关联角色对象中的普通角色对象对应的客户端发送发生变化的场景信息的变化信息;如果关联角色对象中包括AI角色对象,则向AI处理平台发送发生变化的场景信息的变化信息和关联角色对象中包括AI角色对象的角色对象标识。
其中,变化信息可以是发生变化的场景信息变化后的数值,也可以是变化值,例如,某角色对象的原血量为3,变化后的血量为4,那么,此场景信息的变化信息可以是4也可以是增加1。
在实施中,场景服务器可以记录各普通角色对象与客户端的对应关系,如果关联角色对象中包括普通角色对象,可以根据该对应关系确定相应的普通角色对象对应的客户端,并向确定出的客户端发送上述变化信息,客户端可以根据此变化信息在其显示的场景中显示相应的动画效果,例如,面前的 房屋发生倒塌,用户看到场景发生变化后,可以判断自己需要作出的反应,如果决定需要进行某动作,可以进一步通过客户端向场景服务器发出动作请求。
在实施中,如果关联角色对象中包括AI角色对象,可以向AI处理平台发送处理请求,处理请求中携带上述变化信息和关联角色对象中包括的各AI角色对象的角色对象标识,AI处理平台中可以预先记录各AI角色对象对应的行为逻辑规则。该行为逻辑规则可以由AI处理平台根据AI角色对象所处的场景和状态等信息来确定,也可以由管理人员预先为AI角色对象指定。当接收到处理请求时,AI处理平台可以根据其中的角色对象标识查找对应的行为逻辑规则,并基于变化信息和查找到的行为逻辑规则,进行行为决策,如果决定需要进行某动作,则根据行为决策向服务器发送动作请求。在行为决策的过程中,如果根据逻辑规则,需要某些场景信息,可以向场景服务器获取相应的场景信息。
本发明实施例中,场景服务器在接收到客户端或AI处理平台发送的动作请求时,可以根据动作请求对相应的场景信息进行控制,处理过程可以如下:
情况一,当接收到客户端发送的携带有动作信息和角色对象标识的动作请求时,根据预设规则,验证动作信息的可行性,如果验证通过,则控制所述角色对象标识对应的普通角色对象执行动作信息对应的动作。
情况二,当接收到AI处理平台发送的携带有动作信息和角色对象标识的动作请求时,根据预设规则,验证所述动作信息的可行性,如果验证通过,则控制所述角色对象标识对应的AI角色对象执行所述动作信息对应的动作。
具体的,根据预设规则验证动作信息的可行性的处理过程可以如下:将动作请求发送给逻辑平台,并且逻辑平台根据其存储的预设规则,验证动作信息的可行性,并反馈验证结果。
其中,动作请求用于请求服务器控制角色对象执行某指定动作。预设规则可以是网络应用中基于自然规则和/或人为规定制定的基本行为规则。本发明实施例中,可以设置独立的逻辑平台,用于处理网络应用的基本逻辑,如判断某动作的执行是否可行,例如,某用户请求挪动某个箱子,而基于游戏 的预设规则,该箱子现在的状态是无法移动的,则判定拒绝该动作请求。逻辑平台可以是场景服务器的一个模块,也可以是一个独立的服务器。
在实施中,服务器接收到客户端或AI处理平台发送的动作请求后,可以将动作请求发送给逻辑平台,由逻辑平台根据预设规则验证动作请求中的动作信息的可行性,将验证结果反馈给服务器,服务器接收到的验证结果如果是通过,则控制相应的角色对象执行相应的动作,例如,出“杀”牌,使用某技能等,验证结果如果是不通过,则服务器可以拒绝该动作请求。执行相应的动作可以使场景信息发生变化,进而可以依据本实施例上面的方法进行变化信息的通知。
上述处理中,服务器对普通角色对象和AI角色对象的动作请求采用了相同的处理方式。
本发明实施例提供的网络系统结构示意图可以如图2所示。在该网络系统结构中,AI处理平台和逻辑平台是独立于场景服务器之外的服务器,这样,AI处理平台和逻辑平台可以为一台或多台场景服务器提供服务。
本发明实施例中,场景服务器可以记录本地缓存空间中存储有状态信息的各角色对象的角色类型,可以记录本地分配有缓存空间的AI角色对象的角色类型为AI类型,记录本地分配有缓存空间的普通角色对象的角色类型为普通类型。相应的,可以建立角色类型表,用于记录各角色的角色类型。基于上述的通过分配缓存空间来管理角色对象的状态信息的处理方式,以及场景服务器记录的各角色对象的角色类型,场景服务器可以按如下的方式实现普通角色对象和AI角色对象之间的转换。
当接收到将本地场景中的第一普通角色对象转换为AI角色对象的请求时,将本地记录的第一普通角色对象的角色类型由普通类型修改为AI类型。
在实施中,可以在客户端向用户提供智能托管功能,用户在客户端中操作启动智能托管功能时,可以触发客户端向场景服务器发送智能托管请求,场景服务器接收到智能托管请求后,可以在上述角色类型表中,将该客户端对应的普通角色对象的角色类型,由普通类型修改为AI类型。另外,场景服务器也可以根据预先制定的规则,在某个触发条件发生时,主动将某普通角 色对象转换为AI角色对象。
在另一种情况下,当接收到将本地场景中的AI角色对象转换为普通角色对象的请求时,将本地记录的AI角色对象的角色类型由AI类型修改为普通类型。
在实施中,当用户在客户端中操作结束智能托管时,可以触发客户端向场景服务器发送智能托管终止请求,场景服务器接收到智能托管终止请求后,可以在上述角色类型表中,将该客户端对应的普通角色对象的角色类型,由AI类型修改为普通类型。另外,场景服务器也可以根据预先制定的规则,在某个触发条件发生时,主动将某AI角色对象转换为普通角色对象。
本发明实施例中,场景服务器接收将AI角色对象加入本地场景的请求,获取该AI角色对象的状态信息,为该AI角色对象分配对应的缓存空间,并在缓存空间中存储该AI角色对象的状态信息。这样,在服务器的主程序运行过程中,可以随时对AI角色对象进行添加操作,从而,可以提高对AI角色对象进行调度的灵活性。
实施例三
基于相同的技术构思,本发明实施例还提供了一种角色对象管理的装置。该角色对象管理的装置应用于服务器,该服务器还包括逻辑平台,该逻辑平台通过所述场景服务器经由接口分别与客户端和人工智能AI处理平台连接。如图3所示,所述角色对象管理的装置包括:
接收模块310,用于接收将AI角色对象加入本地场景的请求;
获取模块320,用于获取所述AI角色对象的状态信息;以及
存储模块330,用于为所述AI角色对象分配对应的缓存空间,并在所述缓存空间中存储所述AI角色对象的状态信息。
在另一实施例中,获取模块320,还用于获取该AI角色对象离开所述本地场景的请求;以及该角色对象管理的装置进一步包括:删除模块340,用于删除所述缓存空间中存储的所述AI角色的状态信息。
在另一实施例中,所述接收模块310,进一步用于:接收将所述AI角色对象从其它服务器的场景迁移到本地场景的请求;以及所述获取模块320,进 一步用于:从所述其它服务器为所述AI角色对象分配的缓存空间中,获取所述AI角色对象的状态信息。
在另一实施例中,接收模块310,进一步用于:接收在本地场景中新创建所述AI角色对象的请求;以及所述获取模块320,进一步用于获取所述请求中携带的所述AI角色对象的状态信息。
优选的,所述装置还包括:
确定模块350,用于当场景信息发生变化时,确定发生变化的场景信息所对应的本地场景中的关联角色对象;以及
发送模块360,用于如果所述关联角色对象中包括普通角色对象,则向所述关联角色对象中的普通角色对象对应的客户端发送所述发生变化的场景信息的变化信息;如果所述关联角色对象中包括AI角色对象,则向AI处理平台发送所述发生变化的场景信息的变化信息和角色对象标识。角色对象标识用于所述关联角色对象中包括AI角色对象的。
在另一实施例中,所述接收模块,进一步用于:接收所述客户端发送的携带有动作信息和角色对象标识的动作请求;以及
所述装置还包括控制模块370,用于根据预设规则,验证所述动作信息的可行性,如果验证通过,则控制所述角色对象标识对应的普通角色对象执行所述动作信息对应的动作。
在可选的实施例中,所述接收模块,进一步用于接收AI处理平台发送的携带有动作信息和角色对象标识的动作请求;以及
所述装置还包括控制模块370,用于根据预设规则,验证所述动作信息的可行性,如果验证通过,则控制所述角色对象标识对应的AI角色对象执行所述动作信息对应的动作。
在另一实施例中,所述控制模块370,用于将所述动作请求发送给逻辑平台,并且所述逻辑平台根据其存储的预设规则,验证所述动作信息的可行性,并反馈验证结果。
在另一实施例中,所述装置还包括转换模块380,用于:
记录本地分配有缓存空间的AI角色对象的角色类型为AI类型,记录本地分配有缓存空间的普通角色对象的角色类型为普通类型;
当接收到将本地场景中的第一普通角色对象转换为AI角色对象的请求时,将本地记录的所述第一普通角色对象的角色类型由普通类型修改为AI类型;
当接收到将本地场景中的AI角色对象转换为普通角色对象的请求时,将本地记录的所述AI角色对象的角色类型由AI类型修改为普通类型。
本发明实施例中,角色对象管理的装置接收将AI角色对象加入本地场景的请求,获取AI角色对象的状态信息,为AI角色对象分配对应的缓存空间,并在缓存空间中存储AI角色对象的状态信息。这样,在服务器的主程序运行过程中,可以随时对AI角色对象进行添加操作,从而,可以提高对AI角色对象进行调度的灵活性。
实施例四
图4是本发明实施例中服务器(该服务器可以用作上述网络应用的场景服务器)的结构示意图。该服务器1900可因配置或性能不同而产生比较大的差异,可以包括一个或一个以上中央处理器(central processing units,CPU)1922(例如,一个或一个以上处理器)和存储器1932,一个或一个以上存储应用程序1942或数据1944的存储介质1930(例如一个或一个以上海量存储设备)。其中,存储器1932和存储介质1930可以是短暂存储或持久存储。存储在存储介质1930的程序可以包括一个或一个以上模块(图示没标出),每个模块可以包括对服务器中的一系列指令操作。更进一步地,中央处理器1922可以设置为与存储介质1930通信,在服务器1900上执行存储介质1930中的一系列指令操作。
服务器1900还可以包括一个或一个以上电源1926,一个或一个以上有线或无线网络接口1950,一个或一个以上输入输出接口1958,一个或一个以上键盘1956,和/或,一个或一个以上操作系统1941,例如Windows ServerTM,Mac OS XTM,UnixTM,LinuxTM,FreeBSDTM等等。
服务器1900可以包括有存储器,以及一个或者一个以上的程序,其中一个或者一个以上程序存储于存储器中,用于实现逻辑平台和场景服务器。,所述逻辑平台通过所述场景服务器经由输入输出接口1958分别与客户端和人工 智能AI处理平台连接。经配置以由一个或者一个以上处理器执行所述一个或者一个以上程序包含用于进行以下操作的指令,以实现场景服务器:
接收将AI角色对象加入本地场景的请求;
获取所述AI角色对象的状态信息;
为所述AI角色对象分配对应的缓存空间,并在所述缓存空间中存储所述AI角色对象的状态信息。
在一个实施例中,在所述场景服务器为所述AI角色对象分配对应的缓存空间,并在所述缓存空间中存储所述AI角色对象的状态信息之后,所述方法还包括:
所述场景服务器获取所述AI角色对象离开所述本地场景的请求;以及
所述场景服务器删除所述缓存空间中存储的所述AI角色的状态信息
在一个实施例中,所述接收将AI角色对象加入本地场景的请求,包括:
接收将AI角色对象从其它服务器的场景迁移到本地场景的请求;以及
所述场景服务器获取所述AI角色对象的状态信息,包括:
从所述其它服务器为所述AI角色对象分配的缓存空间中,获取所述AI角色对象的状态信息。
在一可选实施例中,所述接收将AI角色对象加入本地场景的请求,包括:接收在本地场景中新创建AI角色对象的请求;以及
所述场景服务器获取所述AI角色对象的状态信息,包括:
获取所述请求中携带的所述AI角色对象的状态信息。
在一个实施例中,由一个或者一个以上处理器执行所述一个或者一个以上程序包含用于进行以下操作的指令:
当场景信息发生变化时,确定发生变化的场景信息所对应的本地场景中的关联角色对象;
如果所述关联角色对象中包括普通角色对象,则向所述关联角色对象中的普通角色对象对应的客户端发送所述发生变化的场景信息的变化信息;
如果所述关联角色对象中包括AI角色对象,则向AI处理平台发送所述发生变化的场景信息的变化信息和角色对象标识,其中,所述角色对象标识用于表示所述关联角色对象中包括所述AI角色对象。
在一个实施例中,由一个或者一个以上处理器执行所述一个或者一个以上程序包含用于进行以下操作的指令:
接收客户端发送的携带有动作信息和角色对象标识的动作请求;以及
根据预设规则,验证所述动作信息的可行性,如果验证通过,则控制所述角色对象标识对应的普通角色对象执行所述动作信息对应的动作。
在一个可选实施例中,由一个或者一个以上处理器执行所述一个或者一个以上程序包含用于进行以下操作的指令:
接收AI处理平台发送的携带有动作信息和角色对象标识的动作请求;以及
根据预设规则,验证所述动作信息的可行性,如果验证通过,则控制所述角色对象标识对应的AI角色对象执行所述动作信息对应的动作。
在一个实施例,所述根据预设规则,验证所述动作信息的可行性,包括:
将所述动作请求发送给逻辑平台,以使所述逻辑平台根据其存储的预设规则,验证所述动作信息的可行性,并反馈验证结果。
在一个实施例,由一个或者一个以上处理器执行所述一个或者一个以上程序包含用于进行以下操作的指令:
记录本地分配有缓存空间的AI角色对象的角色类型为AI类型,记录本地分配有缓存空间的普通角色对象的角色类型为普通类型;
当接收到将本地场景中的第一普通角色对象转换为AI角色对象的请求时,将本地记录的所述第一普通角色对象的角色类型由普通类型修改为AI类型;
当接收到将本地场景中的AI角色对象转换为普通角色对象的请求时,将本地记录的所述AI角色对象的角色类型由AI类型修改为普通类型。
本发明实施例中,接收将AI角色对象加入本地场景的请求,获取AI角色对象的状态信息,为AI角色对象分配对应的缓存空间,并在缓存空间中存储AI角色对象的状态信息。这样,在服务器的主程序运行过程中,可以随时对AI角色对象进行添加操作,从而,可以提高对AI角色对象进行调度的灵活性。
需要说明的是:上述实施例提供的角色对象管理的装置在对角色对象的状态信息进行管理时,仅以上述各功能模块的划分进行举例说明,实际应用中,可以根据需要而将上述功能分配由不同的功能模块完成,即将装置的内部结构划分成不同的功能模块,以完成以上描述的全部或者部分功能。另外,上述实施例提供的角色对象管理的装置与角色对象管理的方法实施例属于同一构思,其具体实现过程详见方法实施例,这里不再赘述。
上述本发明实施例序号仅仅为了描述,不代表实施例的优劣。
本领域普通技术人员可以理解实现上述实施例的全部或部分步骤可以通过硬件来完成,也可以通过程序来指令相关的硬件完成,所述的程序可以存储于一种计算机可读存储介质中,上述提到的存储介质可以是只读存储器,磁盘或光盘等。
以上所述仅为本发明的较佳实施例,并不用以限制本发明,凡在本发明的精神和原则之内,所作的任何修改、等同替换、改进等,均应包含在本发明的保护范围之内。

Claims (19)

  1. 一种角色对象管理的方法,应用于服务器,其特征在于,所述服务器包括逻辑平台和场景服务器,所述逻辑平台通过所述场景服务器经由接口分别与客户端和人工智能AI处理平台连接,以及所述方法包括:
    所述场景服务器接收将AI角色对象加入本地场景的请求;
    所述场景服务器获取所述AI角色对象的状态信息;以及
    所述场景服务器为所述AI角色对象分配对应的缓存空间,并在所述缓存空间中存储所述AI角色对象的状态信息。
  2. 根据权利要求1所述的方法,其特征在于,在所述场景服务器为所述AI角色对象分配对应的缓存空间,并在所述缓存空间中存储所述AI角色对象的状态信息之后,所述方法还包括:
    所述场景服务器获取所述AI角色对象离开所述本地场景的请求;以及
    所述场景服务器删除所述缓存空间中存储的所述AI角色的状态信息。
  3. 根据权利要求1所述的方法,其特征在于,所述场景服务器接收将AI角色对象加入本地场景的请求,包括:
    接收将所述AI角色对象从其它服务器的场景迁移到本地场景的请求;以及
    所述场景服务器获取所述AI角色对象的状态信息,包括:
    从所述其它服务器为所述AI角色对象分配的缓存空间中,获取所述AI角色对象的状态信息。
  4. 根据权利要求1所述的方法,其特征在于,所述场景服务器接收将AI角色对象加入本地场景的请求,包括:
    接收在本地场景中新创建AI角色对象的请求;以及
    所述场景服务器获取所述AI角色对象的状态信息,包括:
    获取所述请求中携带的所述AI角色对象的状态信息。
  5. 根据权利要求1所述的方法,其特征在于,所述方法还包括:
    当场景信息发生变化时,确定发生变化的场景信息所对应的本地场景中的关联角色对象;
    如果所述关联角色对象中包括普通角色对象,则向所述关联角色对象中的所述普通角色对象对应的所述客户端发送所述发生变化的场景信息的变化信息;以及
    如果所述关联角色对象中包括AI角色对象,则向所述AI处理平台发送所述发生变化的场景信息的变化信息和角色对象标识,其中,所述角色对象标识用于表示所述关联角色对象中包括所述AI角色对象。
  6. 根据权利要求1所述的方法,其特征在于,所述方法还包括:
    所述场景服务器接收所述客户端发送的携带有动作信息和角色对象标识的动作请求;以及
    根据预设规则,验证所述动作信息的可行性,如果验证通过,则控制所述角色对象标识对应的普通角色对象执行所述动作信息对应的动作。
  7. 根据权利要求1所述的方法,其特征在于,所述方法还包括:
    所述场景服务器接收AI处理平台发送的携带有动作信息和角色对象标识的动作请求;以及
    根据预设规则,验证所述动作信息的可行性,如果验证通过,则控制所述角色对象标识对应的AI角色对象执行所述动作信息对应的动作。
  8. 根据权利要求6或7所述的方法,其特征在于,所述根据预设规则,验证所述动作信息的可行性,包括:
    将所述动作请求发送至所述逻辑平台,以使所述逻辑平台根据其存储的预设规则,验证所述动作信息的可行性,并反馈验证结果。
  9. 根据权利要求1所述的方法,其特征在于,所述方法还包括:
    记录本地分配有缓存空间的AI角色对象的角色类型为AI类型,记录本地分配有缓存空间的普通角色对象的角色类型为普通类型;
    当接收到将本地场景中的普通角色对象转换为AI角色对象的请求时,所述场景服务器将本地记录的所述普通角色对象的角色类型由普通类型修改为AI类型;以及
    当接收到将本地场景中的AI角色对象转换为普通角色对象的请求时,所述场景服务器将本地记录的所述AI角色对象的角色类型由AI类型修改为普通类型。
  10. 一种角色对象管理的装置,应用于服务器,其特征在于,所述服务器还包括逻辑平台,所述逻辑平台通过所述场景服务器经由接口分别与客户端和人工智能AI处理平台连接,以及所述角色对象管理的装置包括:
    接收模块,用于接收将AI角色对象加入本地场景的请求;
    获取模块,用于获取所述AI角色对象的状态信息;以及
    存储模块,用于为所述AI角色对象分配对应的缓存空间,并在所述缓存空间中存储所述AI角色对象的状态信息。
  11. 根据权利要求10所述的装置,其特征在于,所述获取模块,还用于获取所述AI角色对象离开所述本地场景的请求;以及
    所述装置进一步包括:删除模块,用于删除所述缓存空间中存储的所述AI角色的状态信息。
  12. 根据权利要求10所述的装置,其特征在于,所述接收模块,进一步用于:接收将所述AI角色对象从其它服务器的场景迁移到本地场景的请求;以及
    获取模块,进一步用于获取所述AI角色对象的状态信息。
  13. 根据权利要求10所述的装置,其特征在于,所述接收模块,进一步用于:接收在本地场景中新创建所述AI角色对象的请求;以及
    获取模块,进一步用于获取所述请求中携带的所述AI角色对象的状态信息。
  14. 根据权利要求10所述的装置,其特征在于,还包括:
    确定模块,用于当场景信息发生变化时,确定发生变化的场景信息所对应的本地场景中的关联角色对象;以及
    发送模块,用于如果所述关联角色对象中包括普通角色对象,则向所述关联角色对象中的所述普通角色对象对应的客户端发送所述发生变化的场景信息的变化信息;如果所述关联角色对象中包括AI角色对象,则向AI处理平台发送所述发生变化的场景信息的变化信息和角色对象标识,其中,所述角色对象标识用于表示所述关联角色对象中包括所述AI角色对象。
  15. 根据权利要求10所述的装置,其特征在于,所述接收模块,进一步 用于:
    接收所述客户端发送的携带有动作信息和角色对象标识的动作请求;以及
    所述装置进一步包括:控制模块,用于根据预设规则,验证所述动作信息的可行性,如果验证通过,则控制所述角色对象标识对应的普通角色对象执行所述动作信息对应的动作。
  16. 根据权利要求10所述的装置,其特征在于,所述接收模块,进一步用于:
    接收AI处理平台发送的携带有动作信息和角色对象标识的动作请求;以及
    所述装置进一步包括:控制模块,用于根据预设规则,验证所述动作信息的可行性,如果验证通过,则控制所述角色对象标识对应的AI角色对象执行所述动作信息对应的动作。
  17. 根据权利要求15或16所述的装置,其特征在于,所述控制模块,用于:
    将所述动作请求发送给逻辑平台,以使所述逻辑平台根据其存储的预设规则,验证所述动作信息的可行性,并反馈验证结果。
  18. 根据权利要求10所述的装置,其特征在于,还包括转换模块,用于:
    记录本地分配有缓存空间的AI角色对象的角色类型为AI类型,记录本地分配有缓存空间的普通角色对象的角色类型为普通类型;
    当接收到将本地场景中的普通角色对象转换为AI角色对象的请求时,将本地记录的所述普通角色对象的角色类型由普通类型修改为AI类型;
    当接收到将本地场景中的AI角色对象转换为普通角色对象的请求时,将本地记录的所述AI角色对象的角色类型由AI类型修改为普通类型。
  19. 一种服务器,其特征在于,所述服务器包括逻辑平台和如权利要求10-18中任一项所述的角色对象管理的装置,其中,所述逻辑平台通过所述场景服务器经由接口分别与客户端和人工智能AI处理平台连接。
PCT/CN2015/072098 2013-12-03 2015-02-02 一种角色对象管理的方法、装置和服务器 WO2015081907A1 (zh)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN201310643217.XA CN103678892A (zh) 2013-12-03 2013-12-03 一种角色对象管理的方法和装置
CN201310643217.X 2013-12-03

Publications (1)

Publication Number Publication Date
WO2015081907A1 true WO2015081907A1 (zh) 2015-06-11

Family

ID=50316422

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2015/072098 WO2015081907A1 (zh) 2013-12-03 2015-02-02 一种角色对象管理的方法、装置和服务器

Country Status (3)

Country Link
CN (1) CN103678892A (zh)
TW (1) TWI561287B (zh)
WO (1) WO2015081907A1 (zh)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113769408A (zh) * 2021-09-15 2021-12-10 网易(杭州)网络有限公司 游戏的数据处理方法、装置、电子设备及存储介质

Families Citing this family (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103678892A (zh) * 2013-12-03 2014-03-26 腾讯科技(成都)有限公司 一种角色对象管理的方法和装置
CN105031922B (zh) * 2015-07-07 2017-04-12 网易(杭州)网络有限公司 游戏数据的处理方法、游戏服务端及游戏客户端
CN105288998B (zh) 2015-09-23 2019-01-08 腾讯科技(深圳)有限公司 智能硬件的交互方法及装置
CN107103644B (zh) * 2017-04-21 2019-03-08 腾讯科技(深圳)有限公司 一种虚拟场景中对象的控制方法和装置
CN107890674A (zh) * 2017-11-13 2018-04-10 杭州电魂网络科技股份有限公司 Ai行为调用方法和装置
CN107930127B (zh) * 2017-11-28 2020-12-11 腾讯科技(上海)有限公司 游戏中实现团队转移场景的方法、装置、存储介质及设备
CN108057249B (zh) * 2017-11-29 2020-07-24 腾讯科技(成都)有限公司 一种业务数据处理方法和装置
CN108465242A (zh) * 2018-03-31 2018-08-31 丁超 网络游戏处理方法、装置及计算机存储介质
CN109960545B (zh) * 2019-03-29 2022-09-13 网易(杭州)网络有限公司 虚拟对象控制方法、系统、装置、介质及电子设备

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20040116186A1 (en) * 2002-12-13 2004-06-17 Kwang-Hyun Shim Distance based distributed online game server system
CN101169806A (zh) * 2007-09-28 2008-04-30 腾讯科技(深圳)有限公司 网络游戏系统中的角色数据管理装置和方法
CN102158524A (zh) * 2010-12-30 2011-08-17 北京像素软件科技股份有限公司 一种基于渲染的分布式行为控制系统
CN102215209A (zh) * 2010-04-07 2011-10-12 上海乐格网络科技有限公司 一种用于大型多人在线角色扮演的网络游戏引擎
CN103678892A (zh) * 2013-12-03 2014-03-26 腾讯科技(成都)有限公司 一种角色对象管理的方法和装置

Family Cites Families (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
EP1827633A2 (en) * 2004-11-18 2007-09-05 Turbo Squid, Inc. Method of dynamically modifying a computer game
CN100492382C (zh) * 2005-04-12 2009-05-27 国际商业机器公司 基于服务器/客户机的无缝游戏世界系统及其方法
CN1945588A (zh) * 2006-10-27 2007-04-11 北京金山软件有限公司 网络游戏系统及创建游戏元素的方法
US8570320B2 (en) * 2011-01-31 2013-10-29 Microsoft Corporation Using a three-dimensional environment model in gameplay
TW201309370A (zh) * 2011-08-25 2013-03-01 Moregeek Entertainment Inc 連線遊戲方法
CN102629302A (zh) * 2012-04-22 2012-08-08 盛绩信息技术(上海)有限公司 建立自创游戏的方法及系统

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20040116186A1 (en) * 2002-12-13 2004-06-17 Kwang-Hyun Shim Distance based distributed online game server system
CN101169806A (zh) * 2007-09-28 2008-04-30 腾讯科技(深圳)有限公司 网络游戏系统中的角色数据管理装置和方法
CN102215209A (zh) * 2010-04-07 2011-10-12 上海乐格网络科技有限公司 一种用于大型多人在线角色扮演的网络游戏引擎
CN102158524A (zh) * 2010-12-30 2011-08-17 北京像素软件科技股份有限公司 一种基于渲染的分布式行为控制系统
CN103678892A (zh) * 2013-12-03 2014-03-26 腾讯科技(成都)有限公司 一种角色对象管理的方法和装置

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113769408A (zh) * 2021-09-15 2021-12-10 网易(杭州)网络有限公司 游戏的数据处理方法、装置、电子设备及存储介质
CN113769408B (zh) * 2021-09-15 2024-05-10 网易(杭州)网络有限公司 游戏的数据处理方法、装置、电子设备及存储介质

Also Published As

Publication number Publication date
CN103678892A (zh) 2014-03-26
TWI561287B (en) 2016-12-11
TW201521845A (zh) 2015-06-16

Similar Documents

Publication Publication Date Title
WO2015081907A1 (zh) 一种角色对象管理的方法、装置和服务器
US11826656B2 (en) Latency compensation for interface type in emulation
US7984122B2 (en) Dedicated processor core request
US10279272B2 (en) Initiate events through hidden interactions
JP2019512804A (ja) リモートアクセスされるデータの効率的なライブマイグレーション
JP2022509882A (ja) 機械学習によって推進されるリソース配分
US10661169B1 (en) Game content playback
US20140380197A1 (en) System and Methods for Managing Distributed Physics Simulation of Objects in a Virtual Environment
CN112988400B (zh) 显存优化方法、装置、电子设备以及可读存储介质
WO2014194695A1 (en) Method and server for pvp team matching in computer games
US9722869B2 (en) Sharing an application configuration among social networks
US10807006B1 (en) Behavior-aware player selection for multiplayer electronic games
CN103150192B (zh) 一种基于网络游戏的副本加载方法和设备
Bhojan et al. CloudyGame: Enabling cloud gaming on the edge with dynamic asset streaming and shared game instances
US20120284651A1 (en) Persistent party rooms
CN113672757B (zh) 一种音频播放方法及装置
US10630497B2 (en) Communication middleware for managing multicast channels
JP2023541567A (ja) コンテンツオーケストレーション、管理及びプログラミングシステム
CN116510312A (zh) 一种云游戏多开实现方法、装置、设备及存储介质
US10917467B1 (en) Object subscription rule propagation
US9149725B2 (en) Method and server for PVP team matching in computer games
US9280384B2 (en) Method, server and system for processing task data
CN113157452B (zh) 应用服务请求方法、装置、计算机设备及存储介质
CN110652727A (zh) 呈现激励的分层游戏设计
JP2015525380A (ja) 持続的なパーティルーム

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 15725967

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

32PN Ep: public notification in the ep bulletin as address of the adressee cannot be established

Free format text: NOTING OF LOSS OF RIGHTS PURSUANT TO RULE 112(1) EPC (EPO FORM 1205A DATED 28.10.2016)

122 Ep: pct application non-entry in european phase

Ref document number: 15725967

Country of ref document: EP

Kind code of ref document: A1