Disclosure of Invention
The application mainly aims to provide a business data processing method, a business data processing device, business data processing equipment and a storage medium, and aims to solve the technical problem that maintenance of an existing mahjong game consumes a large amount of manpower and material resources.
To achieve the above object, the present application provides a service data processing method,
when a service processing instruction is detected, acquiring the type of the service processing instruction;
acquiring target rule configuration information according to the type of the service processing instruction;
determining a target business processing flow according to the target rule configuration information;
and processing the service to be processed according to the target service processing flow.
Optionally, the step of determining a target service processing flow according to the target rule configuration information includes:
matching an initial plug-in class from a preset configuration table according to the target rule configuration information;
determining the type of the event to be monitored according to the initial plug-in class;
and determining a target business processing flow according to the type of the event to be monitored.
Optionally, the step of determining the type of the event to be monitored according to the initial plug-in class includes:
acquiring a target process link of an event to be monitored;
and determining the type of the event to be monitored according to the initial plug-in class and the target process link.
Optionally, the step of determining the type of the event to be monitored according to the initial plug-in class includes
Carrying out logic initialization processing on the initial plug-in class, and carrying out monitoring registration on the initial plug-in class to obtain a target plug-in class;
and determining the type of the event to be monitored according to the target plug-in class.
Optionally, the step of determining a target service processing flow according to the target rule configuration information includes:
if a change instruction for changing the target rule configuration information is detected, authenticating the change instruction;
if the authentication is passed, obtaining the configuration information of the change rule according to the change instruction;
and determining a new target business processing flow according to the change rule configuration information, and storing the new target business processing flow and the original target business processing flow.
Optionally, the step of processing the service to be processed according to the target service processing flow includes:
if a card-playing request of a game player is detected, processing the card-playing request and generating a post-card-playing event;
and processing the event after the card is played according to the target business processing flow.
Optionally, the step of processing the event after the card is dealt according to the target business processing flow includes:
according to the target business processing flow, the event after the card is played is sent to a target plug-in class, so that the target plug-in class forwards the target plug-in class to a rule class corresponding to the event after the card is played;
matching the post-deal-drawing events according to the rule classes to obtain a matching result;
and informing the matching result and executing a preset subsequent event of the matching result.
The present application further provides a service data processing apparatus, where the service data processing apparatus includes:
the first acquisition module is used for acquiring the type of the service processing instruction;
the second acquisition module is used for acquiring target rule configuration information according to the type of the service processing instruction;
the determining module is used for determining a target business processing flow according to the target rule configuration information;
and the processing module is used for processing the service to be processed according to the target service processing flow.
Optionally, the determining module includes:
the matching unit is used for matching the initial plug-in class from a preset configuration table according to the target rule configuration information;
the first determining unit is used for determining the type of the event to be monitored according to the initial plug-in class;
and the second determining unit is used for determining a target business processing flow according to the type of the event to be monitored.
Optionally, the first determining unit includes: the acquisition subunit is used for acquiring a target process link where an event to be monitored is located;
and the first determining subunit is used for determining the type of the event to be monitored according to the initial plug-in class and the target process link.
Optionally, the first determining unit further includes;
the registration subunit is used for carrying out logic initialization processing on the initial plug-in class and carrying out monitoring registration on the initial plug-in class to obtain a target plug-in class;
and the second determining subunit is used for determining the type of the event to be monitored according to the target plug-in class.
Optionally, the determining module:
the change unit is used for authenticating the change instruction if the change instruction for changing the target rule configuration information is detected;
the obtaining unit is used for obtaining the configuration information of the change rule according to the change instruction if the authentication is passed;
and the third determining unit is used for determining a new target business processing flow according to the change rule configuration information and storing the new target business processing flow and the original target business processing flow.
Optionally, the processing module includes:
the production unit is used for processing the card-playing request and generating a post-card-playing event if the card-playing request of the game player is detected;
and the processing unit is used for processing the event after the card is dealt according to the target business processing flow.
Optionally, the processing module includes:
the forwarding subunit is configured to send the event after the card is dealt to a target plug-in class according to the target service processing flow, so that the target plug-in class forwards the target plug-in class to a rule class corresponding to the event after the card is dealt;
the matching subunit is used for matching the post-deal-making event according to the rule class to obtain a matching result;
and the notification subunit is used for notifying the matching result and executing a preset subsequent event of the matching result.
The present application further provides a service data processing device, where the service data processing device is an entity device, and the service data processing device includes: a memory, a processor and a program of the business data processing method stored on the memory and executable on the processor, wherein the program of the business data processing method, when executed by the processor, can implement the steps of the business data processing method as described above.
The present application also provides a readable storage medium, on which a program for implementing the service data processing method is stored, and when executed by a processor, the program for implementing the service data processing method implements the steps of the service data processing method as described above.
The present application also provides a computer program product, comprising a computer program, which when executed by a processor implements the steps of the above-mentioned service data processing method.
Compared with the prior art that mahjong games played by various methods are independently developed items, so that maintenance consumes a large amount of manpower and material resources, the method and the device for processing business data acquire the type of a business processing instruction when the business processing instruction is detected; acquiring target rule configuration information according to the type of the service processing instruction; determining a target business processing flow according to the target rule configuration information; and processing the service to be processed according to the target service processing flow. In the application, instead of independently developing the mahjong games of each playing method, when a business processing instruction, namely a game development instruction, is detected, the type of the instruction is determined, the mode of target rule configuration information is further determined, a target business processing flow is further obtained, and the business to be processed is processed according to the target business processing flow, namely, in the application, each mahjong game is developed in a configuration mode, so that when the games are maintained, only unified maintenance is needed, the maintenance efficiency is improved, and the maintenance cost is reduced.
Detailed Description
It should be understood that the specific embodiments described herein are merely illustrative of the present application and are not intended to limit the present application.
In a first embodiment of the service data processing method of the present application, referring to fig. 1, the service data processing method includes:
step S10, when a service processing instruction is detected, acquiring the type of the service processing instruction;
step S20, obtaining target rule configuration information according to the type of the service processing instruction;
step S30, determining a target business processing flow according to the target rule configuration information;
and step S40, processing the service to be processed according to the target service processing flow.
The method comprises the following specific steps:
step S10, when a service processing instruction is detected, acquiring the type of the service processing instruction;
in this embodiment, it should be noted that the service data processing method is applied to a service data processing apparatus, where the service data processing apparatus is subordinate to a service data processing device, and the service data processing device may specifically be a development device or a maintenance device.
That is, in this embodiment, the service may be a development service, a maintenance service, a modification service, or the like, and the specific type of the service is not limited.
In this embodiment, the service is specifically described by taking an example in which the service is a development service.
Therefore, when a service processing instruction is detected, the type of obtaining the service processing instruction may specifically be:
firstly, the method comprises the following steps: when a game service development instruction is detected, acquiring the type of the service processing instruction;
for example, specifically, the type of the business processing instruction may be acquired when a mahjong game business development instruction is detected, or the type of the business processing instruction may be acquired when a card game business development instruction is detected.
Secondly, the method comprises the following steps: or when a game service maintenance instruction is detected, acquiring the type of the service processing instruction.
Specifically, for example, the type of the mahjong game business maintenance instruction is acquired when the mahjong game business maintenance instruction is detected, or the type of the card game business maintenance instruction is acquired when the card game business maintenance instruction is detected.
The following description specifically describes the game service development command as an example of the service processing command.
When a service processing instruction is detected, a manner of obtaining a type of the service processing instruction may specifically be:
when a game service development instruction is detected, extracting game playing type information carried in the game service development instruction, and further acquiring the type of the service processing instruction;
or when a game service development instruction is detected, extracting a unique identification play naming PlayID (project naming) in the game service development instruction, and further acquiring the type of the service processing instruction according to the unique identification play naming PlayID.
Specifically, for example, when a game service development instruction is detected, the unique identified play naming PlayID (sichuan) in the game service development instruction is extracted, and then the type of the service processing instruction is acquired as a sichuan mahjong type, or when a game service development instruction is detected, the unique identified play naming PlayID (guangdong) in the game service development instruction is extracted, and then the type of the service processing instruction is acquired as a guangdong mahjong type.
Step S20, obtaining target rule configuration information according to the type of the service processing instruction;
in this embodiment, the target rule configuration information is obtained according to the type of the service processing instruction, and specifically, the target rule configuration information is obtained through an uploaded configuration file according to the type of the service processing instruction, or the target rule configuration information is selected in a form of a configuration table according to the type of the service processing instruction.
For example, target rule configuration information is obtained through the uploaded configuration file according to the Sichuan mahjong development type, or target rule configuration information corresponding to the Guangdong mahjong development type is selected in a table configuration mode according to the Guangdong mahjong development type.
In the embodiment, the development of the game is realized in a configuration mode, so that the resource can be saved, and the maintenance is facilitated.
In this embodiment, it should be noted that the mahjong game includes a core business module, which is mainly used for controlling a basic flow of a playing method of the mahjong game; the basic process is independent of the mahjong playing method, that is, any mahjong playing method can be split into a general process (abstract game logic) including game start- > deal (including operations such as eat and bump) - > settle- > game end, and then various subclasses can be derived based on the general process to realize a standard mahjong business process (game logic), for example, a business process (MatchLogic) of a mahjong game, and the mahjong further includes: the system comprises a core business module, a play rule module and a play Plugin module (plug, or plugins, Plugin businesses), wherein the play Plugin module mainly serves as a middleware between the core business module and the play rule module, and can be used for developing services unique to mahjong playing. Specifically, there may be one generic plug-in service class (abstract plug-in); then deriving plug-ins of mahjong playing methods in various places, such as Sichuan mahjong plug-ins, Wuhan mahjong plug-ins and the like; when a certain mahjong playing method is developed, the self plugin of the mahjong playing method can exist, and only the universal plug-in is required to be inherited; existing mahjong playing plug-ins can also be applied, and in this embodiment, mahjong development can further include a development Rule module (Rule): the development rule module is mainly used for processing the common business of a plurality of mahjong playing methods. The development rule module can be divided into two major sub-modules, one is an operation service module (Action) for eating a touch bar and the like, and the other is a special rule for playing mahjong, for example, three pieces of special rules are replaced, and the like. Each rule has its own class of service handling and each rule is assigned a unique identification (RuleID).
In this embodiment, since the core service module is not related to the mahjong playing method, according to the type of the service processing instruction, the target rule configuration information is obtained mainly as follows: and acquiring a development rule in a development rule module according to the type of the service processing instruction, and further acquiring plug-in event detection in a plug-in module (plug) for mahjong playing according to the development rule in the development rule module.
In this embodiment, before the development of the mahjong game, a unique identifier named play id is assigned to the development project, each development project and mahjong play may have its own plugin processing class for mahjong play, or a plurality of mahjong plays may share one plugin processing class, and for each rule of the development project, a unique identifier named rule id is also assigned.
For the server side (GameServer) that develops mahjong game projects; when the business process is started, a set of configuration table (MJPlayCfg) of the mahjong playing method is loaded, the configuration table mainly configures a RuleID list owned by a certain mahjong playing method PlayID and a corresponding mahjong playing method plug-in class, and specifically, the GameLogic layer finds the corresponding mahjong playing method plug-in class from the MJPlayCfg through the PlayID.
Step S30, determining a target business processing flow according to the target rule configuration information;
in this embodiment, after obtaining the target rule configuration information, a target business processing flow is determined, which event is mainly monitored, how the event is monitored, and how the monitored event is processed by the target business processing flow, specifically, for example, after a player requests to find a card, how the target business processing flow processes the requested card, after receiving and processing the card-out business, how to process an event after card-out, such as an event after card-out is thrown to a plug (plug-in), and how the plug processes the next specific business after receiving the event.
Referring to fig. 2, the step of determining a target service processing flow according to the target rule configuration information includes:
step S31, according to the target rule configuration information, matching an initial plug-in class from a preset configuration table;
step S32, determining the type of the event to be monitored according to the initial plug-in class;
in this embodiment, it should be noted that according to the target rule configuration information, an initial plug-in class is matched from a preset configuration table, and then according to the initial plug-in class, a type of an event to be monitored is determined, for example, according to the initial plug-in class, it is monitored that the type of the event to be monitored is dealt cards before a game starts, or according to the initial plug-in class, the type of the event to be monitored is determined to be dealt cards after a player deals cards, where it is noted that an internal logic of the initial plug-in class determines the type of the event to be monitored.
And step S33, determining a target business processing flow according to the type of the event to be monitored.
And determining a target business processing flow according to the type of the event to be monitored, specifically, determining the target business processing flow according to the type combination of each event to be monitored.
The step of determining the type of the event to be monitored according to the initial plug-in class comprises the following steps:
step A1, acquiring a target process link of an event to be monitored;
step A2, determining the type of the event to be monitored according to the initial plug-in class and the target process link.
In this embodiment, target process links where the event to be monitored is located are obtained, the target process links may include before game start, after dealing, after a player plays cards, and the like, and the type of the event to be monitored is determined according to the initial plug-in class and the target process links. That is, in this embodiment, the process links are different, and the types of the events to be monitored are different, so that the types of the events to be monitored are determined according to the initial plug-in class and the target process link.
And step S40, processing the service to be processed according to the target service processing flow.
In this embodiment, after a target service processing flow is obtained, a service to be processed is processed according to the target service processing flow.
Compared with the prior art that mahjong games played by various mahjong are independently developed items, so that maintenance consumes a large amount of manpower and material resources, the business data processing method and device have the advantages that the type of a business processing instruction is obtained when the business processing instruction is detected; acquiring target rule configuration information according to the type of the service processing instruction; determining a target business processing flow according to the target rule configuration information; and processing the service to be processed according to the target service processing flow. In the application, instead of independently developing the mahjong game of each mahjong playing method, when a business processing instruction, namely a game development instruction, is detected, the type of the instruction is determined, the mode of target rule configuration information is further determined, a target business processing flow is further obtained, and the business to be processed is processed according to the target business processing flow, namely, in the application, each mahjong game is developed in a configuration mode, so that when the game is maintained, only unified maintenance is needed, the maintenance efficiency is improved, and the maintenance cost is reduced.
Further, based on the first embodiment in the present application, in another embodiment of the present application,
the step of determining the type of the event to be monitored according to the initial plug-in class comprises the following steps:
step B1, carrying out logic initialization processing on the initial plug-in class, and carrying out monitoring registration on the initial plug-in class to obtain a target plug-in class;
in this embodiment, the logic initialization processing is performed on the initial plug-in class, and the monitoring registration is performed on the initial plug-in class, specifically, by calling an initialization logic unit of the initial plug-in class, the logic initialization processing is performed on the initial plug-in class, and calling a preset monitoring registration logic unit, the monitoring registration setting is performed on the initial plug-in class, so as to obtain the target plug-in class.
And step B2, determining the type of the event to be monitored according to the target plug-in class.
And determining the type of the event to be monitored according to the target plug-in class, wherein the type of the event to be monitored, such as the rule of monitoring the collision or monitoring other matters, is determined according to the target plug-in class.
In this embodiment, the target plug-in class is obtained by performing logic initialization processing on the initial plug-in class and performing monitoring registration on the initial plug-in class. And determining the type of the event to be monitored according to the target plug-in class. In this embodiment, the type of the event to be monitored is accurately determined according to the target plug-in class, so that the development of games with different playing methods is realized.
Further, based on the first and second embodiments in the present application, in another embodiment of the present application,
the step of determining a target service processing flow according to the target rule configuration information includes:
step C1, if detecting the change instruction for changing the target rule configuration information, authenticating the change instruction;
step C2, if the authentication is passed, obtaining the configuration information of the change rule according to the change instruction;
and step C3, determining a new target business processing flow according to the change rule configuration information, and storing the new target business processing flow and the original target business processing flow.
In this embodiment, the target rule configuration information may also be modified, and if a modification instruction for modifying the target rule configuration information is detected, the modification instruction is authenticated, specifically, the authentication information in the modification instruction is extracted to authenticate the modification instruction, if the authentication fails, the rule configuration information is not modified, if the authentication passes, the modification rule configuration information is obtained according to the modification instruction, a new target service processing flow is determined according to the modification rule configuration information, and the new target service processing flow and an original target service processing flow are stored.
In this embodiment, if a change instruction for changing the target rule configuration information is detected, authenticating the change instruction, and if the authentication is passed, obtaining the change rule configuration information according to the change instruction; and determining a new target business processing flow according to the change rule configuration information, and storing the new target business processing flow and the original target business processing flow.
Further, based on the first, second and third embodiments of the present application, in another embodiment of the present application,
the step of processing the service to be processed according to the target service processing flow comprises the following steps:
step D1, if detecting the card-playing request of the game player, processing the card-playing request and generating a post-card-playing event;
in this embodiment, specific matters for processing the transaction to be processed are provided, specifically, when a card-out request of a game player is detected, the card-out request is processed, and a post-card-out event is generated.
The step of processing the event after the card is dealt according to the target business processing flow comprises the following steps:
step E1, according to the target business processing flow, sending the event after the card is dealt to a target plug-in class, so that the target plug-in class forwards the target plug-in class to a rule class corresponding to the event after the card is dealt;
e2, matching the post-deal event according to the rule class to obtain a matching result;
and E3, notifying the matching result, and executing a preset subsequent event of the matching result.
Specifically, when a card-playing request of a game player is detected, for example, the player requests to play cards, a core service module in the service data processing device receives and processes the card-playing service, after the card-playing service is processed, the core service module throws an event after playing cards to a Plugin (Plugin, target Plugin class), after the target Plugin class Plugin receives the event, the service which the target Plugin class needs to process can be processed, and then the event is forwarded to a Rule list (Rule class) which monitors the event; rules such as collision; the hit rule logic processing class (rule class) receives the event and then executes its own business, i.e. analyzes whether the other three players can hit the card; the GameLogic layer controls the flow, so that whether a person can take actions such as touching a bar or not can be judged next after the event is thrown out; if yes, informing, if not, informing to touch the card.
And D2, processing the event after the card is dealt according to the target business processing flow.
In this embodiment, the event after the card is dealt is accurately and timely processed according to the target business processing flow.
Referring to fig. 3, fig. 3 is a schematic device structure diagram of a hardware operating environment according to an embodiment of the present application.
As shown in fig. 3, the service data processing apparatus may include: aprocessor 1001, such as a CPU, amemory 1005, and acommunication bus 1002. Thecommunication bus 1002 is used for realizing connection communication between theprocessor 1001 and thememory 1005. Thememory 1005 may be a high-speed RAM memory or a non-volatile memory (e.g., a magnetic disk memory). Thememory 1005 may alternatively be a memory device separate from theprocessor 1001 described above.
Optionally, the service data processing device may further include a rectangular user interface, a network interface, a camera, an RF (Radio Frequency) circuit, a sensor, an audio circuit, a WiFi module, and the like. The rectangular user interface may comprise a Display screen (Display), an input sub-module such as a Keyboard (Keyboard), and the optional rectangular user interface may also comprise a standard wired interface, a wireless interface. The network interface may optionally include a standard wired interface, a wireless interface (e.g., WI-FI interface).
It will be appreciated by those skilled in the art that the business data processing apparatus architecture shown in figure 3 does not constitute a limitation of business data processing apparatus and may include more or fewer components than shown, or some components may be combined, or a different arrangement of components.
As shown in fig. 3, amemory 1005, which is a kind of computer storage medium, may include therein an operating system, a network communication module, and a business data processing method program. The operating system is a program that manages and controls the hardware and software resources of the business data processing apparatus, and supports the operation of the business data processing method program and other software and/or programs. The network communication module is used for realizing communication among the components in thememory 1005 and with other hardware and software in the service data processing method system.
In the service data processing apparatus shown in fig. 3, theprocessor 1001 is configured to execute a service data processing method program stored in thememory 1005, and implement the steps of any one of the service data processing methods described above.
The specific implementation of the service data processing device of the present application is substantially the same as that of each embodiment of the service data processing method, and is not described herein again.
The embodiment of the application also provides a service data processing device,
the service data processing device comprises:
the first acquisition module is used for acquiring the type of the service processing instruction;
the second acquisition module is used for acquiring target rule configuration information according to the type of the service processing instruction;
the determining module is used for determining a target business processing flow according to the target rule configuration information;
and the processing module is used for processing the service to be processed according to the target service processing flow.
Optionally, the determining module includes:
the matching unit is used for matching the initial plug-in class from a preset configuration table according to the target rule configuration information;
the first determining unit is used for determining the type of the event to be monitored according to the initial plug-in class;
and the second determining unit is used for determining a target business processing flow according to the type of the event to be monitored.
Optionally, the first determining unit includes: the acquisition subunit is used for acquiring a target process link where an event to be monitored is located;
and the first determining subunit is used for determining the type of the event to be monitored according to the initial plug-in class and the target process link.
Optionally, the first determining unit further includes;
the registration subunit is used for carrying out logic initialization processing on the initial plug-in class and carrying out monitoring registration on the initial plug-in class to obtain a target plug-in class;
and the second determining subunit is used for determining the type of the event to be monitored according to the target plug-in class.
Optionally, the determining module:
the change unit is used for authenticating the change instruction if the change instruction for changing the target rule configuration information is detected;
the obtaining unit is used for obtaining the configuration information of the change rule according to the change instruction if the authentication is passed;
and the third determining unit is used for determining a new target business processing flow according to the change rule configuration information and storing the new target business processing flow and the original target business processing flow.
Optionally, the processing module includes:
the production unit is used for processing the card-playing request and generating a post-card-playing event if the card-playing request of the game player is detected;
and the processing unit is used for processing the event after the card is dealt according to the target business processing flow.
Optionally, the processing module includes:
the forwarding subunit is configured to send the event after the card is dealt to a target plug-in class according to the target service processing flow, so that the target plug-in class forwards the target plug-in class to a rule class corresponding to the event after the card is dealt;
the matching subunit is used for matching the post-deal-making event according to the rule class to obtain a matching result;
and the notification subunit is used for notifying the matching result and executing a preset subsequent event of the matching result.
The specific implementation of the service data processing apparatus of the present application is substantially the same as that of each embodiment of the service data processing method, and is not described herein again.
The present application also provides a computer program product, comprising a computer program, which when executed by a processor implements the steps of the above-mentioned service data processing method.
The specific implementation of the computer program product of the present application is substantially the same as that of each embodiment of the service data processing method, and is not described herein again.
The above description is only a preferred embodiment of the present application, and not intended to limit the scope of the present application, and all modifications of equivalent structures and equivalent processes, which are made by the contents of the specification and the drawings, or which are directly or indirectly applied to other related technical fields, are included in the scope of the present application.