CN110548285B - Game communication control method and device, medium and electronic equipment - Google Patents

Game communication control method and device, medium and electronic equipment Download PDF

Info

Publication number
CN110548285B
CN110548285B CN201910828668.8A CN201910828668A CN110548285B CN 110548285 B CN110548285 B CN 110548285B CN 201910828668 A CN201910828668 A CN 201910828668A CN 110548285 B CN110548285 B CN 110548285B
Authority
CN
China
Prior art keywords
data packet
version
state machine
response data
user terminal
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN201910828668.8A
Other languages
Chinese (zh)
Other versions
CN110548285A (en
Inventor
曹李浩野
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Shanghai Neteasy Brilliant Network Technology Co ltd
Original Assignee
Shanghai Neteasy Brilliant Network Technology Co ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Shanghai Neteasy Brilliant Network Technology Co ltd filed Critical Shanghai Neteasy Brilliant Network Technology Co ltd
Priority to CN201910828668.8A priority Critical patent/CN110548285B/en
Publication of CN110548285A publication Critical patent/CN110548285A/en
Application granted granted Critical
Publication of CN110548285B publication Critical patent/CN110548285B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • AHUMAN NECESSITIES
    • A63SPORTS; GAMES; AMUSEMENTS
    • A63FCARD, BOARD, OR ROULETTE GAMES; INDOOR GAMES USING SMALL MOVING PLAYING BODIES; VIDEO GAMES; GAMES NOT OTHERWISE PROVIDED FOR
    • A63F13/00Video games, i.e. games using an electronically generated display having two or more dimensions
    • A63F13/30Interconnection arrangements between game servers and game devices; Interconnection arrangements between game devices; Interconnection arrangements between game servers
    • A63F13/35Details of game servers
    • AHUMAN NECESSITIES
    • A63SPORTS; GAMES; AMUSEMENTS
    • A63FCARD, BOARD, OR ROULETTE GAMES; INDOOR GAMES USING SMALL MOVING PLAYING BODIES; VIDEO GAMES; GAMES NOT OTHERWISE PROVIDED FOR
    • A63F13/00Video games, i.e. games using an electronically generated display having two or more dimensions
    • A63F13/30Interconnection arrangements between game servers and game devices; Interconnection arrangements between game devices; Interconnection arrangements between game servers
    • A63F13/35Details of game servers
    • A63F13/352Details of game servers involving special game server arrangements, e.g. regional servers connected to a national server or a plurality of servers managing partitions of the game world
    • AHUMAN NECESSITIES
    • A63SPORTS; GAMES; AMUSEMENTS
    • A63FCARD, BOARD, OR ROULETTE GAMES; INDOOR GAMES USING SMALL MOVING PLAYING BODIES; VIDEO GAMES; GAMES NOT OTHERWISE PROVIDED FOR
    • A63F13/00Video games, i.e. games using an electronically generated display having two or more dimensions
    • A63F13/60Generating or modifying game content before or while executing the game program, e.g. authoring tools specially adapted for game development or game-integrated level editor

Abstract

The present disclosure relates to the field of game technologies, and in particular, to a game communication control method, a game communication control device, a computer readable storage medium, and an electronic device, where the method includes: responding to a response data packet of the game server, and performing logic conversion on the response data packet according to a first state machine path to generate a corresponding language structure data packet; and encoding the language structure data packet according to the request data packet corresponding to the response data packet to generate a target response data packet, and sending the target response data packet to a user terminal corresponding to the request data packet. According to the technical scheme, the user terminals of different versions can utilize the resources corresponding to the game server, and the problems of complex development process, time consumption and labor consumption caused by respectively developing the resources for the different user terminal versions are avoided.

Description

Game communication control method and device, medium and electronic equipment
Technical Field
The present disclosure relates to the field of game technology, and more particularly, to a game communication control method, a game communication control device, a computer-readable storage medium, and an electronic apparatus.
Background
With the continuous development of electronic devices, there are more and more electronic devices of different types. In order for an application to be usable on all electronic devices, developers often need to develop different versions of clients for the same application. In order to support the functional logic of the user end with different versions, the corresponding running servers of the user end are also different.
Because the resources between the running servers cannot be communicated, when the same function is developed for the user ends of different versions, the resources need to be respectively developed according to the different running servers. For example, when java version and bedrock version of some game programs use spiot server and PocketMine server respectively, resources of two servers are not mutually communicated, so resources corresponding to the same game play method need to be developed twice. However, in the case of many server types, the same resource cannot be used for the same function of the same application program, but resource development needs to be performed for different client versions, which finally results in the problems of complicated development process, time and effort consumption.
It should be noted that the information disclosed in the above background section is only for enhancing understanding of the background of the present disclosure and thus may include information that does not constitute prior art known to those of ordinary skill in the art.
Disclosure of Invention
The present disclosure aims to provide a game communication control method, a game communication control device, a computer readable storage medium and an electronic device, and further at least to some extent overcome the problems of complicated development process, time and effort consumption caused by respectively developing resources for different client versions.
Other features and advantages of the present disclosure will be apparent from the following detailed description, or may be learned in part by the practice of the disclosure.
According to a first aspect of the present disclosure, there is provided a game communication control method including:
responding to a response data packet of the game server, and performing logic conversion on the response data packet according to a first state machine path to generate a corresponding language structure data packet;
and encoding the language structure data packet according to the request data packet corresponding to the response data packet to generate a target response data packet, and sending the target response data packet to a user terminal corresponding to the request data packet.
In an exemplary embodiment of the disclosure, based on the foregoing solution, the logically converting, according to a first state machine path, the response packet to generate a corresponding language structure packet includes:
Acquiring the attribute of the request data packet corresponding to the response data packet to select a corresponding first state machine path;
and inputting the response data packet into a corresponding state machine according to the first state machine path to perform logic conversion to generate a language structure data packet.
In an exemplary embodiment of the disclosure, based on the foregoing scheme, the first state machine path corresponds to one state machine or a plurality of state machines arranged in sequence.
In an exemplary embodiment of the present disclosure, based on the foregoing solution, encoding the language structure data packet according to the request data packet corresponding to the response data packet to generate a target response data packet includes:
reading the data type of the request data packet corresponding to the response data packet;
and encoding the language structure data packet according to the data type to generate a target response data packet.
In an exemplary embodiment of the present disclosure, based on the foregoing solution, before the target response packet is sent to the user end corresponding to the request packet, the method further includes:
and identifying the protocol used by the user terminal and carrying out protocol conversion on the target response data packet.
According to a second aspect of the present disclosure, there is provided a game communication control method including:
responding to a request data packet sent by a user side, and decoding the request data packet to generate a corresponding language structure data packet;
and carrying out logic conversion on the language structure data packet according to a second state machine path to generate a target request data packet, and sending the target request data packet to a game server so that the game server processes the target request data packet to generate a corresponding response data packet.
In an exemplary embodiment of the disclosure, based on the foregoing solution, the generating, by logically converting the language structure data packet according to the second state machine path, the target request data packet includes:
acquiring the attribute of the request data packet to select a corresponding second state machine path;
and inputting the language structure data packet into a corresponding state machine according to the second state machine path to perform logic conversion to generate a target request data packet.
In an exemplary embodiment of the disclosure, based on the foregoing scheme, the second state machine path corresponds to one state machine or a plurality of state machines arranged in sequence.
In an exemplary embodiment of the present disclosure, based on the foregoing solution, before decoding the request packet to generate a corresponding language structure packet, the method further includes:
and identifying a protocol used by the user terminal, and carrying out protocol conversion on the request data packet.
According to a third aspect of the present disclosure, there is provided a game communication control device comprising:
the first logic conversion module is used for responding to the response data packet of the game server, and carrying out logic conversion on the response data packet according to the first state machine path to generate a corresponding language structure data packet;
and the data coding module is used for coding the language structure data packet according to the request data packet corresponding to the response data packet to generate a target response data packet, and sending the target response data packet to the user terminal corresponding to the request data packet.
According to a fourth aspect of the present disclosure, there is provided a game communication control device comprising:
the data decoding module is used for responding to the request data packet sent by the user terminal, and decoding the request data packet to generate a corresponding language structure data packet;
and the second logic conversion module is used for carrying out logic conversion on the language structure data packet according to a second state machine path to generate a target request data packet, and sending the target request data packet to a game server so that the game server can process the target request data packet to generate a corresponding response data packet.
According to a fifth aspect of the present disclosure, there is provided a computer-readable storage medium having stored thereon a computer program which, when executed by a processor, implements the game communication control method according to the first aspect or the game communication control method according to the second aspect as described in the above-described embodiments.
According to a sixth aspect of embodiments of the present disclosure, there is provided an electronic device, comprising:
a processor; and
and a storage means for storing one or more programs which, when executed by the one or more processors, cause the one or more processors to implement the game communication control method according to the first aspect or the game communication control method according to the second aspect of the embodiments described above.
The technical scheme provided by the embodiment of the disclosure can comprise the following beneficial effects:
in the game communication control method provided by the embodiment of the disclosure, a response data packet of a game server is responded, and logic conversion is performed on the response data packet according to a state machine path to generate a corresponding language structure data packet; and encoding the language structure data packet according to the request data packet corresponding to the response data packet to generate a target response data packet, and sending the target response data packet to the user terminal corresponding to the request data packet, thereby realizing the purpose of converting the response data packet of the game server into the target response data packet available to the user terminal. By logically converting the response data packet according to the state machine path, the response data packet containing the resources corresponding to the game server can be converted into the target response data packet usable by the corresponding user terminal, so that the user terminals of different versions can utilize the resources corresponding to the game server, and the problems of complex development process, time consumption and labor consumption caused by respectively developing the resources for the different user terminal versions are avoided.
It is to be understood that both the foregoing general description and the following detailed description are exemplary and explanatory only and are not restrictive of the disclosure.
Drawings
The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the disclosure and together with the description, serve to explain the principles of the disclosure. It will be apparent to those of ordinary skill in the art that the drawings in the following description are merely examples of the disclosure and that other drawings may be derived from them without undue effort. In the drawings:
FIG. 1 schematically illustrates a flow chart of a game communication control method in an exemplary embodiment of the present disclosure;
FIG. 2 schematically illustrates a flowchart of a method for logically converting the response packet according to a first state machine path to generate a corresponding language structure packet in an exemplary embodiment of the present disclosure;
FIG. 3 schematically illustrates a flowchart of a method for encoding the language structure data packet according to a request data packet corresponding to the response data packet to generate a target response data packet in an exemplary embodiment of the disclosure;
FIG. 4 schematically illustrates a flow chart of a game communication control method in an exemplary embodiment of the present disclosure;
FIG. 5 schematically illustrates a flowchart of a method for generating a target request packet by logically transforming the language structure packet according to a second state machine path in an exemplary embodiment of the present disclosure;
fig. 6 schematically illustrates a conversion process of a response packet and a request packet when a base rock user terminal logs in a java version server through a virtual reverse proxy server in an exemplary embodiment of the present disclosure;
FIG. 7 schematically illustrates a composition diagram of a gaming communication control device in an exemplary embodiment of the present disclosure;
FIG. 8 schematically illustrates a composition diagram of another game communication control device in an exemplary embodiment of the present disclosure;
FIG. 9 schematically illustrates a composition diagram of another game communication control device in an exemplary embodiment of the present disclosure;
FIG. 10 schematically illustrates a composition diagram of another game communication control device in an exemplary embodiment of the present disclosure;
FIG. 11 schematically illustrates a structural schematic diagram of a computer system suitable for use in implementing the electronic device of the exemplary embodiments of the present disclosure;
fig. 12 schematically illustrates a schematic diagram of a computer-readable storage medium according to some embodiments of the present disclosure.
Detailed Description
Example embodiments will now be described more fully with reference to the accompanying drawings. However, the exemplary embodiments may be embodied in many forms and should not be construed as limited to the examples set forth herein; rather, these embodiments are provided so that this disclosure will be thorough and complete, and will fully convey the concept of the example embodiments to those skilled in the art. The described features, structures, or characteristics may be combined in any suitable manner in one or more embodiments.
Furthermore, the drawings are merely schematic illustrations of the present disclosure and are not necessarily drawn to scale. The same reference numerals in the drawings denote the same or similar parts, and thus a repetitive description thereof will be omitted. Some of the block diagrams shown in the figures are functional entities and do not necessarily correspond to physically or logically separate entities. These functional entities may be implemented in software or in one or more hardware modules or integrated circuits or in different networks and/or processor devices and/or microcontroller devices.
In the present exemplary embodiment, there is provided first a game communication control method that can be applied to a process in which a server transmits data to a user side. For example, the method can be applied to a process of converting response data when the game server corresponding to the version A user terminal transmits the response data to other version user terminals. Referring to fig. 1, the above game communication control method may include the steps of:
S110, responding to a response data packet of the game server, and carrying out logic conversion on the response data packet according to a first state machine path to generate a corresponding language structure data packet;
s120, encoding the language structure data packet according to the request data packet corresponding to the response data packet to generate a target response data packet, and sending the target response data packet to a user terminal corresponding to the request data packet.
By logically converting the response data packet according to the state machine path, the response data packet containing the resources corresponding to the game server can be converted into the target response data packet usable by the corresponding user terminal, so that the user terminals of different versions can utilize the resources corresponding to the game server, and the problems of complex development process, time consumption and labor consumption caused by respectively developing the resources for the different user terminal versions are avoided.
Next, the respective steps of the game communication control method in the present exemplary embodiment will be described in more detail with reference to the drawings and the embodiments.
Step S110, responding to the response data packet of the game server, and performing logic conversion on the response data packet according to the first state machine path to generate a corresponding language structure data packet.
In an example embodiment of the present disclosure, the game server may be set in a customized manner according to different application programs, and may be a server corresponding to a client of any version. For example, the game a includes a user end of a java version and a bedrock version, but more resources are available for a server corresponding to the java version, and at this time, the server corresponding to the java version may be set as the game server. By custom setting the game server, the server with more resources corresponding to the application program can be set as the game server, so that the problem of resource waste in development caused by re-development of the existing resources of other servers when the number of available resources of the application program in the fixed server is small is avoided.
In an example embodiment of the present disclosure, the response packet is logically converted according to a state machine path to generate a corresponding language structure packet, and referring to fig. 2, the method includes the following steps S210 to S220:
step S210, obtaining the attribute of the request packet corresponding to the response packet to select the corresponding first state machine path.
In an example embodiment of the present disclosure, the attributes include a logical attribute of a user side corresponding to the request packet and a functional attribute required to be implemented by the request packet. The first state machine path corresponds to one state machine or a plurality of state machines arranged in sequence. Because the logic conversion of different functions and the logic conversion of different clients are different, the corresponding state machine path needs to be selected according to the attribute of the request data packet. For example, the game server is a server corresponding to a java version user terminal, the user terminal corresponding to the request data packet is a bedrock version user terminal, and the request data packet is required to realize the operation on the object bar. Since the object bar is composed of one or more object bar state change events in the bedrock game, and is composed of a series of object bar click events in the java game. In order to enable a response data packet of a java version to be processed by a user terminal of a bedrock version, a state machine path formed by one or more sequentially arranged state machines capable of converting object bar logic corresponding to the java version into object bar logic corresponding to the bedrock version needs to be selected as a first state machine path.
By selecting the corresponding first state machine path according to the attribute of the request data packet corresponding to the response data packet, the first state machine path adapting to the function corresponding to the request data packet and the user side can be selected, and the problem that logic conversion errors or unmatched logic and the user side after conversion are caused by selecting the inapplicable first state machine path is avoided.
Step S220, inputting the response data packet to the corresponding state machine according to the first state machine path to perform logic conversion to generate a language structure data packet.
In an example embodiment of the present disclosure, response data packets are sequentially input to corresponding state machines according to a state machine sequence in a first state machine path, and logic conversion can be performed on the response data packets, so as to generate a language structure data packet applicable to logic correspondence of a user side. For example, the content generated by performing logic conversion according to the state machine is [ int, string ], and the content identified by the user side is [ string, int ]. At this time, the language structure data packet includes two fields string and int that need to be read by the user side, and further, the recognizable data structure of the user side can be obtained through further processing of the language data packet. By selecting the first state machine path according to the attribute of the request data packet corresponding to the response data packet, the response data packet can be subjected to logic conversion according to one or more state machines arranged in succession in the first state machine path, and can be converted into logic identifiable by the user terminal, so that the user terminal can conveniently realize the corresponding function.
And step S120, encoding the language structure data packet according to the request data packet corresponding to the response data packet to generate a target response data packet, and sending the target response data packet to a user terminal corresponding to the request data packet.
In an example embodiment of the present disclosure, before the sending the target response packet to the user end corresponding to the request packet, the method further includes: and identifying the protocol used by the user terminal and carrying out protocol conversion on the target response data packet.
In an example embodiment of the present disclosure, in order to ensure the security of the real server, a virtual reverse proxy server is often provided between the client and the game server, so that the target response data may be forwarded to the client through the virtual reverse proxy server. However, since the protocols used by the ue and the virtual reverse proxy server may be different, the target response packet needs to be subjected to protocol conversion before being sent to the corresponding ue, so that the ue can perform normal data communication with the virtual reverse proxy server.
For example, the protocols used by the user end are identified as udp network transmission protocol and bedrock protocol, while the protocols used by the virtual reverse proxy server are tcp network transmission protocol and java version protocol, and the target response data packet can be converted into udp network transmission protocol and bedrock protocol by protocol conversion. In the operation network provided with the virtual reverse proxy server, the protocol used by the user terminal is identified and the protocol conversion is carried out on the target response data packet, so that the data communication and transmission between the virtual reverse proxy server and the user terminal can be normally carried out.
In an example embodiment of the present disclosure, encoding the language structure data packet according to the request data packet corresponding to the response data packet to generate a target response data packet, as shown in fig. 3, includes the following steps S310 to S320:
step S310, reading the data type of the request packet corresponding to the response packet.
In one example embodiment of the present disclosure, since the data used in the communication process is computer system data, it is necessary to convert the language structure data packet output through the state machine in the first state machine path into computer system data. Because the coding and storage modes of the computer system data received by the user terminals of different versions may be different, the data types which can be processed by the user terminal corresponding to the request data packet need to be determined according to the data types of the request data packet.
Step S320, encoding the language structure data packet according to the data type to generate a target response data packet.
In an example embodiment of the present disclosure, after determining a data type that can be processed by a user side according to a data type of a request packet, a language structure packet is encoded according to the data type, so as to generate a target response packet that can be processed by the user side, so that the user side can process the target response packet. For example, the storage mode of the response data packets is sequential, and the storage corresponding to the user end version may be reverse, and at this time, the sequentially stored response data packets are converted into target response data packets stored in reverse order through the language structure data packet coding, so that the user end version can process the data in the target response data packets.
The data type of the request data packet is used for determining the data type which can be processed by the user side, so that the language structure data packet is encoded, the language data packet can be encoded into a target response data packet which can be processed by the user side, and the problem of application program operation errors caused by the fact that the user side cannot process data due to data type errors is avoided.
Further, there is also provided in an exemplary embodiment of the present disclosure a game communication control method, as shown with reference to fig. 4, including the following steps S410 to S420:
step S410, responding to the request data packet sent by the user terminal, and decoding the request data packet to generate a corresponding language structure data packet.
In an example embodiment of the present disclosure, before decoding the request packet to generate a corresponding language structure packet, the method further includes: and identifying a protocol used by the user terminal, and carrying out protocol conversion on the request data packet.
In an example embodiment of the present disclosure, in order to guarantee the security of a real server, a virtual reverse proxy server is often provided between the client and the game server, and the request packet may need to be forwarded by the virtual reverse proxy server. However, since the protocols used by the ue and the virtual reverse proxy server may be different, before decoding the request packet to generate a corresponding language structure packet, a protocol conversion needs to be performed on the request packet sent by the ue, so that the virtual proxy server may forward the request packet.
For example, the protocols used by the identification user end are udp network transmission protocol and bedrock protocol, the protocols used by the virtual reverse proxy server are tcp network transmission protocol and java version protocol, and the request data packet can be converted into tcp network transmission protocol and java version protocol by protocol conversion, so that the virtual proxy server can identify and forward the request data packet. In the operation network provided with the virtual reverse proxy server, the data communication and transmission between the virtual reverse proxy server and the user terminal can be normally performed by identifying the protocol used by the user terminal and performing protocol conversion on the request data packet.
Step S420, performing logic conversion on the language structure data packet according to a second state machine path to generate a target request data packet, and sending the target request data packet to a game server so that the game server processes the target request data packet to generate a corresponding response data packet.
In an exemplary embodiment of the disclosure, the generating the target request packet by logically converting the language structure packet according to the second state machine path is shown in fig. 5, and includes the following steps S510 to S520:
Step S510, obtaining the attribute of the request packet to select a corresponding second state machine path.
In an example embodiment of the present disclosure, the second state machine path also includes one state machine or a plurality of state machines arranged in order, corresponding to the first state machine path in the above-described game communication control method. Also, since the logic transitions of different functions and the logic transitions of different clients are different, the corresponding state machine path needs to be selected as the second state machine path according to the attribute of the request packet. It should be noted that, in general, when the same user end version and the game server implement the same function, the first state machine path and the second state machine path are opposite paths. For example, in the case where the client version and the game server are the same, the first state machine path is: state machine 1, state machine 2, the second state machine path is: state machine 2, state machine 1.
By selecting the second state machine path according to the attribute of the request data packet, the request data packet can be subjected to logic conversion according to one or more continuous state machines in the second state machine path, and can be converted into logic recognizable by the game server, so that the game server can respond to the function required to be realized by the request data packet.
Step S520, inputting the language structure data packet to a corresponding state machine according to the second state machine path for logic conversion to generate a target request data packet.
In an example embodiment of the present disclosure, the language structure data packet is sequentially input to the corresponding state machines according to the state machines in the second state machine path, so that the language structure data packet can be logically converted, and a target request data packet corresponding to the logic identifiable by the game server is generated. By selecting the second state machine path according to the attribute of the request packet, the request packet can be logically converted into logic recognizable by the game server according to one or more continuous state machines in the second state machine path, so that the game server can respond.
Taking a base rock version user terminal logging in a java version server through a virtual reverse proxy server as an example, with reference to fig. 6, implementation details of the technical scheme of the embodiment of the disclosure are described in detail as follows:
1. request data conversion process
The object bar request data packet sent by the bedrock version user end 610 is subjected to transmission protocol conversion through the RakNet proxy 620, the udp network transmission protocol is converted into the tcp network transmission protocol, and the protocol format of the bedrock version corresponding to the request data packet is converted into the protocol format of the java version through the first protocol conversion 630. In response to the converted request packet forwarded by the virtual reverse proxy server 640, the request packet is decoded by the second protocol conversion 650 to obtain a language structure packet. Selecting one or more state machines corresponding to the object bar function logic, converting the bedrock edition logic into the java edition logic as a second state machine path 660, inputting the language structure data packets into the corresponding state machines according to the sequence of the second state machine path 660 for logic conversion to obtain target request data packets, and sending the target request data packets to the java server 670 so that the java server 670 processes the target request data packets to generate corresponding response data packets.
2. Responsive data conversion process
In response to the response data packet of the java server 670, one or more state machines corresponding to the object bar function logic and converting the java version logic into the bedrock version logic are selected as the first state machine path 660, and the response data packet is input into the corresponding state machines according to the sequence of the first state machine path 660 to be subjected to logic conversion to obtain the language structure data packet. The language structure data packet is encoded through the second protocol conversion 650 to obtain a target response data packet, and the target response data packet is sent to the virtual reverse proxy server 640 corresponding to the request data packet. After being forwarded by the virtual reverse proxy server 640, the protocol format of the bedrock version corresponding to the target response data packet is converted into the protocol format of the java version through the first protocol conversion 630, the transmission protocol conversion is performed through the RakNet proxy 620, and after the udp network transmission protocol is converted into the tcp network transmission protocol, the tcp network transmission protocol is sent to the corresponding bedrock version user end 610.
It is noted that the above-described figures are merely schematic illustrations of processes involved in a method according to exemplary embodiments of the present disclosure, and are not intended to be limiting. It will be readily appreciated that the processes shown in the above figures do not indicate or limit the temporal order of these processes. In addition, it is also readily understood that these processes may be performed synchronously or asynchronously, for example, among a plurality of modules.
In addition, in an exemplary embodiment of the present disclosure, there is also provided a game communication control device. Referring to fig. 7, the game communication control device 700 includes: a first logic conversion module 710, a data encoding module 720.
The first logic conversion module 710 may be configured to respond to a response data packet of the game server, and perform logic conversion on the response data packet according to a first state machine path to generate a corresponding language structure data packet;
the data encoding module 720 may be configured to encode the language structure data packet according to a request data packet corresponding to the response data packet to generate a target response data packet, and send the target response data packet to a user terminal corresponding to the request data packet.
In an exemplary embodiment of the present disclosure, based on the foregoing solution, the first logic conversion module 710 may be configured to obtain an attribute of a request packet corresponding to the response packet to select a corresponding first state machine path; and inputting the response data packet into a corresponding state machine according to the first state machine path to perform logic conversion to generate a language structure data packet.
In an exemplary embodiment of the disclosure, based on the foregoing scheme, the first state machine path corresponds to one state machine or a plurality of state machines arranged in sequence.
In an exemplary embodiment of the present disclosure, based on the foregoing scheme, the data encoding module 720 may be configured to read a data type of the request packet corresponding to the response packet; and encoding the language structure data packet according to the data type to generate a target response data packet.
In an exemplary embodiment of the present disclosure, based on the foregoing scheme, referring to fig. 8, the game communication control device 700 further includes a first protocol conversion module 730.
Specifically, the first protocol conversion module 730 may be configured to identify a protocol used by the client, and perform protocol conversion on the target response packet.
In addition, in an exemplary embodiment of the present disclosure, there is also provided a game communication control device. Referring to fig. 9, the game communication control device 900 includes: the data decoding module 910, the second logic conversion module 920.
The data decoding module 910 may be configured to, in response to a request packet sent by a user side, decode the request packet to generate a corresponding language structure packet;
the second logic conversion module 920 may be configured to perform logic conversion on the language structure data packet according to a second state machine path to generate a target request data packet, and send the target request data packet to a game server, so that the game server processes the target request data packet to generate a corresponding response data packet.
In an exemplary embodiment of the disclosure, based on the foregoing scheme, the second logic conversion module 920 may be configured to obtain an attribute of the request packet to select a corresponding second state machine path; and inputting the language structure data packet into a corresponding state machine according to the second state machine path to perform logic conversion to generate a target request data packet.
In an exemplary embodiment of the disclosure, based on the foregoing scheme, the second state machine path corresponds to one state machine or a plurality of state machines arranged in sequence.
In an exemplary embodiment of the present disclosure, based on the foregoing scheme, referring to fig. 10, the game communication control device 900 further includes a second protocol conversion module 930.
Specifically, the second protocol conversion module 930 may be configured to identify a protocol used by the client, and perform protocol conversion on the request packet.
Since each functional module of the game communication control device according to the exemplary embodiment of the present disclosure corresponds to a step of the above-described exemplary embodiment of the game communication control method, for details not disclosed in the embodiment of the device of the present disclosure, please refer to the above-described embodiment of the game communication control method of the present disclosure.
It should be noted that although in the above detailed description several modules or units of a device for action execution are mentioned, such a division is not mandatory. Indeed, the features and functionality of two or more modules or units described above may be embodied in one module or unit in accordance with embodiments of the present disclosure. Conversely, the features and functions of one module or unit described above may be further divided into a plurality of modules or units to be embodied.
In addition, in an exemplary embodiment of the present disclosure, an electronic device capable of implementing the above-described game communication control method is also provided.
Those skilled in the art will appreciate that the various aspects of the present disclosure may be implemented as a system, method, or program product. Accordingly, various aspects of the disclosure may be embodied in the following forms, namely: an entirely hardware embodiment, an entirely software embodiment (including firmware, micro-code, etc.) or an embodiment combining hardware and software aspects may be referred to herein as a "circuit," module "or" system.
An electronic device 1100 according to such an embodiment of the present disclosure is described below with reference to fig. 11. The electronic device 1100 shown in fig. 11 is merely an example and should not be construed as limiting the functionality and scope of use of the disclosed embodiments.
As shown in fig. 11, the electronic device 1100 is embodied in the form of a general purpose computing device. Components of electronic device 1100 may include, but are not limited to: the at least one processing unit 1110, the at least one memory unit 1120, a bus 1130 connecting the different system components (including the memory unit 1120 and the processing unit 1110), and a display unit 1140.
Wherein the storage unit stores program code that is executable by the processing unit 1110 such that the processing unit 1110 performs steps according to various exemplary embodiments of the present disclosure described in the above-described "exemplary methods" section of the present specification. For example, the processing unit 1110 may perform step S110 as shown in fig. 1: responding to a response data packet of the game server, and performing logic conversion on the response data packet according to a first state machine path to generate a corresponding language structure data packet; s120: and encoding the language structure data packet according to the request data packet corresponding to the response data packet to generate a target response data packet, and sending the target response data packet to a user terminal corresponding to the request data packet.
As another example, the electronic device may implement the steps shown in fig. 2-5.
The storage unit 1120 may include a readable medium in the form of a volatile storage unit, such as a Random Access Memory (RAM) 1121 and/or a cache memory 1122, and may further include a Read Only Memory (ROM) 1123.
Storage unit 1120 may also include a program/utility 1124 having a set (at least one) of program modules 1125, such program modules 1125 including, but not limited to: an operating system, one or more application programs, other program modules, and program data, each or some combination of which may include an implementation of a network environment.
The bus 1130 may be a local bus representing one or more of several types of bus structures, including a memory unit bus or memory unit controller, a peripheral bus, an accelerated graphics port, a processing unit, or a bus using any of a variety of bus architectures.
The electronic device 1100 may also communicate with one or more external devices 1170 (e.g., keyboard, pointing device, bluetooth device, etc.), one or more devices that enable a user to interact with the electronic device 1100, and/or any device (e.g., router, modem, etc.) that enables the electronic device 1100 to communicate with one or more other computing devices. Such communication may occur through an input/output (I/O) interface 1150. Also, electronic device 1100 can communicate with one or more networks such as a Local Area Network (LAN), a Wide Area Network (WAN), and/or a public network, such as the Internet, through network adapter 1160. As shown, network adapter 1160 communicates with other modules of electronic device 1100 via bus 1130. It should be appreciated that although not shown, other hardware and/or software modules may be used in connection with electronic device 1100, including, but not limited to: microcode, device drivers, redundant processing units, external disk drive arrays, RAID systems, tape drives, data backup storage systems, and the like.
From the above description of embodiments, those skilled in the art will readily appreciate that the example embodiments described herein may be implemented in software, or in combination with the necessary hardware. Thus, the technical solution according to the embodiments of the present disclosure may be embodied in the form of a software product, which may be stored in a non-volatile storage medium (may be a CD-ROM, a U-disk, a mobile hard disk, etc.) or on a network, and includes several instructions to cause a computing device (may be a personal computer, a server, a terminal device, or a network device, etc.) to perform the method according to the embodiments of the present disclosure.
In an exemplary embodiment of the present disclosure, a computer-readable storage medium having stored thereon a program product capable of implementing the method described above in the present specification is also provided. In some possible embodiments, the various aspects of the present disclosure may also be implemented in the form of a program product comprising program code for causing a terminal device to carry out the steps according to the various exemplary embodiments of the disclosure as described in the "exemplary methods" section of this specification, when the program product is run on the terminal device.
Referring to fig. 12, a program product 1200 for implementing the above-described method, which may employ a portable compact disc read-only memory (CD-ROM) and include program code, and may be run on a terminal device, such as a personal computer, is described according to an embodiment of the present disclosure. However, the program product of the present disclosure is not limited thereto, and in this document, a readable storage medium may be any tangible medium that can contain, or store a program for use by or in connection with an instruction execution system, apparatus, or device.
The program product may employ any combination of one or more readable media. The readable medium may be a readable signal medium or a readable storage medium. The readable storage medium can be, for example, but is not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or a combination of any of the foregoing. More specific examples (a non-exhaustive list) of the readable storage medium would include the following: an electrical connection having one or more wires, a portable disk, a hard disk, random Access Memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM or flash memory), optical fiber, portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing.
The computer readable signal medium may include a data signal propagated in baseband or as part of a carrier wave with readable program code embodied therein. Such a propagated data signal may take any of a variety of forms, including, but not limited to, electro-magnetic, optical, or any suitable combination of the foregoing. A readable signal medium may also be any readable medium that is not a readable storage medium and that can communicate, propagate, or transport a program for use by or in connection with an instruction execution system, apparatus, or device.
Program code embodied on a readable medium may be transmitted using any appropriate medium, including but not limited to wireless, wireline, optical fiber cable, RF, etc., or any suitable combination of the foregoing.
Program code for carrying out operations of the present disclosure may be written in any combination of one or more programming languages, including an object oriented programming language such as Java, C++ or the like and conventional procedural programming languages, such as the "C" programming language or similar programming languages. The program code may execute entirely on the user's computing device, partly on the user's device, as a stand-alone software package, partly on the user's computing device, partly on a remote computing device, or entirely on the remote computing device or server. In the case of remote computing devices, the remote computing device may be connected to the user computing device through any kind of network, including a Local Area Network (LAN) or a Wide Area Network (WAN), or may be connected to an external computing device (e.g., connected via the Internet using an Internet service provider).
Furthermore, the above-described figures are only schematic illustrations of processes included in the method according to the exemplary embodiments of the present disclosure, and are not intended to be limiting. It will be readily appreciated that the processes shown in the above figures do not indicate or limit the temporal order of these processes. In addition, it is also readily understood that these processes may be performed synchronously or asynchronously, for example, among a plurality of modules.
Other embodiments of the disclosure will be apparent to those skilled in the art from consideration of the specification and practice of the disclosure disclosed herein. This application is intended to cover any adaptations, uses, or adaptations of the disclosure following, in general, the principles of the disclosure and including such departures from the present disclosure as come within known or customary practice within the art to which the disclosure pertains. It is intended that the specification and examples be considered as exemplary only, with a true scope and spirit of the disclosure being indicated by the following claims.
It is to be understood that the present disclosure is not limited to the precise arrangements and instrumentalities shown in the drawings, and that various modifications and changes may be effected without departing from the scope thereof. The scope of the present disclosure is limited only by the appended claims.

Claims (13)

1. A game communication control method, characterized by comprising:
Responding to a response data packet corresponding to a request data packet sent by a second version of user terminal in a game server, and carrying out logic conversion on the response data packet according to a first state machine path to generate a language structure data packet corresponding to the second version of user terminal;
encoding the language structure data packet according to the request data packet to generate a target response data packet, and sending the target response data packet to the user terminal of the second version;
the response data packet is a data packet identifiable by the user side of the first version;
the user terminal of the first version and the user terminal of the second version are user terminals of different language versions corresponding to the same game;
the game server is a game server corresponding to the user side of the first version.
2. The method of claim 1, wherein logically converting the response packet according to the first state machine path generates a language structure packet corresponding to the second version of the client, and the method comprises:
acquiring the attribute of the request data packet corresponding to the response data packet to select a corresponding first state machine path;
and inputting the response data packet into a corresponding state machine according to the first state machine path to perform logic conversion to generate a language structure data packet corresponding to the user terminal of the second version.
3. The method of claim 2, wherein the first state machine path corresponds to one state machine or a plurality of state machines arranged in sequence.
4. The method of claim 1, wherein encoding the language construct data packet based on the request data packet generates a target response data packet, comprising:
reading the data type of the request data packet;
and encoding the language structure data packet according to the data type to generate a target response data packet.
5. The method of claim 1, wherein prior to sending the targeted response data packet to the second version of the client, the method further comprises:
and identifying the protocol used by the user terminal of the second version, and carrying out protocol conversion on the target response data packet.
6. A game communication control method, characterized by comprising:
responding to a second version of user side to send a request data packet, and decoding the request data packet to generate a corresponding language structure data packet;
performing logic conversion on the language structure data packet according to a second state machine path to generate a target request data packet, and sending the target request data packet to a game server so that the game server processes the target request data packet to generate a corresponding response data packet;
The response data packet is a data packet identifiable by the user side of the first version;
the user terminal of the first version and the user terminal of the second version are user terminals of different language versions corresponding to the same game;
the game server is a game server corresponding to the user side of the first version.
7. The method of claim 6, wherein logically converting the language structure data packet according to the second state machine path generates a target request data packet, comprising:
acquiring the attribute of the request data packet to select a corresponding second state machine path;
and inputting the language structure data packet into a corresponding state machine according to the second state machine path to perform logic conversion to generate a target request data packet.
8. The method of claim 7, wherein the second state machine path corresponds to one state machine or a plurality of state machines arranged in sequence.
9. The method of claim 6, wherein prior to decoding the request packet to generate a corresponding language structure packet, the method further comprises:
and identifying a protocol used by the user terminal of the second version, and carrying out protocol conversion on the request data packet.
10. A game communication control device, comprising:
the first logic conversion module is used for responding to a response data packet corresponding to a request data packet sent by a second version of user terminal in the game server, and carrying out logic conversion on the response data packet according to a first state machine path to generate a language structure data packet corresponding to the second version of user terminal;
the data coding module is used for coding the language structure data packet according to the request data packet to generate a target response data packet, and sending the target response data packet to the user terminal of the second version; the response data packet is a data packet identifiable by the user side of the first version; the user terminal of the first version and the user terminal of the second version are user terminals of different language versions corresponding to the same game; the game server is a game server corresponding to the user side of the first version.
11. A game communication control device, comprising:
the data decoding module is used for responding to the request data packet sent by the user terminal of the second version, and decoding the request data packet to generate a corresponding language structure data packet;
The second logic conversion module is used for carrying out logic conversion on the language structure data packet according to a second state machine path to generate a target request data packet, and sending the target request data packet to a game server so that the game server can process the target request data packet to generate a corresponding response data packet;
the response data packet is a data packet identifiable by the user side of the first version; the user terminal of the first version and the user terminal of the second version are user terminals of different language versions corresponding to the same game; the game server is a game server corresponding to the user side of the first version.
12. A computer-readable storage medium having stored thereon a computer program, wherein the program when executed by a processor implements the game communication control method according to any one of claims 1 to 5 or the game communication control method according to any one of claims 6 to 9.
13. An electronic device, comprising:
a processor; and
a memory for storing one or more programs that, when executed by the one or more processors, cause the one or more processors to implement the gaming communication control method of any of claims 1-5 or the gaming communication control method of any of claims 6-9.
CN201910828668.8A 2019-09-03 2019-09-03 Game communication control method and device, medium and electronic equipment Active CN110548285B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201910828668.8A CN110548285B (en) 2019-09-03 2019-09-03 Game communication control method and device, medium and electronic equipment

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201910828668.8A CN110548285B (en) 2019-09-03 2019-09-03 Game communication control method and device, medium and electronic equipment

Publications (2)

Publication Number Publication Date
CN110548285A CN110548285A (en) 2019-12-10
CN110548285B true CN110548285B (en) 2023-11-28

Family

ID=68738862

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201910828668.8A Active CN110548285B (en) 2019-09-03 2019-09-03 Game communication control method and device, medium and electronic equipment

Country Status (1)

Country Link
CN (1) CN110548285B (en)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111957036A (en) * 2020-08-20 2020-11-20 网易(杭州)网络有限公司 Game data processing system, method, electronic device and storage medium

Citations (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US9189211B1 (en) * 2010-06-30 2015-11-17 Sony Computer Entertainment America Llc Method and system for transcoding data

Family Cites Families (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
AU2002210810A1 (en) * 2001-10-22 2003-05-06 Sun Microsystems, Inc. Inter-process communication using different programming languages
US8365153B2 (en) * 2007-10-26 2013-01-29 Qualcomm Incorporated Server-based code compilation
US9886249B2 (en) * 2015-11-16 2018-02-06 Sap Se Universal transcompiling framework

Patent Citations (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US9189211B1 (en) * 2010-06-30 2015-11-17 Sony Computer Entertainment America Llc Method and system for transcoding data

Non-Patent Citations (2)

* Cited by examiner, † Cited by third party
Title
"faketcp方案和常见的udp over tcp、udp in tcp方案的区别";wangyu;《github网站》;20180705;https://github.com/wangyu-/udp2raw/wiki/faketcp%E6%96%B9%E6%A1%88%E5%92%8C%E5%B8%B8%E8%A7%81%E7%9A%84udp-over-tcp%E3%80%81udp-in-tcp%E6%96%B9%E6%A1%88%E7%9A%84%E5%8C%BA%E5%88%AB *
武安状.《基于VS2012平台C#语言测量软件开发技术》.《基于VS2012平台C#语言测量软件开发技术》.黄河水利出版社,2015,(第1版),第477-479页. *

Also Published As

Publication number Publication date
CN110548285A (en) 2019-12-10

Similar Documents

Publication Publication Date Title
CN107404418B (en) Internet product testing method, device, equipment and storage medium
CN110389755B (en) Code processing method and device, electronic equipment and computer readable storage medium
CN109815107B (en) Method and device for automatic testing
CN112685248A (en) Intelligent network card monitoring log obtaining method and device, electronic equipment and storage medium
US11934287B2 (en) Method, electronic device and computer program product for processing data
CN111338623A (en) Method, device, medium and electronic equipment for developing user interface
CN110990081A (en) Microservice registration and discovery method and device, storage medium and electronic equipment
CN112783748B (en) Program debugging method, device, equipment and computer readable storage medium
CN112306884A (en) Program test control and execution method and corresponding device, equipment and medium
CN109873861B (en) Cross-block chain node interaction method and device, storage medium and electronic equipment
CN110807111A (en) Three-dimensional graph processing method and device, storage medium and electronic equipment
CN110548285B (en) Game communication control method and device, medium and electronic equipment
CN110830427A (en) Method and device for message encoding and message decoding in netty environment
CN111813407B (en) Game development method, game running device and electronic equipment
US11797277B2 (en) Neural network model conversion method server, and storage medium
US10592388B1 (en) Methods for facilitating more efficient network message exchange and analysis and devices thereof
CN113779121A (en) Data conversion method and device, storage medium and electronic equipment
CN114071190A (en) Cloud application video stream processing method, related device and computer program product
CN112416843A (en) Backboard communication equipment, control method thereof and storage medium
CN112688863B (en) Gateway data processing method and device and electronic equipment
CN114615521B (en) Video processing method and device, computer readable storage medium and electronic equipment
CN116383014B (en) Monitoring computer, software debugging method, software debugging system, medium and product
CN117112074B (en) Method, system and medium for automatically converting HTTP application into serverless function
CN114640659B (en) Cloud encoding auxiliary method and device, electronic equipment and storage medium
CN114968607A (en) Calling method of development page, storage medium and terminal

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant