Data processing method and device in character game

文档序号:1119070 发布日期:2020-10-02 浏览:30次 中文

阅读说明:本技术 文字游戏中数据处理方法及装置 (Data processing method and device in character game ) 是由 胡映明 胡志鹏 李仁杰 范长杰 刘柏 李乐 林磊 刘思彦 陈旭韩 陶凯伦 张照煦 于 2020-06-28 设计创作,主要内容包括:本申请提供了一种文字游戏中数据处理方法及装置,涉及计算机技术领域,包括预处理服务器接收所述交互服务器发送的玩家的输入数据;确定所述玩家的游戏描述信息,并将所述玩家的游戏描述信息转换为无状态的数据;将所述无状态的数据以及所述玩家的输入数据发送至所述玩法服务器,以便所述玩法服务器将所述无状态的数据和所述玩家的输入数据输入自然语言处理模型后,生成处理结果。以此实现,将玩家的游戏描述信息在预处理服务器中转换为无状态的数据后,玩法服务器再进行自然语言处理,以此降低玩法服务器的负担,提升计算效率。(The application provides a data processing method and a data processing device in a character game, which relate to the technical field of computers and comprise the steps that a preprocessing server receives input data of a player sent by an interaction server; determining game description information of the player, and converting the game description information of the player into stateless data; and sending the stateless data and the input data of the player to the play server so that the play server can generate a processing result after inputting the stateless data and the input data of the player into a natural language processing model. The game description information of the player is converted into stateless data in the preprocessing server, and then the playing server carries out natural language processing, so that the burden of the playing server is reduced, and the calculation efficiency is improved.)

1. A data processing method in a character game is characterized in that a service system of the character game comprises an interaction server, a preprocessing server and a play server, wherein the play server provides a natural language processing model, and the preprocessing server maintains player state data; the method is suitable for preprocessing a server, and comprises the following steps:

receiving input data of the player sent by the interaction server;

determining game description information of the player, and converting the game description information of the player into stateless data;

and sending the stateless data and the input data of the player to the play server so that the play server can generate a processing result after inputting the stateless data and the input data of the player into a natural language processing model.

2. The method of claim 1, wherein the preprocessing server comprises a plurality.

3. The method of claim 1, wherein the input data of the player carries an identification of the player; a step of determining game description information of the player and converting the game description information of the player into stateless data, including;

obtaining game description information of the player in a state database based on the identification of the player;

and converting the game description information of the player into stateless data based on a preset first format template, wherein the first format is an input format of the natural language processing model.

4. The method according to claim 3, wherein the first format template comprises a preset status identifier and a part to be filled corresponding to the status identifier; the step of converting the game description information of the player into stateless data includes:

and filling the game description information of the player into the part to be filled of the first format template according to the state identification to obtain stateless data.

5. The method of claim 4, wherein the status flag comprises a requirement flag and a configuration flag.

6. The method of claim 5, wherein the game description information of the player comprises progress data of the word game and identity data of the player.

7. The method of claim 6, wherein the step of determining game description information for the player comprises:

determining requirement data of the player, which is generated according to the process data of the player, wherein the requirement data corresponds to a requirement identifier;

and determining configuration data of the player according to the identity data of the player, wherein the configuration data corresponds to a configuration identifier.

8. The method of claim 1, further comprising:

receiving the processing result sent by the play server;

and converting the processing result into output data based on the game description information of the player, and then sending the output data to the interactive server so that the interactive server can provide the output data for a client.

9. The method of claim 8, wherein the step of transmitting the output data to the interaction server after converting the processing result into the output data based on the game description information of the player comprises:

updating the game description information of the player according to the processing result;

generating output data according to the updated game description information of the player;

and sending the output data to the interaction server.

10. The method of claim 1, wherein prior to receiving the player's input data sent by the interaction server, the method further comprises:

receiving creation data of the character game sent by the interactive server, wherein the creation data comprises an identity of a player and a current game ID;

establishing a game process aiming at the current game ID;

and returning a creation success message to the interaction server.

11. A data processing method in a character game is characterized in that a service system of the character game comprises an interaction server, a preprocessing server and a play server, wherein the play server provides a natural language processing model, and the preprocessing server maintains player state data; the method is applicable to the service system and comprises the following steps:

the interactive server receives input data of a player sent by the client;

the interaction server sends the input data of the player to the preprocessing server;

the preprocessing server determines game description information of the player and converts the game description information of the player into stateless data;

the preprocessing server sends the stateless data and the input data of the player to the play server;

and the play server inputs the stateless data and the input data of the player into a natural language processing model and then generates a processing result.

12. The method of claim 11, further comprising:

the play server sends the processing result to the preprocessing server;

the preprocessing server converts the processing result into output data based on the game description information of the player;

the preprocessing server sends the output data to the interaction server;

and the interaction server sends the output data to the client.

13. A data processing device in a character game is characterized in that a server side of the character game comprises an interaction server, a preprocessing server and a play server, wherein the play server provides a natural language processing model, and the preprocessing server maintains player state data; the apparatus is adapted to pre-process a server, the apparatus comprising:

the receiving module is used for receiving input data of the player sent by the interaction server;

the conversion module is used for determining the game description information of the player and converting the game description information of the player into stateless data;

and the sending module is used for sending the stateless data and the input data of the player to the play server so that the play server can generate a processing result after inputting the stateless data and the input data of the player into a natural language processing model.

14. A pre-processing server comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor implements the steps of the method according to any one of claims 1 to 10 when executing the computer program.

15. A server system for a word game, the server system comprising an interaction server, a preprocessing server as claimed in claim 14, and a play server, the play server providing a natural language processing model, the preprocessing server maintaining player status data.

16. A computer readable storage medium having stored thereon machine executable instructions which, when invoked and executed by a processor, cause the processor to execute the method of any of claims 1 to 10.

Technical Field

The present application relates to the field of computer technologies, and in particular, to a method and an apparatus for processing data in a text game.

Background

In game application, a plurality of interactive operations are performed between a player and a game system, the player inputs certain operation, and the game system displays a calculation result in the form of pictures, sounds, characters and the like after calculation.

In the conventional game application, after receiving input data sent by a client, a game interaction server forwards the input data to a game playing system, the game playing system inquires player state data from a game data storage server according to the player input data, and sends results of the player state data and the player input data after being processed by playing calculation logic to the client through the interaction server.

The traditional game server system depends on player state data when calculating the result of game play data, the player state data can be very complex according to the complexity of the game, such as equipment data, achievement data, activity data, task data and the like, and the game system needs more complex logic to process the access task of the player state data.

In a character game system developed by an NLP technology, an NLP processing system corresponds to a playing system of a traditional game system, the NLP system occupies a large amount of computing resources due to algorithm model computing, the algorithm model computing consumes a long time, and a processing scheme of player interaction data in a traditional server system can increase the burden of the NLP processing system.

Disclosure of Invention

The application aims to provide a data processing method and device in a character game so as to relieve the technical problem that a playing server in the prior art is overloaded.

In a first aspect, an embodiment of the present application provides a method for processing data in a text game, where a service system of the text game includes an interaction server, a preprocessing server and a play server, the play server provides a natural language processing model, and the preprocessing server maintains player status data; the method is suitable for the preprocessing server and comprises the following steps: receiving input data of a player sent by an interaction server; determining game description information of a player, and converting the game description information of the player into stateless data; and sending the stateless data and the input data of the player to a play server so that the play server can generate a processing result after inputting the stateless data and the input data of the player into the natural language processing model.

In an alternative embodiment, the preprocessing server includes a plurality.

In an alternative embodiment, the player's input data carries the player's identification; determining game description information of a player, and converting the game description information of the player into stateless data, including; acquiring game description information of the player in a state database based on the identification of the player; and converting the game description information of the player into stateless data based on a preset first format template, wherein the first format is an input format of the natural language processing model.

In an optional embodiment, the first format template includes a preset state identifier and a part to be filled corresponding to the state identifier; the step of converting the game description information of the player into stateless data includes: and filling the game description information of the player into the part to be filled of the first format template according to the state identification to obtain stateless data.

In an alternative embodiment, the status identifier includes a requirement identifier and a configuration identifier.

In an alternative embodiment, the game description information of the player includes progress data of the text game and identity data of the player.

In an alternative embodiment, the step of determining game description information of the player comprises: determining the generated requirement data of the player according to the process data of the player, wherein the requirement data corresponds to a requirement identifier; and determining configuration data of the player according to the identity data of the player, wherein the configuration data corresponds to a configuration identifier.

In an alternative embodiment, the method further comprises: receiving a processing result sent by a play server; and converting the processing result into output data based on the game description information of the player, and then sending the output data to the interaction server so that the interaction server can provide the output data to the client.

In an alternative embodiment, the step of converting the processing result into output data based on the game description information of the player, and then sending the output data to the interaction server includes: updating game description information of the player according to the processing result; generating output data according to the updated game description information of the player; and sending the output data to an interaction server.

In an alternative embodiment, before receiving the input data of the player transmitted by the interaction server, the method further comprises: receiving creation data of the character game sent by the interactive server, wherein the creation data comprises an identity of a player and a current game ID; establishing a game process aiming at the current game ID; and returning a creation success message to the interaction server.

In a second aspect, an embodiment of the present application provides a method for processing data in a text game, where a service system of the text game includes an interaction server, a preprocessing server and a play server, the play server provides a natural language processing model, and the preprocessing server maintains player status data; the method is applicable to a service system, and comprises the following steps: the interactive server receives input data of a player sent by the client; the interactive server sends the input data of the player to the preprocessing server; the method comprises the steps that a preprocessing server determines game description information of a player and converts the game description information of the player into stateless data; the preprocessing server sends stateless data and input data of a player to a play server; the play server inputs the stateless data and the input data of the player into the natural language processing model, and then generates a processing result.

In an alternative embodiment, the method further comprises: the play server sends the processing result to a preprocessing server; the preprocessing server converts the processing result into output data based on the game description information of the player; the preprocessing server sends the output data to an interaction server; and the interaction server sends the output data to the client.

In a third aspect, an embodiment of the present application provides a data processing apparatus in a text game, where a server of the text game includes an interaction server, a preprocessing server, and a play server, where the play server provides a natural language processing model, and the preprocessing server maintains player status data; the apparatus is adapted to preprocess a server, the apparatus comprising: the receiving module is used for receiving input data of the player sent by the interaction server; the conversion module is used for determining game description information of the player and converting the game description information of the player into stateless data; and the sending module is used for sending the stateless data and the input data of the player to the play server so that the play server can generate a processing result after inputting the stateless data and the input data of the player into the natural language processing model.

In an alternative embodiment, the player's input data carries the player's identification; the conversion module is specifically configured to: acquiring game description information of the player in a state database based on the identification of the player; and converting the game description information of the player into stateless data based on a preset first format template, wherein the first format is an input format of the natural language processing model.

In an optional embodiment, the first format template includes a preset state identifier and a part to be filled corresponding to the state identifier; the conversion module is specifically configured to: and filling the game description information of the player into the part to be filled of the first format template according to the state identification to obtain stateless data.

In an alternative embodiment, the status identifier includes a requirement identifier and a configuration identifier. The game description information of the player includes progress data of the text game and identification data of the player. The conversion module is specifically configured to: determining the generated requirement data of the player according to the process data of the player, wherein the requirement data corresponds to a requirement identifier; and determining configuration data of the player according to the identity data of the player, wherein the configuration data corresponds to a configuration identifier.

In an optional implementation manner, the game playing system further includes a response module, configured to receive a processing result sent by the play server; and converting the processing result into output data based on the game description information of the player, and then sending the output data to the interaction server so that the interaction server can provide the output data to the client.

In an alternative embodiment, the response module is specifically configured to: updating game description information of the player according to the processing result; generating output data according to the updated game description information of the player; and sending the output data to an interaction server.

In an optional embodiment, the system further comprises a creating module, configured to: receiving creation data of the character game sent by the interactive server, wherein the creation data comprises an identity of a player and a current game ID; establishing a game process aiming at the current game ID; and returning a creation success message to the interaction server.

In a fourth aspect, an embodiment of the present application provides a preprocessing server, where the preprocessing server includes a memory and a processor, where the memory stores a computer program executable on the processor, and the processor implements the steps of the method in any one of the foregoing embodiments when executing the computer program.

In a fifth aspect, an embodiment of the present application provides a server system for a word game, where the server system includes an interaction server, a preprocessing server as in the foregoing embodiment, and a play server, where the play server provides a natural language processing model, and the preprocessing server maintains player status data.

In a sixth aspect, embodiments of the present application provide a computer-readable storage medium storing machine executable instructions that, when invoked and executed by a processor, cause the processor to perform the method of any of the preceding embodiments.

According to the data processing method and device in the character game, input data of a player sent by an interactive server are received through a preprocessing server; determining game description information of a player, and converting the game description information of the player into stateless data; and sending the stateless data and the input data of the player to a play server so that the play server can generate a processing result after inputting the stateless data and the input data of the player into the natural language processing model. The game description information of the player is converted into stateless data in the preprocessing server, and then the playing server carries out natural language processing, so that the burden of the playing server is reduced, and the calculation efficiency is improved.

Drawings

In order to more clearly illustrate the detailed description of the present application or the technical solutions in the prior art, the drawings needed to be used in the detailed description of the present application or the prior art description will be briefly introduced below, and it is obvious that the drawings in the following description are some embodiments of the present application, and other drawings can be obtained by those skilled in the art without creative efforts.

Fig. 1 is a schematic structural diagram of a service system of a text game according to an embodiment of the present disclosure;

fig. 2 is a schematic flow chart of a data processing method in a text game according to an embodiment of the present application;

fig. 3 is a schematic signaling interaction diagram of a data processing method in a text game according to an embodiment of the present application;

FIG. 4 is a schematic structural diagram of a data processing apparatus in a text game according to an embodiment of the present disclosure;

fig. 5 is a schematic structural diagram of a computer device according to an embodiment of the present application.

Detailed Description

In order to make the objects, technical solutions and advantages of the embodiments of the present application clearer, the technical solutions in the embodiments of the present application will be clearly and completely described below with reference to the drawings in the embodiments of the present application, and it is obvious that the described embodiments are some embodiments of the present application, but not all embodiments. The components of the embodiments of the present application, generally described and illustrated in the figures herein, can be arranged and designed in a wide variety of different configurations.

Thus, the following detailed description of the embodiments of the present application, presented in the accompanying drawings, is not intended to limit the scope of the claimed application, but is merely representative of selected embodiments of the application. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present application.

It should be noted that: like reference numbers and letters refer to like items in the following figures, and thus, once an item is defined in one figure, it need not be further defined and explained in subsequent figures.

Fig. 1 is a schematic structural diagram of a service system of a word game provided in an embodiment of the present application, and as shown in fig. 1, the service system 100 of the word game includes an interaction server 101, a preprocessing server 102, and a play server 103.

The play server 103 is configured to provide a Natural Language Processing model (NLP), which may be obtained by training in advance, and may be periodically optimized according to data generated during a game. The optimization period may be determined according to actual needs, for example, the optimization may be performed after the data amount reaches a preset condition or the interval time reaches a preset condition. The natural language model is mainly used for realizing a playing method in a character game, and can obtain character output according to character input, for example, a complete story can be generated according to input multiple sentences or multiple vocabularies. The specific natural language model is illustrated here for clarity, and the capabilities of the specific natural language model are different according to different game playing methods, and are not described here again.

The preprocessing server 102 may include one or more. For a game play, the data affecting the game outcome may be various, and in the embodiment of the present application, mainly includes state data and input data. Where the preprocessing server 102 maintains player status data. Depending on the complexity of the play, the player status data may also vary, for example, the player status data may include equipment data, achievement data, activity data, mission data, and the like. The player state data can also be divided into requirement data and configuration data, the requirement data is mainly value game process data, and the configuration data is mainly the identity data of the player.

The interaction server 101 is used for communicating with clients, the interaction server 101 may communicate with a pre-processing server, and the pre-processing server may communicate with a play server.

The essence of the service system 100 is a program that provides long-term operation and services multiple sporadic, indefinite-place network requests. The service system 100 is very concerned about stability and performance. The service system 100 primarily enables storage of game data and player data; performing data broadcasting on the player client; a part of game logic is operated on the server, so that the game is convenient to update the content, and the external hanging is prevented. The performance of the server system and the processing speed determine the fluency of the game.

Some embodiments of the present application will be described in detail below with reference to the accompanying drawings. The embodiments described below and the features of the embodiments can be combined with each other without conflict.

Fig. 2 is a schematic flow chart of a data processing method in a text game according to an embodiment of the present application. As shown in FIG. 2, the method is applicable to a preprocessing server, such as the preprocessing server 102 described in FIG. 1. The method specifically comprises the following steps:

s210, receiving input data of the player sent by the interaction server.

For a character game, one or more players can be included, and each player can play the game according to preset game rules. For example, during the game, the characters are input orderly based on the game rules set in advance, and the input characters can be called input data. The input data may include the latest input words of the current player, or the input words of all players in the current round of the current game, which may be determined according to the game rules. After the player inputs the text, a response needs to be made based on the input text, for example, a result of a current game or a result of a current round of game is generated, and the specific content of the response may be determined by the play server, and the client may send the input text to the interaction server, so that the interaction server sends the input text to the play server through the preprocessing server.

The interactive server receives the input command from the game client, and sends the input command to the interactive server, wherein the interactive logic between different game clients and the interactive server is different, so that after the client sends the input command to the interactive server, the interactive server identifies the input command and determines the input data corresponding to the input command. For example, the input command may include a command of an input character, or may be a touch operation by a player.

In addition, the client may be a user terminal, such as a personal computer, a mobile phone, or the like, or may be a simulation server, which is used to simulate human behavior, or may be a robot.

It should be noted that the text game is divided into two types according to the nature of the general sense: role-playing RP and policy SG. The role play is a character game in which an individual is a game subject. The strategy refers to a character game taking a collective as a main body of the game. Further, the character game is divided into a free game rp, a decision game sg, an immediate decision game sg, a round/event game sg, and the like, by continuing the subdivision from the judgment mode of the character game. The free rpr means that the server does not directly interfere with the action and action result of the player, and the player retains the action free right of the player character itself. The decision rp is a result of the server directly interfering with the player's action, and the player retains the player's freedom of awareness of the player's character. The immediate predicate sg means: there is no strict judgment cycle, and the judgment can be performed at any time and in real time. Turn/event system sg refers to: the sg-type character game has a definite judgment cycle { number of floors, time, action status of player, etc. }, and the judgment is summarized periodically.

Based on this, the input data of the player may be freely written action data, or may also be action data selected based on a preset rule, for example, a plurality of options may be given in the game, and the player selects one of the options as an action, at this time, the action data is the text content corresponding to the option.

S220, determining game description information of a player, and converting the game description information of the player into stateless data;

during the game, the game description information is used for describing the game situation of the player, such as the history input of the player, the current game progress situation, the grade situation of the player, the equipment situation of the player and the like.

In addition, the game description information of the player mainly includes configuration data and requirement data.

The input data of the player carries an identifier of the player, and game description information of the player can be acquired according to the identifier of the player. As one example, the game description information of the player may be obtained in a game description information database based on the identification of the player; then, based on a first format template set in advance, game description information of the player is converted into stateless data. The first format is an input format of a natural language processing model, and the game description information database may store game description information of each player, such as equipment data, level data, or activity data.

The method can correspond to different first format templates for different games or different states, the first format templates can be predetermined according to actual needs, and the first format templates can be consistent with the format of training samples used by the natural language model in the training process. In other words, the game description information of the player can be converted into text data recognizable by the natural language model, which is stateless, by the first format template.

The first format template comprises a preset state identifier and a part to be filled corresponding to the state identifier; the game description information of the player can be filled into the part to be filled of the first format template according to the state identification, and stateless data can be obtained.

The status identifier may include a requirement identifier and a configuration identifier.

The game description information of the player comprises progress data of the text game and identity data of the player. As an example, the requirement data of the player which is generated can be determined according to the progress data of the player, and the requirement data corresponds to the requirement identification; and determining configuration data of the player according to the identity data of the player, wherein the configuration data corresponds to the configuration identifier.

And S230, sending the stateless data and the input data of the player to a play server so that the play server can generate a processing result after inputting the stateless data and the input data of the player into a natural language processing model.

Stateful (Stateful) and Stateless (Stateless) are common concepts in the computer field. In the context of the word game data processing of this embodiment, the input data of the natural language processing model is stateless, which can effectively improve the processing efficiency.

The play server receives stateless data converted from the state data and the input data, and generates corresponding processing results according to the stateless data.

It should be noted that, without specific description, the stateless data in the embodiment of the present application mainly refers to data converted from game description information of a player, and it should be understood that input data of the player is also stateless.

For the processed result, the result can be returned to the client so that the client can display the result to prompt the player.

According to the game processing method and the game processing system, the game description information of the player is converted into stateless data in the preprocessing server, and then the playing server carries out natural language processing, so that the burden of the playing server is reduced, and the calculation efficiency is improved. For the play server, players, game stations and rounds do not need to be distinguished, processing results can be generated directly according to the text information, the universality of the play server can be reduced, the complexity of data processing of the play server is reduced, and the efficiency of data processing of the play server is improved. Because the data processing efficiency of the play server restricts the fluency of the whole game, the fluency of the game can be further improved, and the user experience is improved.

In some embodiments, after obtaining the processing result, the play server may send the processing result to the interaction server through the pre-processing server so that the interaction server sends the processing result to the client. The preprocessing server can convert the processing result into a result which can be identified by the client, and then send the result to the client. As an example, the preprocessing server may further perform the following steps to implement the above functions:

step 1.1), receiving a processing result sent by a play server;

and step 1.2), converting the processing result into output data based on the game description information of the player, and then sending the output data to the interactive server so that the interactive server can provide the output data for the client.

For the above step 1.1) and step 1.2), the play server may obtain an intermediate processing result, and the preprocessing server needs to combine the intermediate result with the current game scene to obtain the output data suitable for the current game. For example, the processing result is a winning of the player a, and in this case, the play server may generate output data for each player according to the result of the winning of the player a and a predetermined award or penalty of winning in the game, for example, the output data is that the player a adds 1000 coins, and the player b and the player c reduce 500 coins.

As an example, the step 1.2) can be specifically realized by the following steps: updating game description information of the player according to the processing result; generating output data according to the updated game description information of the player; and sending the output data to an interaction server.

According to the method and the device, format conversion of the processing result is achieved through the interactive server, the burden of the play server can be further reduced, so that the play server can use more resources to run the natural language model, the processing efficiency is improved, the speed of responding to the user is improved, and the user experience is improved.

In some embodiments, when playing, it is generally necessary to create a game first and then play the game within the created game according to the rules of the game. For example, for a card game landholder, multiple players can be prepared in a room, and the house master controls the game to be started, and when the game is started, the current game scene is entered. As an example, before step S110, the preprocessing server may further perform the following steps:

and 2.1) receiving the creation data of the character game sent by the interactive server, wherein the creation data comprises the identification of the player and the current game ID.

And 2.2) establishing a game process aiming at the current game ID.

And 2.3) returning a creation success message to the interactive server.

The player's identity may be a user name, nickname or ID of the player, etc. The current game ID may be a room number, or a game number, or the like.

The preprocessing server may start the maintenance of the game data for the current game play, that is, the maintenance of the state data, after receiving the creation data of the text game.

In the embodiment of the present application, the first player may create a text game, and configure game rules for the created text game, where the game rules may include various types, for example, the game rules may include a game background of the created game, conditions of entry, content of entry, and a determination manner, and the above information may be referred to as game creation data. The game rule can be determined according to the rule which can be identified by a natural language model preset by the system. After the game is successfully created, other players may make entries in the game and perform actions, i.e., input data.

The game creation data may be recorded in a preprocessing server, and when a player in the game acts, the preprocessing server may transmit the action of the player and the creation data to a play server so that the play server generates a processing result based on the information.

In addition, during the game process of the player, multiple inputs may be performed, and each input may have a certain influence on the game trend. Therefore, when the preprocessing server sends information to the play server, the history input data of the player, the processing result corresponding to the history input data, the creation data of the game and the current input data of the player can be sent to the play server, and the play server generates the current processing result after receiving the information.

Wherein the processing result may be a story generated by the play server based on the received data, the story indicating a trend of a current scenario of the game. Or the processing result may be a judgment result generated by the play server based on the received data, and the judgment result may be a story or only one result, specifically determined according to the actual needs of the game.

Fig. 3 is a schematic signaling interaction diagram of a data processing method in a text game according to an embodiment of the present application, where the method is applied to a service system, and the service system may be as shown in fig. 1, and the service system may include an interaction server, a preprocessing server, and a play server, where the interaction server is communicatively linked with a client and the preprocessing server, and the preprocessing server is communicatively linked with the play server. As shown in fig. 3, the method may specifically include the following steps:

s310, the interactive server receives input data of the player sent by the client.

The client can send input data generated in the process of playing the text game to the interactive server. The input data may include text input or operations, etc. The interaction server may identify the text in the text input or determine the text input based on the operation.

S320, the interactive server sends the input data of the player to the preprocessing server.

This step is a corresponding step to the step S210, and may be understood by referring to each other, which is not described herein again.

S330, the preprocessing server determines game description information of a player and converts the game description information of the player into stateless data;

this step is a corresponding step to the step S220, and may be understood by referring to each other, which is not described herein again.

S340, the preprocessing server sends stateless data and input data of the player to a play server;

this step is a corresponding step to the step S230, and may be understood by referring to each other, which is not described herein again.

And S350, the play server inputs the stateless data and the input data of the player into the natural language processing model and generates a processing result.

In addition, after game description information of a player is converted into state data in the preprocessing server, the play server performs natural language processing, so that the burden of the play server is reduced, and the calculation efficiency is improved.

In some embodiments, the method may further comprise the steps of:

s360, the play server sends the processing result to a preprocessing server;

this step and the aforementioned step 1.1) are corresponding steps, and can be understood by referring to each other, and are not described herein again.

S370, the preprocessing server converts the processing result into output data based on the game description information of the player;

the play server may obtain an intermediate result of the processing, and the preprocessing server needs to combine the intermediate result with the current game scene to obtain output data adapted to the current game. This step and the aforementioned step 1.2) are corresponding steps, and can be understood by referring to each other, and are not described herein again.

S380, the preprocessing server sends the output data to an interactive server;

this step and the aforementioned step 1.2) are corresponding steps, and can be understood by referring to each other, and are not described herein again.

S390, the interactive server sends the output data to the client.

The output data may carry a game identifier, where the game identifier may be a player identifier or a current game identifier, and the interaction server may send the output data to the client according to the game identifier.

According to the embodiment of the application, a preprocessing server is added between the interaction server and the play server. Because the complexity of the player state data in the character game is not high, only the character game progress information and the player identity information exist, and the game progress information and the player identity information can be stored in the preprocessing server. The pre-processing server receives the player input data forwarded by the interaction server. The pre-processing server processes the player revenue data and game progress information into the input format required by the natural language model. And the preprocessing server sends the processed data to the natural language model and waits for the output of the natural language model. The preprocessing server processes the output result of the natural language model into output data according to the game process and the player identity, and then the output data is sent to the client through the interactive server. Although the natural language model is the core computational engine in a word game system, the natural language model does not need to be aware of player data and focuses on processing the algorithmic model with a stateless service.

Fig. 4 is a schematic structural diagram of a data processing device in a text game according to an embodiment of the present application. The server side of the character game comprises an interaction server, a preprocessing server and a play server, wherein the play server provides a natural language processing model, and the preprocessing server maintains player state data; the apparatus is adapted to preprocess a server, the apparatus comprising:

a receiving module 401, configured to receive input data of a player sent by an interaction server;

a conversion module 402, configured to determine game description information of a player, and convert the game description information of the player into stateless data;

a sending module 403, configured to send the stateless data and the input data of the player to the play server, so that the play server generates a processing result after inputting the stateless data and the input data of the player into the natural language processing model.

In some embodiments, the player's input data carries the player's identification; the conversion module 402 is specifically configured to:

acquiring game description information of the player in a state database based on the identification of the player;

and converting the game description information of the player into stateless data based on a preset first format template, wherein the first format is an input format of the natural language processing model.

In some embodiments, the first format template includes a preset state identifier and a part to be filled corresponding to the state identifier; the conversion module 402 is specifically configured to:

and filling the game description information of the player into the part to be filled of the first format template according to the state identification to obtain stateless data.

In some embodiments, the status identification includes a requirement identification and a configuration identification. The game description information of the player includes progress data of the text game and identification data of the player. The conversion module 402 is specifically configured to:

determining the generated requirement data of the player according to the process data of the player, wherein the requirement data corresponds to a requirement identifier;

and determining configuration data of the player according to the identity data of the player, wherein the configuration data corresponds to a configuration identifier.

In some embodiments, the game playing system further comprises a response module for receiving the processing result sent by the play server;

and converting the processing result into output data based on the game description information of the player, and then sending the output data to the interaction server so that the interaction server can provide the output data to the client.

In some embodiments, the response module is specifically configured to:

updating game description information of the player according to the processing result;

generating output data according to the updated game description information of the player;

and sending the output data to an interaction server.

In some embodiments, the method further comprises:

receiving creation data of the character game sent by the interactive server, wherein the creation data comprises an identity of a player and a current game ID;

establishing a game process aiming at the current game ID;

and returning a creation success message to the interaction server.

The data processing device in the character game provided by the embodiment of the application has the same technical characteristics as the data processing method in the character game provided by the embodiment, so that the same technical problems can be solved, and the same technical effects can be achieved.

As shown in fig. 5, a computer device 700 provided in an embodiment of the present application, for example, the computer device 700 may be a preprocessing server, including: the processor 701, the memory 702 and the bus, the memory 702 stores machine readable instructions executable by the processor 701, when the electronic device is operated, the processor 701 communicates with the memory 702 through the bus, and the processor 701 executes the machine readable instructions to execute the steps of the data processing method in the word game.

Specifically, the memory 702 and the processor 701 can be general-purpose memory and processor, which are not limited to specific examples, and when the processor 701 executes a computer program stored in the memory 702, the data processing method in the word game can be executed.

Corresponding to the data processing method in the word game, the embodiment of the application also provides a computer readable storage medium, wherein a machine executable instruction is stored in the computer readable storage medium, and when the machine executable instruction is called and executed by the processor, the computer executable instruction causes the processor to execute the steps of the data processing method in the word game.

The data processing device in the word game provided by the embodiment of the application can be specific hardware on the device, or software or firmware installed on the device, and the like. The device provided by the embodiment of the present application has the same implementation principle and technical effect as the foregoing method embodiments, and for the sake of brief description, reference may be made to the corresponding contents in the foregoing method embodiments where no part of the device embodiments is mentioned. It is clear to those skilled in the art that, for convenience and brevity of description, the specific working processes of the foregoing systems, apparatuses and units may refer to the corresponding processes in the foregoing method embodiments, and are not described herein again.

In the embodiments provided in the present application, it should be understood that the disclosed apparatus and method may be implemented in other ways. The above-described embodiments of the apparatus are merely illustrative, and for example, a division of a unit is merely a division of one logic function, and there may be other divisions when actually implemented, and 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 of devices or units through some communication interfaces, and may be in an electrical, mechanical or other form.

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 the embodiments provided in the present application, it should be understood that the disclosed apparatus and method can be implemented in other ways. The apparatus embodiments described above are merely illustrative, and for example, the flowchart and block diagrams in the figures illustrate the architecture, functionality, and operation of possible implementations of apparatus, methods and computer program products according to various embodiments of the present application. In this regard, each block in the flowchart or block diagrams may represent a module, segment, or portion of code, which comprises one or more executable instructions for implementing the specified logical function(s). It should also be noted that, in some alternative implementations, the functions noted in the block may occur out of the order noted in the figures. For example, two blocks shown in succession may, in fact, be executed substantially concurrently, or the blocks may sometimes be executed in the reverse order, depending upon the functionality involved. It will also be noted that each block of the block diagrams and/or flowchart illustration, and combinations of blocks in the block diagrams and/or flowchart illustration, can be implemented by special purpose hardware-based systems which perform the specified functions or acts, or combinations of special purpose hardware and computer instructions.

In addition, functional units in the embodiments provided in the present application 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 functions, if implemented in the form of software functional units and sold or used as a stand-alone product, may be stored in a computer readable storage medium. Based on such understanding, the technical solution of the present application or portions thereof that substantially contribute to the prior art may be embodied in the form of a software product stored in a storage medium and including instructions for causing a computer device to execute all or part of the steps of the movement control method according to the embodiments of the present application. And the aforementioned storage medium includes: various media capable of storing program codes, such as a usb disk, a removable hard disk, a Read-Only Memory (ROM), a Random Access Memory (RAM), a magnetic disk, or an optical disk.

It should be noted that: like reference numbers and letters refer to like items in the following figures, and thus once an item is defined in one figure, it need not be further defined and explained in subsequent figures, and moreover, the terms "first", "second", "third", etc. are used merely to distinguish one description from another and are not to be construed as indicating or implying relative importance.

Finally, it should be noted that: the above examples are only specific embodiments of the present application, and are not intended to limit the technical solutions of the present application, and the scope of the present application is not limited thereto, although the present application is described in detail with reference to the foregoing examples, those skilled in the art should understand that: any person skilled in the art can modify or easily conceive the technical solutions described in the foregoing embodiments or equivalent substitutes for some technical features within the technical scope disclosed in the present application; such modifications, changes or substitutions do not depart from the scope of the embodiments of the present application. Are intended to be covered by the scope of the present application.

16页详细技术资料下载
上一篇:一种医用注射器针头装配设备
下一篇:一种数据处理方法、装置及存储介质

网友询问留言

已有0条留言

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

精彩留言,会给你点赞!

技术分类