WO2017084283A1 - 一种移动游戏的数据处理方法以及装置 - Google Patents

一种移动游戏的数据处理方法以及装置 Download PDF

Info

Publication number
WO2017084283A1
WO2017084283A1 PCT/CN2016/083157 CN2016083157W WO2017084283A1 WO 2017084283 A1 WO2017084283 A1 WO 2017084283A1 CN 2016083157 W CN2016083157 W CN 2016083157W WO 2017084283 A1 WO2017084283 A1 WO 2017084283A1
Authority
WO
WIPO (PCT)
Prior art keywords
data
data operation
target
expression
processed
Prior art date
Application number
PCT/CN2016/083157
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 腾讯科技(深圳)有限公司
Priority to KR1020177036599A priority Critical patent/KR102094066B1/ko
Priority to JP2017558652A priority patent/JP6755527B2/ja
Publication of WO2017084283A1 publication Critical patent/WO2017084283A1/zh
Priority to US15/714,225 priority patent/US10445103B2/en

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/30Interconnection arrangements between game servers and game devices; Interconnection arrangements between game devices; Interconnection arrangements between game servers
    • A63F13/35Details of game servers
    • A63F13/355Performing operations on behalf of clients with restricted processing capabilities, e.g. servers transform changing game scene into an encoded video stream for transmitting to a mobile phone or a thin client
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/44Arrangements for executing specific programs
    • 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/25Output arrangements for video game devices
    • 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/30Interconnection arrangements between game servers and game devices; Interconnection arrangements between game devices; Interconnection arrangements between game servers
    • A63F13/35Details of game servers
    • A63F13/358Adapting the game course according to the network or server load, e.g. for reducing latency due to different connection speeds between clients
    • 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/45Controlling the progress of the video game
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/44Arrangements for executing specific programs
    • G06F9/448Execution paradigms, e.g. implementations of programming paradigms
    • G06F9/4482Procedural
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/01Protocols
    • H04L67/131Protocols for games, networked simulations or virtual reality
    • AHUMAN NECESSITIES
    • A63SPORTS; GAMES; AMUSEMENTS
    • A63FCARD, BOARD, OR ROULETTE GAMES; INDOOR GAMES USING SMALL MOVING PLAYING BODIES; VIDEO GAMES; GAMES NOT OTHERWISE PROVIDED FOR
    • A63F2300/00Features of games using an electronically generated display having two or more dimensions, e.g. on a television screen, showing representations related to the game
    • A63F2300/50Features of games using an electronically generated display having two or more dimensions, e.g. on a television screen, showing representations related to the game characterized by details of game servers
    • A63F2300/55Details of game data or player data management
    • A63F2300/5526Game data structure
    • A63F2300/5533Game data structure using program state or machine event data, e.g. server keeps track of the state of multiple players on in a multiple player game

Definitions

  • the present invention relates to the field of Internet technologies, and in particular, to a data processing method and apparatus for a mobile game.
  • the current mobile game network architecture is usually a server connected to multiple clients, that is, one server can interact with multiple clients for game data. For example, if there are n clients to perform a mobile game at the same time, the server can transfer the game data of n clients in real time, so that each client can know the game data of other clients to each other, so as to facilitate n customers. The end can achieve the effect of playing games online at the same time.
  • the current network architecture of mobile games requires the server to understand every step performed by each client in real time, that is, each client needs to feed back each game step performed to the server, so that the server can respond according to the feedback from the client.
  • the step instructs the client to perform the next step, but for some steps that can be handled by the client itself, but also through the interaction with the server information, the server notifies the client to execute, it is obvious that such information interaction is redundant. of.
  • a large number of clients simultaneously play mobile games a large amount of redundant information interaction will occur at the same time, resulting in partial network bandwidth being occupied by these redundant information interactions, resulting in waste of network bandwidth and may even affect the mobile game network. Fluency.
  • Embodiments of the present invention provide a data processing method and apparatus for a mobile game, which can avoid waste of network bandwidth in the process of moving a game, so as to improve network fluency of the mobile game.
  • a first aspect of the present invention provides a data processing method for a mobile game, including:
  • the first data operation includes a display operation of the interface association information, and the interface association information includes at least one of progress information, associated animation information, and operation result information.
  • a second aspect of the present invention provides a data processing apparatus for a mobile game, including:
  • a state obtaining module configured to acquire a target running state that is currently triggered by the mobile game
  • a search module configured to search for at least one pending data operation involved in the target running state
  • a first determining execution module configured to determine, when the at least one data operation to be processed is a data operation to be processed belonging to a non-transmission type, the data operation to be processed belonging to the non-transmission type is determined as the first data operation, and Performing the first data operation on a local client of the mobile game;
  • the first data operation includes a display operation of the interface association information, and the interface association information includes at least one of progress information, associated animation information, and operation result information.
  • the data operation to be processed belonging to the non-transmission type may exist in the at least one data operation to be processed.
  • the client can determine the running state of the target to determine The operation that can be performed locally, so that the client can perform the first data operation on the local client without performing information interaction with the server, avoiding redundant information interaction, thereby avoiding waste of network bandwidth and improving mobile The network fluency of the game.
  • FIG. 1 is a schematic flow chart of a data processing method for a mobile game according to an embodiment of the present invention
  • FIG. 1a is a schematic flowchart of a monitoring process of a state machine according to an embodiment of the present invention
  • FIG. 2 is a schematic flowchart diagram of another data processing method for a mobile game according to an embodiment of the present invention
  • FIG. 3 is a schematic structural diagram of a data processing apparatus for a mobile game according to an embodiment of the present invention.
  • FIG. 4 is a schematic structural diagram of another data processing apparatus for a mobile game according to an embodiment of the present invention.
  • FIG. 5 is a schematic structural diagram of a second determining execution module according to an embodiment of the present disclosure.
  • FIG. 6 is a schematic structural diagram of another second determining execution module according to an embodiment of the present disclosure.
  • FIG. 7 is a schematic structural diagram of still another data processing apparatus for a mobile game according to an embodiment of the present invention.
  • the clients involved in the embodiments of the present invention may be running on, but not limited to, mobile phones, mobile computers, tablets, personal digital assistants (PDAs), media players, smart TVs, smart watches, smart phones. Game client on user equipment such as glasses and smart bracelets.
  • PDAs personal digital assistants
  • FIG. 1 is a schematic flowchart of a data processing method for a mobile game according to an embodiment of the present invention.
  • the method may include:
  • the data processing apparatus applied to a mobile game in the client may acquire, by using a preset state machine, a target running state that is currently triggered by the mobile game.
  • the target operating state may be one of at least one operating state set in advance according to rules of the mobile game
  • the preset at least one running state may include an active card initial state, a passive card initial state, a card selection state, a launching skill state, a carding state, and the like.
  • the state machine may be a Mealy state machine in a FSM (Finite State Machine), that is, the state machine may be a directed graph, and is composed of a group of nodes and a corresponding set of transfer functions.
  • the state machine "runs" by responding to a series of events, each event being within the control of a transfer function belonging to the "current" node, where the range of functions is a subset of the nodes; at least one of these nodes must It is the final state, and when it reaches the final state, the state machine stops.
  • FSM Finite State Machine
  • the data processing device may search for at least one to-be-processed data operation involved in the target running state.
  • the data processing device may further set at least one data operation to be processed for each operation state when the at least one operating state is preset, and the type of the data operation to be processed may be classified into a non-transmission type and a transmission.
  • the data operation of the non-transmission type is specifically a data operation that can be performed by the client and does not need to perform data interaction with the server.
  • the data operation of the transmission type is specifically a data operation that requires data interaction with the server. .
  • the at least one to-be-processed data operation involved in the active card initial state may include: “Notification UI (User Interface) displays a card progress bar”;
  • the at least one data operation to be processed may include: “notifying the UI to display the card animation”, “sending the game data corresponding to the card process to the server”; wherein “the notification UI displays the card progress bar” and “notifying the UI display”
  • the card-out animation is a non-transfer type of pending data operation, and the "send game data corresponding to the card-out process to the server” is a transmission type of pending data operation; wherein the initial card-off initial state may be through a server
  • the trigger information is triggered by the sending of the trigger information, and the trigger information is generated by the server when detecting that the client enters the active card round.
  • the card status may be determined by the client according to the user.
  • the execution of the card click operation is triggered.
  • the data processing apparatus detects that the data operation to be processed belonging to the non-transmission type exists in the at least one data to be processed operation, it indicates that the presence in the target operation state may be
  • the client performs a self-determination and does not need to perform data interaction with the server, so the data processing device may determine the data operation to be processed belonging to the non-transmission type as the first data operation, and
  • the local client of the mobile game performs the first data operation.
  • the first data operation includes a display operation of the interface association information, and the interface association information includes at least one of progress information, associated animation information, and operation result information.
  • the data processing apparatus may actively notify the UI to display a card progress bar, that is, the data processing apparatus may perform a display operation on the progress information, since the server does not need to send a notification message to the client to notify the The client displays a card progress bar, so redundant information interaction can be reduced.
  • the first data operation may further include a local logical operation operation that does not need to perform data interaction, where the local logical operation operation specifically refers to being executable by the local client without being processed and notified by the server.
  • Logical operation when the user clicks and selects a certain card in the local client, the data processing device can acquire the current target running state as the card selection state, and therefore, the data processing device can Performing, in the local client, the local logical operation involved in the card-selecting state, where the local logical operation is specifically: according to the attack distance of the card and the character of the local client and the character of the other client The character distance, analyzes the character who can be attacked by the card, and grays out the avatar of the person character that cannot be attacked by the card, since the analysis of the character attack distance association information by the server is not required to be sent to The local client does not need to notify the local client to perform graying processing on the avatar of the persona, so the number of information interactions can be effectively reduced.
  • the second data operation refers to an operation of transmitting game data between the client and the server, specifically, may be divided into a receiving operation on game data and a game data Send operation.
  • FIG. 1 is a schematic flowchart of a monitoring process of a state machine according to an embodiment of the present invention.
  • the state machine in FIG. 1a is applied to a card game, and the state machine shown in FIG. 1a is specifically activated.
  • the card process is an example.
  • the state machine in Figure 1a can be checked in real time. Detecting whether the client enters the active card release phase or the passive card release phase, and if the client is detected to enter the active card release phase, the state machine may determine that the current target operational state is the active card initial state, if detected When the client enters the passive carding phase, the state machine may determine that the current target operating state is the passive carding initial state.
  • the data processing device may actively perform the first data operation involved in the initial carding initial state ("Notifying the UI to display the card progress bar"
  • the state machine continues to detect whether the user activates the skill.
  • the state machine can jump the current target running state to the skill selection state, so that the data processing device can actively execute the The first data operation involved in the skill selection state ("Notification UI triggers skill selection”); when the user chooses not to launch the skill, the state machine continues to detect whether the user selects a hand, and if the user clicks on the hand, the The state machine can jump the current target running state to the card selection state, so that the data processing apparatus can actively execute the plurality of first data operations involved in the card-setting state ("initialize hand”, “notify UI” Trigger point player card, "determine whether the card selection is legal”, “determine the attack distance according to the selection card”, “notify the UI according to the attack distance The state machine continues to detect whether the user selects a target (the target may be a character of another client or a hand of another client), and if the user clicks on the selected target, the state machine Re-jumping the current target running state to the target selecting state, so that the data processing
  • a target the target may be
  • the data processing device may also perform a second data operation involved in the card-playing state by data interaction with the server ("the card-out process The corresponding game data is sent to the server"). After the state machine detects the user's fold click operation, the state machine will end the state monitoring for the current round.
  • the data operation to be processed belonging to the non-transmission type may exist in the at least one data operation to be processed.
  • the client can determine the running state of the target to determine Currently executable locally Operation, so that the client can perform the first data operation on the local client without interacting with the server, avoiding redundant information interaction, thereby avoiding waste of network bandwidth and improving network fluency of the mobile game.
  • FIG. 2 is a schematic flowchart of another data processing method for a mobile game according to an embodiment of the present invention.
  • the method may include:
  • the data processing apparatus applied to a mobile game in the client may respectively set corresponding object identifiers for all element objects in the mobile game by using a preset skill manager, and declare each element object and each object.
  • the mapping relationship between the identifiers is obtained, so that the data processing apparatus can obtain the object identifier corresponding to the element object according to the declared mapping relationship, or parse the element object corresponding to the object identifier.
  • the specific way of declaring the mapping relationship is: declaring the mapping relationship between the element object and each object identifier by means of pre-compilation template specialization, which provides the possibility of automatic creation of the skill.
  • the element object may include card content, skill content, game character, and the like.
  • the specific process of setting the object identifier and declaring the mapping relationship by the skill manager can be divided into three parts, for example:
  • the first step is to define the skill ID and attack distance in the CSkilldata.h file.
  • the second step is to generate a skill sequence in the CSkilldata.h file (that is, by setting the class name to associate the object identifier with the attack distance of the element object)
  • Step 3 Add a declaration of the skill constructor template class in SkillCreatorFactory.h. Since the class of the set element object includes the mapping relationship between the element object and the object identifier, the mapping relationship between the element object and the attack distance, and the mapping relationship between the object identifier and the attack distance of the element object, after the class of the element object is declared, When a class name is called, each mapping relationship corresponding to the class name is obtained, so that the client can obtain the object identifier and the attack distance of the element object by calling the class name of the element object.
  • the skill manager After the skill manager declares various names, it can also be used to manage the life cycle of each element object, that is, the skill manager can supervise all the cards owned by the client in the game process. Processing, the supervision process includes at least one of a creation process, a logic process, and a deletion process.
  • the skill manager may create a usage parameter of the card (the usage parameter includes an object identifier and an attack distance obtained according to the card class name),
  • the card may be subjected to corresponding logic processing (the logic processing is specifically to adjust the state of the area where the card is located); when the card is played or When the card is folded, the card can be deleted, that is, the skill manager no longer supervises the card.
  • the regular expression rule may also be set; the regular expression rule may refer to some specific characters defined in advance, and the specific characters. Combine to form a "rule string", which is used to express a filtering logic for strings.
  • the regular expression rule may include a card wildcard rule and an optional target wildcard rule
  • the card wildcard rule is:
  • the constants include:
  • the aggregate mark boundary symbol is ⁇ >. When it is empty, it means arbitrary and is not bound by the aggregate.
  • the element is indexed by a constant, and the range of points is 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13;
  • the logical function pair may be generated according to the card wildcard rule.
  • the optional target wildcard rule is:
  • [target wildcard]--- indicates logical OR, one of two conditions can be satisfied;
  • the distance when the distance is a positive number, it indicates a physical distance; when the distance is a negative number, it indicates an attack distance; if the distance is 0 or not, it means that there is no distance constraint.
  • the logical expression corresponding to the logical function of the element object may include an optional card expression and/or an optional target expression, and the optional card expression is generated according to the card wildcard rule, and
  • the optional card expression represents a card range selectable by the logic function; the selectable target expression is generated according to the selectable target wildcard rule, and the selectable target expression represents The target person character that can be selected by the logic function.
  • the data processing device may generate according to the game data corresponding to the user operation (the game data includes a skill selected by the user or a card selected by the user or a target person selected by the user).
  • An operation expression may include a selected card expression and/or a selected target expression, and the selected card expression may be generated according to the card wildcard rule, the selected card
  • the card expression represents the card information selected by the user, and the selected card expression may also carry an object identifier of the skill selected by the user; the selected target expression may be according to the optional target wildcard rule Generated, and the selected target expression represents a target person character selected by the user.
  • S203 Set at least one running state according to the rule of the mobile game, and configure at least one to-be-processed data operation for each running state.
  • the steps S203 and S201-S202 are in no particular order, and the steps S201-S203 are preset processes.
  • the data processing apparatus may set at least one operating state according to the rules of the mobile game, and configure at least one pending data operation for each operating state; wherein at least one target operating state is present in the at least one operating state Triggered by the local client in sequence according to user operations, or at least one target running state exists in the at least one operating state It is triggered by the server sending a trigger message.
  • the preset at least one running state may include an active card initial state, a passive card initial state, a card selection state, a launching skill state, a carding state, and the like.
  • the type of the to-be-processed data operation may be classified into a non-transmission type and a transmission type; the non-transmission type to-be-processed data operation specifically refers to a data operation that can be performed by the client autonomously and does not need to perform data interaction with the server, and transmits A type of pending data operation specifically refers to a data operation that requires data interaction with a server.
  • the at least one to-be-processed data operation involved in the active card initial state may include: “notifying the UI to display the card progress bar”; and at least one to-be-processed data involved in the card-playing state
  • the operation may include: “notifying the UI to display the card animation”, “sending the game data corresponding to the card issuing process to the server”; wherein “the notification UI displays the card progress bar” and “notifying the UI display card animation” are non-operations
  • the data type pending data operation, "send the game data corresponding to the card-out process to the server” is a data type pending data operation; wherein the active card initial state may be triggered by the server sending the trigger information.
  • the trigger information is generated by the server when detecting that the client enters the active card round in turn; the card release status may be triggered by the client according to the user's card click operation. implemented.
  • the data processing apparatus may determine the data operation to be processed belonging to the transmission type as the second data operation, and perform the second data operation by data transmission with the server.
  • the second data operation may be specifically divided into a receiving operation on the game data and a sending operation on the game data, wherein the game data is formed according to a regular expression rule; the game data includes an operation expression or a logical expression formula.
  • the The second data operation is a sending operation of the game data
  • the specific process of performing the second data operation by data transmission with the server may be: generating the user operation corresponding according to a regular expression rule
  • An operation expression comprising: an object identifier of a target element object involved in the user operation; sending the operation expression to a server to cause the server to acquire a logical function of the target element object, And sending a logical expression corresponding to the logical function to the target client; the logical expression is formed according to a regular expression rule, and includes an object identifier of at least one element object associated with the logical function.
  • the data processing device may generate an operation expression corresponding to the user operation, and send the operation expression.
  • the operational expression may include a selected card expression and a selected target expression, and the selected card expression may be generated according to the card wildcard rule described above, the selected card
  • the expression represents information of the card A selected by the user (ie, the object identifier corresponding to the card A), and the selected target expression may be generated according to the optional target wildcard rule described above, and the selected target expression
  • the information indicating the target person character B selected by the user ie, the object identifier corresponding to the target person character B).
  • the second data operation when there is a data operation to be processed belonging to the transmission type in the at least one data to be processed, when it is further detected that the target operation state is triggered by the server, the second data operation may be determined to be the a receiving operation of the game data, the specific process of performing the second data operation by data transmission with the server may be: receiving a logical expression corresponding to a logical function of the target element object sent by the server; The logical expression is constructed according to a regular expression rule and includes an object identifier of at least one element object associated with the logic function; parsing an object identifier in the logical wildcard expression to identify a Target element object Logic functions and perform operations that conform to the logic functions described.
  • the server when the other client selects the persona of the local client and plays the card A, the server will send the logical expression corresponding to the logic function of the card A to the local client.
  • the logical expression may include an optional card expression generated according to the card wildcard rule described above, and the optional card expression represents the logic of the card A a range of cards that can be selected by the function; after receiving the logical expression, the local client can parse the optional card expression in the logical expression to obtain the logical function of the card A, so that The local client can select a valid card based on the range of cards that can be selected by the logical function of card A.
  • the data processing apparatus may analyze that "2-2" refers to selecting two cards according to the above-mentioned card wildcarding rule, and "1: # ⁇ 1, 2>” refers to selecting different black colors.
  • the card, "5:! ⁇ 103>” means that the selected card cannot be the card numbered 103, so that the card function of the card A can select the card range as "specify two different cards”. Black card, and cannot be a card numbered 103.”
  • cocos2d-x-UFO is based on the UFO engine and incorporates cocos2d-x (open source mobile) 2D game framework) excellent features, such as skeletal animation, particle effects, FBO off-screen rendering, Shader (shader), motion assembler, Scud, incremental upgrade and other excellent functional modules.
  • cocos2d-x-UFO is cross-platform and can cover platforms such as iOS, Android, Symbian, Win32, WP7, Bada, and iMac.
  • the data interaction between the server and each client is based on the transmission of the operation expression or the logical expression, and the operation expression and the logical expression are both identified by a preset object.
  • the composition and the object identifier have certain versatility, that is, the client of each platform can identify the object identifier, thereby further improving the implementability of cross-platform integration.
  • the operation expression and the logical expression occupy relatively small capacity, network packet traffic can be saved by transmitting the operation expression or the logical expression; and because all cards, Skills and heroes are set as object identifiers, so when adding new element objects, you only need to configure the object identifier of the new element object in the client and server, and configure the logical function of the new element object in the server.
  • the logical expression can realize the adaptive effect of the new element object, thus avoiding a large number of modification of the copy relationship between the new element object and the existing element object in the client, thereby greatly reducing the manpower of the project. Cost, shortened the development cycle of skills.
  • the data processing apparatus may further preset a relationship listening queue based on an MVC (Model View Controller) model, where the relationship listening queue includes the at least one running state and all the element objects A mapping relationship between each of the interfaces associated with the mobile game; an operational state corresponding to an interface association information, and an element object corresponding to an interface association information.
  • the data processing apparatus may aggregate the at least one running state and the all element objects into one component by an MVC model to be separated from all interface association information, so that when the interface association information is modified, the At least one running state and all the pairs of elements need only modify the mapping relationship in the relationship listening queue.
  • MVC Model View Controller
  • the step of performing the first data operation on the local client of the mobile game may include: acquiring an interface association having a mapping relationship with the target running state according to the preset relationship monitoring queue Information and/or interface association information having a mapping relationship with the target element object, and displaying the acquired interface association information in a user interface of the local client; the target element object is in the target running state
  • the triggered element object that is, the element object that is manipulated by the user.
  • the data processing apparatus may create an Observer interface and an Observable class, because a mapping relationship refers to a mapping relationship between an operating state and an interface association information or a mapping relationship between an element object and an interface association information.
  • a mapping relationship refers to a mapping relationship between an operating state and an interface association information or a mapping relationship between an element object and an interface association information.
  • the mapping relationship between the at least one running state and all the element objects and all the interface related information in the mobile game can be registered in the relationship listening queue of the Observable class, that is, all The Observer interface is registered in the relational listening queue of the Observable class.
  • the data operation to be processed belonging to the non-transmission type may exist in the at least one data operation to be processed.
  • the client can determine the running state of the target to determine The operation that can be performed locally, so that the client can perform the first data operation on the local client without performing information interaction with the server, avoiding redundant information interaction, thereby avoiding waste of network bandwidth and improving mobile Network fluency of the game; and, since the data interaction between the server and each client is based on the transmission of the operation expression or the logical expression, and the operation expression and the
  • the logical expressions are all composed of preset object identifiers, and the object identifiers have certain versatility, that is, the clients of various platforms can identify the object identifiers, thereby further improving cross-platform integration.
  • FIG. 3 is a schematic structural diagram of a data processing apparatus for a mobile game according to an embodiment of the present invention.
  • the data processing apparatus 1 may be applied to a client, and the data processing apparatus 1 may include: a state acquiring module 10, The search module 20, the first determining execution module 30;
  • the state obtaining module 10 is configured to acquire a target running state that is currently triggered by the mobile game
  • the state obtaining module 10 may acquire, by using a preset state machine, a target running state that is currently triggered by the mobile game.
  • the target running state may be one of at least one operating state set in advance according to the rules of the mobile game.
  • the preset at least one running state may include an initial playing card. Status, passive initial status, card selection status, starting skill status, playing status, etc.
  • the state machine may be a Mealy state machine in the FSM, that is, the state machine may be a directed graph, and is composed of a group of nodes and a corresponding set of transfer functions.
  • the state machine "runs" by responding to a series of events, each event being within the control of a transfer function belonging to the "current" node, where the range of functions is a subset of the nodes; at least one of these nodes must It is the final state, and when it reaches the final state, the state machine stops.
  • the searching module 20 is configured to search for at least one to-be-processed data operation involved in the target running state
  • the searching Module 20 may look up at least one pending data operation involved in the target operational state.
  • at least one data operation to be processed may be separately set for each operating state, and the type of the data operation to be processed may be classified into a non-transmission type and a transmission type;
  • the data operation to be processed specifically refers to a data operation that can be performed by the client autonomously and does not need to perform data interaction with the server.
  • the data operation of the transmission type to be processed specifically refers to a data operation that requires data interaction with the server.
  • the at least one to-be-processed data operation involved in the active card initial state may include: “notifying the UI to display the card progress bar”; and at least one to-be-processed data involved in the card-playing state
  • the operation may include: “notifying the UI to display the card animation”, “sending the game data corresponding to the card issuing process to the server”; wherein “the notification UI displays the card progress bar” and “notifying the UI display card animation” are non-operations
  • the data type pending data operation, "send the game data corresponding to the card-out process to the server” is a data type pending data operation; wherein the active card initial state may be triggered by the server sending the trigger information.
  • the trigger information is generated by the server when detecting that the client enters the active card round in turn; the card release status may be triggered by the client according to the user's card click operation. implemented.
  • the first determining execution module 30 is configured to determine, when the at least one data to be processed operation is a data operation to be processed that belongs to a non-transmission type, the data operation to be processed belonging to the non-transmission type is determined as the first data. Operating and performing the first data operation on a local client of the mobile game;
  • the first determination execution module 30 may determine the pending data operation belonging to the non-transmission type as the first data operation, and execute the local client in the mobile game.
  • the first data operation is described.
  • the first data operation includes a display operation of the interface association information, and the interface association information includes at least one of progress information, associated animation information, and operation result information.
  • the first determining execution module 30 may actively notify the UI to display a card progress bar, that is, the first determining execution module. 30 can display the progress information. Since there is no need to send a notification message to the client by the server to notify the client to display the card progress bar, redundant information interaction can be reduced.
  • the first data operation may further include a local logical operation operation that does not need to perform data interaction, where the local logical operation operation specifically refers to being executable by the local client without being processed and notified by the server.
  • Logical operation For example, when the user clicks on a card in the local client, the first determination execution module 30 can obtain the current target running state as the card selection state. Therefore, the data is The processing device 1 may perform a local logical operation operation involved in the card selection state on the local client, where the local logical operation operation is specifically: according to the attack distance of the card and the character of the local client and other clients.
  • the character distance of the character of the character analyzes the character who can be attacked by the card, and grays out the avatar of the character who cannot be attacked by the card, because there is no need for the attack distance of the character analyzed by the server
  • the association information is sent to the local client, and the local client is not required to notify the local client to perform graying processing of the character's avatar, so the number of information interactions can be effectively reduced.
  • the data operation to be processed belonging to the non-transmission type may exist in the at least one data operation to be processed.
  • the client can determine the running state of the target to determine The operation that can be performed locally, so that the client can perform the first data operation on the local client without performing information interaction with the server, avoiding redundant information interaction, thereby avoiding waste of network bandwidth and improving mobile The network fluency of the game.
  • FIG. 4 is a schematic structural diagram of another data processing apparatus for a mobile game according to an embodiment of the present invention.
  • the data processing apparatus 1 may be applied to a client, and the data processing apparatus 1 may include the foregoing implementation of FIG.
  • the data processing device 1 may further include: a first setting module 40, a second setting module 50, and a third setting module 60. a second determining execution module 70;
  • the first setting module 40 is configured to separately set a corresponding object identifier for all element objects in the mobile game
  • the first setting module 40 is further configured to declare a mapping relationship between each element object and each object identifier, and set a regular expression rule, so as to subsequently generate the foregoing according to the mapping relationship and the regular expression rule. Manipulating an expression or parsing the logical expression;
  • the first setting module 40 may separately set corresponding object identifiers for all element objects in the mobile game by using a preset skill manager, and declare a mapping relationship between each element object and each object identifier.
  • the specific way of declaring the mapping relationship is: declaring the mapping relationship between the element object and each object identifier by means of pre-compilation template specialization, which provides the possibility of automatic creation of the skill.
  • the element object may include card content, skill content, game character, and the like.
  • the specific process of setting the object identifier and declaring the mapping relationship by the skill manager can be divided into three parts, for example:
  • the first step is to define the skill ID and attack distance in the CSkilldata.h file.
  • the second step is to generate a skill sequence in the CSkilldata.h file (that is, by setting the class name to associate the object identifier with the attack distance of the element object)
  • Step 3 Add a declaration of the skill constructor template class in SkillCreatorFactory.h. Because the class of the set element object includes the mapping relationship between the element object and the object identifier, the element object and the attack The mapping relationship between the distance mapping relationship, the object identifier, and the attack distance of the element object. Therefore, after the class of the element object is declared, each mapping relationship corresponding to the class name can be obtained when the class name is called, so that the The data processing apparatus 1 acquires the object identification and attack distance of the element object by calling the class name of the element object.
  • the skill manager After the skill manager declares various names, it can also be used to manage the life cycle of each element object, that is, the skill manager can supervise all the cards owned by the client in the game process. Processing, the supervision process includes at least one of a creation process, a logic process, and a deletion process.
  • the skill manager may create a usage parameter of the card (the usage parameter includes an object identifier and an attack distance obtained according to the card class name),
  • the card may be subjected to corresponding logic processing (the logic processing is specifically to adjust the state of the area where the card is located); when the card is played or When the card is folded, the card can be deleted, that is, the skill manager no longer supervises the card.
  • the regular expression rule may also be set; the regular expression rule may refer to some specific characters defined in advance, and the specific A combination of characters that form a "rule string" that is used to express a filtering logic for a string.
  • the regular expression rule may include a card wildcard rule and an optional target wildcard rule
  • the card wildcard rule is:
  • the constants include:
  • the aggregate mark boundary symbol is ⁇ >. When it is empty, it means arbitrary and is not bound by the aggregate.
  • the element is indexed by a constant, and the range of points is 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13;
  • an optional card corresponding to the logical function may be generated according to the card wildcard rule.
  • the optional target wildcard rule is:
  • [target wildcard]--- indicates logical OR, one of two conditions can be satisfied;
  • the distance when the distance is a positive number, it indicates a physical distance; when the distance is a negative number, it indicates an attack distance; if the distance is 0 or not, it means that there is no distance constraint.
  • the logical expression corresponding to the logical function of the element object may include an optional card expression and/or an optional target expression, and the optional card expression is generated according to the card wildcard rule, and
  • the optional card expression represents a card range selectable by the logic function; the selectable target expression is generated according to the selectable target wildcard rule, and the selectable target expression represents The target person character that can be selected by the logic function.
  • the data processing apparatus 1 may generate, according to the game data corresponding to the user operation (the game data includes a skill selected by the user or a card selected by the user or a target person selected by the user), when the skill is generated or the card is played.
  • the operational expression may include a selected card expression and/or a selected target expression, the selected card expression may be generated according to the card wildcard rule, the selected The card expression represents card information selected by the user, and the selected card expression may further carry an object identifier of the skill selected by the user; the selected target expression may be wild according to the optional target A rule is generated, and the selected target expression represents a target persona selected by the user.
  • the second setting module 50 is configured to set at least one running state according to the rules of the mobile game, and configure at least one to-be-processed data operation for each running state;
  • the execution time of the second setting module 50 and the first setting module 40 may be in no particular order.
  • the second setting module 50 may set at least one running state according to the rules of the mobile game, and configure at least one to-be-processed data operation for each running state; wherein at least one target running exists in the at least one running state The state is triggered by the local client according to the user operation, or the presence of at least one target running state in the at least one running state is triggered by the server by sending the trigger information.
  • the preset at least one running state may include an active card initial state, a passive card initial state, a card selection state, a launching skill state, a carding state, and the like.
  • the type of the to-be-processed data operation may be classified into a non-transmission type and a transmission type; the non-transmission type to-be-processed data operation specifically refers to a data operation that can be performed by the client autonomously and does not need to perform data interaction with the server, and transmits A type of pending data operation specifically refers to a data operation that requires data interaction with a server.
  • the at least one pending data operation involved in the initial state of the card release may include: “notifying the UI to display the card progress bar”; the at least one to-be-processed data operation involved in the card-out state may include: “Notifying the UI to display the card "Animation”, "send game data corresponding to the card-out process to the server”; wherein “notification UI displays card progress bar” and “notification UI display card animation” are non-transfer type pending data operations, "will The game data corresponding to the card-issuing process is sent to the server for operation of the data to be processed of the transmission type; wherein the initial state of the active card is triggered by the server sending the trigger information, and the trigger information is generated by the server The check is generated when it is detected that the client enters the active card round; the card state may be triggered by the client according to the user's card click operation.
  • the third setting module 60 is configured to set a relationship listening queue based on the MVC model, where the relationship listening queue includes the at least one running state and the all element objects are respectively associated with all interface related information in the mobile game Mapping relationship; an operating state corresponds to an interface association information, and an element object corresponds to an interface association information;
  • the first determining execution module 30 is configured to acquire, according to the preset relationship monitoring queue, interface association information that has a mapping relationship with the target running state, and/or an interface association that has a mapping relationship with the target element object. And displaying the acquired interface association information in a user interface of the local client; the target element object is an element object that is triggered in the target running state;
  • the third setting module 60 can create an Observer interface and an Observable class, because a mapping relationship refers to a mapping relationship between an operating state and an interface association information or a mapping between an element object and an interface association information. Corresponding to an Observer interface, so that the mapping relationship between the at least one running state and all the interface objects and all interface association information in the mobile game can be registered in the relationship listening queue of the Observable class. All Observer interfaces are registered in the relationship listening queue of the Observable class.
  • the third setting module 60 may aggregate the at least one running state and the all element objects into one component through an MVC model to be separated from all interface association information, so that when the interface association information is modified, there is no need to rewrite The at least one running state and the all pairs of elements only need to modify the mapping relationship in the relationship listening queue.
  • the second determining execution module 70 is configured to exist in the at least one data to be processed operation When the data to be processed belongs to the transmission type, the data operation to be processed belonging to the transmission type is determined as the second data operation, and the second data operation is performed by data transmission with the server;
  • the second determination execution module 70 may determine the to-be-processed data operation belonging to the transmission type as a second data operation, and perform the second data operation by data transmission with the server.
  • the second data operation may be specifically divided into a receiving operation on the game data and a sending operation on the game data, wherein the game data is formed according to a regular expression rule; the game data includes an operation expression or a logical expression formula.
  • FIG. 5 is a schematic structural diagram of a second determining execution module 70 according to an embodiment of the present invention.
  • the second determining execution module 70 may include: a generating unit 701 and a sending unit 702.
  • the generating unit 701 is configured to: when there is a data operation to be processed belonging to a transmission type in the at least one data operation to be processed, and the target operation state is triggered by the local client according to a user operation, according to the regularity
  • An expression rule generates an operation expression corresponding to the user operation; the operation expression includes an object identifier of a target element object involved in the user operation;
  • the sending unit 702 is configured to send the operation expression to a server, so that the server acquires a logical function of the target element object, and sends a logical expression corresponding to the logical function to a target client;
  • the logical expression is constructed in accordance with a regular expression rule and includes an object identification of at least one element object associated with the logical function.
  • the The second data operation is a sending operation of the game data.
  • the generating unit 701 may generate an operation expression corresponding to the user operation according to a regular expression rule, and the operation is performed by the sending unit 702. The expression is sent to the server.
  • the generating unit 701 may generate an operation expression corresponding to the user operation, and the sending unit 702 will
  • the operation expression is sent to the server, and the operation expression may include a selected card expression and selected a target expression, the selected card expression may be generated according to the card wildcard rule described above, and the selected card expression represents information of the card A selected by the user (ie, the object identifier corresponding to the card A)
  • the selected target expression may be generated according to the optional target wildcard rule described above, and the selected target expression represents information of the target person character B selected by the user (ie, the object identifier corresponding to the target person character B) ).
  • FIG. 6 is a schematic structural diagram of another second determining execution module 70 according to an embodiment of the present invention, where the second determining execution module 70 may include: a receiving unit 703 and an analysis identifying unit 704;
  • the receiving unit 703 is configured to: when there is a data operation to be processed belonging to a transmission type in the at least one data operation to be processed, and the target operation state is triggered by a server, receive a target element object sent by the server a logical expression corresponding to the logical function; the logical expression is constructed according to a regular expression rule, and includes an object identifier of at least one element object associated with the logical function;
  • the parsing and identifying unit 704 is configured to parse an object identifier in the logical wildcard expression to identify a logical function of the target element object, and perform an operation conforming to the logic function;
  • the receiving unit 703 can receive a logical expression corresponding to the logical function of the target element object sent by the server, and parse the logical wildcard expression by the parsing and identifying unit 704 An object identifier to identify a logical function of the target element object and perform an operation consistent with the logical function.
  • the server when the other client selects the persona of the local client and plays the card A, the server will send the logical expression corresponding to the logic function of the card A to the local client.
  • the logical expression may include an optional card expression generated according to the card wildcard rule described above, and the optional card expression represents the logic of the card A
  • the logic function allows the local client to select a valid card based on the range of cards that can be selected by the logical function of card A.
  • the parsing and recognizing unit 704 may analyze that "2-2" refers to selecting two cards according to the above-mentioned card wildcarding rule, and "1: # ⁇ 1, 2>” means selecting different blacks.
  • the card of the suit, "5:! ⁇ 103>” means that the selected card cannot be the card numbered 103, so that the card function of the card A can be selected as "specified two cards”. Cards of different black colors, and cannot be cards numbered 103".
  • the data processing device 1 in the embodiment of the present invention is a derivative system module developed on the basis of cocos2d-x-UFO, and cocos2d-x-UFO is based on the UFO engine and incorporates cocos2d-x (open source).
  • cocos2d-x-UFO is cross-platform and can cover platforms such as iOS, Android, Symbian, Win32, WP7, Bada, and iMac.
  • the data operation to be processed belonging to the non-transmission type may exist in the at least one data operation to be processed.
  • the client can determine the running state of the target to determine The operation that can be performed locally, so that the client can perform the first data operation on the local client without performing information interaction with the server, avoiding redundant information interaction, thereby avoiding waste of network bandwidth and improving mobile Network fluency of the game; and, since the data interaction between the server and each client is based on the transmission of the operation expression or the logical expression, and the operation expression and the logical expression Are composed of preset object identifiers, and the object identifiers have certain Usability, that is, the client of various platforms can identify the object identifier, so the implementation of the cross-platform integration is further improved; and the operation expression and the logical expression occupy the The capacity is relatively small, so by transmitting the operation expression or the logical expression, network packet traffic can be saved; and since all cards, skills, and heroes are set as object identifiers, new
  • the element object you only need to configure the object identifier of the new element object in the client and server, and configure the logical expression corresponding to the logical function of the new element object in the server to realize the adaptive effect of the new element object.
  • the at least one operational state and the all element objects are aggregated into one component by the MVC model to be separated from all interface association information, so that the degree of coupling can be greatly reduced.
  • FIG. 7 is a schematic structural diagram of still another data processing apparatus for a mobile game according to an embodiment of the present invention.
  • the data processing apparatus 1000 can include at least one processor 1001, such as a CPU, at least one network interface 1004, a user interface 1003, a memory 1005, and at least one communication bus 1002.
  • the communication bus 1002 is used to implement connection communication between these components.
  • the user interface 1003 can include a display and a keyboard.
  • the optional user interface 1003 can also include a standard wired interface and a wireless interface.
  • the network interface 1004 can optionally include a standard wired interface, a wireless interface (such as a WI-FI interface).
  • the memory 1005 may be a high speed RAM memory or a non-volatile memory such as at least one disk memory.
  • the memory 1005 can also optionally be at least one storage device located remotely from the aforementioned processor 1001. As shown in FIG. 7, an operating system, a network communication module, a user interface module, and a device control application may be included in the memory 1005 as a computer storage medium.
  • the network interface 1004 is mainly used to connect to a server for data communication with the server; and the user interface 1003 is mainly used to provide an input interface for the user to acquire data output by the user;
  • the processor 1001 can be used to invoke the device control application stored in the memory 1005, and specifically perform the following steps:
  • the first data operation includes a display operation of the interface association information, and the interface association information includes at least one of progress information, associated animation information, and operation result information.
  • the processor 1001 also performs the following steps:
  • the game data transmitted in the second data operation is constructed according to a regular expression rule; the game data includes an operation expression or a logical expression.
  • the processor 1001 determines, when the at least one to-be-processed data operation has a pending data operation belonging to a transmission type, determining the to-be-processed data operation belonging to the transmission type as the second data.
  • the following steps are specifically performed:
  • the operation expression includes an object identifier of a target element object involved in the user operation
  • the logical expression is according to a regularity
  • An object identifier that is constructed by an expression rule and includes at least one element object associated with the logic function.
  • the processor 1001 determines, when the at least one to-be-processed data operation has a pending data operation belonging to a transmission type, determining the to-be-processed data operation belonging to the transmission type as the second data.
  • the following steps are specifically performed:
  • the logical expression is constructed according to a regular expression rule and includes an object identifier of at least one element object associated with the logic function;
  • An object identifier in the logical wildcard expression is parsed to identify a logical function of the target element object and perform an operation consistent with the logical function.
  • the processor 1001 performs the following steps before performing the target running state of acquiring the current trigger execution of the mobile game:
  • the at least one element object in the target running state is supervised by the local client, and the policing process includes at least one of a creation process, a logic process, and a deletion process.
  • the processor 1001 performs the following steps before performing the target running state of acquiring the current trigger execution of the mobile game:
  • the at least one target operating state is triggered by the local client according to a user operation, or at least one target running state of the at least one running state is sent by the server. Triggered by the trigger information.
  • the processor 1001 performs the following steps before performing the target running state of acquiring the current trigger execution of the mobile game:
  • the relationship listening queue includes a mapping relationship between the at least one running state and all the interface objects and all interface association information in the mobile game; one running state corresponds to one interface Associated information, an element object corresponds to an interface associated information;
  • the processor 1001 performs the following steps when performing the first data operation on the local client of the mobile game:
  • the target element object is an element object that is triggered in the target running state.
  • the data operation to be processed belonging to the non-transmission type may exist in the at least one data operation to be processed.
  • the client can determine the running state of the target to determine Currently executable locally Operation, so that the client can perform the first data operation on the local client without interacting with the server, avoiding redundant information interaction, thereby avoiding waste of network bandwidth and improving network fluency of the mobile game.
  • the object identifiers have certain versatility, that is, the clients of various platforms can identify the object identifiers, thereby further improving the interoperability of cross-platform integration; Both the expression and the logical expression occupy a small amount of space, so by transmitting the operation expression or the logical expression, network packet traffic can be saved; and since all cards, skills, heroes are Is set to the object ID, so when adding a new element object, just configure it on the client and server
  • the object identifier of the element object, and the logical expression corresponding to the logical function of the new element object in the server can realize the adaptive effect of the new element object, thereby avoiding a large number of modification of the new element object in the client.
  • the replication relationship between some element objects greatly reduces the labor cost of the project and shortens the development cycle of the skills.
  • the at least one operational state and the all element objects are aggregated into one component by the MVC model to be separated from all interface association information, so that the degree of coupling can be greatly reduced.
  • a non-volatile machine readable storage medium storing a program product for data processing of a mobile game, the program product comprising a machine executable for causing a computer system to perform the following steps An instruction: acquiring a target running state that is currently triggered by the mobile game; searching for at least one pending data operation involved in the target running state; and when there is a non-transferring type pending data operation in the at least one pending data operation Determining, to the first data operation, the pending data operation belonging to the non-transport type, and performing the first data operation on a local client of the mobile game; wherein the first data operation includes an interface association
  • the display operation of the information includes at least one of progress information, associated animation information, and operation result information.
  • the data operation to be processed belonging to the transmission type is determined as the second data operation, and is executed by data transmission with the server.
  • the second data operation is constructed according to a regular expression rule; the game data includes an operation expression Or a logical expression.
  • the data operation to be processed belonging to the transmission type is determined as the second data operation, and the data transmission is performed between the server and the server.
  • the performing the second data operation includes: when there is a data operation to be processed belonging to a transmission type in the at least one data operation to be processed, and the target operation state is triggered by the local client according to a user operation Generating an operation expression corresponding to the user operation according to a regular expression rule; the operation expression includes an object identifier of a target element object involved in the user operation; and sending the operation expression to a server to enable
  • the server acquires a logical function of the target element object, and sends a logical expression corresponding to the logical function to a target client; the logical expression is formed according to a regular expression rule, and includes the logic The object identifier of at least one element object associated with the function.
  • the data operation to be processed belonging to the transmission type is determined as the second data operation, and the data transmission is performed between the server and the server.
  • the performing the second data operation comprises: receiving a to-be-processed data operation belonging to a transmission type in the at least one to-be-processed data operation, and receiving the target sent by the server when the target running state is triggered by a server a logical expression corresponding to a logical function of the element object; the logical expression is constructed according to a regular expression rule, and includes an object identifier of at least one element object associated with the logical function; parsing the logical pass An object identifier in the expression is assigned to identify the logical function of the target element object and perform an operation consistent with the logical function.
  • the method further includes:
  • the method further includes:
  • the rules of the mobile game set at least one running state, and configure for each running state Having at least one pending data operation; wherein at least one target operating state is present in the at least one operating state is triggered by the local client in sequence according to a user operation, or at least one of the at least one operating state exists
  • the target running state is triggered by the server sending a trigger message.
  • the method further includes:
  • the relationship listening queue includes a mapping relationship between the at least one running state and all the interface objects and all interface association information in the mobile game; one running state corresponds to one interface Correlation information, an element object corresponds to an interface association information; and the performing, by the local client of the mobile game, the first data operation, specifically: acquiring, according to the preset relationship monitoring queue, the target The operation state has interface mapping information and/or interface association information having a mapping relationship with the target element object, and displays the acquired interface association information in a user interface of the local client; the target element object is An element object that is triggered in the target running state.
  • the storage medium may be a magnetic disk, an optical disk, a read-only memory (ROM), or a random access memory (RAM).

Landscapes

  • Engineering & Computer Science (AREA)
  • Multimedia (AREA)
  • Software Systems (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • User Interface Of Digital Computer (AREA)
  • Information Transfer Between Computers (AREA)
  • Management, Administration, Business Operations System, And Electronic Commerce (AREA)

Abstract

本发明实施例公开了一种移动游戏的数据处理方法以及装置,其中方法包括:获取移动游戏当前触发执行的目标运行状态;查找所述目标运行状态所涉及的至少一个待处理数据操作;当所述至少一个待处理数据操作中存在属于非传输类型的待处理数据操作时,将所述属于非传输类型的待处理数据操作确定为第一数据操作,并在所述移动游戏的本地客户端执行所述第一数据操作;其中,所述第一数据操作包括对界面关联信息的显示操作,所述界面关联信息包括:进度信息、关联动画信息、操作结果信息中的至少一种。采用本发明,可以在移动游戏的过程中避免造成网络带宽的浪费,以提高移动游戏的网络流畅性。

Description

一种移动游戏的数据处理方法以及装置
本发明要求2015年11月17日递交的发明名称为“一种移动游戏的数据处理方法以及装置”的申请号201510791150.3的在先申请优先权,上述在先申请的内容以引入的方式并入本文本中。
技术领域
本发明涉及互联网技术领域,尤其涉及一种移动游戏的数据处理方法以及装置。
背景技术
随着智能手机的普及,移动游戏也变得越来越普及,目前的移动游戏的网络架构通常是一台服务器连接多个客户端,即一台服务器可以与多个客户端进行游戏数据交互。例如,若有n个客户端要同时进行一款移动游戏,则服务器可以将n个客户端的游戏数据实时进行相互传输,使得每个客户端可以相互了解其他客户端的游戏数据,以便于n个客户端可以实现同时在线玩游戏的效果。
目前的移动游戏的网络架构需要服务器实时了解每个客户端的所执行的每一个步骤,即每个客户端都需要将所执行的每个游戏步骤反馈给服务器,使得服务器可以根据客户端所反馈的步骤指示客户端进行下一步操作,但是对于一些能够由客户端自行判断处理的步骤却也要通过与服务器的信息交互后,才由服务器通知到客户端执行,可见这类的信息交互是冗余的。当大量客户端同时进行移动游戏时,必然会同时出现大量的冗余信息交互,导致部分网络带宽被这些冗余的信息交互所占用,造成了网络带宽的浪费,甚至可能影响到移动游戏的网络流畅性。
发明内容
本发明实施例提供一种移动游戏的数据处理方法以及装置,可以在移动游戏的过程中避免造成网络带宽的浪费,以提高移动游戏的网络流畅性。
本发明第一方面提供了一种移动游戏的数据处理方法,包括:
获取移动游戏当前触发执行的目标运行状态;
查找所述目标运行状态所涉及的至少一个待处理数据操作;
当所述至少一个待处理数据操作中存在属于非传输类型的待处理数据操作时,将所述属于非传输类型的待处理数据操作确定为第一数据操作,并在所述移动游戏的本地客户端执行所述第一数据操作;
其中,所述第一数据操作包括对界面关联信息的显示操作,所述界面关联信息包括:进度信息、关联动画信息、操作结果信息中的至少一种。
本发明第二方面提供了一种移动游戏的数据处理装置,包括:
状态获取模块,用于获取移动游戏当前触发执行的目标运行状态;
查找模块,用于查找所述目标运行状态所涉及的至少一个待处理数据操作;
第一确定执行模块,用于当所述至少一个待处理数据操作中存在属于非传输类型的待处理数据操作时,将所述属于非传输类型的待处理数据操作确定为第一数据操作,并在所述移动游戏的本地客户端执行所述第一数据操作;
其中,所述第一数据操作包括对界面关联信息的显示操作,所述界面关联信息包括:进度信息、关联动画信息、操作结果信息中的至少一种。
本发明实施例通过获取移动游戏当前触发执行的目标运行状态,并查找目标运行状态所涉及的至少一个待处理数据操作,可以在至少一个待处理数据操作中存在属于非传输类型的待处理数据操作时,将属于非传输类型的待处理数据操作确定为第一数据操作,并在移动游戏的本地客户端执行第一数据操作,由此可见,客户端可以通过对目标运行状态的分析以判断出当前可在本地执行的操作,从而使客户端无需与服务器进行信息交互即可在本地客户端执行第一数据操作,避免了冗余的信息交互,从而避免造成网络带宽的浪费,而且提高了移动游戏的网络流畅性。
附图说明
为了更清楚地说明本发明实施例或现有技术中的技术方案,下面将对实施例或现有技术描述中所需要使用的附图作简单地介绍,显而易见地,下面描述 中的附图仅仅是本发明的一些实施例,对于本领域普通技术人员来讲,在不付出创造性劳动的前提下,还可以根据这些附图获得其他的附图。
图1是本发明实施例提供的一种移动游戏的数据处理方法的流程示意图;
图1a是本发明实施例提供的一种状态机的监控过程的流程示意图;
图2是本发明实施例提供的另一种移动游戏的数据处理方法的流程示意图;
图3是本发明实施例提供的一种移动游戏的数据处理装置的结构示意图;
图4是本发明实施例提供的另一种移动游戏的数据处理装置的结构示意图;
图5是本发明实施例提供的一种第二确定执行模块的结构示意图;
图6是本发明实施例提供的另一种第二确定执行模块的结构示意图;
图7是本发明实施例提供的又一种移动游戏的数据处理装置的结构示意图。
具体实施方式
下面将结合本发明实施例中的附图,对本发明实施例中的技术方案进行清楚、完整地描述,显然,所描述的实施例仅仅是本发明一部分实施例,而不是全部的实施例。基于本发明中的实施例,本领域普通技术人员在没有作出创造性劳动前提下所获得的所有其他实施例,都属于本发明保护的范围。
本发明实施例中所涉及到的客户端可以为运行在包括但不限于移动电话、移动电脑、平板电脑、个人数字助理(Personal Digital Assistant,PDA)、媒体播放器、智能电视、智能手表、智能眼镜、智能手环等用户设备上的游戏客户端。
请参见图1,是本发明实施例提供的一种移动游戏的数据处理方法的流程示意图,所述方法可以包括:
S101,获取移动游戏当前触发执行的目标运行状态;
具体的,应用于客户端中的一种移动游戏的数据处理装置可以通过预设的状态机获取所述移动游戏当前触发执行的目标运行状态。所述目标运行状态可以是预先按照所述移动游戏的规则所设置的至少一个运行状态中的其中一个 运行状态,以卡牌游戏为例,所预设的至少一个运行状态可以包括主动出牌初始状态、被动出牌初始状态、选牌状态、发动技能状态、出牌状态等等。
其中,所述状态机可以为FSM(Finite State Machine,状态机)中的Mealy状态机,即是指所述状态机可以为一个有向图形,由一组节点和一组相应的转移函数组成。所述状态机通过响应一系列事件而“运行”,每个事件都在属于“当前”节点的转移函数的控制范围内,其中函数的范围是节点的一个子集;这些节点中至少有一个必须是终态,当到达终态时,所述状态机停止。
S102,查找所述目标运行状态所涉及的至少一个待处理数据操作;
具体的,所述数据处理装置在获取到所述目标运行状态后,可以查找所述目标运行状态所涉及的至少一个待处理数据操作。其中,所述数据处理装置在预设所述至少一个运行状态时,还可以为每个运行状态分别设置至少一个待处理数据操作,所述待处理数据操作的类型可以分为非传输类型和传输类型;非传输类型的待处理数据操作具体是指可以由客户端自主判断执行且无需与服务器进行数据交互的数据操作,传输类型的待处理数据操作具体是指需要与服务器进行数据交互的数据操作。再以卡牌游戏为例,所述主动出牌初始状态所涉及的至少一个待处理数据操作可以包括:“通知UI(User Interface,用户界面)显示出牌进度条”;所述出牌状态所涉及的至少一个待处理数据操作可以包括:“通知UI显示出牌动画”、“将出牌过程对应的游戏数据发送至服务器”;其中,“通知UI显示出牌进度条”以及“通知UI显示出牌动画”均为非传输类型的待处理数据操作,“将出牌过程对应的游戏数据发送至服务器”为传输类型的待处理数据操作;其中,所述主动出牌初始状态可以是通过服务器发送触发信息所触发执行的,所述触发信息是由所述服务器在检测出轮流至所述客户端进入主动出牌回合时所生成的;所述出牌状态可以为由所述客户端根据用户的出牌点击操作所触发执行的。
S103,当所述至少一个待处理数据操作中存在属于非传输类型的待处理数据操作时,将所述属于非传输类型的待处理数据操作确定为第一数据操作,并在所述移动游戏的本地客户端执行所述第一数据操作;
具体的,当所述数据处理装置检测出所述至少一个待处理数据操作中存在属于非传输类型的待处理数据操作时,说明在所述目标运行状态下存在可以由 所述客户端进行自主判断且无需与服务器进行数据交互的待处理数据操作,因此,所述数据处理装置可以将所述属于非传输类型的待处理数据操作确定为第一数据操作,并在所述移动游戏的本地客户端执行所述第一数据操作。其中,所述第一数据操作包括对界面关联信息的显示操作,所述界面关联信息包括:进度信息、关联动画信息、操作结果信息中的至少一种。例如,若当前所获取到的目标运行状态为主动出牌初始状态,则可以检测到所述主动出牌初始状态所涉及的待处理数据操作“通知UI显示出牌进度条”属于非传输类型,因此,所述数据处理装置可以主动通知UI显示出牌进度条,即所述数据处理装置可以对进度信息进行显示操作,由于无需再由所述服务器发送通知消息到所述客户端以通知所述客户端显示出牌进度条,所以可以减少冗余的信息交互。
可选的,所述第一数据操作还可以包括无需进行数据交互的本地逻辑运算操作,所述本地逻辑运算操作具体指可在所述本地客户端执行且无需由所述服务器进行处理和通知的逻辑运算操作。以卡牌游戏为例,当用户在所述本地客户端中点击选择某一张牌时,所述数据处理装置可以获取到当前的目标运行状态为选牌状态,因此,所述数据处理装置可以在所述本地客户端执行所述选牌状态所涉及的本地逻辑运算操作,所述本地逻辑运算操作具体为:根据该牌的攻击距离以及所述本地客户端的人物角色与其他客户端的人物角色的人物距离,分析出可被该牌攻击到的人物角色,并将无法被该牌攻击到的人物角色的头像进行置灰处理,由于无需由所述服务器将分析出的人物攻击距离关联信息发送到所述本地客户端,也无需由所述服务器通知所述本地客户端进行人物角色的头像置灰处理,所以可以有效减少信息交互的次数。
可选的,当所述至少一个待处理数据操作中存在属于传输类型的待处理数据操作时,将所述属于传输类型的待处理数据操作确定为第二数据操作,并通过与服务器之间的数据传输以执行所述第二数据操作;所述第二数据操作是指在所述客户端和所述服务器之间传输游戏数据的操作,具体可以分为对游戏数据的接收操作和对游戏数据的发送操作。
再请见图1a,是本发明实施例提供的一种状态机的监控过程的流程示意图,图1a中的状态机被应用于卡牌游戏中,且图1a所展示的状态机具体以主动出牌过程为例。图1a中的所述状态机开始执行后,所述状态机可以实时检 测客户端是否进入主动出牌阶段或被动出牌阶段,若检测出所述客户端进入主动出牌阶段,则所述状态机可以确定当前的目标运行状态为主动出牌初始状态,若检测出所述客户端进入被动出牌阶段,则所述状态机可以确定当前的目标运行状态为被动出牌初始状态。所述状态机确定当前的目标运行状态为主动出牌初始状态后,所述数据处理装置可以主动执行所述主动出牌初始状态所涉及的第一数据操作(“通知UI显示出牌进度条”);所述状态机再继续检测用户是否发动技能,当用户点击技能选择按键时,所述状态机可以将当前的目标运行状态跳转至技能选择状态,使得所述数据处理装置可以主动执行所述技能选择状态所涉及的第一数据操作(“通知UI触发技能选择”);当用户选择不发动技能时,所述状态机再继续检测用户是否选择手牌,若用户点击手牌,则所述状态机可以将当前的目标运行状态跳转至选牌状态,使得所述数据处理装置可以主动执行所述选牌状态所涉及的多个第一数据操作(“初始化手牌”、“通知UI触发点选手牌”、“判断手牌选择是否合法”、“根据选牌确定攻击距离”、“通知UI根据攻击距离确定头像是否置灰”);所述状态机再继续检测用户是否选择目标(所述目标可以为其他客户端的人物角色或其他客户端的手牌),若用户点击选择目标,则所述状态机将当前的目标运行状态再跳转至目标选择状态,使得所述数据处理装置可以主动执行所述目标选择状态所涉及的第一数据操作(“通知UI选择目标”);所述状态机再检测用户是否点击出牌按键,若用户点击出牌按键,则所述状态机可以再将当前的目标运行状态跳转至出牌状态,使得所述数据处理装置可以主动执行所述出牌状态所涉及的第一数据操作(“通知UI显示出牌动画”),所述数据处理装置还可以通过与服务器之间的数据交互执行所述出牌状态所涉及的第二数据操作(“将出牌过程对应的游戏数据发送至服务器”)。所述状态机在检测到用户的弃牌点击操作后,所述状态机将结束对本回合的状态监控。
本发明实施例通过获取移动游戏当前触发执行的目标运行状态,并查找目标运行状态所涉及的至少一个待处理数据操作,可以在至少一个待处理数据操作中存在属于非传输类型的待处理数据操作时,将属于非传输类型的待处理数据操作确定为第一数据操作,并在移动游戏的本地客户端执行第一数据操作,由此可见,客户端可以通过对目标运行状态的分析以判断出当前可在本地执行 的操作,从而使客户端无需与服务器进行信息交互即可在本地客户端执行第一数据操作,避免了冗余的信息交互,从而避免造成网络带宽的浪费,而且提高了移动游戏的网络流畅性。
再请参见图2,是本发明实施例提供的另一种移动游戏的数据处理方法的流程示意图,所述方法可以包括:
S201,为所述移动游戏中的所有元素对象分别设置对应的对象标识;
S202,声明各元素对象与各对象标识之间的映射关系,并设置正则表达式规则;
具体的,应用于客户端中的一种移动游戏的数据处理装置可以通过预设的技能管理器为所述移动游戏中的所有元素对象分别设置对应的对象标识,并声明各元素对象与各对象标识之间的映射关系,以便于所述数据处理装置可以根据所声明的映射关系获取元素对象对应的对象标识,或解析对象标识对应的元素对象。其中,声明所述映射关系的具体方式为:采用预编译模板特化的方式声明元素对象与各对象标识之间的映射关系,为技能的自动化创建提供了可能。
以卡牌游戏为例,所述元素对象可以包括卡牌内容、技能内容、游戏人物角色等等。在实际应用过程中,所述技能管理器设置对象标识和声明映射关系的具体过程可以分为三个部分,例如:
第一步,在CSkilldata.h文件中定义技能ID和攻击距离
Figure PCTCN2016083157-appb-000001
Figure PCTCN2016083157-appb-000002
第二步,在CSkilldata.h文件中生成技能序列(即通过设置类名称将对象标识与元素对象的攻击距离关联起来)
const SKILL_DATA s_SkillData[]=
{
//普通牌——初始数据
{SkillId_sha,“ShaLogic”,SkillDist_Sha},
{SkillId_shan,“ShanLogic”,SkillDist_InvalidDistance},
{SkillId_yao,“YaoLogic”,SkillDist_InvalidDistance},
{SkillId_qipai,“QiPai”,SkillDist_Default},
//装备牌——初始数据
{SkillId_ChiTuMa,“OffensiveHorse Logic”,SkillDist_OffensiveHorse},
//英雄技能——初始数据
{SkillId_TianLang,“TianLang Logic”,SkillDist_Default},
//锦囊牌——初始数据
{SkillId_WuZhongShengYou,“WuZhongShengYouLogic”,SkillDist_InvalidDistance},
};
第三步:在SkillCreatorFactory.h中增加技能构造器模版类的声明。由于所设置的元素对象的类包括元素对象与对象标识的映射关系、元素对象与攻击距离的映射关系、对象标识与元素对象的攻击距离的映射关系,所以对元素对象的类进行声明后,可以在调用某类名时获取到该类名对应的各个映射关系,从而可以使所述客户端通过调用元素对象的类名以获取元素对象的对象标识和攻击距离。
所述技能管理器在声明各类名后,还可以用于对各元素对象的生命周期进行管理,即所述技能管理器可以对游戏过程中的所述客户端所拥有的所有卡牌进行监管处理,所述监管处理包括创建处理、逻辑处理、删除处理中的至少一种。例如,所述客户端获取到一张新的卡牌,则所述技能管理器可以创建该卡牌的使用参数(所述使用参数包括根据卡牌类名所获取到的对象标识和攻击距离),当该卡牌从手牌区域转移至装备区域时,可以对该卡牌进行相应的逻辑处理(所述逻辑处理具体为调整该卡牌所处区域的状态);当该卡牌被打出或被弃牌时,可以对该卡牌进行删除处理,即所述技能管理器不再对该卡牌进行监管。
所述数据处理装置通过所述技能管理器设置对象标识和声明映射关系后,还可以设置正则表达式规则;所述正则表达式规则可以指用事先定义好的一些特定字符、及这些特定字符的组合,组成一个“规则字符串”,这个“规则字符串”用来表达对字符串的一种过滤逻辑。
以卡牌游戏为例,所述正则表达式规则可以包括卡牌通配规则和可选目标通配规则;
其中,所述卡牌通配规则为:
[卡牌数量下限flagFromTo卡牌数量上限,1:flag<花色>2:flag<点数>3:flag<classId>4:flag<牌区>5:flag<指定卡牌ID集合体>];
其中,[卡牌通配]|[卡牌通配]---逻辑或,满足两条件之一即可;
[卡牌通配]&[卡牌通配]---逻辑与,同时满足两个条件;
[卡牌通配]%[卡牌通配]---满足第一通配的元素不参与下一个通配;
flag:#表示互斥;=表示同;*表示任意;!表示不包含;flagFromTo:-表示全部的。
注意:(1)用~界限数值域时,满足当前条件的元素,不参与下一个条件匹配;(2)不支持的匹配模式:flag值为=且flagFromTo值为~时。
其中,常量包括:
Figure PCTCN2016083157-appb-000003
注意:(1)集合体标识界限符号为<>,里面为空时,表示任意,不受集合体约束。(2)元素用常量索引,点数范围:1,2,3,4,5,6,7,8,9,10,11,12,13;
例如:当某元素对象对应的逻辑功能为指定两张不同黑色花色的卡牌,并且不能是id为103的卡牌,则根据所述卡牌通配规则可以生成该逻辑功能对 应的可选卡牌表达式为:[2-2,1:#<1,2>5:!<103>];或者,当某元素对象对应的逻辑功能为指定两张相同花色的“闪”卡牌,则根据所述卡牌通配规则可以生成该逻辑功能对应的可选卡牌表达式为:[2-2,1:=<>3:=<jinkCard>]。
其中,所述可选目标通配规则为:
[目标数量下限flagFromTo目标数量上限,flag<指定目标ChairId集合体>距离];
其中,[目标通配]|[目标通配]---表示逻辑或,满足两条件之一即可;
flag:*不需要用户交互,$需要用户交互;flagFromTo:-表示全部的。
其中,距离为正数时,表示物理距离;距离为负数时,表示攻击距离;距离为0或者不配置,表示没有距离约束。
其中,元素对象的逻辑功能对应的逻辑表达式可以包括可选卡牌表达式和/或可选目标表达式,所述可选卡牌表达式是根据所述卡牌通配规则生成的,且所述可选卡牌表达式表示所述逻辑功能所能选择的卡牌范围;所述可选目标表达式是根据所述可选目标通配规则生成的,且所述可选目标表达式表示所述逻辑功能所能选择的目标人物角色。其中,在发动技能或出牌时,所述数据处理装置可以根据用户操作对应的游戏数据生成(所述游戏数据包括用户选择的技能或用户选择的卡牌或用户选择的目标人物角色)对应的操作表达式,所述操作表达式可以包括已选卡牌表达式和/或已选目标表达式,所述已选卡牌表达式可以根据所述卡牌通配规则生成,所述已选卡牌表达式表示用户所选的卡牌信息,且所述已选卡牌表达式还可以携带用户所选择的技能的对象标识;所述已选目标表达式可以根据所述可选目标通配规则生成,且所述已选目标表达式表示用户所选的目标人物角色。
S203,按照所述移动游戏的规则,设置至少一个运行状态,并为每个运行状态配置至少一个待处理数据操作;
具体的,S203步骤与S201-S202步骤之间不分先后顺序,S201-S203步骤均为预置过程。所述数据处理装置可按照所述移动游戏的规则,设置至少一个运行状态,并为每个运行状态配置至少一个待处理数据操作;其中,所述至少一个运行状态中存在至少一个目标运行状态是由所述本地客户端根据用户操作所依次触发的,或者,所述至少一个运行状态中存在至少一个目标运行状态 是由服务器通过发送触发信息所触发的。以卡牌游戏为例,所预设的至少一个运行状态可以包括主动出牌初始状态、被动出牌初始状态、选牌状态、发动技能状态、出牌状态等等。其中,所述待处理数据操作的类型可以分为非传输类型和传输类型;非传输类型的待处理数据操作具体是指可以由客户端自主判断执行且无需与服务器进行数据交互的数据操作,传输类型的待处理数据操作具体是指需要与服务器进行数据交互的数据操作。再以卡牌游戏为例,所述主动出牌初始状态所涉及的至少一个待处理数据操作可以包括:“通知UI显示出牌进度条”;所述出牌状态所涉及的至少一个待处理数据操作可以包括:“通知UI显示出牌动画”、“将出牌过程对应的游戏数据发送至服务器”;其中,“通知UI显示出牌进度条”以及“通知UI显示出牌动画”均为非传输类型的待处理数据操作,“将出牌过程对应的游戏数据发送至服务器”为传输类型的待处理数据操作;其中,所述主动出牌初始状态可以是通过服务器发送触发信息所触发执行的,所述触发信息是由所述服务器在检测出轮流至所述客户端进入主动出牌回合时所生成的;所述出牌状态可以为由所述客户端根据用户的出牌点击操作所触发执行的。
S204,获取移动游戏当前触发执行的目标运行状态;
S205,查找所述目标运行状态所涉及的至少一个待处理数据操作;
S206,当所述至少一个待处理数据操作中存在属于非传输类型的待处理数据操作时,将所述属于非传输类型的待处理数据操作确定为第一数据操作,并在所述移动游戏的本地客户端执行所述第一数据操作;
其中,S204-S206步骤的具体实现方式可以参见上述图1对应实施例中的S101-S103,这里不再进行赘述。
S207,当所述至少一个待处理数据操作中存在属于传输类型的待处理数据操作时,将所述属于传输类型的待处理数据操作确定为第二数据操作,并通过与服务器之间的数据传输以执行所述第二数据操作;其中,所述第二数据操作中所传输的游戏数据是根据正则表达式规则构成的;所述游戏数据包括操作表达式或逻辑表达式;
具体的,当所述至少一个待处理数据操作中存在属于传输类型的待处理数据操作时,说明在所述目标运行状态下存在需要与所述服务器进行信息交互的 待处理数据操作,因此,所述数据处理装置可以将所述属于传输类型的待处理数据操作确定为第二数据操作,并通过与服务器之间的数据传输以执行所述第二数据操作。所述第二数据操作具体可以分为对游戏数据的接收操作和对游戏数据的发送操作,其中,所述游戏数据是根据正则表达式规则构成的;所述游戏数据包括操作表达式或逻辑表达式。
进一步的,当所述至少一个待处理数据操作中存在属于传输类型的待处理数据操作时,进一步检测到所述目标运行状态是由所述本地客户端根据用户操作所触发时,可以确定所述第二数据操作是对所述游戏数据的发送操作,那么所述通过与服务器之间的数据传输以执行所述第二数据操作的具体过程可以为:根据正则表达式规则生成所述用户操作对应的操作表达式;所述操作表达式包括所述用户操作所涉及的目标元素对象的对象标识;将所述操作表达式发送至服务器,以使所述服务器获取所述目标元素对象的逻辑功能,并将所述逻辑功能对应的逻辑表达式发送至目标客户端;所述逻辑表达式是根据正则表达式规则所构成的,且包括与所述逻辑功能相关联的至少一个元素对象的对象标识。以卡牌游戏为例,若用户选择卡牌A,并选择目标人物角色B,且点击出牌,则所述数据处理装置可以生成用户操作对应的操作表达式,并将所述操作表达式发送至所述服务器,所述操作表达式可以包括已选卡牌表达式和已选目标表达式,所述已选卡牌表达式可以根据上述的卡牌通配规则生成,所述已选卡牌表达式表示用户所选的卡牌A的信息(即卡牌A对应的对象标识),所述已选目标表达式可以根据上述的可选目标通配规则生成,且所述已选目标表达式表示用户所选的目标人物角色B的信息(即目标人物角色B对应的对象标识)。
进一步的,当所述至少一个待处理数据操作中存在属于传输类型的待处理数据操作时,进一步检测到所述目标运行状态是由服务器触发时,可以确定所述第二数据操作是对所述游戏数据的接收操作,那么所述通过与服务器之间的数据传输以执行所述第二数据操作的具体过程可以为:接收所述服务器发送的目标元素对象的逻辑功能所对应的逻辑表达式;所述逻辑表达式是根据正则表达式规则所构成的,且包括与所述逻辑功能相关联的至少一个元素对象的对象标识;解析所述逻辑通配表达式中的对象标识,以识别出所述目标元素对象的 逻辑功能,并执行符合所述逻辑功能的操作。再以卡牌游戏为例,当其他客户端选中本地客户端的人物角色,且打出卡牌A时,所述服务器将会向所述本地客户端发送卡牌A的逻辑功能所对应的逻辑表达式,所述逻辑表达式可以包括可选卡牌表达式,所述可选卡牌表达式是根据上述的卡牌通配规则生成的,且所述可选卡牌表达式表示卡牌A的逻辑功能所能选择的卡牌范围;所述本地客户端接收到所述逻辑表达式后,可以解析所述逻辑表达式中的可选卡牌表达式,以获取卡牌A的逻辑功能,使得所述本地客户端可以根据卡牌A的逻辑功能所能选择的卡牌范围选择合法的卡牌。又例如,若卡牌A的逻辑功能对应的可选卡牌表达式为:[2-2,1:#<1,2>5:!<103>],则所述数据处理装置可以根据上述的卡牌通配规则分析出“2-2”是指选择两张牌,“1:#<1,2>”是指选取不同黑色花色的卡牌,“5:!<103>”是指所选取的卡牌不能是编号为103的卡牌,从而得出卡牌A的逻辑功能所能选择的卡牌范围为“指定两张不同黑色花色的卡牌,并且不能是编号为103的卡牌”。
其中,本发明实施例中的所述数据处理装置是基于cocos2d-x-UFO基础上开发的一个衍生体系模块,cocos2d-x-UFO是在UFO引擎的基础上融合了cocos2d-x(开源的移动2D游戏框架)的优秀特性,把骨骼动画、粒子特效、FBO离屏渲染、Shader(渲染器)、动作组装器、Scud、增量升级等优秀的功能模块进行相互融合。cocos2d-x-UFO具有跨平台性,可以覆盖如iOS、Android、Symbian、Win32、WP7、Bada、iMac等平台。由于所述服务器与各个客户端之间的数据交互都是基于所述操作表达式或所述逻辑表达式的传输,且所述操作表达式和所述逻辑表达式都是由预设的对象标识构成,且对象标识具备一定的通用性,即各种平台的客户端都可以对所述对象标识进行识别,所以也进一步提高了跨平台一体化的可实施性。而且由于所述操作表达式和所述逻辑表达式所占用的容量都比较小,所以通过对所述操作表达式或所述逻辑表达式进行传输,可以节省网络包流量;而且由于所有卡牌、技能、英雄人物都被设置为对象标识,所以使得在增加新的元素对象时,只需在客户端和服务器中配置新的元素对象的对象标识,并在服务器配置新的元素对象的逻辑功能对应的逻辑表达式,即可实现新的元素对象的自适应效果,从而避免在客户端中大量修改新的元素对象与已有的元素对象之间的复制关系,从而大幅降低了项目的人力 成本、缩短了技能的开发周期。
可选的,所述数据处理装置还可以基于MVC(Model View Controller,模型-视图-控制器)模型预设关系监听队列,所述关系监听队列包括所述至少一个运行状态以及所述所有元素对象分别与所述移动游戏中的所有界面关联信息之间的映射关系;一个运行状态对应一个界面关联信息,一个元素对象对应一个界面关联信息。所述数据处理装置可以通过MVC模型将所述至少一个运行状态以及所述所有元素对象聚集到一个部件中,以与所有界面关联信息分离开,使得在修改界面关联信息时,无需重新编写所述至少一个运行状态以及所述所有元素对,只需修改所述关系监听队列中的映射关系即可。因此,所述在所述移动游戏的本地客户端执行所述第一数据操作的步骤,具体可以包括:根据预设的所述关系监听队列,获取与所述目标运行状态具有映射关系的界面关联信息和/或与目标元素对象具有映射关系的界面关联信息,并在所述本地客户端的用户界面中显示获取到的所述界面关联信息;所述目标元素对象为在所述目标运行状态下被触发的元素对象(即被用户所操作的元素对象)。
具体的,所述数据处理装置可以创建Observer接口和Observable类,由于一个映射关系(指一个运行状态与一个界面关联信息之间的映射关系或一个元素对象与一个界面关联信息之间的映射关系)对应一个Observer接口,所以可以将所述至少一个运行状态以及所述所有元素对象分别与所述移动游戏中的所有界面关联信息之间的映射关系全都注册到Observable类的关系监听队列中,即将所有Observer接口注册到Observable类的关系监听队列中。
本发明实施例通过获取移动游戏当前触发执行的目标运行状态,并查找目标运行状态所涉及的至少一个待处理数据操作,可以在至少一个待处理数据操作中存在属于非传输类型的待处理数据操作时,将属于非传输类型的待处理数据操作确定为第一数据操作,并在移动游戏的本地客户端执行第一数据操作,由此可见,客户端可以通过对目标运行状态的分析以判断出当前可在本地执行的操作,从而使客户端无需与服务器进行信息交互即可在本地客户端执行第一数据操作,避免了冗余的信息交互,从而避免造成网络带宽的浪费,而且提高了移动游戏的网络流畅性;而且,由于所述服务器与各个客户端之间的数据交互都是基于所述操作表达式或所述逻辑表达式的传输,且所述操作表达式和所 述逻辑表达式都是由预设的对象标识构成,且对象标识具备一定的通用性,即各种平台的客户端都可以对所述对象标识进行识别,所以也进一步提高了跨平台一体化的可实施性;而且由于所述操作表达式和所述逻辑表达式所占用的容量都比较小,所以通过对所述操作表达式或所述逻辑表达式进行传输,可以节省网络包流量;而且由于所有卡牌、技能、英雄人物都被设置为对象标识,所以使得在增加新的元素对象时,只需在客户端和服务器中配置新的元素对象的对象标识,并在服务器配置新的元素对象的逻辑功能对应的逻辑表达式,即可实现新的元素对象的自适应效果,从而避免在客户端中大量修改新的元素对象与已有的元素对象之间的复制关系,从而大幅降低了项目的人力成本、缩短了技能的开发周期。而且,通过MVC模型将所述至少一个运行状态以及所述所有元素对象聚集到一个部件中,以与所有界面关联信息分离开,可以使耦合度大大降低。
请参见图3,是本发明实施例提供的一种移动游戏的数据处理装置的结构示意图,所述数据处理装置1可以应用于客户端,所述数据处理装置1可以包括:状态获取模块10、查找模块20、第一确定执行模块30;
所述状态获取模块10,用于获取移动游戏当前触发执行的目标运行状态;
具体的,所述状态获取模块10可以通过预设的状态机获取所述移动游戏当前触发执行的目标运行状态。所述目标运行状态可以是预先按照所述移动游戏的规则所设置的至少一个运行状态中的其中一个运行状态,以卡牌游戏为例,所预设的至少一个运行状态可以包括主动出牌初始状态、被动出牌初始状态、选牌状态、发动技能状态、出牌状态等等。
其中,所述状态机可以为FSM中的Mealy状态机,即是指所述状态机可以为一个有向图形,由一组节点和一组相应的转移函数组成。所述状态机通过响应一系列事件而“运行”,每个事件都在属于“当前”节点的转移函数的控制范围内,其中函数的范围是节点的一个子集;这些节点中至少有一个必须是终态,当到达终态时,所述状态机停止。
所述查找模块20,用于查找所述目标运行状态所涉及的至少一个待处理数据操作;
具体的,所述状态获取模块10在获取到所述目标运行状态后,所述查找 模块20可以查找所述目标运行状态所涉及的至少一个待处理数据操作。其中,在预设所述至少一个运行状态时,还可以为每个运行状态分别设置至少一个待处理数据操作,所述待处理数据操作的类型可以分为非传输类型和传输类型;非传输类型的待处理数据操作具体是指可以由客户端自主判断执行且无需与服务器进行数据交互的数据操作,传输类型的待处理数据操作具体是指需要与服务器进行数据交互的数据操作。再以卡牌游戏为例,所述主动出牌初始状态所涉及的至少一个待处理数据操作可以包括:“通知UI显示出牌进度条”;所述出牌状态所涉及的至少一个待处理数据操作可以包括:“通知UI显示出牌动画”、“将出牌过程对应的游戏数据发送至服务器”;其中,“通知UI显示出牌进度条”以及“通知UI显示出牌动画”均为非传输类型的待处理数据操作,“将出牌过程对应的游戏数据发送至服务器”为传输类型的待处理数据操作;其中,所述主动出牌初始状态可以是通过服务器发送触发信息所触发执行的,所述触发信息是由所述服务器在检测出轮流至所述客户端进入主动出牌回合时所生成的;所述出牌状态可以为由所述客户端根据用户的出牌点击操作所触发执行的。
所述第一确定执行模块30,用于当所述至少一个待处理数据操作中存在属于非传输类型的待处理数据操作时,将所述属于非传输类型的待处理数据操作确定为第一数据操作,并在所述移动游戏的本地客户端执行所述第一数据操作;
具体的,当检测出所述至少一个待处理数据操作中存在属于非传输类型的待处理数据操作时,说明在所述目标运行状态下存在可以由所述客户端进行自主判断且无需与服务器进行数据交互的待处理数据操作,因此,所述第一确定执行模块30可以将所述属于非传输类型的待处理数据操作确定为第一数据操作,并在所述移动游戏的本地客户端执行所述第一数据操作。其中,所述第一数据操作包括对界面关联信息的显示操作,所述界面关联信息包括:进度信息、关联动画信息、操作结果信息中的至少一种。例如,若当前所获取到的目标运行状态为主动出牌初始状态,则可以检测到所述主动出牌初始状态所涉及的待处理数据操作“通知UI显示出牌进度条”属于非传输类型,因此,所述第一确定执行模块30可以主动通知UI显示出牌进度条,即所述第一确定执行模块 30可以对进度信息进行显示操作,由于无需再由所述服务器发送通知消息到所述客户端以通知所述客户端显示出牌进度条,所以可以减少冗余的信息交互。
可选的,所述第一数据操作还可以包括无需进行数据交互的本地逻辑运算操作,所述本地逻辑运算操作具体指可在所述本地客户端执行且无需由所述服务器进行处理和通知的逻辑运算操作。以卡牌游戏为例,当用户在所述本地客户端中点击选择某一张牌时,所述第一确定执行模块30可以获取到当前的目标运行状态为选牌状态,因此,所述数据处理装置1可以在所述本地客户端执行所述选牌状态所涉及的本地逻辑运算操作,所述本地逻辑运算操作具体为:根据该牌的攻击距离以及所述本地客户端的人物角色与其他客户端的人物角色的人物距离,分析出可被该牌攻击到的人物角色,并将无法被该牌攻击到的人物角色的头像进行置灰处理,由于无需由所述服务器将分析出的人物攻击距离关联信息发送到所述本地客户端,也无需由所述服务器通知所述本地客户端进行人物角色的头像置灰处理,所以可以有效减少信息交互的次数。
本发明实施例通过获取移动游戏当前触发执行的目标运行状态,并查找目标运行状态所涉及的至少一个待处理数据操作,可以在至少一个待处理数据操作中存在属于非传输类型的待处理数据操作时,将属于非传输类型的待处理数据操作确定为第一数据操作,并在移动游戏的本地客户端执行第一数据操作,由此可见,客户端可以通过对目标运行状态的分析以判断出当前可在本地执行的操作,从而使客户端无需与服务器进行信息交互即可在本地客户端执行第一数据操作,避免了冗余的信息交互,从而避免造成网络带宽的浪费,而且提高了移动游戏的网络流畅性。
请参见图4,是本发明实施例提供的另一种移动游戏的数据处理装置的结构示意图,所述数据处理装置1可以应用于客户端,所述数据处理装置1可以包括上述图3对应实施例中的状态获取模块10、查找模块20、第一确定执行模块30,进一步的,所述数据处理装置1还可以包括:第一设置模块40、第二设置模块50、第三设置模块60、第二确定执行模块70;
所述第一设置模块40,用于为所述移动游戏中的所有元素对象分别设置对应的对象标识;
所述第一设置模块40,还用于声明各元素对象与各对象标识之间的映射关系,并设置正则表达式规则,以便于后续根据所述映射关系和所述正则表达式规则生成所述操作表达式或解析所述逻辑表达式;
具体的,所述第一设置模块40可以通过预设的技能管理器为所述移动游戏中的所有元素对象分别设置对应的对象标识,并声明各元素对象与各对象标识之间的映射关系,以便于所述数据处理装置1可以根据所声明的映射关系获取元素对象对应的对象标识,或解析对象标识对应的元素对象。其中,声明所述映射关系的具体方式为:采用预编译模板特化的方式声明元素对象与各对象标识之间的映射关系,为技能的自动化创建提供了可能。
以卡牌游戏为例,所述元素对象可以包括卡牌内容、技能内容、游戏人物角色等等。在实际应用过程中,所述技能管理器设置对象标识和声明映射关系的具体过程可以分为三个部分,例如:
第一步,在CSkilldata.h文件中定义技能ID和攻击距离
Figure PCTCN2016083157-appb-000004
Figure PCTCN2016083157-appb-000005
第二步,在CSkilldata.h文件中生成技能序列(即通过设置类名称将对象标识与元素对象的攻击距离关联起来)
const SKILL_DATA s_SkillData[]=
{
//普通牌——初始数据
{SkillId_sha,“ShaLogic”,SkillDist_Sha},
{SkillId_shan,“ShanLogic”,SkillDist_InvalidDistance},
{SkillId_yao,“YaoLogic”,SkillDist_InvalidDistance},
{SkillId_qipai,“QiPai”,SkillDist_Default},
//装备牌——初始数据
{SkillId_ChiTuMa,“OffensiveHorse Logic”,SkillDist_OffensiveHorse},
//英雄技能——初始数据
{SkillId_TianLang,“TianLang Logic”,SkillDist_Default},
//锦囊牌——初始数据
{SkillId_WuZhongShengYou,“WuZhongShengYouLogic”,SkillDist_InvalidDistance},
};
第三步:在SkillCreatorFactory.h中增加技能构造器模版类的声明。由于所设置的元素对象的类包括元素对象与对象标识的映射关系、元素对象与攻击 距离的映射关系、对象标识与元素对象的攻击距离的映射关系,所以对元素对象的类进行声明后,可以在调用某类名时获取到该类名对应的各个映射关系,从而可以使所述数据处理装置1通过调用元素对象的类名以获取元素对象的对象标识和攻击距离。
所述技能管理器在声明各类名后,还可以用于对各元素对象的生命周期进行管理,即所述技能管理器可以对游戏过程中的所述客户端所拥有的所有卡牌进行监管处理,所述监管处理包括创建处理、逻辑处理、删除处理中的至少一种。例如,所述客户端获取到一张新的卡牌,则所述技能管理器可以创建该卡牌的使用参数(所述使用参数包括根据卡牌类名所获取到的对象标识和攻击距离),当该卡牌从手牌区域转移至装备区域时,可以对该卡牌进行相应的逻辑处理(所述逻辑处理具体为调整该卡牌所处区域的状态);当该卡牌被打出或被弃牌时,可以对该卡牌进行删除处理,即所述技能管理器不再对该卡牌进行监管。
所述第一设置模块40通过所述技能管理器设置对象标识和声明映射关系后,还可以设置正则表达式规则;所述正则表达式规则可以指用事先定义好的一些特定字符、及这些特定字符的组合,组成一个“规则字符串”,这个“规则字符串”用来表达对字符串的一种过滤逻辑。
以卡牌游戏为例,所述正则表达式规则可以包括卡牌通配规则和可选目标通配规则;
其中,所述卡牌通配规则为:
[卡牌数量下限flagFromTo卡牌数量上限,1:flag<花色>2:flag<点数>3:flag<classId>4:flag<牌区>5:flag<指定卡牌ID集合体>];
其中,[卡牌通配]|[卡牌通配]---逻辑或,满足两条件之一即可;
[卡牌通配]&[卡牌通配]---逻辑与,同时满足两个条件;
[卡牌通配]%[卡牌通配]---满足第一通配的元素不参与下一个通配;
flag:#表示互斥;=表示同;*表示任意;!表示不包含;flagFromTo:-表示全部的。
注意:(1)用~界限数值域时,满足当前条件的元素,不参与下一个条件匹配;(2)不支持的匹配模式:flag值为=且flagFromTo值为~时。
其中,常量包括:
Figure PCTCN2016083157-appb-000006
注意:(1)集合体标识界限符号为<>,里面为空时,表示任意,不受集合体约束。(2)元素用常量索引,点数范围:1,2,3,4,5,6,7,8,9,10,11,12,13;
例如:当某元素对象对应的逻辑功能为指定两张不同黑色花色的卡牌,并且不能是id为103的卡牌,则根据所述卡牌通配规则可以生成该逻辑功能对应的可选卡牌表达式为:[2-2,1:#<1,2>5:!<103>];或者,当某元素对象对应的逻辑功能为指定两张相同花色的“闪”卡牌,则根据所述卡牌通配规则可以生成该逻辑功能对应的可选卡牌表达式为:[2-2,1:=<>3:=<jinkCard>]。
其中,所述可选目标通配规则为:
[目标数量下限flagFromTo目标数量上限,flag<指定目标ChairId集合体>距离];
其中,[目标通配]|[目标通配]---表示逻辑或,满足两条件之一即可;
flag:*不需要用户交互,$需要用户交互;flagFromTo:-表示全部的。
其中,距离为正数时,表示物理距离;距离为负数时,表示攻击距离;距离为0或者不配置,表示没有距离约束。
其中,元素对象的逻辑功能对应的逻辑表达式可以包括可选卡牌表达式和/或可选目标表达式,所述可选卡牌表达式是根据所述卡牌通配规则生成的,且所述可选卡牌表达式表示所述逻辑功能所能选择的卡牌范围;所述可选目标表达式是根据所述可选目标通配规则生成的,且所述可选目标表达式表示所述逻辑功能所能选择的目标人物角色。其中,在发动技能或出牌时,所述数据处理装置1可以根据用户操作对应的游戏数据生成(所述游戏数据包括用户选择的技能或用户选择的卡牌或用户选择的目标人物角色)对应的操作表达式,所述操作表达式可以包括已选卡牌表达式和/或已选目标表达式,所述已选卡牌表达式可以根据所述卡牌通配规则生成,所述已选卡牌表达式表示用户所选的卡牌信息,且所述已选卡牌表达式还可以携带用户所选择的技能的对象标识;所述已选目标表达式可以根据所述可选目标通配规则生成,且所述已选目标表达式表示用户所选的目标人物角色。
所述第二设置模块50,用于按照所述移动游戏的规则,设置至少一个运行状态,并为每个运行状态配置至少一个待处理数据操作;
具体的,所述第二设置模块50和所述第一设置模块40的执行时间可以不分先后顺序。所述第二设置模块50可按照所述移动游戏的规则,设置至少一个运行状态,并为每个运行状态配置至少一个待处理数据操作;其中,所述至少一个运行状态中存在至少一个目标运行状态是由所述本地客户端根据用户操作所依次触发的,或者,所述至少一个运行状态中存在至少一个目标运行状态是由服务器通过发送触发信息所触发的。以卡牌游戏为例,所预设的至少一个运行状态可以包括主动出牌初始状态、被动出牌初始状态、选牌状态、发动技能状态、出牌状态等等。其中,所述待处理数据操作的类型可以分为非传输类型和传输类型;非传输类型的待处理数据操作具体是指可以由客户端自主判断执行且无需与服务器进行数据交互的数据操作,传输类型的待处理数据操作具体是指需要与服务器进行数据交互的数据操作。再以卡牌游戏为例,所述主 动出牌初始状态所涉及的至少一个待处理数据操作可以包括:“通知UI显示出牌进度条”;所述出牌状态所涉及的至少一个待处理数据操作可以包括:“通知UI显示出牌动画”、“将出牌过程对应的游戏数据发送至服务器”;其中,“通知UI显示出牌进度条”以及“通知UI显示出牌动画”均为非传输类型的待处理数据操作,“将出牌过程对应的游戏数据发送至服务器”为传输类型的待处理数据操作;其中,所述主动出牌初始状态可以是通过服务器发送触发信息所触发执行的,所述触发信息是由所述服务器在检测出轮流至所述客户端进入主动出牌回合时所生成的;所述出牌状态可以为由所述客户端根据用户的出牌点击操作所触发执行的。
所述第三设置模块60,用于基于MVC模型设置关系监听队列,所述关系监听队列包括所述至少一个运行状态以及所述所有元素对象分别与所述移动游戏中的所有界面关联信息之间的映射关系;一个运行状态对应一个界面关联信息,一个元素对象对应一个界面关联信息;
则所述第一确定执行模块30,具体用于根据预设的所述关系监听队列,获取与所述目标运行状态具有映射关系的界面关联信息和/或与目标元素对象具有映射关系的界面关联信息,并在所述本地客户端的用户界面中显示获取到的所述界面关联信息;所述目标元素对象为在所述目标运行状态下被触发的元素对象;
具体的,所述第三设置模块60可以创建Observer接口和Observable类,由于一个映射关系(指一个运行状态与一个界面关联信息之间的映射关系或一个元素对象与一个界面关联信息之间的映射关系)对应一个Observer接口,所以可以将所述至少一个运行状态以及所述所有元素对象分别与所述移动游戏中的所有界面关联信息之间的映射关系全都注册到Observable类的关系监听队列中,即将所有Observer接口注册到Observable类的关系监听队列中。所述第三设置模块60可以通过MVC模型将所述至少一个运行状态以及所述所有元素对象聚集到一个部件中,以与所有界面关联信息分离开,使得在修改界面关联信息时,无需重新编写所述至少一个运行状态以及所述所有元素对,只需修改所述关系监听队列中的映射关系即可。
所述第二确定执行模块70,用于当所述至少一个待处理数据操作中存在 属于传输类型的待处理数据操作时,将所述属于传输类型的待处理数据操作确定为第二数据操作,并通过与服务器之间的数据传输以执行所述第二数据操作;
具体的,当所述至少一个待处理数据操作中存在属于传输类型的待处理数据操作时,说明在所述目标运行状态下存在需要与所述服务器进行信息交互的待处理数据操作,因此,所述第二确定执行模块70可以将所述属于传输类型的待处理数据操作确定为第二数据操作,并通过与服务器之间的数据传输以执行所述第二数据操作。所述第二数据操作具体可以分为对游戏数据的接收操作和对游戏数据的发送操作,其中,所述游戏数据是根据正则表达式规则构成的;所述游戏数据包括操作表达式或逻辑表达式。
进一步的,再一并参见图5,是本发明实施例提供的一种第二确定执行模块70的结构示意图,所述第二确定执行模块70可以包括:生成单元701、发送单元702;
所述生成单元701,用于当所述至少一个待处理数据操作中存在属于传输类型的待处理数据操作,且所述目标运行状态是由所述本地客户端根据用户操作所触发时,根据正则表达式规则生成所述用户操作对应的操作表达式;所述操作表达式包括所述用户操作所涉及的目标元素对象的对象标识;
所述发送单元702,用于将所述操作表达式发送至服务器,以使所述服务器获取所述目标元素对象的逻辑功能,并将所述逻辑功能对应的逻辑表达式发送至目标客户端;所述逻辑表达式是根据正则表达式规则所构成的,且包括与所述逻辑功能相关联的至少一个元素对象的对象标识。
具体的,当所述至少一个待处理数据操作中存在属于传输类型的待处理数据操作时,进一步检测到所述目标运行状态是由所述本地客户端根据用户操作所触发时,可以确定所述第二数据操作是对所述游戏数据的发送操作,此时,所述生成单元701可以根据正则表达式规则生成所述用户操作对应的操作表达式,并由所述发送单元702将所述操作表达式发送至服务器。以卡牌游戏为例,若用户选择卡牌A,并选择目标人物角色B,且点击出牌,则所述生成单元701可以生成用户操作对应的操作表达式,并由所述发送单元702将所述操作表达式发送至所述服务器,所述操作表达式可以包括已选卡牌表达式和已选 目标表达式,所述已选卡牌表达式可以根据上述的卡牌通配规则生成,所述已选卡牌表达式表示用户所选的卡牌A的信息(即卡牌A对应的对象标识),所述已选目标表达式可以根据上述的可选目标通配规则生成,且所述已选目标表达式表示用户所选的目标人物角色B的信息(即目标人物角色B对应的对象标识)。
进一步的,再一并参见图6,是本发明实施例提供的另一种第二确定执行模块70的结构示意图,所述第二确定执行模块70可以包括:接收单元703、解析识别单元704;
所述接收单元703,用于当所述至少一个待处理数据操作中存在属于传输类型的待处理数据操作,且所述目标运行状态是由服务器触发时,接收所述服务器发送的目标元素对象的逻辑功能所对应的逻辑表达式;所述逻辑表达式是根据正则表达式规则所构成的,且包括与所述逻辑功能相关联的至少一个元素对象的对象标识;
所述解析识别单元704,用于解析所述逻辑通配表达式中的对象标识,以识别出所述目标元素对象的逻辑功能,并执行符合所述逻辑功能的操作;
具体的,当所述至少一个待处理数据操作中存在属于传输类型的待处理数据操作时,进一步检测到所述目标运行状态是由服务器触发时,可以确定所述第二数据操作是对所述游戏数据的接收操作,因此,所述接收单元703可以接收所述服务器发送的目标元素对象的逻辑功能所对应的逻辑表达式,并由所述解析识别单元704解析所述逻辑通配表达式中的对象标识,以识别出所述目标元素对象的逻辑功能,并执行符合所述逻辑功能的操作。再以卡牌游戏为例,当其他客户端选中本地客户端的人物角色,且打出卡牌A时,所述服务器将会向所述本地客户端发送卡牌A的逻辑功能所对应的逻辑表达式,所述逻辑表达式可以包括可选卡牌表达式,所述可选卡牌表达式是根据上述的卡牌通配规则生成的,且所述可选卡牌表达式表示卡牌A的逻辑功能所能选择的卡牌范围;所述接收单元703接收到所述逻辑表达式后,所述解析识别单元704可以解析所述逻辑表达式中的可选卡牌表达式,以获取卡牌A的逻辑功能,使得所述本地客户端可以根据卡牌A的逻辑功能所能选择的卡牌范围选择合法的卡牌。又例如,若卡牌A的逻辑功能对应的可选卡牌表达式为:[2-2,1:#<1, 2>5:!<103>],则所述解析识别单元704可以根据上述的卡牌通配规则分析出“2-2”是指选择两张牌,“1:#<1,2>”是指选取不同黑色花色的卡牌,“5:!<103>”是指所选取的卡牌不能是编号为103的卡牌,从而得出卡牌A的逻辑功能所能选择的卡牌范围为“指定两张不同黑色花色的卡牌,并且不能是编号为103的卡牌”。
其中,本发明实施例中的所述数据处理装置1是基于cocos2d-x-UFO基础上开发的一个衍生体系模块,cocos2d-x-UFO是在UFO引擎的基础上融合了cocos2d-x(开源的移动2D游戏框架)的优秀特性,把骨骼动画、粒子特效、FBO离屏渲染、Shader(渲染器)、动作组装器、Scud、增量升级等优秀的功能模块进行相互融合。cocos2d-x-UFO具有跨平台性,可以覆盖如iOS、Android、Symbian、Win32、WP7、Bada、iMac等平台。
本发明实施例通过获取移动游戏当前触发执行的目标运行状态,并查找目标运行状态所涉及的至少一个待处理数据操作,可以在至少一个待处理数据操作中存在属于非传输类型的待处理数据操作时,将属于非传输类型的待处理数据操作确定为第一数据操作,并在移动游戏的本地客户端执行第一数据操作,由此可见,客户端可以通过对目标运行状态的分析以判断出当前可在本地执行的操作,从而使客户端无需与服务器进行信息交互即可在本地客户端执行第一数据操作,避免了冗余的信息交互,从而避免造成网络带宽的浪费,而且提高了移动游戏的网络流畅性;而且,由于所述服务器与各个客户端之间的数据交互都是基于所述操作表达式或所述逻辑表达式的传输,且所述操作表达式和所述逻辑表达式都是由预设的对象标识构成,且对象标识具备一定的通用性,即各种平台的客户端都可以对所述对象标识进行识别,所以也进一步提高了跨平台一体化的可实施性;而且由于所述操作表达式和所述逻辑表达式所占用的容量都比较小,所以通过对所述操作表达式或所述逻辑表达式进行传输,可以节省网络包流量;而且由于所有卡牌、技能、英雄人物都被设置为对象标识,所以使得在增加新的元素对象时,只需在客户端和服务器中配置新的元素对象的对象标识,并在服务器配置新的元素对象的逻辑功能对应的逻辑表达式,即可实现新的元素对象的自适应效果,从而避免在客户端中大量修改新的元素对象与已有的元素对象之间的复制关系,从而大幅降低了项目的人力成本、缩短了 技能的开发周期。而且,通过MVC模型将所述至少一个运行状态以及所述所有元素对象聚集到一个部件中,以与所有界面关联信息分离开,可以使耦合度大大降低。
请参见图7,是本发明实施例提供的又一种移动游戏的数据处理装置的结构示意图。如图7所示,所述数据处理装置1000可以包括:至少一个处理器1001,例如CPU,至少一个网络接口1004,用户接口1003,存储器1005,至少一个通信总线1002。其中,通信总线1002用于实现这些组件之间的连接通信。其中,用户接口1003可以包括显示屏(Display)、键盘(Keyboard),可选用户接口1003还可以包括标准的有线接口、无线接口。网络接口1004可选的可以包括标准的有线接口、无线接口(如WI-FI接口)。存储器1005可以是高速RAM存储器,也可以是非不稳定的存储器(non-volatile memory),例如至少一个磁盘存储器。存储器1005可选的还可以是至少一个位于远离前述处理器1001的存储装置。如图7所示,作为一种计算机存储介质的存储器1005中可以包括操作系统、网络通信模块、用户接口模块以及设备控制应用程序。
在图7所示的数据处理装置1000中,网络接口1004主要用于连接服务器,与所述服务器进行数据通信;而用户接口1003主要用于为用户提供输入的接口,获取用户输出的数据;而处理器1001可以用于调用存储器1005中存储的设备控制应用程序,并具体执行以下步骤:
获取移动游戏当前触发执行的目标运行状态;
查找所述目标运行状态所涉及的至少一个待处理数据操作;
当所述至少一个待处理数据操作中存在属于非传输类型的待处理数据操作时,将所述属于非传输类型的待处理数据操作确定为第一数据操作,并在所述移动游戏的本地客户端执行所述第一数据操作;
其中,所述第一数据操作包括对界面关联信息的显示操作,所述界面关联信息包括:进度信息、关联动画信息、操作结果信息中的至少一种。
在一个实施例中,所述处理器1001还执行以下步骤:
当所述至少一个待处理数据操作中存在属于传输类型的待处理数据操作时,将所述属于传输类型的待处理数据操作确定为第二数据操作,并通过与服 务器之间的数据传输以执行所述第二数据操作;
其中,所述第二数据操作中所传输的游戏数据是根据正则表达式规则构成的;所述游戏数据包括操作表达式或逻辑表达式。
在一个实施例中,所述处理器1001在执行当所述至少一个待处理数据操作中存在属于传输类型的待处理数据操作时,将所述属于传输类型的待处理数据操作确定为第二数据操作,并通过与服务器之间的数据传输以执行所述第二数据操作时,具体执行以下步骤:
当所述至少一个待处理数据操作中存在属于传输类型的待处理数据操作,且所述目标运行状态是由所述本地客户端根据用户操作所触发时,根据正则表达式规则生成所述用户操作对应的操作表达式;所述操作表达式包括所述用户操作所涉及的目标元素对象的对象标识;
将所述操作表达式发送至服务器,以使所述服务器获取所述目标元素对象的逻辑功能,并将所述逻辑功能对应的逻辑表达式发送至目标客户端;所述逻辑表达式是根据正则表达式规则所构成的,且包括与所述逻辑功能相关联的至少一个元素对象的对象标识。
在一个实施例中,所述处理器1001在执行当所述至少一个待处理数据操作中存在属于传输类型的待处理数据操作时,将所述属于传输类型的待处理数据操作确定为第二数据操作,并通过与服务器之间的数据传输以执行所述第二数据操作时,具体执行以下步骤:
当所述至少一个待处理数据操作中存在属于传输类型的待处理数据操作,且所述目标运行状态是由服务器触发时,接收所述服务器发送的目标元素对象的逻辑功能所对应的逻辑表达式;所述逻辑表达式是根据正则表达式规则所构成的,且包括与所述逻辑功能相关联的至少一个元素对象的对象标识;
解析所述逻辑通配表达式中的对象标识,以识别出所述目标元素对象的逻辑功能,并执行符合所述逻辑功能的操作。
在一个实施例中,所述处理器1001在执行获取移动游戏当前触发执行的目标运行状态之前,还执行以下步骤:
为所述移动游戏中的所有元素对象分别设置对应的对象标识;
声明各元素对象与各对象标识之间的映射关系,并设置正则表达式规则, 以便于后续根据所述映射关系和所述正则表达式规则生成所述操作表达式或解析所述逻辑表达式;
其中,处于所述目标运行状态下的至少一个元素对象均是由所述本地客户端进行监管处理,所述监管处理包括创建处理、逻辑处理、删除处理中的至少一种。
在一个实施例中,所述处理器1001在执行获取移动游戏当前触发执行的目标运行状态之前,还执行以下步骤:
按照所述移动游戏的规则,设置至少一个运行状态,并为每个运行状态配置至少一个待处理数据操作;
其中,所述至少一个运行状态中存在至少一个目标运行状态是由所述本地客户端根据用户操作所依次触发的,或者,所述至少一个运行状态中存在至少一个目标运行状态是由服务器通过发送触发信息所触发的。
在一个实施例中,所述处理器1001在执行获取移动游戏当前触发执行的目标运行状态之前,还执行以下步骤:
基于MVC模型设置关系监听队列,所述关系监听队列包括所述至少一个运行状态以及所述所有元素对象分别与所述移动游戏中的所有界面关联信息之间的映射关系;一个运行状态对应一个界面关联信息,一个元素对象对应一个界面关联信息;
则所述处理器1001在执行在所述移动游戏的本地客户端执行所述第一数据操作时,具体执行以下步骤:
根据预设的所述关系监听队列,获取与所述目标运行状态具有映射关系的界面关联信息和/或与目标元素对象具有映射关系的界面关联信息,并在所述本地客户端的用户界面中显示获取到的所述界面关联信息;所述目标元素对象为在所述目标运行状态下被触发的元素对象。
本发明实施例通过获取移动游戏当前触发执行的目标运行状态,并查找目标运行状态所涉及的至少一个待处理数据操作,可以在至少一个待处理数据操作中存在属于非传输类型的待处理数据操作时,将属于非传输类型的待处理数据操作确定为第一数据操作,并在移动游戏的本地客户端执行第一数据操作,由此可见,客户端可以通过对目标运行状态的分析以判断出当前可在本地执行 的操作,从而使客户端无需与服务器进行信息交互即可在本地客户端执行第一数据操作,避免了冗余的信息交互,从而避免造成网络带宽的浪费,而且提高了移动游戏的网络流畅性;而且,由于所述服务器与各个客户端之间的数据交互都是基于所述操作表达式或所述逻辑表达式的传输,且所述操作表达式和所述逻辑表达式都是由预设的对象标识构成,且对象标识具备一定的通用性,即各种平台的客户端都可以对所述对象标识进行识别,所以也进一步提高了跨平台一体化的可实施性;而且由于所述操作表达式和所述逻辑表达式所占用的容量都比较小,所以通过对所述操作表达式或所述逻辑表达式进行传输,可以节省网络包流量;而且由于所有卡牌、技能、英雄人物都被设置为对象标识,所以使得在增加新的元素对象时,只需在客户端和服务器中配置新的元素对象的对象标识,并在服务器配置新的元素对象的逻辑功能对应的逻辑表达式,即可实现新的元素对象的自适应效果,从而避免在客户端中大量修改新的元素对象与已有的元素对象之间的复制关系,从而大幅降低了项目的人力成本、缩短了技能的开发周期。而且,通过MVC模型将所述至少一个运行状态以及所述所有元素对象聚集到一个部件中,以与所有界面关联信息分离开,可以使耦合度大大降低。
根据本发明的实施方式,还提供了一种非易失机器可读存储媒介,存储有用于移动游戏的数据处理的程序产品,所述程序产品包括用于使计算机系统执行以下步骤的机器可执行指令:获取移动游戏当前触发执行的目标运行状态;查找所述目标运行状态所涉及的至少一个待处理数据操作;当所述至少一个待处理数据操作中存在属于非传输类型的待处理数据操作时,将所述属于非传输类型的待处理数据操作确定为第一数据操作,并在所述移动游戏的本地客户端执行所述第一数据操作;其中,所述第一数据操作包括对界面关联信息的显示操作,所述界面关联信息包括:进度信息、关联动画信息、操作结果信息中的至少一种。
当所述至少一个待处理数据操作中存在属于传输类型的待处理数据操作时,将所述属于传输类型的待处理数据操作确定为第二数据操作,并通过与服务器之间的数据传输以执行所述第二数据操作。其中,所述第二数据操作中所传输的游戏数据是根据正则表达式规则构成的;所述游戏数据包括操作表达式 或逻辑表达式。
所述当所述至少一个待处理数据操作中存在属于传输类型的待处理数据操作时,将所述属于传输类型的待处理数据操作确定为第二数据操作,并通过与服务器之间的数据传输以执行所述第二数据操作,包括:当所述至少一个待处理数据操作中存在属于传输类型的待处理数据操作,且所述目标运行状态是由所述本地客户端根据用户操作所触发时,根据正则表达式规则生成所述用户操作对应的操作表达式;所述操作表达式包括所述用户操作所涉及的目标元素对象的对象标识;将所述操作表达式发送至服务器,以使所述服务器获取所述目标元素对象的逻辑功能,并将所述逻辑功能对应的逻辑表达式发送至目标客户端;所述逻辑表达式是根据正则表达式规则所构成的,且包括与所述逻辑功能相关联的至少一个元素对象的对象标识。
所述当所述至少一个待处理数据操作中存在属于传输类型的待处理数据操作时,将所述属于传输类型的待处理数据操作确定为第二数据操作,并通过与服务器之间的数据传输以执行所述第二数据操作,包括:当所述至少一个待处理数据操作中存在属于传输类型的待处理数据操作,且所述目标运行状态是由服务器触发时,接收所述服务器发送的目标元素对象的逻辑功能所对应的逻辑表达式;所述逻辑表达式是根据正则表达式规则所构成的,且包括与所述逻辑功能相关联的至少一个元素对象的对象标识;解析所述逻辑通配表达式中的对象标识,以识别出所述目标元素对象的逻辑功能,并执行符合所述逻辑功能的操作。
在所述获取移动游戏当前触发执行的目标运行状态的步骤之前,还包括:
为所述移动游戏中的所有元素对象分别设置对应的对象标识;声明各元素对象与各对象标识之间的映射关系,并设置正则表达式规则,以便于后续根据所述映射关系和所述正则表达式规则生成所述操作表达式或解析所述逻辑表达式;其中,处于所述目标运行状态下的至少一个元素对象均是由所述本地客户端进行监管处理,所述监管处理包括创建处理、逻辑处理、删除处理中的至少一种。
在所述获取移动游戏当前触发执行的目标运行状态的步骤之前,还包括:
按照所述移动游戏的规则,设置至少一个运行状态,并为每个运行状态配 置至少一个待处理数据操作;其中,所述至少一个运行状态中存在至少一个目标运行状态是由所述本地客户端根据用户操作所依次触发的,或者,所述至少一个运行状态中存在至少一个目标运行状态是由服务器通过发送触发信息所触发的。
在所述获取移动游戏当前触发执行的目标运行状态的步骤之前,还包括:
基于MVC模型设置关系监听队列,所述关系监听队列包括所述至少一个运行状态以及所述所有元素对象分别与所述移动游戏中的所有界面关联信息之间的映射关系;一个运行状态对应一个界面关联信息,一个元素对象对应一个界面关联信息;则所述在所述移动游戏的本地客户端执行所述第一数据操作,具体包括:根据预设的所述关系监听队列,获取与所述目标运行状态具有映射关系的界面关联信息和/或与目标元素对象具有映射关系的界面关联信息,并在所述本地客户端的用户界面中显示获取到的所述界面关联信息;所述目标元素对象为在所述目标运行状态下被触发的元素对象。
本领域普通技术人员可以理解实现上述实施例方法中的全部或部分流程,是可以通过计算机程序来指令相关的硬件来完成,所述的程序可存储于一计算机可读取存储介质中,该程序在执行时,可包括如上述各方法的实施例的流程。其中,所述的存储介质可为磁碟、光盘、只读存储记忆体(Read-Only Memory,ROM)或随机存储记忆体(RandomAccess Memory,RAM)等。
以上所揭露的仅为本发明较佳实施例而已,当然不能以此来限定本发明之权利范围,因此依本发明权利要求所作的等同变化,仍属本发明所涵盖的范围。

Claims (26)

  1. 一种移动游戏的数据处理方法,其特征在于,包括:
    获取移动游戏当前触发执行的目标运行状态;
    查找所述目标运行状态所涉及的至少一个待处理数据操作;
    当所述至少一个待处理数据操作中存在属于非传输类型的待处理数据操作时,将所述属于非传输类型的待处理数据操作确定为第一数据操作,并在所述移动游戏的本地客户端执行所述第一数据操作;
    其中,所述第一数据操作包括对界面关联信息的显示操作,所述界面关联信息包括:进度信息、关联动画信息、操作结果信息中的至少一种。
  2. 如权利要求1所述的方法,其特征在于,还包括:
    当所述至少一个待处理数据操作中存在属于传输类型的待处理数据操作时,将所述属于传输类型的待处理数据操作确定为第二数据操作,并通过与服务器之间的数据传输以执行所述第二数据操作;
    其中,所述第二数据操作中所传输的游戏数据是根据正则表达式规则构成的;所述游戏数据包括操作表达式或逻辑表达式。
  3. 如权利要求2所述的方法,其特征在于,所述当所述至少一个待处理数据操作中存在属于传输类型的待处理数据操作时,将所述属于传输类型的待处理数据操作确定为第二数据操作,并通过与服务器之间的数据传输以执行所述第二数据操作,包括:
    当所述至少一个待处理数据操作中存在属于传输类型的待处理数据操作,且所述目标运行状态是由所述本地客户端根据用户操作所触发时,根据正则表达式规则生成所述用户操作对应的操作表达式;所述操作表达式包括所述用户操作所涉及的目标元素对象的对象标识;
    将所述操作表达式发送至服务器,以使所述服务器获取所述目标元素对象的逻辑功能,并将所述逻辑功能对应的逻辑表达式发送至目标客户端;所述逻辑表达式是根据正则表达式规则所构成的,且包括与所述逻辑功能相关联的至 少一个元素对象的对象标识。
  4. 如权利要求2所述的方法,其特征在于,所述当所述至少一个待处理数据操作中存在属于传输类型的待处理数据操作时,将所述属于传输类型的待处理数据操作确定为第二数据操作,并通过与服务器之间的数据传输以执行所述第二数据操作,包括:
    当所述至少一个待处理数据操作中存在属于传输类型的待处理数据操作,且所述目标运行状态是由服务器触发时,接收所述服务器发送的目标元素对象的逻辑功能所对应的逻辑表达式;所述逻辑表达式是根据正则表达式规则所构成的,且包括与所述逻辑功能相关联的至少一个元素对象的对象标识;
    解析所述逻辑通配表达式中的对象标识,以识别出所述目标元素对象的逻辑功能,并执行符合所述逻辑功能的操作。
  5. 如权利要求3或4所述的方法,其特征在于,在所述获取移动游戏当前触发执行的目标运行状态的步骤之前,还包括:
    为所述移动游戏中的所有元素对象分别设置对应的对象标识;
    声明各元素对象与各对象标识之间的映射关系,并设置正则表达式规则,以便于后续根据所述映射关系和所述正则表达式规则生成所述操作表达式或解析所述逻辑表达式;
    其中,处于所述目标运行状态下的至少一个元素对象均是由所述本地客户端进行监管处理,所述监管处理包括创建处理、逻辑处理、删除处理中的至少一种。
  6. 如权利要求5所述的方法,其特征在于,在所述获取移动游戏当前触发执行的目标运行状态的步骤之前,还包括:
    按照所述移动游戏的规则,设置至少一个运行状态,并为每个运行状态配置至少一个待处理数据操作;
    其中,所述至少一个运行状态中存在至少一个目标运行状态是由所述本地客户端根据用户操作所依次触发的,或者,所述至少一个运行状态中存在至少一个目标运行状态是由服务器通过发送触发信息所触发的。
  7. 如权利要求6所述的方法,其特征在于,在所述获取移动游戏当前触发执行的目标运行状态的步骤之前,还包括:
    基于MVC模型设置关系监听队列,所述关系监听队列包括所述至少一个运行状态以及所述所有元素对象分别与所述移动游戏中的所有界面关联信息之间的映射关系;一个运行状态对应一个界面关联信息,一个元素对象对应一个界面关联信息;
    则所述在所述移动游戏的本地客户端执行所述第一数据操作,具体包括:
    根据预设的所述关系监听队列,获取与所述目标运行状态具有映射关系的界面关联信息和/或与目标元素对象具有映射关系的界面关联信息,并在所述本地客户端的用户界面中显示获取到的所述界面关联信息;所述目标元素对象为在所述目标运行状态下被触发的元素对象。
  8. 一种移动游戏的数据处理装置,其特征在于,包括:
    状态获取模块,用于获取移动游戏当前触发执行的目标运行状态;
    查找模块,用于查找所述目标运行状态所涉及的至少一个待处理数据操作;
    第一确定执行模块,用于当所述至少一个待处理数据操作中存在属于非传输类型的待处理数据操作时,将所述属于非传输类型的待处理数据操作确定为第一数据操作,并在所述移动游戏的本地客户端执行所述第一数据操作;
    其中,所述第一数据操作包括对界面关联信息的显示操作,所述界面关联信息包括:进度信息、关联动画信息、操作结果信息中的至少一种。
  9. 如权利要求8所述的装置,其特征在于,还包括:
    第二确定执行模块,用于当所述至少一个待处理数据操作中存在属于传输类型的待处理数据操作时,将所述属于传输类型的待处理数据操作确定为第二数据操作,并通过与服务器之间的数据传输以执行所述第二数据操作;
    其中,所述第二数据操作中所传输的游戏数据是根据正则表达式规则构成的;所述游戏数据为操作表达式或逻辑表达式。
  10. 如权利要求9所述的装置,其特征在于,所述第二确定执行模块包括:
    生成单元,用于当所述至少一个待处理数据操作中存在属于传输类型的待处理数据操作,且所述目标运行状态是由所述本地客户端根据用户操作所触发时,根据正则表达式规则生成所述用户操作对应的操作表达式;所述操作表达式包括所述用户操作所涉及的目标元素对象的对象标识;
    发送单元,用于将所述操作表达式发送至服务器,以使所述服务器获取所述目标元素对象的逻辑功能,并将所述逻辑功能对应的逻辑表达式发送至目标客户端;所述逻辑表达式是根据正则表达式规则所构成的,且包括与所述逻辑功能相关联的至少一个元素对象的对象标识。
  11. 如权利要求9所述的装置,其特征在于,所述第二确定执行模块包括:
    接收单元,用于当所述至少一个待处理数据操作中存在属于传输类型的待处理数据操作,且所述目标运行状态是由服务器触发时,接收所述服务器发送的目标元素对象的逻辑功能所对应的逻辑表达式;所述逻辑表达式是根据正则表达式规则所构成的,且包括与所述逻辑功能相关联的至少一个元素对象的对象标识;
    解析识别单元,用于解析所述逻辑通配表达式中的对象标识,以识别出所述目标元素对象的逻辑功能,并执行符合所述逻辑功能的操作。
  12. 如权利要求10或11所述的装置,其特征在于,还包括:
    第一设置模块,用于为所述移动游戏中的所有元素对象分别设置对应的对象标识;
    所述第一设置模块,还用于声明各元素对象与各对象标识之间的映射关系,并设置正则表达式规则,以便于后续根据所述映射关系和所述正则表达式规则生成所述操作表达式或解析所述逻辑表达式;
    其中,处于所述目标运行状态下的至少一个元素对象均是由所述本地客户端进行监管处理,所述监管处理包括创建处理、逻辑处理、删除处理中的至少一种。
  13. 如权利要求12所述的装置,其特征在于,还包括:
    第二设置模块,用于按照所述移动游戏的规则,设置至少一个运行状态,并为每个运行状态配置至少一个待处理数据操作;
    其中,所述至少一个运行状态中存在至少一个目标运行状态是由所述本地客户端根据用户操作所依次触发的,或者,所述至少一个运行状态中存在至少一个目标运行状态是由服务器通过发送触发信息所触发的。
  14. 如权利要求13所述的装置,其特征在于,还包括:
    第三设置模块,用于基于MVC模型设置关系监听队列,所述关系监听队列包括所述至少一个运行状态以及所述所有元素对象分别与所述移动游戏中的所有界面关联信息之间的映射关系;一个运行状态对应一个界面关联信息,一个元素对象对应一个界面关联信息;
    则所述第一确定执行模块,具体用于根据预设的所述关系监听队列,获取与所述目标运行状态具有映射关系的界面关联信息和/或与目标元素对象具有映射关系的界面关联信息,并在所述本地客户端的用户界面中显示获取到的所述界面关联信息;所述目标元素对象为在所述目标运行状态下被触发的元素对象。
  15. 一种移动游戏的数据处理装置,包括:
    存储器,存储计算机可执行程序代码;以及
    处理器,用于执行所述计算机可执行程序代码以执行以下操作:
    获取移动游戏当前触发执行的目标运行状态;
    查找所述目标运行状态所涉及的至少一个待处理数据操作;
    当所述至少一个待处理数据操作中存在属于非传输类型的待处理数据操作时,将所述属于非传输类型的待处理数据操作确定为第一数据操作,并在所述移动游戏的本地客户端执行所述第一数据操作;
    其中,所述第一数据操作包括对界面关联信息的显示操作,所述界面关联信息包括:进度信息、关联动画信息、操作结果信息中的至少一种。
  16. 如权利要求15所述的移动游戏的数据处理装置,其特征在于,所述计算机可执行程序代码还被执行以用于:
    当所述至少一个待处理数据操作中存在属于传输类型的待处理数据操作时,将所述属于传输类型的待处理数据操作确定为第二数据操作,并通过与服务器之间的数据传输以执行所述第二数据操作;
    其中,所述第二数据操作中所传输的游戏数据是根据正则表达式规则构成的;所述游戏数据包括操作表达式或逻辑表达式。
  17. 如权利要求16所述的移动游戏的数据处理装置,其特征在于,所述当所述至少一个待处理数据操作中存在属于传输类型的待处理数据操作时,将所述属于传输类型的待处理数据操作确定为第二数据操作,并通过与服务器之间的数据传输以执行所述第二数据操作,包括:
    当所述至少一个待处理数据操作中存在属于传输类型的待处理数据操作,且所述目标运行状态是由所述本地客户端根据用户操作所触发时,根据正则表达式规则生成所述用户操作对应的操作表达式;所述操作表达式包括所述用户操作所涉及的目标元素对象的对象标识;
    将所述操作表达式发送至服务器,以使所述服务器获取所述目标元素对象的逻辑功能,并将所述逻辑功能对应的逻辑表达式发送至目标客户端;所述逻辑表达式是根据正则表达式规则所构成的,且包括与所述逻辑功能相关联的至少一个元素对象的对象标识。
  18. 如权利要求16所述的移动游戏的数据处理装置,其特征在于,所述当所述至少一个待处理数据操作中存在属于传输类型的待处理数据操作时,将所述属于传输类型的待处理数据操作确定为第二数据操作,并通过与服务器之间的数据传输以执行所述第二数据操作,包括:
    当所述至少一个待处理数据操作中存在属于传输类型的待处理数据操作,且所述目标运行状态是由服务器触发时,接收所述服务器发送的目标元素对象的逻辑功能所对应的逻辑表达式;所述逻辑表达式是根据正则表达式规则所构 成的,且包括与所述逻辑功能相关联的至少一个元素对象的对象标识;
    解析所述逻辑通配表达式中的对象标识,以识别出所述目标元素对象的逻辑功能,并执行符合所述逻辑功能的操作。
  19. 如权利要求17或18所述的移动游戏的数据处理装置,其特征在于,在所述获取移动游戏当前触发执行的目标运行状态的步骤之前,所述计算机可执行程序代码还被执行以用于:
    为所述移动游戏中的所有元素对象分别设置对应的对象标识;
    声明各元素对象与各对象标识之间的映射关系,并设置正则表达式规则,以便于后续根据所述映射关系和所述正则表达式规则生成所述操作表达式或解析所述逻辑表达式;
    其中,处于所述目标运行状态下的至少一个元素对象均是由所述本地客户端进行监管处理,所述监管处理包括创建处理、逻辑处理、删除处理中的至少一种。
  20. 如权利要求19所述的移动游戏的数据处理装置,其特征在于,在所述获取移动游戏当前触发执行的目标运行状态的步骤之前,所述计算机可执行程序代码还被执行以用于:
    按照所述移动游戏的规则,设置至少一个运行状态,并为每个运行状态配置至少一个待处理数据操作;
    其中,所述至少一个运行状态中存在至少一个目标运行状态是由所述本地客户端根据用户操作所依次触发的,或者,所述至少一个运行状态中存在至少一个目标运行状态是由服务器通过发送触发信息所触发的。
  21. 一种计算机可读存储媒介,存储计算机可执行程序代码,所述计算机可执行程序代码使得移动游戏的数据处理装置执行以下操作:
    获取移动游戏当前触发执行的目标运行状态;
    查找所述目标运行状态所涉及的至少一个待处理数据操作;
    当所述至少一个待处理数据操作中存在属于非传输类型的待处理数据操作时,将所述属于非传输类型的待处理数据操作确定为第一数据操作,并在所述移动游戏的本地客户端执行所述第一数据操作;
    其中,所述第一数据操作包括对界面关联信息的显示操作,所述界面关联信息包括:进度信息、关联动画信息、操作结果信息中的至少一种。
  22. 如权利要求21所述的计算机可读存储媒介,其特征在于,所述计算机可执行程序代码还被执行以用于:
    当所述至少一个待处理数据操作中存在属于传输类型的待处理数据操作时,将所述属于传输类型的待处理数据操作确定为第二数据操作,并通过与服务器之间的数据传输以执行所述第二数据操作;
    其中,所述第二数据操作中所传输的游戏数据是根据正则表达式规则构成的;所述游戏数据包括操作表达式或逻辑表达式。
  23. 如权利要求22所述的计算机可读存储媒介,其特征在于,所述当所述至少一个待处理数据操作中存在属于传输类型的待处理数据操作时,将所述属于传输类型的待处理数据操作确定为第二数据操作,并通过与服务器之间的数据传输以执行所述第二数据操作,包括:
    当所述至少一个待处理数据操作中存在属于传输类型的待处理数据操作,且所述目标运行状态是由所述本地客户端根据用户操作所触发时,根据正则表达式规则生成所述用户操作对应的操作表达式;所述操作表达式包括所述用户操作所涉及的目标元素对象的对象标识;
    将所述操作表达式发送至服务器,以使所述服务器获取所述目标元素对象的逻辑功能,并将所述逻辑功能对应的逻辑表达式发送至目标客户端;所述逻辑表达式是根据正则表达式规则所构成的,且包括与所述逻辑功能相关联的至少一个元素对象的对象标识。
  24. 如权利要求22所述的计算机可读存储媒介,其特征在于,所述当所述至少一个待处理数据操作中存在属于传输类型的待处理数据操作时,将所述 属于传输类型的待处理数据操作确定为第二数据操作,并通过与服务器之间的数据传输以执行所述第二数据操作,包括:
    当所述至少一个待处理数据操作中存在属于传输类型的待处理数据操作,且所述目标运行状态是由服务器触发时,接收所述服务器发送的目标元素对象的逻辑功能所对应的逻辑表达式;所述逻辑表达式是根据正则表达式规则所构成的,且包括与所述逻辑功能相关联的至少一个元素对象的对象标识;
    解析所述逻辑通配表达式中的对象标识,以识别出所述目标元素对象的逻辑功能,并执行符合所述逻辑功能的操作。
  25. 如权利要求23或24所述的计算机可读存储媒介,其特征在于,在所述获取移动游戏当前触发执行的目标运行状态的步骤之前,所述计算机可执行程序代码还被执行以用于:
    为所述移动游戏中的所有元素对象分别设置对应的对象标识;
    声明各元素对象与各对象标识之间的映射关系,并设置正则表达式规则,以便于后续根据所述映射关系和所述正则表达式规则生成所述操作表达式或解析所述逻辑表达式;
    其中,处于所述目标运行状态下的至少一个元素对象均是由所述本地客户端进行监管处理,所述监管处理包括创建处理、逻辑处理、删除处理中的至少一种。
  26. 如权利要求25所述的计算机可读存储媒介,其特征在于,在所述获取移动游戏当前触发执行的目标运行状态的步骤之前,所述计算机可执行程序代码还被执行以用于:
    按照所述移动游戏的规则,设置至少一个运行状态,并为每个运行状态配置至少一个待处理数据操作;
    其中,所述至少一个运行状态中存在至少一个目标运行状态是由所述本地客户端根据用户操作所依次触发的,或者,所述至少一个运行状态中存在至少一个目标运行状态是由服务器通过发送触发信息所触发的。
PCT/CN2016/083157 2015-11-17 2016-05-24 一种移动游戏的数据处理方法以及装置 WO2017084283A1 (zh)

Priority Applications (3)

Application Number Priority Date Filing Date Title
KR1020177036599A KR102094066B1 (ko) 2015-11-17 2016-05-24 모바일 게임에 대한 데이터 처리 방법 및 장치
JP2017558652A JP6755527B2 (ja) 2015-11-17 2016-05-24 モバイルゲームのためのデータ処理方法および装置
US15/714,225 US10445103B2 (en) 2015-11-17 2017-09-25 Mobile game data processing method and apparatus

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN201510791150.3A CN105468358B (zh) 2015-11-17 2015-11-17 一种移动游戏的数据处理方法以及装置
CN201510791150.3 2015-11-17

Related Child Applications (1)

Application Number Title Priority Date Filing Date
US15/714,225 Continuation US10445103B2 (en) 2015-11-17 2017-09-25 Mobile game data processing method and apparatus

Publications (1)

Publication Number Publication Date
WO2017084283A1 true WO2017084283A1 (zh) 2017-05-26

Family

ID=55606101

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2016/083157 WO2017084283A1 (zh) 2015-11-17 2016-05-24 一种移动游戏的数据处理方法以及装置

Country Status (5)

Country Link
US (1) US10445103B2 (zh)
JP (1) JP6755527B2 (zh)
KR (1) KR102094066B1 (zh)
CN (1) CN105468358B (zh)
WO (1) WO2017084283A1 (zh)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN108769192A (zh) * 2018-05-29 2018-11-06 努比亚技术有限公司 一种游戏带宽调控方法、设备及计算机可读存储介质

Families Citing this family (11)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105468358B (zh) 2015-11-17 2019-11-05 腾讯科技(深圳)有限公司 一种移动游戏的数据处理方法以及装置
CN107982912B (zh) * 2016-10-26 2020-08-11 腾讯科技(深圳)有限公司 一种信息处理方法和终端
CN108379841B (zh) * 2018-03-15 2021-10-29 网易(杭州)网络有限公司 游戏特效的处理方法、装置和终端
CN109847356B (zh) * 2019-02-25 2022-03-01 腾讯科技(深圳)有限公司 一种回合制游戏的数据处理方法、装置、终端及服务器
CN111437602B (zh) * 2020-03-23 2021-08-17 腾讯科技(深圳)有限公司 虚拟环境中的飞行轨迹显示方法、装置、设备及存储介质
CN113556261B (zh) * 2020-04-26 2024-02-13 阿里巴巴集团控股有限公司 数据通信方法、装置、电子设备及计算机可读存储介质
CN111773715B (zh) * 2020-08-03 2024-07-23 网易(杭州)网络有限公司 任务执行方法及装置、设备和介质
CN112044057B (zh) * 2020-09-17 2024-06-25 网易(杭州)网络有限公司 一种游戏状态监测方法和装置
CN112546624A (zh) * 2020-12-15 2021-03-26 竞技世界(北京)网络技术有限公司 一种特效释放的控制方法及装置、设备、计算机可读存储介质
CN112717372A (zh) * 2021-01-08 2021-04-30 北京爱奇艺科技有限公司 云游戏操控方法、装置、电子设备及存储介质
CN115943619B (zh) 2021-06-14 2024-05-28 株式会社软技 信息处理装置、记录介质、数据同步方法、数据同步系统以及终端装置

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20060259579A1 (en) * 2005-05-11 2006-11-16 Bigfoot Networks, Inc. Distributed processing system and method
US20110310011A1 (en) * 2010-06-22 2011-12-22 Hsni, Llc System and method for integrating an electronic pointing device into digital image data
CN102460524A (zh) * 2009-04-17 2012-05-16 Igt公司 游戏系统的远程主持和本地呈现内容的显示
CN105050671A (zh) * 2012-12-21 2015-11-11 微软技术许可有限责任公司 等待时间敏感的游戏特征的客户端渲染
CN105468358A (zh) * 2015-11-17 2016-04-06 腾讯科技(深圳)有限公司 一种移动游戏的数据处理方法以及装置

Family Cites Families (10)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US7034834B2 (en) * 2003-10-24 2006-04-25 Microsoft Corporation Communication protocol for synchronizing animation systems
US8291261B2 (en) * 2008-11-05 2012-10-16 Vulcan Technologies Llc Lightweight application-level runtime state save-and-restore utility
US8051427B2 (en) * 2009-04-06 2011-11-01 Jason Kleban Method of establishing a logical state of an instance using non-deterministic operation results stored in a result log
US9122538B2 (en) * 2010-02-22 2015-09-01 Virtustream, Inc. Methods and apparatus related to management of unit-based virtual resources within a data center environment
US9223611B2 (en) * 2010-12-28 2015-12-29 Microsoft Technology Licensing, Llc Storing and resuming application runtime state
JP6052731B2 (ja) * 2012-10-31 2016-12-27 株式会社Future Tech Lab 情報システム、サーバ装置、端末装置、情報処理方法、およびプログラム
JP5745559B2 (ja) * 2013-02-27 2015-07-08 株式会社スクウェア・エニックス ビデオゲーム処理装置、及びビデオゲーム処理プログラム
US10142406B2 (en) * 2013-03-11 2018-11-27 Amazon Technologies, Inc. Automated data center selection
CN103731340B (zh) * 2013-12-27 2017-01-11 北京像素软件科技股份有限公司 一种网络游戏系统的通信方法
JP2015153176A (ja) * 2014-02-14 2015-08-24 株式会社コナミデジタルエンタテインメント 処理システム、サーバ、端末、サーバ処理プログラム及び端末処理プログラム

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20060259579A1 (en) * 2005-05-11 2006-11-16 Bigfoot Networks, Inc. Distributed processing system and method
CN102460524A (zh) * 2009-04-17 2012-05-16 Igt公司 游戏系统的远程主持和本地呈现内容的显示
US20110310011A1 (en) * 2010-06-22 2011-12-22 Hsni, Llc System and method for integrating an electronic pointing device into digital image data
CN105050671A (zh) * 2012-12-21 2015-11-11 微软技术许可有限责任公司 等待时间敏感的游戏特征的客户端渲染
CN105468358A (zh) * 2015-11-17 2016-04-06 腾讯科技(深圳)有限公司 一种移动游戏的数据处理方法以及装置

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN108769192A (zh) * 2018-05-29 2018-11-06 努比亚技术有限公司 一种游戏带宽调控方法、设备及计算机可读存储介质

Also Published As

Publication number Publication date
US20180018178A1 (en) 2018-01-18
JP6755527B2 (ja) 2020-09-16
CN105468358B (zh) 2019-11-05
JP2018528497A (ja) 2018-09-27
KR102094066B1 (ko) 2020-03-26
CN105468358A (zh) 2016-04-06
US10445103B2 (en) 2019-10-15
KR20180009352A (ko) 2018-01-26

Similar Documents

Publication Publication Date Title
WO2017084283A1 (zh) 一种移动游戏的数据处理方法以及装置
US11458401B2 (en) Server device, control method performed by the server device, program, and terminal device
CN105335064A (zh) 一种信息处理方法、终端和计算机存储介质
JP2019518257A (ja) 状態制御方法及び装置
CN104461693B (zh) 一种桌面云计算环境下的虚拟机更新方法和系统
CN110134375B (zh) 游戏角色行为的控制方法、装置及可读存储介质
WO2015078175A1 (en) Method,apparatus,and artificial intelligence server for determining artificial intelligence behavior
CN113032268B (zh) 软件测试方法、装置及存储介质
US20240009571A1 (en) Game data processing method and apparatus, device, storage medium, and program product
KR102307870B1 (ko) 게임 테스트 방법
CN114979029A (zh) 一种虚拟机器人的控制方法、装置、设备及存储介质
CN104994179B (zh) 一种数据处理方法及服务器
CN109391838B (zh) 一种广播的处理方法、装置和计算机可读存储介质
US20160246613A1 (en) Guided Authoring of Interactive Content
TWI714006B (zh) Android系統Activity的啟動方法和裝置
CN109597641B (zh) 一种对象行为的控制方法、装置、终端及存储介质
CN113181656A (zh) 外挂检测方法、设备及介质
CN105279031A (zh) 一种信息处理方法及系统
WO2020236360A1 (en) Remote operations application programming interface
Mark et al. Peer-to-peer using multipeer connectivity
CN117046111B (zh) 一种游戏技能的处理方法以及相关装置
WO2024021771A1 (zh) 信息传递方法、装置、存储介质、电子设备和程序产品
CN113253995B (zh) 区块链系统的开发方法、装置、设备和存储介质
US20240127520A1 (en) Dynamic interactions between avatar attachments
CN105056529B (zh) 一种玩家数据的管理系统及管理方法

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: 16865464

Country of ref document: EP

Kind code of ref document: A1

ENP Entry into the national phase

Ref document number: 2017558652

Country of ref document: JP

Kind code of ref document: A

ENP Entry into the national phase

Ref document number: 20177036599

Country of ref document: KR

Kind code of ref document: A

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 02.10.2018)

122 Ep: pct application non-entry in european phase

Ref document number: 16865464

Country of ref document: EP

Kind code of ref document: A1