Message transmission method and device and server
By generating and sending messages containing client identifiers and channel identifiers in the server, and using Binder for cross-process communication, the problem of client access server complexity and message transmission stability is solved, and more efficient message transmission is achieved.
Patent Information
- Application Number
- CN202310344215.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2023-03-31
- Publication Date
- 2024-10-01
AI Technical Summary
In the existing technology, when the client accesses the server, it needs to establish a message transmission channel with the client in the terminal device, which results in high access complexity and difficulty in ensuring the stability of message transmission.
The server generates a message containing the client identifier, channel identifier and timestamp and sends it to the terminal device. Through the Binder cross-process communication connection, it obtains the message information generated by the client and avoids the direct establishment of a message transmission channel between the client and the terminal device.
It reduces the complexity and development cost of client access to the server, and improves the stability and success rate of message transmission.
Smart Images

Figure CN118740896A_ABST
Abstract
Description
Technical Field
[0001] The embodiments of the present disclosure relate to the field of information transmission technology, and in particular, to a message transmission method, device and server. Background Art
[0002] After the client is connected to the server, the client can run in the server, and the server can render client-related images and send client-related images to the terminal device.
[0003] At present, there is a message transmission channel between the client of the terminal device and the client in the server, and the client of the server and the client in the terminal device transmit messages based on the message transmission channel. For example, the client in the terminal device can send authentication messages such as account number and password to the client of the server based on the message transmission channel. However, when each client accesses the server, it needs to establish a message transmission channel with the corresponding client in the terminal device, resulting in high complexity of client access to the server. Summary of the invention
[0004] The present disclosure provides a message transmission method, device and server, which are used to solve the technical problem of high complexity of client access to server in the prior art.
[0005] In a first aspect, the present disclosure provides a message transmission method, which is applied to a server, wherein the server includes a first client, and a terminal device includes a second client corresponding to the first client, and the method includes:
[0006] Generate a first message, the first message including first message information generated by the first client, a first identifier of the first client, a second identifier of the second client, and an identifier of a channel for transmitting the first message, wherein the first message information includes first message content, an identifier of the first message, and a timestamp of the first message;
[0007] Sending the first message to the terminal device.
[0008] In a second aspect, the present disclosure provides a message transmission device, which is applied to a server, wherein the server includes a first client, and a terminal device includes a second client corresponding to the first client, and the message transmission device includes a generating module and a sending module, wherein:
[0009] The generating module is used to generate a first message, wherein the first message includes first message information generated by the first client, a first identifier of the first client, a second identifier of the second client, and an identifier of a channel for transmitting the first message, wherein the first message information includes first message content, an identifier of the first message, and a timestamp of the first message;
[0010] The sending module is used to send the first message to the terminal device.
[0011] In a third aspect, an embodiment of the present disclosure provides a server, including: a processor and a memory;
[0012] The memory stores computer-executable instructions;
[0013] The processor executes the computer-executable instructions stored in the memory, so that the at least one processor executes the message transmission method as described in the first aspect and various possible aspects of the first aspect.
[0014] In a fourth aspect, an embodiment of the present disclosure provides a computer-readable storage medium, in which computer execution instructions are stored. When a processor executes the computer execution instructions, the message transmission method as described in the first aspect and various possible aspects of the first aspect are implemented.
[0015] In a fifth aspect, an embodiment of the present disclosure provides a computer program product, including a computer program, which, when executed by a processor, implements the message transmission method as described in the first aspect and various possible aspects of the first aspect.
[0016] The present disclosure provides a message transmission method, apparatus and server, which are applied to a server, wherein the server includes a first client, and the terminal device includes a second client corresponding to the first client. The server can generate a first message, wherein the first message includes first message information generated by the first client, a first identifier of the first client, a second identifier of the second client and a channel identifier for transmitting the first message, and the first message information can include the first message content, the identifier of the first message and the timestamp of the first message, and the electronic device can send the timestamp of the first message to the terminal device. In the above method, since the first information sent by the server to the terminal device can include the message content generated by the first client, the first client does not need to establish a message transmission channel for transmitting the message content with the second client in the terminal device, so that when the first client accesses the server, the first client can be decoupled from the message transmission protocol, reducing the complexity of the first client accessing the server and improving the stability of message transmission. BRIEF DESCRIPTION OF THE DRAWINGS
[0017] In order to more clearly illustrate the embodiments of the present disclosure or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are some embodiments of the present disclosure. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative labor.
[0018] Figure 1 A schematic diagram of a system architecture provided for an embodiment of the present disclosure;
[0019] Figure 2 A flowchart of a message processing method provided by an embodiment of the present disclosure;
[0020] Figure 3 A schematic diagram of a method for establishing a communication connection provided by an embodiment of the present disclosure;
[0021] Figure 4 A schematic diagram of establishing a communication connection provided by an embodiment of the present disclosure;
[0022] Figure 5 A schematic diagram of a method for sending a detection message provided by an embodiment of the present disclosure;
[0023] Figure 6 A schematic diagram of a detection message sending timing provided by an embodiment of the present disclosure;
[0024] Fig. 7A A schematic diagram of sending a first message to a terminal device provided in an embodiment of the present disclosure;
[0025] Figure 7B A schematic diagram of another method of sending a first message to a terminal device provided in an embodiment of the present disclosure;
[0026] Figure 8 A schematic diagram of a method for receiving a second message from a terminal device provided for implementation of the present disclosure;
[0027] Fig.9A A schematic diagram of receiving a second message provided in an embodiment of the present disclosure;
[0028] Fig. 9B A schematic diagram of another method of receiving a second message provided by an embodiment of the present disclosure;
[0029] Fig.10 A schematic diagram of the structure of a message transmission device provided by an embodiment of the present disclosure; and
[0030] Fig.11 A schematic diagram of the structure of a terminal device provided in an embodiment of the present disclosure. DETAILED DESCRIPTION
[0031] Exemplary embodiments will be described in detail herein, examples of which are shown in the accompanying drawings. When the following description refers to the drawings, the same numbers in different drawings represent the same or similar elements unless otherwise indicated. The embodiments described in the following exemplary embodiments do not represent all embodiments consistent with the present disclosure. Instead, they are merely examples of devices and methods consistent with some aspects of the present disclosure as detailed in the appended claims.
[0032] In the related art, after the client accesses the server, it can run in the server, the server can render the screen related to the client, and send the screen to the terminal device, and the terminal device can display the screen. However, the client in the terminal device and the client in the server still need to transmit messages. At present, the client in the server and the client in the terminal device can include a message transmission channel, and the client of the server and the client of the terminal device can transmit messages based on the message transmission channel. For example, the client of the terminal device can send a login message to the corresponding client in the server based on the message transmission channel. However, when each client accesses the server, it needs to establish a message transmission channel with the client in the terminal device, which leads to a high complexity of client access to the server.
[0033] In order to solve the technical problems in the related art, the embodiment of the present disclosure provides a message transmission method, which is applied to a server, the server includes a first client, and the terminal device includes a second client corresponding to the first client. The server can receive a startup instruction for the first client from the terminal device, and the startup instruction includes the second identifier of the second client. Based on the startup instruction, a Binder cross-process connection is established between the first component in the server and the second component in the first client, and the first identifier of the first client is generated. After the communication connection is successfully established, the server can generate a first message, wherein the first message can include the first message information generated by the first client, the first identifier of the first client, the second identifier of the second client, and the channel identifier for transmitting the first message. The first message information includes the first message content, the identifier of the first message, and the timestamp of the first message. After the server generates the first message, it can send the first message to the terminal device. In this way, the first component in the server can obtain the first message information generated by the first client based on the Binder cross-process communication connection, and send the first message including the first message information to the terminal device. Therefore, the first client does not need to establish a message transmission channel for transmitting the message content with the second client. In this way, when the first client accesses the server, the first client can be decoupled from the message transmission protocol, reducing the complexity of the first client accessing the server.
[0034] Next, combine Figure 1, the system architecture between the server and the terminal device in the embodiment of the present disclosure is described.
[0035] Figure 1 A schematic diagram of a system architecture provided by an embodiment of the present disclosure. Figure 1 , including a terminal device and a server. The server includes a first component, a client 1, a client 2, and a client 3. The client 1 includes a second component A, the client 2 includes a second component B, the client 3 includes a second component C, and the terminal device includes clients corresponding to the client 1, the client 2, and the client 3.
[0036] See also Figure 1 , the server is connected to the terminal device through communication based on the first component, and the first component can be connected to the second component A, the second component B, and the second component C through cross-process communication. In this way, the first component can obtain the message generated by the client in the server based on the cross-process communication connection, and the server can forward the message of the client in the server to the terminal device based on the first component. Therefore, when the client accesses the server, it only needs to install the second component, and it can transmit messages with the client in the terminal device without establishing a message transmission channel with the client in the terminal device separately. In addition, the client in the server does not need to maintain the stability of the message transmission channel. In this way, the complexity of the client accessing the server can be reduced, and the development cost of the client accessing the server can be reduced.
[0037] exist Figure 1 In the illustrated embodiment, the terminal device may include clients corresponding to multiple clients in the server. For example, the terminal device includes clients corresponding to the clients in the server one by one. For example, if the server includes a client for game 1 and a client for game 2, the terminal device may also include a client for game 1 and a client for game 2, wherein the operation of the client of a specific game is implemented in the server, and the client of the game in the terminal device may display the game screen related to the client of the game sent by the server.
[0038] The first component can be used to communicate with the terminal device. For example, the first component can be a communication software package (such as veMsg Channel Service), and the communication software package can integrate multiple message transmission protocols, so that the server can not only transmit image data and operation instructions with the terminal device based on the first component, but also transmit messages with the terminal device.
[0039] The second component can perform cross-process communication with the first component, and the second component is a component in the client of the server. For example, the second component can be a communication software package (such as veMSG Channel Client), which can be installed in the client of the server. The second component can perform message transmission with the first component based on Binder cross-process communication, so that the first component in the server can obtain the message generated by the client of the server.
[0040] It can be understood that the first component in the server can be a transit station for the client's messages. The first component can transmit messages with the terminal device based on the message transmission protocol. The first component can also transmit messages with the second component in the client of the server based on cross-process communication, thereby realizing message transmission between the client in the server and the client in the terminal device. In this way, when a new client accesses the server, there is no need to configure a complex message transmission protocol for the new client, thereby reducing the complexity of the client accessing the server and reducing the development cost of the client accessing the server.
[0041] It should be noted that Binder cross-process communication can realize communication between different processes. For example, different applications in the system run in different processes, and because the processes are isolated from each other, the applications running in each process cannot actively communicate with each other. The Binder cross-process communication mechanism can enable applications running in different processes to communicate.
[0042] The technical solution of the present invention and how the technical solution of the present invention solves the above-mentioned technical problems are described in detail below with specific embodiments. The following specific embodiments can be combined with each other, and the same or similar concepts or processes may not be repeated in some embodiments. The embodiments of the present invention will be described below in conjunction with the accompanying drawings.
[0043] Figure 2 A flowchart of a message processing method provided by an embodiment of the present disclosure. Figure 2 , the method may include:
[0044] S201: Generate a first message, where the first message may include first message information generated by a first client, a first identifier of the first client, a second identifier of a second client, and an identifier of a channel for transmitting the first message.
[0045] The execution subject of the embodiment of the present disclosure may be a server, or a message transmission device arranged in the server. The message transmission device may be implemented based on software, or may be implemented based on a combination of software and hardware, which is not limited in the embodiment of the present disclosure.
[0046] The server may include a first client, and the terminal device may include a second client corresponding to the first client. For example, the server may include a first client of a game, and the terminal device may also include a second client of the game. The server may run the first client of the game and generate a screen related to the game, and the second client of the terminal device may receive the screen related to the game and display the screen.
[0047] The first message may include first message information generated by the first client, a first identifier of the first client, a second identifier of the second client, and an identifier of a channel for transmitting the first message.
[0048] The first message information may include the first message content, the first message identifier, and the timestamp of the first message. For example, the first message content may be the message content to be sent from the first client to the second client, wherein the first message content may at least include the client update message, the client announcement message, the client installation message, and the client uninstall message, etc. For example, the first message content may at least include the game client update message, the game client announcement message, the game client installation or uninstall message, etc., which is not limited in the embodiments of the present disclosure.
[0049] The identifier of the first message may be an identity identification number ID of the message. For example, when generating the first message, each first message includes a unique ID, and the ID may represent the first message. For example, the identifier of the first message may be a random set of numbers, etc., which is not limited in the embodiments of the present disclosure.
[0050] The first identifier may be an ID of the first client. For example, the first identifier may be a unique ID of the first client, and the server may generate the first identifier of the first client. For example, the server may transform the name of the first client according to a preset rule, and then obtain the first identifier corresponding to the first client.
[0051] The second identifier may be an ID of the second client. For example, the second identifier may be a unique ID of the second client, and the terminal device may include the second identifier of the second client. When the terminal device performs data transmission with the server, the server may obtain the second identifier of the second client from the terminal device.
[0052] It should be noted that the first identifier is the identifier of the first client in the server, and the second identifier is the identifier of the second client in the terminal device. Although the first client and the second client can correspond to the same application, the first identifier of the first client and the second identifier of the second client are unique, and the first identifier and the second identifier are also different.
[0053] The channel identifier may be a channel identifier for transmitting the first message. For example, in actual application, the server may transmit image data, operation instructions, etc. to the terminal device through the DaTe channel mechanism. Therefore, the server may establish a message transmission channel for transmitting messages based on the DaTe channel mechanism. The server may transmit login messages, update messages, installation messages, etc. to the terminal device based on the channel. The channel identifier may be an identifier of the message transmission channel. It should be noted that after the server establishes the message transmission channel, the identifier of the message transmission channel may be obtained.
[0054] Optionally, the server may generate a first message based on the user's operation information on the second client in the terminal device. For example, when the user starts the second client, if the second client needs to be updated, the server may generate a first message, and the first message content in the first message may be information about the client update. Optionally, the server may generate a first message based on the process of the first client. For example, if the first client running on the server needs to download new content before it can continue to run, the server may generate a first message, and the first message content in the first message may include a message requesting to download an installation package for a new client, etc., which is not limited in the embodiments of the present disclosure.
[0055] Optionally, the first message may include a message type identifier. The message type identifier may indicate the type of the first message. For example, the type of the first message may be a detection message, wherein the detection message is used to detect whether the message channel can be used for message transmission, and the first message may be a message to be confirmed, wherein after the receiving end receives the message to be confirmed, it may send an ACK message to the sending end of the message.
[0056] Optionally, the message type identifier may be a pre-set identifier. For example, if the message type identifier is 1, the message type of the first message may be a detection type message, if the message type identifier is 2, the first message may be a message to be confirmed, and if the message type identifier is 3, the first message may be a message that does not require confirmation.
[0057] S202: Send a first message to a terminal device.
[0058] Among them, after the server generates the first message, it can send the first message to the terminal device. For example, after the server generates the first message, it can determine the message transmission channel for transmitting the first message based on the channel identifier in the first message, and then send the first message to the terminal device based on the message transmission channel. For example, when the server transmits the first message to the terminal device, there is an independent message transmission channel. If the identifier of the message transmission channel is 1, the channel identifier carried by the first message can be 1. When the server determines that the channel identifier carried by a message is 1, it can determine that the message is the first message, and transmit the first message based on the message transmission channel.
[0059] Optionally, after receiving the first message, the terminal device may determine the second client to receive the first message based on the second identifier in the first message, and send the first message to the second client. For example, in actual application, the first message is a message sent by the server to the terminal device, so the first client indicated by the first identifier in the first message may be the sender of the first message, and the second client indicated by the second identifier in the first message may be the receiver of the first message.
[0060] Optionally, after the server sends the first message to the terminal device, if the message type identifier of the first message indicates that the first message is a message to be confirmed, the server may receive a confirmation message corresponding to the first message from the terminal device.
[0061] Among them, the confirmation message corresponding to the first message includes the second identifier, the first identifier, the channel identifier and the identifier of the first message. For example, if the first message is a message that needs to return a reception result, then after the terminal device receives the first message sent by the server, it can send an ACK message corresponding to the first message to the server, wherein the second client corresponding to the second identifier in the ACK message can be the sender of the ACK message, and the first client corresponding to the first identifier in the ACK message can be the receiver of the ACK message, and the ACK message can carry the identifier of the first message, so that the server can determine the first message that the terminal device has received based on the identifier of the first message.
[0062] The disclosed embodiment provides a message transmission method, which is applied to a server. The server can generate a first message, wherein the first message can include the first message information generated by the first client in the server, the first identifier of the first client, the second identifier of the second client corresponding to the first client in the terminal device, and the channel identifier for transmitting the first message. After the server generates the first message, it can send the first message to the terminal device. After the terminal device receives the first message, it can forward the first message to the second client. In this way, the server can uniformly obtain the message generated by the first client and send the message to the electronic device. Therefore, the first client does not need to establish a message transmission channel for transmitting messages with the second client. When the first client accesses the server, it does not need to configure a complex transmission protocol, thereby reducing the complexity of the first client accessing the server and reducing the development cost of the first client.
[0063] exist Figure 2 Based on the embodiment shown, the server may further include a first component, and the first client may further include a second component. Before the server generates the first message, the message transmission method further includes a method for establishing a communication connection between the first component and the second component. Figure 3 , a method for establishing a communication connection is described.
[0064] Figure 3 A schematic diagram of a method for establishing a communication connection provided by an embodiment of the present disclosure. Figure 3 The method flow includes:
[0065] S301: Receive a startup instruction for a first client from a terminal device.
[0066] The start instruction may include the second identifier of the second client. For example, since the second client in the terminal device corresponds to the first client in the server, when the user starts the second client in the terminal device, the terminal device may send a start instruction for the first client to the server, and the start instruction may include the identifier of the second client. The server may start the first client in the server based on the start instruction.
[0067] S302: Based on the startup instruction, establish a communication connection between a first component in the server and a second component in the first client, and generate a first identifier of the first client.
[0068] The server may include a first component, and the first client of the server may include a second component. The server may establish a communication connection between the first component and the second component based on a startup instruction. For example, when the server receives a startup instruction from the first client from the terminal device, the server may determine that the terminal device has started the second client corresponding to the first client, and therefore, the server may establish a communication connection between the first component and the second component in the first client, so that the server may obtain a message generated by the first client based on the first component.
[0069] Optionally, the communication connection between the first component and the second component can be a Binder cross-process communication connection. For example, the server can control the first component to provide a binding service for Binder cross-process communication, and the second component can establish a Binder cross-process communication connection with the first component based on the binding service. For example, since both the first component and the second component can be communication software packages, the first client can call the communication interface of the second component, and then realize the Binder cross-process communication connection through the interface and the binding service provided by the first component.
[0070] Next, combine Figure 4 , the process of establishing a communication connection is described.
[0071] Figure 4 A schematic diagram of establishing a communication connection provided by an embodiment of the present disclosure. Figure 4 , including a terminal device and a server. The server includes a first component, a client of game 1, a client of game 2, and a client of game 3. The client of game 1 includes a second component A, the client of game 2 includes a second component B, and the client of game 3 includes a second component C. The terminal device may include clients corresponding to the clients of game 1, game 2, and game 3 in the server.
[0072] See also Figure 4 When the user clicks on the client of Game 3 in the terminal device, the terminal device can send an instruction to start Game 3 to the server. After receiving the instruction to start Game 3, the server can establish a Binder between the first component and the second component C in the client of Game 3 in the server. In this way, the server can obtain the message generated by the client of Game 3 based on the Binder connection between the first component and the second component C.
[0073] It should be noted that when cross-process communication is performed through Binder, there is a shared space between the first component and the second component, and the first component and the second component can transmit messages based on the shared space. For example, when the second component sends a message to the first component, the second component can store the message in the shared space, and the first component can obtain the message in the shared space. Similarly, when the first component sends a message to the second component, the first component can store the message in the shared space, and the second component can obtain the message in the shared space.
[0074] Optionally, when the first component establishes a communication connection with the second component, the server can generate a first identifier of the first client corresponding to the second component. For example, after the first component binds to multiple second components based on the Binder Service, the first component can store the first identifiers (channel IDs) of the first clients corresponding to multiple second components in the instance table during operation. Each channel ID in the instance table can map the Binder instance between the transmission channel of the first component and the second component. In this way, when the first component receives a message sent by the terminal device, the server can parse and obtain the channel ID related to the first client, and search the channel instance related to the channel ID in the instance table, and then send the message to the second component of the first client corresponding to the channel ID through the channel instance.
[0075] For example, if the first component is bound to 10 second components, the first component can store the first identifiers of 10 first clients, each first identifier corresponds to a first client, that is, each first identifier can correspond to a second component in the first client.
[0076] S303. Based on the first component, send a message to the second component to indicate whether the communication connection is established successfully.
[0077] Among them, the message of whether the communication connection is successfully established includes the first identifier of the first client and the result of establishing the communication connection. For example, after the first component in the server establishes a communication connection with the second component in the first client, the first component can send a message to the second component, and the message can include the result of establishing the communication connection (such as successful establishment or failed establishment), and the first identifier assigned by the server to the first client. In this way, after the communication connection is established, the server can obtain the first identifier of the first client and the second identifier of the second client in the terminal device, and then generate a first message and send the first message to the terminal device.
[0078] The disclosed embodiment provides a method for establishing a communication connection, receiving a startup instruction for a first client from a terminal device, establishing a communication connection between a first component in a server and a second component in the first client based on the startup instruction, and generating a first identifier of the first client, and sending a message to the second component based on the first component to indicate whether the communication connection is successfully established. In this way, after the server establishes a communication connection between the first component and the second component, the server can obtain the first identifier of the first client and the second identifier of the second client corresponding to the first client in the terminal device, and then can generate a first message to be sent to the terminal device, without the need for the first client to establish an independent message transmission channel with the second client, thereby reducing the complexity of the first client accessing the server and the development cost of the first client.
[0079] exist Figure 3 Based on the embodiment shown in the figure, after the first component establishes a communication connection with the second component, the server can also send a detection message to the terminal device. Figure 5 , a method for sending a detection message is described.
[0080] Figure 5 A schematic diagram of a method for sending a detection message provided by an embodiment of the present disclosure. Figure 5 , the method comprising:
[0081] S501. If the communication connection is established successfully, a first detection message is sent to the terminal device.
[0082] The first detection message includes a first identifier, a second identifier and a channel identifier. The first detection message is used to detect whether the channel between the second component in the first client of the server and the terminal device is normal.
[0083] Among them, the first client corresponding to the first identifier in the first detection message can be the sender of the first detection message, and the second client corresponding to the second identifier in the first detection message can be the receiver of the first detection message. For example, if a first component in a server establishes a communication connection with a second component of a game client in the server, the first identifier can be the identifier of the game client, and the second identifier can be the identifier of the client corresponding to the game client in the terminal device.
[0084] Optionally, the server sends a first detection message to the terminal device, which can be specifically: based on the second component in the first client, the first detection message is sent to the first component in the server, and based on the first component, the first detection message is forwarded to the second client in the terminal device. For example, if the second component in the game client of the server establishes a communication connection with the first component in the server, the second component in the game client can generate a first detection message, and based on the communication connection, send the first detection message to the first component. After receiving the first detection message, the first component can forward the first detection message to the terminal device based on the message transmission channel corresponding to the channel identifier in the first detection message. In this way, the channel for sending the first detection message is the same as the channel for sending other messages generated by the first client, and whether the message channel is normal can be determined based on the first detection message.
[0085] It should be noted that the second client in the terminal device can integrate a game software package (such as veGame SDK), and the first component can send the first detection message to the veGame SDK to avoid affecting the second client.
[0086] S502: Receive a second detection message from a terminal device.
[0087] Among them, after the server sends the second detection message to the terminal device, if the terminal device receives the second detection message, it means that the channel through which the server sends messages to the terminal device is normal. Therefore, the terminal device can generate a second detection message and send the second detection message to the server, thereby determining whether the channel through which the terminal device sends messages to the server is normal.
[0088] The second detection message includes a second identifier, a first identifier, a channel identifier, and a detection result of the first detection message. For example, the second client corresponding to the second identifier in the second detection message may be the sender of the second detection message, the first client corresponding to the first identifier in the second detection message may be the receiver of the second detection message, and the detection result of the first detection message may be that the terminal device has received the first detection message. In this way, after receiving the second detection message, the server can determine that the message transmission channel between the server and the client is normal, and then the message transmission between the first client and the second client can be performed.
[0089] Next, combine Figure 6 , the process of sending the detection message is explained.
[0090] Figure 6 A schematic diagram of the timing of sending a detection message provided by an embodiment of the present disclosure. Figure 6, including: a second client, a first component, a second component and a first client, wherein the first component and the first client are in a server, the second component can be in the first client, and the second client is in a terminal device.
[0091] See also Figure 6 The first client can send an Init (initialization) request to the second component, the second component can establish a cross-process connection with the first component (such as actively binding the Binder Service), the first component can obtain the first identifier of the first client, and authenticate based on the first identifier, and send a message to the second component indicating that the communication connection is successfully established.
[0092] See also Figure 6 After a communication connection is established between the first component and the second component, the second component can send a first detection message to the first component, and the first component can forward the first detection message to the second client. The first detection message is used to determine whether the message transmission channel between the first client and the second client is normal. The second client can send a second detection message to the first component, and the first component forwards the second detection message to the second component. The second component can call back the detection result to the first client.
[0093] In this way, the first client can determine whether it can send a message to the second client based on the detection result. For example, if the detection result indicates that the message transmission channel between the first client and the second client is normal, the first client can send a message to the second client. If the detection result indicates that the message transmission channel between the first client and the second client is abnormal, the first client can suspend sending messages to the second client.
[0094] The present disclosure implements a method for sending a detection message. If the communication connection between the first component and the second component is successfully established, the server can send a first detection message to the terminal device and receive a second detection message from the terminal device. In this way, the server can determine whether the message transmission channel between the first client in the server and the second client in the terminal device is normal, thereby improving the success rate of message transmission and the stability of message transmission.
[0095] Based on any one of the above embodiments, after a communication connection is established between the first component and the second component, and the message transmission channel between the first client and the second client is normal, the following is combined with Figure 7A-7B , the process of the server sending two messages to the terminal device is explained.
[0096] Fig. 7A A schematic diagram of sending a first message to a terminal device provided in an embodiment of the present disclosure. Fig. 7AIn the embodiment shown, the first message is a one-way message, see Fig. 7A , including: a second client, a client software package (veGameSDK), a first component, a second component and a first client. Among them, the client software package is set in the second client, the first component and the first client are set in the server, and the second component is set in the first client.
[0097] See also Fig. 7A , the first client can send the first message content to the second component. After receiving the first message content, the second component can generate a first message and send the first message to the first component. After receiving the first message, the first component can forward the first message to the client software package. After receiving the first message, the client software package can send the first message to the second client based on the interface callback method. The second client can process the first message.
[0098] In this way, the server can realize message transmission between the first client and the second client based on the first component and the second component. The first client does not need to establish a separate message transmission channel with the second client, thereby reducing the complexity of the first client accessing the server and reducing the development cost of the first client.
[0099] Figure 7B A schematic diagram of another method of sending a first message to a terminal device provided by an embodiment of the present disclosure. Figure 7B In the embodiment shown, the first message is a message to be returned with a result, see Figure 7B , including: a second client, a client software package (veGameSDK), a first component, a second component and a first client. Among them, the client software package is set in the second client, the first component and the first client are set in the server, and the second component is set in the first client.
[0100] See also Figure 7B , the first client sends the first message content to the second component, the second component generates the first message based on the first message content, and sends the first message to the first component. After receiving the first message, the first component can forward the first message to the client software package, after receiving the first message, the client software package can transmit the first message to the second client based on the interface callback method, and the second client can process the first message.
[0101] See also Figure 7BAfter the client software package receives the first message, it can be determined that the second client can receive the first message. Therefore, the client software package can send an Ack message to the first component. After the first component receives the Ack message, it can send the Ack message to the second component to be received. The second component feeds back the sending result of the first message to the first client based on the interface callback, thereby realizing the message transmission between the first client and the second client.
[0102] Based on any one of the above embodiments, in the above message transmission method, after the server sends the first message to the terminal device, the above message transmission method also includes a method for receiving a second message from the terminal device. Figure 8 , a method for a server to receive a second message from a terminal device is described.
[0103] Figure 8 A schematic diagram of a method for receiving a second message from a terminal device provided for the implementation of the present disclosure. Figure 8 ,include:
[0104] S801. Receive a second message from a terminal device.
[0105] The second message includes second message information generated by the second client, a second identifier, a first identifier, a channel identifier, and an identifier of a message type.
[0106] Optionally, the second message information includes the second message content, the identifier of the second message, and the timestamp of the second message. For example, the second message content may be the message content to be sent by the second client to the first client, wherein the second message content may at least include the client's login information, the client's message confirming installation, and the client's message confirming uninstallation. For example, the second message content may at least include the game client's login account, login password, etc., which is not limited in the embodiments of the present disclosure.
[0107] For example, the second client corresponding to the second identifier in the second message can be the sender of the second message, and the first client corresponding to the first identifier in the second message can be the receiver of the second message. It should be noted that after the first component establishes a communication connection with the second component, the second client in the terminal device can obtain the first identifier of the first client in the server, and the present disclosed embodiment does not limit this.
[0108] Optionally, the server receives a second message from the terminal device, which can be specifically: receiving the second message based on the first component in the server, determining the target component among multiple second components communicatively connected to the first component based on the first identifier, and sending the second message to the target component based on the first component and the communication connection between the first component and the target component.
[0109] Among them, the target component is the second component in the first client corresponding to the first identifier in the second message. For example, when the terminal device sends the second message to the first client in the server, since the first component in the server can be connected to the second components in multiple second clients, the first component can determine the recipient of the first message based on the first identifier. For example, after the first component establishes a communication connection with multiple second components, the first component can save the first identifiers of the first clients corresponding to the multiple second components, and establish a corresponding relationship between each first identifier and a communication connection channel. Therefore, the first component can determine the target component based on the corresponding relationship and the first identifier in the second message.
[0110] Optionally, after the server determines the target component, it can send a second message to the target component based on the first component and the communication connection between the first component and the target component. For example, the first message sent by the terminal device to the server includes account login information. After receiving the first message, the server determines the first client corresponding to the account login information based on the first identifier and the corresponding relationship, and sends the first message to the second component in the first client based on the first component. The second component can call back the account login information in the first message to the first client, thereby realizing message transmission between the second client and the first client.
[0111] For example, the first component can determine the instance channel of the target component based on the channel ID, and send the second message to the target component through the instance channel, and the target component is the second component in the first client corresponding to the channel ID. For example, the second client sends a message of game A to the first component, and the target of the message is the first client of game A. Based on the identification of game A, the first component can obtain the channel ID after the second component in the first client of game A binds to the first component through Binder cross-process communication, and then send the message of game A to the second component in the first client of game A through the instance channel of the channel ID.
[0112] S802: If the identifier of the message type in the second message indicates that the second message is a message to be confirmed, send a confirmation message corresponding to the second message to the terminal device.
[0113] Optionally, after the server receives the second message from the terminal device, if the second message is a message to be confirmed, the server may also send a confirmation message corresponding to the second message to the terminal device, and the confirmation message may indicate that the server has received the second message.
[0114] The confirmation message corresponding to the second message includes the first identifier, the second identifier, the channel identifier, and the identifier of the second message. For example, when the server sends a confirmation message corresponding to the second message to the terminal device, the first client corresponding to the first identifier in the confirmation message may be the sender of the confirmation message, the second client corresponding to the second identifier in the confirmation message may be the receiver of the confirmation message, and the identifier of the second message carried in the confirmation message may indicate that the server has received the second message.
[0115] Next, combine Figure 9A-9B , a process of receiving a second message from a terminal device to a server is described.
[0116] Fig.9A A schematic diagram of receiving a second message provided by an embodiment of the present disclosure. Fig.9A In the embodiment shown, the second message may be a one-way message (a message that does not require confirmation), see Fig.9A , including: a second client, a client software package, a first component, a second component and a first client. The client software package is arranged in the second client, the first component and the first client are arranged in the server, and the second component is arranged in the first client.
[0117] See also Fig.9A The second client can send the second message content to the client software package. The client software package generates a second message based on the second message content and sends the second message to the first component. After the first component receives the second message, it can determine the second component to be received based on the first identifier in the second message and send the second message to the second component. After the second component receives the second message, it can feedback the second message to the first client based on the interface callback method, and the first client can process the message content.
[0118] Fig. 9B Another schematic diagram of receiving a second message provided by an embodiment of the present disclosure. Fig. 9B In the embodiment shown, the second message is a message to be confirmed, see Fig. 9B , including: a second client, a client software package, a first component, a second component and a first client. The client software package is arranged in the second client, the first component and the first client are arranged in the server, and the second component is arranged in the first client.
[0119] See also Fig. 9BThe second client can send the second message content to the client software package. The client software package generates a second message based on the second message content and sends the second message to the first component. After the first component receives the second message, it can determine the second component to be received based on the first identifier in the second message and send the second message to the second component. After the second component receives the second message, it can feedback the second message to the first client based on the interface callback method, and the first client can process the message.
[0120] See also Fig. 9B After the second component receives the second message, it can be determined that the first client can receive the second message. Therefore, the second component can send an Ack message to the first component. After the first component receives the Ack message, it can forward the Ack message to the client software package. The client software package feeds back the sending result of the second message to the second client based on the interface callback, thereby realizing the message transmission between the first client and the second client.
[0121] The disclosed embodiment provides a method for receiving a second message from a terminal device, receiving the second message based on a first component in a server, determining a target component among multiple second components that are communicatively connected to the first component based on a first identifier, sending the second message to the target component based on the first component and the communication connection between the first component and the target component, and sending a confirmation message corresponding to the second message to the terminal device if the identifier of the message type in the second message indicates that the second message is a message to be confirmed. In this way, the server can realize message transmission between a first client in the server and a second client in the terminal device based on the first component and the second component, and the first client does not need to establish a separate message transmission channel with the second client, thereby reducing the complexity of the first client accessing the server and reducing the development cost of the first client.
[0122] Fig.10 This is a schematic diagram of the structure of a message transmission device provided by an embodiment of the present disclosure. Fig.10 The message transmission device 100 includes a generating module 101 and a sending module 102, wherein:
[0123] The generating module 101 is used to generate a first message, wherein the first message includes first message information generated by the first client, a first identifier of the first client, a second identifier of the second client, and a channel identifier for transmitting the first message, wherein the first message information includes first message content, an identifier of the first message, and a timestamp of the first message;
[0124] The sending module 102 is used to send the first message to the terminal device.
[0125] According to one or more embodiments of the present disclosure, the message transmission device 100 further includes a receiving module 103, and the receiving module 103 is used to:
[0126] receiving a startup instruction for the first client from the terminal device, wherein the startup instruction includes a second identifier of the second client;
[0127] Based on the startup instruction, establish a communication connection between the first component in the server and the second component in the first client, and generate a first identifier of the first client;
[0128] Based on the first component, a message is sent to the second component to indicate whether the communication connection is successfully established, wherein the message includes a first identifier of the first client and a result of establishing the communication connection.
[0129] According to one or more embodiments of the present disclosure, the sending module 102 is specifically configured to:
[0130] If the communication connection is successfully established, sending a first detection message to the terminal device, where the first detection message includes the first identifier, the second identifier, and the channel identifier;
[0131] A second detection message is received from the terminal device, where the second detection message includes the second identifier, the first identifier, the channel identifier, and a detection result of the first detection message.
[0132] According to one or more embodiments of the present disclosure, the sending module 102 is specifically configured to:
[0133] Based on the second component in the first client, sending the first detection message to the first component in the server;
[0134] Based on the first component, the first detection message is forwarded to a second client in the terminal device.
[0135] According to one or more embodiments of the present disclosure, the sending module 102 is specifically configured to:
[0136] If the message type identifier of the first message indicates that the first message is a message to be confirmed, a confirmation message corresponding to the first message is received from the terminal device, and the confirmation message corresponding to the first message includes the second identifier, the first identifier, the channel identifier and the identifier of the first message.
[0137] According to one or more embodiments of the present disclosure, the receiving module 103 is further configured to:
[0138] receiving a second message from the terminal device, where the second message includes second message information generated by the second client, the second identifier, the first identifier, the channel identifier, and an identifier of the message type, and the second message information includes second message content, an identifier of the second message, and a timestamp of the second message;
[0139] If the message type identifier in the second message indicates that the second message is a message to be confirmed, a confirmation message corresponding to the second message is sent to the terminal device, and the confirmation message corresponding to the second message includes the first identifier, the second identifier, the channel identifier and the identifier of the second message.
[0140] According to one or more embodiments of the present disclosure, the receiving module 103 is specifically configured to:
[0141] receiving the second message based on the first component in the server;
[0142] Based on the first identifier, determine a target component among a plurality of second components that are communicatively connected to the first component, the target component being a second component in the first client corresponding to the first identifier in the second message;
[0143] Based on the first component and the communication connection between the first component and the target component, the second message is sent to the target component.
[0144] The message transmission device provided in the embodiment of the present disclosure can be used to execute the technical solution of the above-mentioned method embodiment. Its implementation principle and technical effect are similar, and this embodiment will not be repeated here.
[0145] Fig.11 A schematic diagram of the structure of a server provided in an embodiment of the present disclosure. Fig.11 , which shows a schematic diagram of the structure of a server 1100 suitable for implementing the embodiment of the present disclosure, and the server 1100 may be a server or a server. The server may include but is not limited to mobile terminals such as mobile phones, notebook computers, digital broadcast receivers, personal digital assistants (PDAs), tablet computers (Portable Android Devices, PADs), portable multimedia players (PMPs), vehicle terminals (such as vehicle navigation terminals), etc., and fixed terminals such as digital TVs, desktop computers, etc. Fig.11 The server shown is only an example and should not bring any limitation to the functions and scope of use of the embodiments of the present disclosure.
[0146] like Fig.11As shown, the server 1100 may include a processing device (e.g., a central processing unit, a graphics processing unit, etc.) 1101, which can perform various appropriate actions and processes according to a program stored in a read-only memory (ROM) 1102 or a program loaded from a storage device 1108 to a random access memory (RAM) 1103. Various programs and data required for the operation of the server 1100 are also stored in the RAM 1103. The processing device 1101, the ROM 1102, and the RAM 1103 are connected to each other via a bus 1104. An input / output (I / O) interface 1105 is also connected to the bus 1104.
[0147] Typically, the following devices may be connected to the I / O interface 1105: input devices 1106 including, for example, a touch screen, a touch pad, a keyboard, a mouse, a camera, a microphone, an accelerometer, a gyroscope, etc.; output devices 1107 including, for example, a liquid crystal display (LCD), a speaker, a vibrator, etc.; storage devices 1108 including, for example, a magnetic tape, a hard disk, etc.; and communication devices 1109. The communication devices 1109 may allow the server 1100 to communicate with other devices wirelessly or by wire to exchange data. Although Fig.11 The server 1100 is shown with various devices, but it should be understood that it is not required to implement or have all the devices shown. More or fewer devices may be implemented or have instead.
[0148] In particular, according to an embodiment of the present disclosure, the process described above with reference to the flowchart can be implemented as a computer software program. For example, an embodiment of the present disclosure includes a computer program product, which includes a computer program carried on a computer-readable medium, and the computer program contains program code for executing the method shown in the flowchart. In such an embodiment, the computer program can be downloaded and installed from a network through a communication device 1109, or installed from a storage device 1108, or installed from a ROM 1102. When the computer program is executed by the processing device 1101, the above-mentioned functions defined in the method of the embodiment of the present disclosure are executed.
[0149] It should be noted that the computer-readable medium disclosed above may be a computer-readable signal medium or a computer-readable storage medium or any combination of the above two. The computer-readable storage medium may be, for example, but not limited to, an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, device or device, or any combination of the above. More specific examples of computer-readable storage media may include, but are not limited to: an electrical connection with one or more wires, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the above. In the present disclosure, a computer-readable storage medium may be any tangible medium containing or storing a program that may be used by or in combination with an instruction execution system, device or device. In the present disclosure, a computer-readable signal medium may include a data signal propagated in a baseband or as part of a carrier wave, in which a computer-readable program code is carried. This propagated data signal may take a variety of forms, including but not limited to an electromagnetic signal, an optical signal, or any suitable combination of the above. The computer readable signal medium may also be any computer readable medium other than a computer readable storage medium, which may send, propagate or transmit a program for use by or in conjunction with an instruction execution system, apparatus or device. The program code contained on the computer readable medium may be transmitted using any suitable medium, including but not limited to: wires, optical cables, RF (radio frequency), etc., or any suitable combination of the above.
[0150] Optionally, the embodiments of the present disclosure further include a computer-readable storage medium, in which computer-executable instructions are stored. When a processor executes the computer-executable instructions, the message transmission method of any of the above embodiments is implemented.
[0151] Optionally, an embodiment of the present disclosure provides a computer program product, including a computer program, and when the computer program is executed by a processor, the message transmission method of any of the above embodiments is implemented.
[0152] The computer-readable medium may be included in the server, or may exist independently without being installed in the server.
[0153] The computer-readable medium carries one or more programs. When the one or more programs are executed by the server, the server executes the method shown in the above embodiment.
[0154] Computer program code for performing the operations of the present disclosure may be written in one or more programming languages or a combination thereof, including object-oriented programming languages, such as Java, Smalltalk, C++, and conventional procedural programming languages, such as "C" or similar programming languages. The program code may be executed entirely on the user's computer, partially on the user's computer, as an independent software package, partially on the user's computer and partially on a remote computer, or entirely on a remote computer or server. In the case of a remote computer, the remote computer may be connected to the user's computer via any type of network, including a local area network (LAN) or a wide area network (WAN), or may be connected to an external computer (e.g., via the Internet using an Internet service provider).
[0155] The flow chart and block diagram in the accompanying drawings illustrate the possible architecture, function and operation of the system, method and computer program product according to various embodiments of the present disclosure. In this regard, each square box in the flow chart or block diagram can represent a module, a program segment or a part of a code, and the module, the program segment or a part of the code contains one or more executable instructions for realizing the specified logical function. It should also be noted that in some implementations as replacements, the functions marked in the square box can also occur in a sequence different from that marked in the accompanying drawings. For example, two square boxes represented in succession can actually be executed substantially in parallel, and they can sometimes be executed in the opposite order, depending on the functions involved. It should also be noted that each square box in the block diagram and / or flow chart, and the combination of the square boxes in the block diagram and / or flow chart can be implemented with a dedicated hardware-based system that performs a specified function or operation, or can be implemented with a combination of dedicated hardware and computer instructions.
[0156] The units involved in the embodiments described in the present disclosure may be implemented by software or hardware. The name of a unit does not limit the unit itself in some cases. For example, the first acquisition unit may also be described as a "unit for acquiring at least two Internet Protocol addresses".
[0157] The functions described above herein may be performed at least in part by one or more hardware logic components. For example, without limitation, exemplary types of hardware logic components that may be used include: field programmable gate arrays (FPGAs), application specific integrated circuits (ASICs), application specific standard products (ASSPs), systems on chips (SOCs), complex programmable logic devices (CPLDs), and the like.
[0158] In the context of the present disclosure, a machine-readable medium may be a tangible medium that may contain or store a program for use by or in conjunction with an instruction execution system, device, or equipment. A machine-readable medium may be a machine-readable signal medium or a machine-readable storage medium. A machine-readable medium may include, but is not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, device, or equipment, or any suitable combination of the foregoing. A more specific example of a machine-readable storage medium may include an electrical connection based on one or more lines, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing.
[0159] It should be noted that the modifications of "one" and "plurality" mentioned in the present disclosure are illustrative rather than restrictive, and those skilled in the art should understand that unless otherwise clearly indicated in the context, it should be understood as "one or more".
[0160] The names of the messages or information exchanged between multiple devices in the embodiments of the present disclosure are only used for illustrative purposes and are not used to limit the scope of these messages or information.
[0161] It is understandable that before using the technical solutions disclosed in the embodiments of the present disclosure, the types, scope of use, usage scenarios, etc. of the personal information involved in the present disclosure should be informed to the user and the user's authorization should be obtained in an appropriate manner in accordance with relevant laws and regulations.
[0162] For example, in response to receiving an active request from a user, a prompt message is sent to the user to clearly prompt the user that the operation requested to be performed will require obtaining and using the user's personal information. Thus, the user can autonomously choose whether to provide personal information to software or hardware such as a terminal device, application, server or storage medium that performs the operation of the technical solution of the present disclosure according to the prompt message. As an optional but non-limiting implementation method, in response to receiving an active request from the user, the method of sending a prompt message to the user can be, for example, a pop-up window, in which the prompt message can be presented in text. In addition, the pop-up window can also carry a selection control for the user to choose "agree" or "disagree" to provide personal information to the terminal device. It can be understood that the above notification and the process of obtaining user authorization are only illustrative and do not constitute a limitation on the implementation method of the present disclosure. Other methods that meet relevant laws and regulations can also be applied to the implementation method of the present disclosure.
[0163] It is understood that the data involved in this technical solution (including but not limited to the data itself, the acquisition or use of the data) shall comply with the requirements of the relevant laws and regulations. The data may include information, parameters and messages, such as flow switching indication information.
[0164] The above description is only a preferred embodiment of the present disclosure and an explanation of the technical principles used. Those skilled in the art should understand that the scope of disclosure involved in the present disclosure is not limited to the technical solutions formed by a specific combination of the above technical features, but should also cover other technical solutions formed by any combination of the above technical features or their equivalent features without departing from the above disclosed concept. For example, the above features are replaced with the technical features with similar functions disclosed in the present disclosure (but not limited to) by each other to form a technical solution.
[0165] In addition, although each operation is described in a specific order, this should not be understood as requiring these operations to be performed in the specific order shown or in a sequential order. Under certain circumstances, multitasking and parallel processing may be advantageous. Similarly, although some specific implementation details are included in the above discussion, these should not be interpreted as limiting the scope of the present disclosure. Some features described in the context of a separate embodiment can also be implemented in a single embodiment in combination. On the contrary, the various features described in the context of a single embodiment can also be implemented in multiple embodiments individually or in any suitable sub-combination mode.
[0166] Although the subject matter has been described in language specific to structural features and / or methodological logical actions, it should be understood that the subject matter defined in the appended claims is not necessarily limited to the specific features or actions described above. On the contrary, the specific features and actions described above are merely example forms of implementing the claims.
Claims
1. A message transmission method, characterized in that: Applied to a server, the server includes a first client, and a terminal device includes a second client corresponding to the first client, the method includes: Generate a first message, the first message including first message information generated by the first client, a first identifier of the first client, a second identifier of the second client, and an identifier of a channel for transmitting the first message, wherein the first message information includes first message content, an identifier of the first message, and a timestamp of the first message; Sending the first message to the terminal device.
2. The method according to claim 1, characterized in that: The server includes a first component, the first client includes a second component, and before generating the first message, the method further includes: receiving a startup instruction for the first client from the terminal device, wherein the startup instruction includes a second identifier of the second client; Based on the startup instruction, establish a communication connection between the first component in the server and the second component in the first client, and generate a first identifier of the first client; Based on the first component, a message is sent to the second component to indicate whether the communication connection is successfully established, wherein the message includes a first identifier of the first client and a result of establishing the communication connection.
3. The method according to claim 2, characterized in that After sending a message to the second component as to whether the communication connection is successfully established, the method further includes: If the communication connection is successfully established, sending a first detection message to the terminal device, where the first detection message includes the first identifier, the second identifier, and the channel identifier; A second detection message is received from the terminal device, where the second detection message includes the second identifier, the first identifier, the channel identifier, and a detection result of the first detection message.
4. The method according to claim 3, characterized in that Sending a first detection message to the terminal device includes: Based on the second component in the first client, sending the first detection message to the first component in the server; Based on the first component, the first detection message is forwarded to a second client in the terminal device.
5. The method according to any one of claims 1 to 3, characterized in that: The first message includes an identifier of a message type; after sending the first message to the terminal device, the method further includes: If the message type identifier of the first message indicates that the first message is a message to be confirmed, a confirmation message corresponding to the first message is received from the terminal device, and the confirmation message corresponding to the first message includes the second identifier, the first identifier, the channel identifier and the identifier of the first message.
6. The method according to any one of claims 2 to 4, characterized in that: After sending the first message to the terminal device, the method further includes: receiving a second message from the terminal device, where the second message includes second message information generated by the second client, the second identifier, the first identifier, the channel identifier, and an identifier of the message type, and the second message information includes second message content, an identifier of the second message, and a timestamp of the second message; If the message type identifier in the second message indicates that the second message is a message to be confirmed, a confirmation message corresponding to the second message is sent to the terminal device, and the confirmation message corresponding to the second message includes the first identifier, the second identifier, the channel identifier and the identifier of the second message.
7. The method according to claim 6, characterized in that Receiving a second message from the terminal device includes: receiving the second message based on the first component in the server; Based on the first identifier, determine a target component among a plurality of second components that are communicatively connected to the first component, the target component being a second component in the first client corresponding to the first identifier in the second message; Based on the first component and the communication connection between the first component and the target component, the second message is sent to the target component.
8. A message transmission device, characterized in that: Applied to a server, the server includes a first client, the terminal device includes a second client corresponding to the first client, and the message transmission device includes a generating module and a sending module, wherein: The generating module is used to generate a first message, wherein the first message includes first message information generated by the first client, a first identifier of the first client, a second identifier of the second client, and an identifier of a channel for transmitting the first message, wherein the first message information includes first message content, an identifier of the first message, and a timestamp of the first message; The sending module is used to send the first message to the terminal device.
9. A server, characterized in that: include: Processor and memory; The memory stores computer-executable instructions; The processor executes the computer-executable instructions stored in the memory, so that the processor executes the message transmission method according to any one of claims 1 to 7.
10. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores computer-executable instructions. When the processor executes the computer-executable instructions, the message transmission method according to any one of claims 1 to 7 is implemented.
