Network game data processing method and system of micro-service

文档序号:1416632 发布日期:2020-03-13 浏览:35次 中文

阅读说明:本技术 微服务的网络游戏数据处理方法及系统 (Network game data processing method and system of micro-service ) 是由 覃世刚 于 2018-09-06 设计创作,主要内容包括:本发明适用于网络游戏技术领域,提供了一种微服务的网络游戏数据处理方法及系统,所述方法包括:接收用户终端发送的数据请求,并将所述数据请求发送至与所述数据请求对应的第一微服务单元;所述第一微服务单元的命令侧将所述数据请求转变为目标状态事件,并存储至事件源数据库;第二微服务单元获取所述事件源数据库发送的所述目标状态事件,并通过所述第二微服务单元的查询侧获取与所述目标状态事件对应的后续事件,并存储至事件源数据库;所述第一微服务单元获取所述后续事件,并根据所述后续事件响应所述数据请求,所述方法采用微服务的网络架构能够使得各个服务实现独立部署,进而实现数据处理系统的灵活性、敏捷性和扩展性。(The invention is suitable for the technical field of online games, and provides a method and a system for processing online game data of micro-services, wherein the method comprises the following steps: receiving a data request sent by a user terminal, and sending the data request to a first micro service unit corresponding to the data request; the command side of the first micro service unit converts the data request into a target state event and stores the target state event in an event source database; the second micro service unit acquires the target state event sent by the event source database, acquires a subsequent event corresponding to the target state event through the query side of the second micro service unit, and stores the subsequent event in the event source database; the first micro-service unit acquires the subsequent event and responds to the data request according to the subsequent event, and the method adopts a network architecture of micro-services to realize independent deployment of each service, thereby realizing the flexibility, agility and expansibility of the data processing system.)

1. A method for processing network game data of micro-service is characterized by comprising the following steps:

receiving a data request sent by a user terminal, and sending the data request to a first micro service unit corresponding to the data request;

the command side of the first micro service unit converts the data request into a target state event and stores the target state event to an event source database;

the second micro service unit acquires the target state event sent by the event source database, acquires a subsequent event corresponding to the target state event through the query side of the second micro service unit after acquiring the target state event, and stores the subsequent event to the event source database;

and the first micro service unit acquires the subsequent event sent by the event source database and responds to the data request according to the subsequent event.

2. The method for processing data of web game of microservice of claim 1, wherein after the second microservice unit stores the subsequent event in the event source database, further comprising:

when a command request with a changed data request meeting condition is received, converting the command request with the changed data request meeting condition into a corresponding state change event through a command side of a second micro service unit, and storing the corresponding state change event to an event source database.

3. The method for processing data of web games served by a micro server according to claim 2, wherein the step of obtaining the subsequent event corresponding to the target state event through the query side of the second micro server unit specifically comprises:

and the second micro service unit acquires a corresponding state change event from the event source database, replays the corresponding state change event and acquires a subsequent event corresponding to the target state event.

4. The microservice network game data processing method of claim 1, further comprising:

and after receiving the target state event or the subsequent event, the event source database sends the target state event or the subsequent event to the micro service unit subscribed to the target state event or the subsequent event through the message bus.

5. The method for processing data of a microservice network game according to claim 4, wherein the step of sending the target state event or the subsequent event to the microservice unit subscribed to the target state event or the subsequent event via a message bus comprises:

detecting the delay time of a target state event or a subsequent event;

when the delay time exceeds a set threshold value, the target state event or the subsequent event is sent to a micro service unit subscribed with the target state event or the subsequent event again;

and after receiving the target state event or the subsequent event, the micro service unit subscribing the target state event or the subsequent event sends a message confirmation signal to a message bus.

6. The method for processing data of a microservice network game according to claim 1, wherein the data request is an entry request, and the obtaining of the subsequent event corresponding to the target state event by the query side of the second microservice unit specifically comprises:

inquiring a game state event when the user registers through a user micro-service subunit of the second micro-service unit;

inquiring a field state event of a user registration through a field micro-service subunit of the second micro-service unit;

and inquiring the entrance ticket state event of the user registration through the entrance ticket micro-service subunit of the second micro-service unit.

7. The network game data processing system of the micro-service is characterized by comprising a first micro-service unit, a second micro-service unit and an event source database;

the first micro service unit is used for acquiring a corresponding target state event according to a data request sent by a user terminal;

the second micro service unit is used for acquiring a subsequent event corresponding to the target state event;

the event source database is used for storing a target state event and a subsequent event corresponding to the target state event, and sending the target state event and the subsequent event corresponding to the target state event to a micro service unit subscribing the target state event and the subsequent event corresponding to the target state event.

8. The microservice network gaming data processing system of claim 7 wherein the data processing system is an entry system and the second microservice unit comprises a user microservice subunit, a session microservice subunit, and a ticket microservice subunit;

the user micro-service subunit is used for inquiring the game state event of the user during registration;

the field micro-service subunit is used for inquiring field state events of user registration;

the entrance ticket micro-service subunit is used for inquiring entrance ticket state events registered by the user.

9. A terminal device comprising a memory, a processor and a computer program stored in the memory and executable on the processor, characterized in that the processor implements the steps of the method according to any of claims 1 to 6 when executing the computer program.

10. A computer-readable storage medium, in which a computer program is stored which, when being executed by a processor, carries out the steps of the method according to any one of claims 1 to 6.

Technical Field

The invention belongs to the technical field of online games, and particularly relates to a method and a system for processing online game data of micro-service.

Background

Nowadays, networks are developed more and more, and various games are gradually converted from off-line to on-line, such as chess and card games. Meanwhile, online games are increasingly favored because they are not limited by time and space. However, the conventional game data processing system is implemented based on a single mode architecture, and the game data processing system under the single mode architecture needs to be integrally operated in the development and debugging stages, and has the disadvantages of high coupling degree, difficulty in control and resource waste. Therefore, there is a need for a network game data processing system with flexibility, agility and extensibility.

Disclosure of Invention

In view of this, embodiments of the present invention provide a method and an apparatus for processing network game data of a micro service, so as to solve the problems in the prior art that a network game data processing system has a high coupling degree, is difficult to control, and wastes resources.

The first aspect of the embodiment of the invention provides a method for processing network game data of micro-service, which comprises the following steps:

receiving a data request sent by a user terminal, and sending the data request to a first micro service unit corresponding to the data request;

the command side of the first micro service unit converts the data request into a target state event and stores the target state event to an event source database;

the second micro service unit acquires the target state event sent by the event source database, acquires a subsequent event corresponding to the target state event through the query side of the second micro service unit after acquiring the target state event, and stores the subsequent event to the event source database;

and the first micro service unit acquires the subsequent event sent by the event source database and responds to the data request according to the subsequent event.

A second aspect of an embodiment of the present invention provides a microservice network game data processing system, including: the system comprises a first micro service unit, a second micro service unit and an event source database;

the first micro service unit is used for acquiring a corresponding target state event according to a data request sent by a user terminal;

the second micro service unit is used for acquiring a subsequent event corresponding to the target state event;

the event source database is used for storing a target state event and a subsequent event corresponding to the target state event, and sending the target state event and the subsequent event corresponding to the target state event to a micro service unit subscribing the target state event and the subsequent event corresponding to the target state event.

A third aspect of an embodiment of the present invention provides a terminal device, including: the system comprises a memory, a processor and a computer program stored in the memory and capable of running on the processor, wherein the processor executes the computer program to realize the steps of the network game data processing method of the microservice according to any one of the above.

A fourth aspect of embodiments of the present invention provides a computer-readable storage medium storing a computer program that, when executed by a processor, implements the steps of the network game data processing method of a microservice as described in any one of the above.

Compared with the prior art, the embodiment of the invention has the following beneficial effects: in the embodiment of the invention, after a data request sent by a user is acquired, the data request is processed through a command side of a first micro service unit, the data request is converted into a target state event, the acquired target state event is stored in an event source database, a second micro service unit acquires the target state event sent by an event source database, after the target state event is acquired, a subsequent event corresponding to the target state event is acquired through a query side of the second micro service unit, the event source database also stores the subsequent event, the first micro service unit acquires the subsequent event from the event source database and responds to the data request according to the subsequent event, and the method stores the target state event or the subsequent event acquired by the first micro service unit and the second micro service unit through the event source database, the data processing system can ensure that the data request process is completed in a single transaction mode, and realizes independent deployment of each micro-service, so that the data processing system has flexibility, agility and expansibility.

Drawings

In order to more clearly illustrate the technical solutions in the embodiments of the present invention, the drawings needed to be used in the embodiments or the prior art descriptions will be briefly described below, and it is obvious that the drawings in the following description are only some embodiments of the present invention, and it is obvious for those skilled in the art to obtain other drawings based on these drawings without inventive exercise.

FIG. 1 is a schematic flow chart of an implementation of a method for processing network game data of a microservice provided by an embodiment of the present invention;

FIG. 2 is a schematic diagram of a network game data processing system of the microservice provided by the embodiment of the invention;

FIG. 3 is a block diagram of another embodiment of a microservice network game data processing system;

FIG. 4 is a flowchart illustrating a process for handling an entry request of a user according to an embodiment of the present invention;

fig. 5 is a schematic diagram of a terminal device according to an embodiment of the present invention.

Detailed Description

In the following description, for purposes of explanation and not limitation, specific details are set forth, such as particular system structures, techniques, etc. in order to provide a thorough understanding of the embodiments of the invention. It will be apparent, however, to one skilled in the art that the present invention may be practiced in other embodiments that depart from these specific details. In other instances, detailed descriptions of well-known systems, devices, circuits, and methods are omitted so as not to obscure the description of the present invention with unnecessary detail.

In order to explain the technical means of the present invention, the following description will be given by way of specific examples.

Referring to fig. 1, a method for processing network game data of a microservice provided by an embodiment of the present invention is shown, and detailed as follows:

step S101, receiving a data request sent by a user terminal, and sending the data request to a first micro service unit corresponding to the data request.

In this embodiment, the user terminal sends the data request to the first micro service unit through the API gateway, where the API gateway is used to connect the user terminal and the micro server, and is used to forward the data request of the user to the first micro service unit, and return a response result of the first micro service unit to the data request to the user terminal. The first micro service unit is used for processing the data request.

Step S102, the command side of the first microserver unit converts the data request into a target state event and stores the target state event to an event source database.

In this embodiment, after receiving a data request, the first microserver converts the data request into a target state event through a command side of the first microserver, for example: when the first micro service unit receives the data request, the command side of the first micro service unit obtains the data processing state according to the data request, and the target state event may be a newly-built data request event. After the first micro service unit obtains the target state event, the target state event is sent to an event source database, that is, the newly-built data request event is stored in the event source database.

Step S103, the second micro service unit obtains the target state event sent by the event source database, and after obtaining the target state event, obtains a subsequent event corresponding to the target state event through the query side of the second micro service unit, and stores the subsequent event in the event source database.

In this embodiment, the second micro service unit subscribes to the target state event from the event source database, and after acquiring the target state event sent by the first micro service unit, the event source database sends the target state event to the second micro service unit. For example, the target state event here may be a newly created data request event. After acquiring the target state event, the second microserver acquires a subsequent event corresponding to the target state event through the query side, where the subsequent event may be an event that the microserver needs to satisfy when requesting data from a user, for example: when the data request of the user is an entry, the second micro service unit needs to detect the game state of the user, and the entry condition can be met only when the user is not in the game state, so that the subsequent event can be a game state event of the user.

Step S104, the first micro service unit obtains the subsequent event sent by the event source database, and responds to the data request according to the subsequent event.

In this embodiment, the first micro service unit may subscribe to a subsequent event sent by the second micro service unit from the element source database, determine whether the data request meets a preset condition according to the obtained subsequent event, and when the preset condition is met, reply a message that the data request is successful to the user; and when the preset condition is not met, replying information of data request failure to the user, and noting the reason of the data request failure.

It should be noted that the preset conditions that the user needs to satisfy for successful registration may be multiple, and the subsequent event that is acquired by the second micro service unit each time is for one preset condition, so that the second micro service unit may acquire different subsequent events multiple times and store them in the event source database, the first micro service unit may acquire the corresponding subsequent event from the event source database, and determine whether the subsequent event satisfies the preset conditions, and when the subsequent events all satisfy the preset conditions, the information that the registration is successful is sent to the user through the data request of the user. The first micro service unit obtains the subsequent events from the event source database and judges whether the subsequent events meet preset conditions, and when the preset conditions are not met, the first micro service unit directly interrupts processing of the data request and sends information of registration failure to a user.

As can be seen from the foregoing embodiments, after a data request sent by a user is obtained, the data request is converted into a target state event through a command side of a first micro service unit and stored in an event source database, after a second micro service unit obtains the target state event from the event source database, a subsequent event corresponding to the target state event is obtained through a query side of the second micro service unit and stored, the first micro service unit obtains the subsequent event from the event source database and responds to the data request according to the subsequent event, in the method, the target state event or the subsequent event obtained by the first micro service unit and the second micro service unit is stored through the event source database, which can ensure that a data request process is completed in a single transaction manner, and realize independent deployment of each service, so that the data processing system has flexibility, Agility and extensibility.

In an embodiment of the present invention, in step S103, after the second microserver stores the subsequent event in the event source database, the method further includes:

when a command request with a changed data request meeting condition is received, converting the command request with the changed data request meeting condition into a corresponding state change event through a command side of a second micro service unit, and storing the corresponding state change event to an event source database.

In this embodiment, when the data request satisfaction condition changes, a command request for changing the data request is generated, and the second microserver unit receives the command request and obtains a corresponding state change event according to the command request. The data request satisfaction condition refers to a condition that needs to be satisfied when the data request is sent by the user. Wherein the data request fulfils a condition that can be changed. For example: when the data request is an entry request, the entry field of the user needs to be an open field, and when the system opens or closes a certain entry field at a certain time, the condition that the data request meets will be changed. When the second microserver acquires the command request, the command request is converted into a state change event by the command side of the second microserver, specifically, the state change event here may be: when the system is in a first moment, the state of the first field is an open state; when the system is in the second time, the state of the first field is the closed state. And after the second micro service unit acquires the state change event, sending the state change event to an event source database for storage.

In an embodiment of the present invention, in step S103, the acquiring, by the querying side of the second microserver, a subsequent event corresponding to the target state event specifically includes:

and the second micro service unit acquires a corresponding state change event from the event source database, replays the corresponding state change event and acquires a subsequent event corresponding to the target state event.

In this embodiment, since the event source database stores the state change event, when the second microserver needs to acquire the subsequent event corresponding to the target state event, the second microserver needs to acquire the corresponding state change event from the event source database, for example: the second microserver obtains the event that the state of the first field is the open state when the system is at the first time from the event source database, and the state of the first field is the closed state when the system is at the second time, and replays the events according to the time sequence to obtain the subsequent events corresponding to the target state event, namely the open state of the game field in which the user is currently positioned.

As can be seen from the foregoing embodiments, since the event source database stores the state change event, the state event at any time point can be obtained through the replay of the event, thereby avoiding that the microserver unit subscribing to the event can only obtain the final state event.

In one embodiment of the invention, the method further comprises: and after receiving the target state event or the subsequent event, the event source database sends the target state event or the subsequent event to the micro service unit subscribed to the target state event or the subsequent event through the message bus.

In the embodiment of the present invention, after receiving a target state event or a subsequent event, an event source database needs to send the event to a micro service unit subscribing to the target state event or the subsequent event, and specifically, the event source database sends the target state event or the subsequent event to the micro service unit through a message bus. For example: after receiving the target state event acquired by the first micro service unit, the event source database stores the target state event, issues the target state event to a message bus, and sends the target state event to the second micro service unit through the message bus.

In the above process, the event source database has atomicity in the data sending process, after the event source database obtains the target state event or the subsequent event, the target state event or the subsequent event is sent to a message bus, the event saving process is a single operation, and the message bus can ensure that the target state event or the subsequent event can be sent to the corresponding micro service unit.

In an embodiment of the present invention, the sending a target state event or a subsequent event to a micro service unit subscribing to the target state event or the subsequent event through a message bus specifically includes:

step S201, detecting a delay time of the target state event or the subsequent event.

In this embodiment, the message bus of the event source database may further ensure that the target state event or the subsequent event is sent to the micro service unit subscribing to the target state event or the subsequent event through an operation of retransmission over time. Specifically, after the event source database sends the target state event or the subsequent event, the micro service unit subscribing the target state event or the subsequent event does not receive the target state event or the subsequent event and obtains the delay time.

Step S202, when the delay time exceeds a set threshold, the target state event or the subsequent event is sent to the micro service unit subscribed with the target state event or the subsequent event again.

In this embodiment, after the delay time is obtained, the delay time is compared with a set threshold, and when the delay time is greater than the set threshold, it indicates that the micro service unit subscribing to the state change event does not receive a target state event or a subsequent event, and needs to resend the target state event or the subsequent event to the micro service unit subscribing to the target state event or the subsequent event.

By the embodiment, the event can be retransmitted after the corresponding micro service unit does not receive the target state event or the subsequent event, so that the probability that the micro service unit subscribing the state change event acquires the target state event or the subsequent event can be improved.

Step S203, after receiving the target state event or the subsequent event, the microserver subscribing the target state event or the subsequent event sends a message confirmation signal to a message bus.

In this embodiment, after receiving the event, the micro service unit subscribing to the target state event or the subsequent event generates a confirmation signal indicating that the micro service unit subscribing to the target state event or the subsequent event has received the target state event or the subsequent event, and sends the confirmation signal to the message bus, and after receiving the confirmation signal, the message bus can determine that the event sending process is successfully completed.

By the embodiment, after receiving the event, the micro service unit subscribing the target state event or the subsequent event can send a confirmation signal to the message bus, so that the message bus can prepare for sending the next target state event or the subsequent event.

In addition, a mode of combining timeout retransmission and message confirmation is adopted to ensure that the micro service unit subscribing the target state event or the subsequent event can receive the corresponding event, but the mode of adopting timeout retransmission and message confirmation can cause the message bus to send the repeated event to the corresponding micro service unit, so that the method also adopts idempotent processing operation, and the idempotent processing can only generate one processing result corresponding to the event when the micro service unit receives the same event for multiple times. For example: after the corresponding micro service unit receives the fee deduction event for many times, the fee of the user is deducted only once.

In an embodiment of the present invention, the data request is an entry request, and the acquiring, by the query side of the second micro service unit, a subsequent event corresponding to the target state event specifically includes:

inquiring a game state event when the user registers through a user micro-service subunit of the second micro-service unit;

inquiring a field state event of a user registration through a field micro-service subunit of the second micro-service unit;

and inquiring the entrance ticket state event of the user registration through the entrance ticket micro-service subunit of the second micro-service unit.

In this embodiment, when the data request is an entry request, the subsequent events corresponding to the target state event acquired by the second microserver unit include: game status events, session status events, and ticket status events. The game state event, the field state event and the entrance ticket state event all correspond to entry conditions to be met by game entries of the user. For example: when a user applies for a certain game, some conditions need to be satisfied: the current game state of the user is not in a game state; the game field of the user registration is in an open state; the ticket value of the user should be greater than the ticket value required for the entry session. In this embodiment, in order to determine whether entry information of a user meets an entry condition, a game state event of the user is acquired through the user micro-service subunit, a field state event of the user is acquired through the field micro-service subunit, a ticket state event of the user is acquired through the ticket micro-service unit, the acquired event is sent to the event source database, and the first micro-service unit acquires the event from the event source database and determines whether the event meets a preset entry condition.

When the data request is an entry request, and when the acquired game state event, field state event and entrance ticket state event of the user are consistent with the preset entry condition, the entry of the user is successful, and when the game state event, field state event and entrance ticket state event are inconsistent with the preset entry condition, namely the entry process is abnormal, the entry state of the user can be returned to the nearest moment that the state event is in a normal state through information rollback, so that the user can continuously judge whether the entry information meets the preset condition after changing the entry information without judging the entry information meeting the preset condition again.

In the embodiment of the invention, after a data request sent by a user is acquired, the data request is converted into a target state event through a command side of a first micro service unit and is stored in an event source database, a second micro service unit acquires the target state event from the event source database, then acquires a subsequent event corresponding to the target state event through a query side of the second micro service unit and stores the subsequent event, the first micro service unit acquires the subsequent event from the event source database and responds to the data request according to the subsequent event, and the method stores the state change event or the subsequent event acquired by the first micro service unit and the second micro service unit through the event source database, can ensure that the data request process is completed in a single transaction mode, realizes independent deployment of each service, and enables the data processing system to have flexibility, Agility and extensibility.

It should be understood that, the sequence numbers of the steps in the foregoing embodiments do not imply an execution sequence, and the execution sequence of each process should be determined by its function and inherent logic, and should not constitute any limitation to the implementation process of the embodiments of the present invention.

Referring to fig. 2, a network game data processing system of the microservice provided by the embodiment of the invention is shown, the system comprises: a first micro-service unit 101, a second micro-service unit 102 and an event source database 103.

The first micro service unit 101 is configured to obtain a corresponding target state event according to a data request sent by a user terminal; the second microserver unit 102 is configured to obtain a subsequent event corresponding to the target state event; the event source database 103 is configured to store a target state event and a subsequent event corresponding to the target state event, and send the target state event and the subsequent event corresponding to the target state event to a microserver subscribing to the target state event and the subsequent event corresponding to the target state event.

Referring to fig. 3, there is shown another network game data processing system of micro-service provided by the embodiment of the present invention, wherein the second micro-service unit includes: a user microservice subunit 1021, a session microservice subunit 1022, and a ticket microservice subunit 1023.

The user micro-service subunit 1021 is used for inquiring a game state event when a user registers;

the session microservice subunit 1022 is configured to query a session status event of a user entry;

the ticket microservice subunit 1023 is used to query ticket status events for the user's entry.

In this embodiment, a first micro service unit is arranged to obtain a corresponding target state event according to a data request sent by a user terminal, a second micro service unit is used to obtain a subsequent event corresponding to the target state event, and an event source database is used to send the target state event and the subsequent event corresponding to the target state event to a micro service unit subscribing to the target state event and the subsequent event corresponding to the target state event, so that the subsequent event is obtained by the second micro service unit, and whether the subsequent event meets a preset condition is determined by the first micro service unit.

Referring to FIG. 4, a flow chart illustrating processing of a user's entry request when the data processing system is an entry request processing system is shown, which is detailed as follows:

the entry request processing system comprises an entry micro-service unit, a user micro-service unit, a field micro-service unit, a ticket micro-service unit and an event source database. After the user terminal sends an entry request, the entry micro-service unit receives the entry request, processes the entry request, modifies the entry state into a created entry event, stores the newly created entry event and sends the newly created entry event to an event source database; the field micro-service unit subscribes a newly-built registration event in an event source database, acquires the newly-built registration event, queries the field state of a user, and releases the field state to the event source database; the entry micro-service unit subscribes a field state event in an event source database, judges whether the field state is an open state after acquiring a field confirmation event, and stores and releases the entry field confirmation event to the event source database when the field state is the open state; the user microservice unit subscribes to an entry field confirming event in an event source database, queries the game state of the user after acquiring the entry field confirming event, and issues the game state event to the event source database.

When the user micro-service unit issues a game state event to an event source database, the registration micro-service unit subscribes the game state event from the event source database and judges that the game state is not in the game state, and stores and issues a game state confirmation event to the event source database; the ticket microservice unit subscribes a game state confirmation event in the event source database, inquires and uses tickets of users after acquiring the game state confirmation event, and issues ticket use events to the event source database; the entry micro-service unit subscribes the entrance ticket using event from an event source database and simultaneously issues an entrance ticket using confirmation event to the event source database; the user micro service unit subscribes the ticket use confirmation event from the event source database and issues a charge deduction event to the event source database; and the registration micro-service unit subscribes a registration fee deduction event from the event source database, stores and releases a registration fee deduction confirmation event to the event source database when fee deduction is successful, and simultaneously sends the information of successful registration to the user terminal.

In the embodiment of the invention, after receiving an entry request, an entry request processing system sequentially judges whether entry is successful or not through each micro-service unit, specifically, a field micro-service unit is adopted to obtain a field state event of a user, a user micro-service unit is adopted to obtain a game state event of the user, a ticket micro-service unit is used to obtain a ticket state event of the user, a user micro-service unit is used to obtain a fee deduction state event of the user, an event source storage unit is used to store the state event, the state event is sent to the entry micro-service unit, and whether entry is successful or not is judged according to the state event. The registration request processing system adopts a network architecture of micro-services, so that each server can be independently deployed, and the flexibility, the agility and the expansibility of the registration system are realized.

Fig. 5 is a schematic diagram of a terminal device according to an embodiment of the present invention. As shown in fig. 5, the terminal device 50 of this embodiment includes: a processor 500, a memory 501 and a computer program 502 stored in said memory 501 and executable on said processor 500. The processor 500 executes the computer program 502 to implement the steps in the above-mentioned embodiments of the method for processing network game data of each micro-service, such as the steps S101 to S104 shown in fig. 1. Alternatively, the processor 500 executes the computer program 502 to implement the functions of the modules/units in the device embodiments, such as the functions of the modules 101 to 103 shown in fig. 2.

Illustratively, the computer program 502 may be partitioned into one or more modules/units that are stored in the memory 501 and executed by the processor 500 to implement the present invention. The one or more modules/units may be a series of computer program instruction segments capable of performing specific functions, which are used to describe the execution process of the computer program 502 in the terminal device 50. For example, the computer program 502 may be divided into a first micro service unit, a second micro service unit and an event source database, and the specific functions of the modules are as follows:

the first micro service unit 101 is configured to obtain a corresponding target state event according to a data request sent by a user terminal;

the second microserver unit 102 is configured to obtain a subsequent event corresponding to the target state event;

the event source database 103 is configured to store a target state event and a subsequent event corresponding to the target state event, and send the target state event and the subsequent event corresponding to the target state event to a microserver subscribing to the target state event and the subsequent event corresponding to the target state event.

The terminal device 50 may be a computing device such as a desktop computer, a notebook, a palm computer, and a cloud server. The terminal device may include, but is not limited to, a processor 500, a memory 501. Those skilled in the art will appreciate that fig. 5 is merely an example of a terminal device 50 and does not constitute a limitation of terminal device 50 and may include more or fewer components than shown, or some components may be combined, or different components, for example, the terminal device may also include input output devices, network access devices, buses, etc.

The Processor 500 may be a Central Processing Unit (CPU), other general purpose Processor, a Digital Signal Processor (DSP), an Application Specific Integrated Circuit (ASIC), an off-the-shelf Programmable Gate Array (FPGA) or other Programmable logic device, discrete Gate or transistor logic, discrete hardware components, etc. A general purpose processor may be a microprocessor or the processor may be any conventional processor or the like.

The storage 501 may be an internal storage unit of the terminal device 50, such as a hard disk or a memory of the terminal device 50. The memory 501 may also be an external storage device of the terminal device 50, such as a plug-in hard disk, a Smart Media Card (SMC), a Secure Digital (SD) Card, a Flash memory Card (Flash Card), and the like, which are provided on the terminal device 50. Further, the memory 501 may also include both an internal storage unit and an external storage device of the terminal device 50. The memory 501 is used for storing the computer program and other programs and data required by the terminal device. The memory 501 may also be used to temporarily store data that has been output or is to be output.

It will be apparent to those skilled in the art that, for convenience and brevity of description, only the above-mentioned division of the functional units and modules is illustrated, and in practical applications, the above-mentioned function distribution may be performed by different functional units and modules according to needs, that is, the internal structure of the apparatus is divided into different functional units or modules to perform all or part of the above-mentioned functions. Each functional unit and module in the embodiments may be integrated in one processing unit, or each unit may exist alone physically, or two or more units are integrated in one unit, and the integrated unit may be implemented in a form of hardware, or in a form of software functional unit. In addition, specific names of the functional units and modules are only for convenience of distinguishing from each other, and are not used for limiting the protection scope of the present application. The specific working processes of the units and modules in the system may refer to the corresponding processes in the foregoing method embodiments, and are not described herein again.

In the above embodiments, the descriptions of the respective embodiments have respective emphasis, and reference may be made to the related descriptions of other embodiments for parts that are not described or illustrated in a certain embodiment.

Those of ordinary skill in the art will appreciate that the various illustrative elements and algorithm steps described in connection with the embodiments disclosed herein may be implemented as electronic hardware or combinations of computer software and electronic hardware. Whether such functionality is implemented as hardware or software depends upon the particular application and design constraints imposed on the implementation. Skilled artisans may implement the described functionality in varying ways for each particular application, but such implementation decisions should not be interpreted as causing a departure from the scope of the present invention.

In the embodiments provided in the present invention, it should be understood that the disclosed apparatus/terminal device and method may be implemented in other ways. For example, the above-described embodiments of the apparatus/terminal device are merely illustrative, and for example, the division of the modules or units is only one logical division, and there may be other divisions when actually implemented, for example, a plurality of units or components may be combined or integrated into another system, or some features may be omitted, or not executed. In addition, the shown or discussed mutual coupling or direct coupling or communication connection may be an indirect coupling or communication connection through some interfaces, devices or units, and may be in an electrical, mechanical or other form.

The units described as separate parts may or may not be physically separate, and parts displayed as units may or may not be physical units, may be located in one place, or may be distributed on a plurality of network units. Some or all of the units can be selected according to actual needs to achieve the purpose of the solution of the embodiment.

In addition, functional units in the embodiments of the present invention may be integrated into one processing unit, or each unit may exist alone physically, or two or more units are integrated into one unit. The integrated unit can be realized in a form of hardware, and can also be realized in a form of a software functional unit.

The integrated modules/units, if implemented in the form of software functional units and sold or used as separate products, may be stored in a computer readable storage medium. Based on such understanding, all or part of the flow of the method according to the embodiments of the present invention may also be implemented by a computer program, which may be stored in a computer-readable storage medium, and when the computer program is executed by a processor, the steps of the method embodiments may be implemented. Wherein the computer program comprises computer program code, which may be in the form of source code, object code, an executable file or some intermediate form, etc. The computer-readable medium may include: any entity or device capable of carrying the computer program code, recording medium, usb disk, removable hard disk, magnetic disk, optical disk, computer Memory, Read-Only Memory (ROM), Random Access Memory (RAM), electrical carrier wave signals, telecommunications signals, software distribution medium, and the like. It should be noted that the computer readable medium may contain content that is subject to appropriate increase or decrease as required by legislation and patent practice in jurisdictions, for example, in some jurisdictions, computer readable media does not include electrical carrier signals and telecommunications signals as is required by legislation and patent practice.

The above-mentioned embodiments are only used for illustrating the technical solutions of the present invention, and not for limiting the same; although the present invention has been described in detail with reference to the foregoing embodiments, it will be understood by those of ordinary skill in the art that: the technical solutions described in the foregoing embodiments may still be modified, or some technical features may be equivalently replaced; such modifications and substitutions do not substantially depart from the spirit and scope of the embodiments of the present invention, and are intended to be included within the scope of the present invention.

16页详细技术资料下载
上一篇:一种医用注射器针头装配设备
下一篇:一种无曲轴吊杆的转马结构

网友询问留言

已有0条留言

还没有人留言评论。精彩留言会获得点赞!

精彩留言,会给你点赞!

技术分类