Data inter-transmission method, device, equipment and computer readable storage medium

文档序号:1233674 发布日期:2020-09-11 浏览:30次 中文

阅读说明:本技术 数据互传的方法、装置、设备及计算机可读存储介质 (Data inter-transmission method, device, equipment and computer readable storage medium ) 是由 刘思维 周宗奇 于 2019-03-04 设计创作,主要内容包括:本申请实施例提供了一种数据互传的方法、装置、设备及计算机可读存储介质,该方法包括:发送数据互传请求给通用服务器,数据互传请求包括第一客户端的身份标识、第一客户端所选的游戏标识、分组标识和分组密钥;通过通用服务器根据分组标识和分组密钥建立的分组与分组内的至少一个第二客户端进行数据互传。该方法只需要一个通用服务器就可以实现多种游戏中任意一种游戏的游戏客户端之间进行数据互传。(The embodiment of the application provides a method, a device, equipment and a computer readable storage medium for data mutual transmission, wherein the method comprises the following steps: sending a data mutual transmission request to a general server, wherein the data mutual transmission request comprises an identity identifier of a first client, a game identifier selected by the first client, a grouping identifier and a grouping key; and the group established by the general server according to the group identification and the group key carries out data transmission with at least one second client in the group. The method can realize data transmission among game clients of any one of a plurality of games by only one universal server.)

1. A data mutual transmission method is applied to a first client side, and is characterized by comprising the following steps:

sending a data mutual transmission request to a general server, wherein the data mutual transmission request comprises the identity identification of the first client, the game identification selected by the first client, the grouping identification and the grouping key;

and the general server carries out data mutual transmission with at least one second client in the group according to the group established by the group identifier and the group key.

2. The method of claim 1, wherein sending the data inter-transmission request to a general-purpose server comprises:

and sending a data mutual transmission request to the general server by calling a uniform interface corresponding to an interface function of the software development kit SDK, wherein the general server comprises a user manager, a network manager and a grouping manager.

3. The method according to claim 2, wherein the inter-transmitting data between the group established by the general server according to the group identifier and the group key and at least one second client in the group comprises:

sending a game starting message or an inter-transmission message to the universal server through the unified interface, so as to forward the game starting message or the inter-transmission message to the at least one second client through the universal server, wherein the inter-transmission message comprises at least one of game achievement, game progress and breakthrough time;

or receiving a game starting message or an inter-transmission message transmitted by the at least one second client and forwarded by the universal server through the unified interface, wherein the inter-transmission message comprises at least one of game achievements, game progress and breakthrough time.

4. The method according to claim 2, wherein the inter-transmitting data between the group established by the general server according to the group identifier and the group key and at least one second client in the group comprises:

sending a game ending message or a leave packet message to a general server through the unified interface for forwarding the game ending message or the leave packet message to the at least one second client through the general server;

or receiving a game ending message or a leave packet message sent by the at least one second client and forwarded by the universal server through the unified interface.

5. A data mutual transmission method is applied to a universal server and is characterized by comprising the following steps:

receiving a data mutual transmission request sent by a first client, wherein the data mutual transmission request comprises an identity identifier of the first client, a game identifier selected by the first client, a group identifier and a group key;

establishing a group according to the group identifier and the group key, and determining at least one second client in the group;

and according to the grouping, data between the first client in the grouping and at least one second client in the grouping are mutually transmitted.

6. The method of claim 5, wherein the receiving a data inter-transmission request sent by a first client comprises:

and receiving the data mutual transmission request sent by the first client through a uniform interface corresponding to the interface function of the SDK.

7. The method of claim 6, wherein said creating a packet based on said packet identifier and said packet key comprises:

analyzing the grouping key according to the grouping identifier and the grouping key;

when the analysis of the group key is successful, a group is established.

8. The method of claim 7, wherein the inter-transmitting data between the first client in the packet and at least one second client in the packet according to the packet comprises at least one of:

forwarding a game starting message or an inter-transmission message sent by the first client to the at least one second client through the unified interface, wherein the inter-transmission message comprises at least one of game achievement, game progress and breakthrough time;

forwarding a game starting message or an inter-transmission message sent by the at least one second client to the first client through the unified interface;

forwarding a game ending message or a leave packet message sent by the first client to the at least one second client through the unified interface;

and forwarding the game ending message or the leave packet message sent by the at least one second client to the first client through the unified interface.

9. A device for data mutual transmission is applied to a first client side, and is characterized by comprising:

the first processing module is used for sending a data mutual transmission request to the universal server, wherein the data mutual transmission request comprises the identity of the first client, the game identifier selected by the first client, the grouping identifier and the grouping key;

and the second processing module is used for performing data mutual transmission with at least one second client in the group through the group established by the general server according to the group identifier and the group key.

10. A device for data mutual transmission is applied to a universal server and is characterized by comprising:

the third processing module is used for receiving a data mutual transmission request sent by a first client, wherein the data mutual transmission request comprises an identity identifier of the first client, a game identifier selected by the first client, a group identifier and a group key;

the fourth processing module is used for establishing a group according to the group identifier and the group key and determining at least one second client in the group;

and the fifth processing module is used for mutually transmitting the data between the first client in the group and at least one second client in the group according to the group.

11. An electronic device, comprising: a processor, a memory, and a bus;

the bus is used for connecting the processor and the memory;

the memory is used for storing operation instructions;

the processor is used for executing the data mutual transmission method of any one of the claims 1-4 by calling the operation instruction.

12. An electronic device, comprising: a processor, a memory, and a bus;

the bus is used for connecting the processor and the memory;

the memory is used for storing operation instructions;

the processor is used for executing the data mutual transmission method of any one of the claims 5-8 by calling the operation instruction.

13. A computer-readable storage medium, in which a computer program is stored, which, when being executed by a processor, is adapted to carry out the method of data interchange according to any one of claims 1 to 4.

14. A computer-readable storage medium, in which a computer program is stored, which, when being executed by a processor, is adapted to carry out the method of data interchange according to any one of claims 5 to 8.

Technical Field

The present application relates to the field of computer technologies, and in particular, to a method, an apparatus, a device, and a computer-readable storage medium for data mutual transmission.

Background

The mutual message transmission between the game clients needs to be carried out through the forwarding of the game server. The existing game clients realize the function of data transmission between each other, and a special game server is required to be provided, and the game server is specially used for the game data transmission information of the game type.

Disclosure of Invention

Aiming at the defects of the existing mode, the application provides a method, a device, equipment and a computer readable storage medium for data mutual transmission, which are used for solving the problem of how to realize the data mutual transmission between game clients of any one of a plurality of games by only one universal server.

In a first aspect, the present application provides a method for data mutual transmission, which is applied to a first client, and includes:

sending a data mutual transmission request to a general server, wherein the data mutual transmission request comprises an identity identifier of a first client, a game identifier selected by the first client, a grouping identifier and a grouping key;

and the group established by the general server according to the group identification and the group key carries out data transmission with at least one second client in the group.

Optionally, sending the data inter-transmission request to the general server includes:

and sending a data mutual transmission request to a general server by calling a uniform interface corresponding to an interface function of the software development kit SDK, wherein the general server comprises a user manager, a network manager and a grouping manager.

Optionally, the data interchange between the packet established by the general server according to the packet identifier and the packet key and at least one second client in the packet includes:

sending a game starting message or an inter-transmission message to a universal server through a uniform interface so as to forward the game starting message or the inter-transmission message to at least one second client through the universal server, wherein the inter-transmission message comprises at least one of game achievements, game progress and breakthrough time;

or receiving a game starting message or an inter-transmission message transmitted by at least one second client forwarded by the universal server through the unified interface, wherein the inter-transmission message comprises at least one of game achievements, game progress and breakthrough time.

Optionally, the data interchange between the packet established by the general server according to the packet identifier and the packet key and at least one second client in the packet includes:

sending the game ending message or the leave packet message to the general server through the uniform interface, so that the game ending message or the leave packet message is forwarded to at least one second client through the general server;

or receiving the game ending message or the leaving packet message sent by the at least one second client forwarded by the universal server through the unified interface.

In a second aspect, the present application provides a method for data mutual transmission, which is applied to a general server, and includes:

receiving a data mutual transmission request sent by a first client, wherein the data mutual transmission request comprises an identity identifier of the first client, a game identifier selected by the first client, a grouping identifier and a grouping key;

establishing a group according to the group identifier and the group key, and determining at least one second client in the group;

and according to the grouping, data between the first client in the grouping and at least one second client in the grouping are mutually transmitted.

Optionally, receiving a data mutual transmission request sent by a first client includes:

and receiving a data mutual transmission request sent by the first client through a uniform interface corresponding to the interface function of the SDK.

Optionally, establishing a packet according to the packet identifier and the packet key includes:

analyzing the grouping key according to the grouping identifier and the grouping key;

when the packet key is successfully parsed, a packet is created.

Optionally, mutually transmitting data between the first client in the packet and the at least one second client in the packet according to the packet, including at least one of:

the method comprises the steps that a game starting message or an inter-transmission message sent by a first client side is forwarded to at least one second client side through a unified interface, wherein the inter-transmission message comprises at least one of game achievements, game progress and breakthrough time;

forwarding a game starting message or an inter-transmission message sent by at least one second client to the first client through the unified interface;

forwarding a game ending message or a leave grouping message sent by the first client to at least one second client through the unified interface;

and forwarding the game ending message or the leaving packet message sent by the at least one second client to the first client through the unified interface.

In a third aspect, the present application provides a device for data mutual transmission, which is applied to a first client, and includes:

the first processing module is used for sending a data mutual transmission request to the universal server, wherein the data mutual transmission request comprises an identity identifier of a first client, a game identifier selected by the first client, a grouping identifier and a grouping key;

and the second processing module is used for performing data mutual transmission with at least one second client in the group through the group established by the general server according to the group identifier and the group key.

In a fourth aspect, the present application provides a device for data mutual transmission, which is applied to a general server, and includes:

the third processing module is used for receiving a data mutual transmission request sent by the first client, wherein the data mutual transmission request comprises the identity of the first client, the game identifier selected by the first client, the grouping identifier and the grouping key;

the fourth processing module is used for establishing a group according to the group identifier and the group key and determining at least one second client in the group;

and the fifth processing module is used for mutually transmitting the data between the first client in the group and at least one second client in the group according to the group.

In a fifth aspect, the present application provides an electronic device, comprising: a processor, a memory, and a bus;

a bus for connecting the processor and the memory;

a memory for storing operating instructions;

and the processor is used for executing the data mutual transmission method of the first aspect of the application by calling the operation instruction.

In a sixth aspect, the present application provides an electronic device, comprising: a processor, a memory, and a bus;

a bus for connecting the processor and the memory;

a memory for storing operating instructions;

and the processor is used for executing the data mutual transmission method of the second aspect of the application by calling the operation instruction.

In a seventh aspect, the present application provides a computer-readable storage medium storing a computer program, where the computer program is used to execute the method for data interchange in the first aspect of the present application.

In an eighth aspect, the present application provides a computer-readable storage medium storing a computer program, the computer program being used for executing the method for data interchange of the second aspect of the present application.

The technical scheme provided by the embodiment of the application at least has the following beneficial effects:

the method comprises the steps that a first client sends a data mutual transmission request to a general server, wherein the data mutual transmission request comprises an identity identifier of the first client, a game identifier selected by the first client, a grouping identifier and a grouping key; the first client side performs data mutual transmission with at least one second client side in the group through the group established by the general server according to the group identifier and the group key; therefore, data can be transmitted among game clients of any one of a plurality of games only by one universal server; through the universal server, the first client and the at least one second client carry out data mutual transmission related to the same game in the same group, so that the original single-machine game at the first client can be conveniently converted into the network game in which the first client and the at least one second client carry out networking mutual transmission on the data related to the same game.

Additional aspects and advantages of the present application will be set forth in part in the description which follows and, in part, will be obvious from the description, or may be learned by practice of the present application.

Drawings

In order to more clearly illustrate the technical solutions in the embodiments of the present application, the drawings used in the description of the embodiments of the present application will be briefly described below.

Fig. 1 is a schematic flowchart of a data interchange method according to an embodiment of the present disclosure;

fig. 2 is a schematic flowchart of another data interchange method according to an embodiment of the present disclosure;

fig. 3 is a schematic flowchart of another data interchange method according to an embodiment of the present application;

fig. 4 is a schematic structural diagram of a device for data interchange provided in an embodiment of the present application;

fig. 5 is a schematic structural diagram of another apparatus for data interchange provided in the embodiment of the present application;

fig. 6 is a schematic structural diagram of an electronic device according to an embodiment of the present disclosure;

fig. 7 is a schematic structural diagram of another electronic device according to an embodiment of the present application.

Detailed Description

Reference will now be made in detail to embodiments of the present application, examples of which are illustrated in the accompanying drawings, wherein like or similar reference numerals refer to the same or similar elements or elements having the same or similar function throughout. The embodiments described below with reference to the drawings are exemplary only for the purpose of explaining the present application and are not to be construed as limiting the present invention.

As used herein, the singular forms "a", "an", "the" and "the" are intended to include the plural forms as well, unless the context clearly indicates otherwise. It will be further understood that the terms "comprises" and/or "comprising," when used in this specification, specify the presence of stated features, integers, steps, operations, elements, and/or components, but do not preclude the presence or addition of one or more other features, integers, steps, operations, elements, components, and/or groups thereof. It will be understood that when an element is referred to as being "connected" or "coupled" to another element, it can be directly connected or coupled to the other element or intervening elements may also be present. Further, "connected" or "coupled" as used herein may include wirelessly connected or wirelessly coupled. As used herein, the term "and/or" includes all or any element and all combinations of one or more of the associated listed items.

It will be understood by those skilled in the art that, unless otherwise defined, all terms (including technical and scientific terms) used herein have the same meaning as commonly understood by one of ordinary skill in the art to which this invention belongs. It will be further understood that terms, such as those defined in commonly used dictionaries, should be interpreted as having a meaning that is consistent with their meaning in the context of the prior art and will not be interpreted in an idealized or overly formal sense unless expressly so defined herein.

The following describes the technical solutions of the present application and how to solve the above technical problems with specific embodiments. The following several specific embodiments may be combined with each other, and details of the same or similar concepts or processes may not be repeated in some embodiments. Embodiments of the present application will be described below with reference to the accompanying drawings.

18页详细技术资料下载
上一篇:一种医用注射器针头装配设备
下一篇:操作响应方法、装置、终端及存储介质

网友询问留言

已有0条留言

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

精彩留言,会给你点赞!

技术分类