CN111970340B - Information transmission method, readable storage medium, and electronic device - Google Patents

Information transmission method, readable storage medium, and electronic device Download PDF

Info

Publication number
CN111970340B
CN111970340B CN202010752239.XA CN202010752239A CN111970340B CN 111970340 B CN111970340 B CN 111970340B CN 202010752239 A CN202010752239 A CN 202010752239A CN 111970340 B CN111970340 B CN 111970340B
Authority
CN
China
Prior art keywords
information transmission
information
client
transmission channel
target information
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN202010752239.XA
Other languages
Chinese (zh)
Other versions
CN111970340A (en
Inventor
刘伟
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Beijing Dami Technology Co Ltd
Original Assignee
Beijing Dami Technology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Beijing Dami Technology Co Ltd filed Critical Beijing Dami Technology Co Ltd
Priority to CN202010752239.XA priority Critical patent/CN111970340B/en
Publication of CN111970340A publication Critical patent/CN111970340A/en
Application granted granted Critical
Publication of CN111970340B publication Critical patent/CN111970340B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/14Session management
    • H04L67/141Setup of application sessions
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/14Session management
    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02DCLIMATE CHANGE MITIGATION TECHNOLOGIES IN INFORMATION AND COMMUNICATION TECHNOLOGIES [ICT], I.E. INFORMATION AND COMMUNICATION TECHNOLOGIES AIMING AT THE REDUCTION OF THEIR OWN ENERGY USE
    • Y02D30/00Reducing energy consumption in communication networks
    • Y02D30/70Reducing energy consumption in communication networks in wireless communication networks

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Computer And Data Communications (AREA)

Abstract

The embodiment of the invention discloses an information transmission method, a readable storage medium and electronic equipment, wherein communication connection is established between a first client and a second client through a plurality of first information transmission channels with different communication modes, and communication connection is established between a second client and a plurality of second information transmission channels with different communication modes. Storing each piece of target information when receiving the target information sent by the first client through at least one first information transmission channel, and sending the target information to the second client through a second information transmission channel with the same communication mode as the first information transmission channel corresponding to each piece of target information. The embodiment of the invention can carry out information transmission through a plurality of information transmission channels with different communication modes, and avoid information transmission failure caused by problems of disconnection, packet loss, blocking, delay and the like in the information transmission process.

Description

Information transmission method, readable storage medium, and electronic device
Technical Field
The present invention relates to the field of computer technologies, and in particular, to an information transmission method, a readable storage medium, and an electronic device.
Background
With the development of internet technology, more and more information can be transmitted online through a network, so that the speed, efficiency and quality of the information transmission process are improved. However, in the prior art, when information is transmitted between two devices, the data communication process is interfered by various factors, so that phenomena such as disconnection, packet loss, blocking and delay are caused, the communication quality is low, and the user experience is affected.
Disclosure of Invention
In view of this, embodiments of the present invention provide an information transmission method, a readable storage medium, and an electronic device, which aim to perform information transmission through a plurality of information transmission channels with different communication modes, so as to ensure reliability of a communication process.
In a first aspect, an embodiment of the present invention provides an information transmission method, where the method includes:
determining target information to be transmitted;
determining the current communication states of a plurality of first information transmission channels, wherein each first information transmission channel corresponds to different communication modes;
and transmitting the target information through the first information transmission channel in response to the existence of at least one first information transmission channel with normal communication state.
Further, the method further comprises:
and in response to the fact that the transmission success prompt is not received within a preset time period after the target information is sent, displaying a transmission failure prompt through a display interface, wherein the transmission failure prompt comprises a target information retransmission control.
Further, the method further comprises:
and in response to receiving the transmission failure prompt, displaying the transmission failure prompt through a display interface, wherein the transmission failure prompt is used for representing that all the target information transmitted by each first information transmission channel is not successfully received, and the transmission failure prompt comprises a target information retransmission control.
In a second aspect, an embodiment of the present invention provides an information transmission method, where the method includes:
establishing communication connection with a first client through a plurality of first information transmission channels, wherein each first information transmission channel corresponds to different communication modes;
storing target information sent by each first information transmission channel in response to receiving the target information sent by the first client through at least one first information transmission channel;
establishing communication connection with a second client through a plurality of second information transmission channels, wherein each second information transmission channel corresponds to different communication modes;
and responding to the state of the second client to be online, and sending the target information to the second client through a second information transmission channel which has the same communication mode as the first information transmission channel corresponding to each target information.
Further, the method comprises:
counting target information received through each first transmission channel;
and sending a transmission success prompt to the first client in response to the counting result being greater than a preset threshold.
In a third aspect, an embodiment of the present invention provides an information transmission method, where the method includes:
determining the current communication states of a plurality of second information transmission channels, wherein each second information transmission channel corresponds to different communication modes;
receiving target information through a second information transmission channel in response to the existence of at least one second information transmission channel with normal communication state;
and performing a deduplication operation on the received target message to determine the received message.
Further, the receiving the target information through the second information transmission channel specifically includes:
and actively pulling the target information at the server side through the second information transmission channel.
Further, the determining the current communication states of the plurality of second information transmission channels specifically includes:
and judging the current communication state of each second information transmission channel based on a heartbeat mechanism.
In a fourth aspect, embodiments of the present invention provide a computer readable storage medium storing computer program instructions which, when executed by a processor, implement the method of any one of the first, second and third aspects.
In a fifth aspect, an embodiment of the present invention provides an electronic device comprising a memory and a processor, the memory storing one or more computer program instructions, wherein the one or more computer program instructions are executable by the processor to implement the method of any one of the first aspect, the second aspect, and the third aspect.
In the embodiment of the invention, the server establishes communication connection with the first client through a plurality of first information transmission channels with different communication modes. Meanwhile, communication connection is established with the second client through a plurality of second information transmission channels with different communication modes. Storing each piece of target information when receiving the target information sent by the first client through at least one first information transmission channel, and sending the target information to the second client through a second information transmission channel with the same communication mode as the first information transmission channel corresponding to each piece of target information. Therefore, the embodiment of the invention can carry out information transmission through a plurality of information transmission channels with different communication modes, avoid information transmission failure caused by problems of disconnection, packet loss, blocking, delay and the like in the information transmission process, and ensure the reliability of the communication process.
Drawings
The above and other objects, features and advantages of the present invention will become more apparent from the following description of embodiments of the present invention with reference to the accompanying drawings, in which:
fig. 1 is a schematic diagram of an information transmission system to which an information transmission method according to an embodiment of the present invention is applied;
fig. 2 is a flowchart of an information transmission method at a first client side according to an embodiment of the present invention;
fig. 3 is a schematic diagram of an information transmission process at a first client side according to an embodiment of the present invention;
fig. 4 is a flowchart of a method for transmitting information on a server side according to an embodiment of the present invention;
fig. 5 is a schematic diagram of an information transmission process at a server side according to an embodiment of the present invention;
fig. 6 is a flowchart of an information transmission method at a second client side according to an embodiment of the present invention;
fig. 7 is a schematic diagram of an information transmission process at a second client side according to an embodiment of the present invention;
fig. 8 is a signaling flow chart of an information transmission method according to an embodiment of the present invention;
fig. 9 is a schematic diagram of an electronic device according to an embodiment of the invention.
Detailed Description
The present invention is described below based on examples, but the present invention is not limited to only these examples. In the following detailed description of the present invention, certain specific details are set forth in detail. The present invention will be fully understood by those skilled in the art without the details described herein. Well-known methods, procedures, flows, components and circuits have not been described in detail so as not to obscure the nature of the invention.
Moreover, those of ordinary skill in the art will appreciate that the drawings are provided herein for illustrative purposes and that the drawings are not necessarily drawn to scale.
Unless the context clearly requires otherwise, the words "comprise," "comprising," and the like in the description are to be construed in an inclusive sense as opposed to an exclusive or exhaustive sense; that is, it is the meaning of "including but not limited to".
In the description of the present invention, it should be understood that the terms "first," "second," and the like are used for descriptive purposes only and are not to be construed as indicating or implying relative importance. Furthermore, in the description of the present invention, unless otherwise indicated, the meaning of "a plurality" is two or more.
Fig. 1 is a schematic diagram of an information transmission system to which an information transmission method according to an embodiment of the present invention is applied. As shown in fig. 1, the information transmission system includes a server 10, a first client 11, and a second client 12 connected through a network. The server 10 is configured to receive, through a plurality of first information transmission channels, target information sent by the information sending terminal 11, count and store at least one received target information, and return a transmission success reminder to the information sending terminal 11. Meanwhile, the server 10 determines a corresponding second transmission channel according to the first information transmission channel corresponding to each of the target information, so as to send each of the target information to the second client 12 through the corresponding second transmission channel.
The embodiment of the invention can be applied to an information transmission system for transmitting information between any terminals through a server. Such as social software, live software, and application scenarios such as online educational websites. In the embodiment of the present invention, the server 10 may be a single server, or may be a server cluster configured in a distributed manner. The first client 11 and the second client 12 may be general-purpose data processing terminals with communication functions, such as smartphones or tablet computers, etc., capable of running computer programs.
The application scenario of the information transmission method for the online education platform is described as an example. The first client 11 may be a teacher terminal used by a teacher user, the server 10 is an online education platform server, and the second client 12 may be a student terminal used by a student user. When the teacher user needs to send data information such as courseware, test questions, homework to the student user in the online teaching process, the teacher terminal sends target information to the server 10 through a plurality of first information transmission channels according to different communication modes. The server 10 stores the received target information, counts the number of the target information, and returns a transmission success reminder to the teacher terminal when the counting result meets the preset condition. Meanwhile, the server 10 determines a corresponding communication mode according to the first information transmission channel corresponding to the received target information, and transmits the target information to the student terminal through the second information transmission channel corresponding to the communication mode. When the student terminal receives more than one identical target information through a plurality of second information transmission channels, the received information is determined among the plurality of target information through a deduplication operation. Optionally, the student terminal displays the received information through a display interface.
Fig. 2 is a flowchart of an information transmission method at a first client side according to an embodiment of the present invention. As shown in fig. 2, the information transmission method of the first client side includes the steps of:
step S100, determining target information to be transmitted.
Specifically, the target information is determined through a first client, and the first client is an information sending terminal. In the embodiment of the present invention, the target information may be any data information capable of performing information transmission through an information transmission channel, for example, information such as a picture, a text, an audio, a video, a web page, and the like. The information transmission method is applied to an online education platform as an example for explanation. The first client may be a teacher terminal that a teacher user logs in or a student terminal that a student user logs in. When the first client is a teacher terminal, the target information can be information such as courseware, test questions, homework, courseware page turning instructions and the like which are required to be sent to the student terminal in the online teaching process. When the first client is a student terminal, the target information may be information such as answers, notes, and completed test paper pages that the student terminal needs to feed back to the teacher terminal in the online teaching process.
Step S200, determining the current communication states of the plurality of first information transmission channels.
Specifically, the first client establishes communication connection with the server through a plurality of first information transmission channels, and each first information transmission channel corresponds to different communication modes. The communication mode comprises a communication protocol and a communication rule, namely, the communication protocols or the communication rules corresponding to the first information transmission channels are different. Before sending the target information, the first client needs to determine whether the current communication state of each first information transmission channel is normal. In the embodiment of the invention, the first client can judge the current communication state by detecting whether each first information transmission channel is opened or not. Optionally, after detecting that the first information transmission channels are opened, the first client may further determine whether the current communication state of the opened first information transmission channels is normal by performing a three-way handshake with the server according to the characteristics of each first information channel.
For example, the first client may establish connection with the server through a first information transmission channel with three different communication modes, namely a long connection websocket channel, a http (HyperText Transfer Protocol) long polling channel, and a UDP (User Datagram Protocol) connectionless channel. Before sending the target information, the first client side firstly judges whether each first information transmission channel is opened or not, and directly judges that the opened first information transmission channel is normal in communication state.
Step S300, the target information is sent through the first information transmission channel in response to the existence of at least one first information transmission channel with normal communication state.
Specifically, after the first client side judges the current communication state of each first information transmission channel, when determining that the communication state of at least one first information transmission channel is normal, information transmission is started. And transmitting the target information through the first information transmission channels with normal communication states based on corresponding communication modes respectively, namely packaging the target information through corresponding communication protocols and rules and then transmitting the packaged target information. Optionally, in the embodiment of the present invention, the information transmission priority of each first information transmission channel may be preset, and information transmission may be performed sequentially. And when the information transmission of the first information transmission channel with higher priority fails, transmitting the target information through the next first information transmission channel.
The first client establishes connection with the server through a first information transmission channel with different communication modes of a long connection websocket channel, an http long polling channel and a UDP connectionless channel, and the communication states of the first information transmission channels are all normally illustrated as examples. And under the condition that the long-connection websocket channel establishes connection between the server and the first client, the connection is not required to be re-established, the target information is directly converted into a corresponding data frame format according to a communication protocol corresponding to the websocket, and the target information is transmitted to the server through a TCP (Transmission Control Protocol) channel. And for the http long polling channel, the first client sends an information transmission request (Ajax request) to a server, and the server establishes connection with the first client after receiving the request. And converting the target information into a corresponding data frame format according to a communication protocol corresponding to the http, and transmitting the data frame format to a server through an http channel. And the server closes the connection with the first client after receiving the target information sent by the http long polling channel. And for the UDP connectionless channel, the first client directly converts the target information into a corresponding data frame format according to a communication protocol corresponding to the UDP, and transmits the target information to a server through the UDP channel.
Further, the target information also includes corresponding identification information. After the first client sends target information to the server through each first information transmission channel, the server counts the received target information according to the identification information. And when the counting result is larger than the preset quantity threshold value of the server, judging that the target information is successfully sent, and returning a transmission success prompt to the first client. And meanwhile, when the counting result is not greater than the preset quantity threshold value of the server, judging that the target information is failed to be sent, and returning a transmission failure prompt comprising a target information retransmission control to the first client. And the first client displays the transmission failure prompt through a display interface so as to resend the target information when the target information resending control is triggered. Wherein the number threshold may be 0. In the embodiment of the present invention, the transmission success reminder and the transmission failure reminder may be sent to the first client through each of the first information transmission channels, or may be returned to the first client through a preset reminder information transmission channel. Optionally, the first client side does not receive the transmission success reminder within a preset time period after sending the target information, namely judges that the target information fails to be transmitted, and displays the transmission failure reminder including the target information retransmission control through a display interface.
Fig. 3 is a schematic diagram of an information transmission process at a first client side according to an embodiment of the present invention. As shown in fig. 3, the first client 30 may establish a communication connection with the server 31 through a plurality of first information transmission channels. In the process of information transmission, the target information is simultaneously sent to the server 31 through each of the opened first information transmission channels.
Optionally, after receiving at least one target message sent to the first client 30, the server 31 returns a transmission success alert to the first client 30, to prompt that the first client message is sent successfully. When the server 31 does not receive the target information sent by the first client 30, a transmission failure reminder is returned to the first client 30, so as to prompt the first client 30 to resend the target information. Further, the transmission success alert and the transmission failure alert may be sent to the first client 30 through each of the first information transmission channels, or may be returned to the first client 30 through a preset alert information transmission channel.
When the information transmission method provided by the embodiment of the invention is used for transmitting the target information, the information transmission can be performed through a plurality of information transmission channels with different communication modes, so that the information transmission failure caused by the problems of disconnection, packet loss, blocking, delay and the like in the information transmission process is avoided, and the reliability of the information transmission process is ensured.
Fig. 4 is a flowchart of a server-side information transmission method according to an embodiment of the present invention. As shown in fig. 4, the information transmission method at the server side includes the following steps:
step S400, communication connection is established with the first client through a plurality of first information transmission channels.
Specifically, the server establishes communication connection with the first client through a plurality of first information transmission channels so as to transmit information with the first client. Wherein, each first information transmission channel corresponds to different communication modes. The communication mode comprises a communication protocol and a communication rule, namely, the communication protocols or the communication rules corresponding to the first information transmission channels are different. Alternatively, the information transmission priority of each first information transmission channel may be preset, and information transmission may be performed sequentially. And when the information transmission of the first information transmission channel with higher priority fails, transmitting the target information through the next first information transmission channel. Before the first client transmits information with the server, determining whether the current communication state of each first information transmission channel is normal or not. In the embodiment of the invention, the current communication state can be determined by detecting whether each first information transmission channel is opened or not through the first client, if so, the judgment result is normal, and if not, the judgment result is unavailable.
For example, the first client may establish connection with the server through a first information transmission channel with different communication modes, such as a long connection websocket channel, an http long polling channel, and a UDP connectionless channel. Before sending the target information, the first client side firstly judges whether each first information transmission channel is opened or not, and directly judges that the opened first information transmission channel is normal in communication state.
Step S500, in response to receiving the target information sent by the first client through at least one first information transmission channel, storing the target information sent by each first information transmission channel.
Specifically, when the server receives the target information sent by the first client through at least one first information transmission channel, the server stores the received target information. The storage format of each piece of target information is a format received by the server, namely a format specified by a communication protocol corresponding to a first information transmission channel for transmitting the target information. For example, when the server receives the target information through the three first information transmission channels of the long connection websocket channel, the http long polling channel and the UDP connectionless channel, the target information in the data frame format specified in the communication protocol corresponding to the websocket, the target information in the data frame format specified in the communication protocol corresponding to the http, and the target information in the data frame format specified in the communication protocol corresponding to the UDP are stored respectively.
Further, the target information further comprises corresponding identification information, and the server judges that the same target information is received according to the identification information so as to count the received same target information. When the counting result reaches a preset quantity threshold, the server judges that the target information of the first client is successfully sent, and returns a transmission success prompt to the first client. And meanwhile, when the counting result is not greater than the preset quantity threshold value of the server, the server judges that the target information of the first client fails to be sent, and a transmission failure prompt comprising a target information retransmission control is returned to the first client. And the first client displays the transmission failure prompt through a display interface so as to resend the target information when the target information resending control is triggered. In the embodiment of the present invention, the transmission success reminder and the transmission failure reminder may be sent to the first client through each of the first information transmission channels, or may be returned to the first client through a preset reminder information transmission channel.
Taking the example that the preset number threshold of the server is 0 and the server is connected with the first client through three first information transmission channels as an illustration. And after the first client sends the target information. And the server counts the target information according to the identification information, and judges that the target information is not successfully received when the counting result is 0, namely the first client information fails to be sent. And sending a transmission failure prompt to the first client through the set prompt information transmission channel so as to prompt the first client to resend the target information. And when the counting result is any one of 1, 2 and 3, judging that the target information is successfully received, namely the first client information is successfully transmitted. And sending a transmission success prompt to the first client through the set prompt information transmission channel or each first information transmission channel so as to prompt the first client to finish the transmission of the target information.
Step S600, establishing communication connection with the second client through a plurality of second information transmission channels.
Specifically, the second client is a receiving terminal of the target information, and is connected with the server through a plurality of second information transmission channels, and is used for receiving the target information stored by the server. Wherein, each second information transmission channel corresponds to different communication modes. The communication mode comprises a communication protocol and a communication rule, namely, the communication protocols or the communication rules corresponding to the second information transmission channels are different. Alternatively, the information transmission priority of each of the second information transmission channels may be preset, and the information transmission may be performed sequentially. And in the information transmission process, when the information transmission of the second information transmission channel with higher priority fails, transmitting the target information through the next second information transmission channel.
Further, before receiving the target information transmitted by the server, the second client determines whether the current communication state of each second information transmission channel is normal, so as to monitor the second information transmission channels with normal communication states. In the embodiment of the invention, the current communication state can be determined by detecting whether each second information transmission channel is opened or not through the second client, if so, the judgment result is normal, and if not, the judgment result is unavailable.
And step S700, responding to the state of the second client to be online, and sending the target information to the second client through a second information transmission channel which is the same as the communication mechanism of the first information transmission channel corresponding to each target information.
Specifically, the server also determines the state of the second client before transmitting the target information to the second client. And when the second client state is online, determining a corresponding second information transmission channel according to the data format corresponding to each piece of stored target information, so as to send the target information to the second client through the corresponding second information transmission channel. That is, the target information is sent to the second client through the second information transmission channel which has the same communication mechanism as the first information transmission channel corresponding to each target information.
Taking the data frame format specified in the communication protocol corresponding to websocket, the data frame format specified in the communication protocol corresponding to http and the data frame format specified in the communication protocol corresponding to UDP as examples for illustration, wherein the target information formats with the same identification information stored in the server are respectively specified in the communication protocol corresponding to websocket. When the second information transmission channel for establishing connection between the server and the second client is respectively an overlong connection websocket channel, an http long polling channel and a UDP connectionless channel, sending target information with a format of a specified data frame in a communication protocol corresponding to websocket to the second client through the long connection websocket channel, sending target information with a format of a specified data frame in a communication protocol corresponding to http to the second client through the http long polling channel, and sending target information with a format of a specified data frame in a communication protocol corresponding to UDP to the second client through the UDP connectionless channel.
Fig. 5 is a schematic diagram of an information transmission procedure at a server side according to an embodiment of the present invention. As shown in fig. 5, the server 50 may establish a communication connection with the first client 51 through a plurality of first information transmission channels, and simultaneously establish a communication connection with the second client 52 through a plurality of second information transmission channels. In the process of information transmission, the first client 51 simultaneously sends target information to the server 50 through each opened first information transmission channel, and the server 50 simultaneously transmits the received target information to the second client 52 through each opened second information transmission channel of the second client 52.
Optionally, after receiving at least one target message sent to the first client 51, the server 50 stores the target message and returns a transmission success alert to the first client 51, so as to prompt that the first client message is sent successfully. When the server 50 does not receive the target information sent by the first client 51, a transmission failure reminder is returned to the first client 51, so as to prompt the first client 51 to resend the target information. Further, the transmission success alert and the transmission failure alert may be sent to the first client 51 through each of the first information transmission channels, or may be returned to the first client 51 through a preset alert information transmission channel. After receiving the target information transmitted by at least one first information transmission channel, the server 50 determines a corresponding second information transmission channel according to a communication mode corresponding to the first information transmission channel for transmitting the target information. To transmit corresponding target information to the second client 52 through each of the second information transmission channels.
In the information transmission method, the first client transmits the target information and the second client receives the target information through the information transmission channels with different communication modes, so that the problems of disconnection, packet loss, blocking, delay and the like of one information transmission channel in the information transmission process are avoided, the information transmission failure is caused, and the reliability of the information transmission process is ensured.
Fig. 6 is a flowchart of an information transmission method at a second client side according to an embodiment of the present invention. As shown in fig. 6, the information transmission method of the second client side includes the following steps:
step S800, determining the current communication states of the plurality of second information transmission channels.
Specifically, the second client establishes communication connection with the server through a plurality of second information transmission channels, and each second information transmission channel corresponds to a different communication mode. The communication mode comprises a communication protocol and a communication rule, namely, the communication protocols or the communication rules corresponding to the second information transmission channels are different. Before receiving the target information, the second client needs to determine whether the current communication state of each second information transmission channel is normal or not, so as to monitor the second information transmission channels with normal communication states, and acquire the corresponding target information. In the embodiment of the present invention, the second client may determine the current communication state by detecting whether each of the second information transmission channels is opened. Optionally, after detecting that the second information transmission channels are opened, the second client may further determine whether the current communication state of the opened second information transmission channels is normal by performing a three-way handshake with the server according to the characteristics of each second information channel. For example, when the second information transmission channel is a websocket channel or a UDP connectionless channel, the communication state of the corresponding second information transmission channel may be determined by using a heartbeat mechanism. And judging the communication failure of the second information transmission channel when the second client side does not receive the feedback signal after sending the heartbeat signal with preset times to the server.
In the embodiment of the present invention, the information transmission priority of each of the second information transmission channels may be preset, and information transmission may be performed sequentially. And in the information transmission process, when the information transmission of the second information transmission channel with higher priority fails, transmitting the target information through the next second information transmission channel.
For example, the second client may establish connection with the server through a second information transmission channel with different communication modes, such as a long connection websocket channel, an http long polling channel, and a UDP connectionless channel. Before receiving the target information, the second client side firstly judges whether each second information transmission channel is opened or not, and directly judges that the opened second information transmission channel is normal in communication state.
Step S900, receiving target information through a second information transmission channel in response to the existence of at least one second information transmission channel with normal communication state.
Specifically, when the second client determines that at least one second information transmission channel with normal communication state exists, monitoring each second information transmission channel with normal communication state. And the server transmits the stored target information to the second client through each second information transmission channel, wherein the target information transmitted by each second information transmission channel is in a data frame format specified in the corresponding communication protocol. In the embodiment of the invention, the target information is sent to the server by the first client through a plurality of first information transmission channels.
Since the server is generally required to send the target information under the condition that the second client is online, in order to ensure timely sending of the target information, the server directly sends the target information to the second client through each second information transmission channel under the condition that the second client is online. In an optional implementation manner of the embodiment of the present invention, when the server has information to be sent to the second client and the second client is not online, the second client may re-acquire the target information according to the characteristics of different channels after reconnecting. For example, for the http channel, the second client may actively pull the target information at the server through the second information transmission channel without interruption, so as to prevent the target information from being lost due to a drop of the connection or the like. The process of actively pulling the target information may be that an information pulling request is sent to a server through each second information transmission channel, and the server returns the target information based on the information pulling request. In another optional implementation manner of the embodiment of the present invention, the target information stored in the server may be synchronized to the second client by the second information transmission channel based on the timing of the heartbeat mechanism.
Step S1000, performing a deduplication operation on the received target message to determine a received message.
Specifically, since the second client may receive multiple pieces of target information with the same content through each second information transmission channel, it is necessary to further perform a deduplication operation on the received target information, and determine that one piece of target information is a received message. In the embodiment of the invention, the second client can determine whether the received target information is the same information according to the information identifier in the target information, and after determining that a plurality of target information with the same content are received, sort the target information according to a preset priority order to determine the target information with the highest priority as the received message. For example, the second client may sort the target information with the same content according to the time when the target information is received, and select the target information received earliest as the received message.
Optionally, after determining that the message is received, the second client displays the received message through a display interface.
Fig. 7 is a schematic diagram of an information transmission process at a second client side according to an embodiment of the present invention. As shown in fig. 7, the second client 70 may establish a communication connection with the server 71 through a plurality of second information transmission channels. In the process of information transmission, the target information sent by the server 71 is monitored through each opened second information transmission channel.
Optionally, after determining that at least one second information transmission channel connected to the server 71 is opened, the second client 70 listens to the opened second information transmission channel to acquire the target information sent by the server 71. The second client 70, after receiving at least one target information sent by the server 71 through each of the second information transmission channels, performs a deduplication operation on target information having the same content to determine a received message. The received message may further be displayed via a display interface.
When the second client receives the target information, the information transmission method can transmit the information through the information transmission channels with different communication modes, so that the problems of disconnection, packet loss, blocking, delay and the like in the information transmission process are avoided, the information transmission failure is avoided, and the reliability of the information transmission process is ensured. And meanwhile, the duplicate removal is performed when a plurality of pieces of same target information are received, so that repeated redundant information is prevented from being received.
Fig. 8 is a signaling flow chart of an information transmission method according to an embodiment of the present invention. As shown in fig. 8, in the information transmission method, the server 81 is used as an intermediary to transmit information between the first client 80 and the second client 82.
Specifically, the first client 80 sends the target information 83 to the server 81 through a plurality of first information transmission channels, and the server 81 receives the corresponding target information through each first information transmission channel, counts and stores 84. When the number of target information is greater than a preset number threshold, the server 81 sends a transmission success alert 85 to the first client 80. Meanwhile, the server 81 also transmits the target information 86 to the second client 82 through a plurality of second information transmission channels. The second client 82 de-duplicates 87 the received plurality of target information to determine a received message.
Optionally, the server 81 may connect the plurality of first clients 80 and the plurality of second clients 82, so as to satisfy an application scenario of various information transmission, such as information transmission from one first client to one second client, information transmission from one first client to the plurality of second clients, information transmission from the plurality of first clients to one second client, and information transmission from the plurality of first clients to the plurality of second clients.
In the information transmission method, the first client transmits the target information and the second client receives the target information through the information transmission channels with different communication modes, so that the problems of disconnection, packet loss, blocking, delay and the like of one information transmission channel in the information transmission process are avoided, the information transmission failure is caused, and the reliability of the information transmission process is ensured. And meanwhile, the second client performs deduplication when receiving a plurality of pieces of same target information, so that repeated redundant information is avoided being received.
Fig. 9 is a schematic diagram of an electronic device according to an embodiment of the invention. As shown in fig. 9, the electronic device shown in fig. 9 is a general address query device, which includes a general computer hardware structure including at least a processor 90 and a memory 91. Processor 90 and memory 91 are connected by bus 92. The memory 91 is adapted to store instructions or programs executable by the processor 90. Processor 90 may be a stand-alone microprocessor or may be a collection of one or more microprocessors. Thus, the processor 90 implements processing of data and control of other devices by executing instructions stored by the memory 91 to perform the method flows of embodiments of the present invention as described above. The bus 92 connects the above components together, and connects the above components to the display controller 93 and the display device and input/output (I/O) device 94. Input/output (I/O) devices 94 may be a mouse, keyboard, modem, network interface, touch input device, somatosensory input device, printer, and other devices known in the art. Typically, the input/output devices 94 are connected to the system through input/output (I/O) controllers 95.
It will be appreciated by those skilled in the art that embodiments of the present application may be provided as a method, apparatus (device) or computer program product. Accordingly, the present application may take the form of an entirely hardware embodiment, an entirely software embodiment or an embodiment combining software and hardware aspects. Furthermore, the present application may employ a computer program product embodied on one or more computer-readable storage media (including, but not limited to, disk storage, CD-ROM, optical storage, etc.) having computer-usable program code embodied therein.
The present application is described with reference to flowchart illustrations of methods, apparatus (devices) and computer program products according to embodiments of the application. It will be understood that each of the flows in the flowchart may be implemented by computer program instructions.
These computer program instructions may be stored in a computer-readable memory that can direct a computer or other programmable data processing apparatus to function in a particular manner, such that the instructions stored in the computer-readable memory produce an article of manufacture including instruction means which implement the function specified in the flowchart flow or flows.
These computer program instructions may also be provided to a processor of a general purpose computer, special purpose computer, embedded processor, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, create means for implementing the functions specified in the flowchart flow or flows.
Another embodiment of the present invention is directed to a non-volatile storage medium storing a computer readable program for causing a computer to perform some or all of the method embodiments described above.
That is, it will be understood by those skilled in the art that all or part of the steps in implementing the methods of the embodiments described above may be implemented by specifying relevant hardware by a program, where the program is stored in a storage medium, and includes several instructions for causing a device (which may be a single-chip microcomputer, a chip or the like) or a processor (processor) to perform all or part of the steps in the methods of the embodiments described herein. And the aforementioned storage medium includes: a U-disk, a removable hard disk, a Read-Only Memory (ROM), a random access Memory (RAM, random Access Memory), a magnetic disk, or an optical disk, or other various media capable of storing program codes.
The above description is only of the preferred embodiments of the present invention and is not intended to limit the present invention, and various modifications and variations may be made to the present invention by those skilled in the art. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present invention should be included in the protection scope of the present invention.

Claims (9)

1. An information transmission method, the method comprising:
determining target information to be transmitted;
determining the current communication states of a plurality of first information transmission channels, wherein each first information transmission channel corresponds to different communication modes;
transmitting the target information through a first information transmission channel in response to the existence of at least one first information transmission channel with normal communication state;
and responding to the receiving of the transmission failure prompt through the first information transmission channels or the preset prompting information transmission channels, displaying the transmission failure prompt through a display interface, wherein the transmission failure prompt is used for representing that the target information transmitted by each first information transmission channel is not successfully received, and the transmission failure prompt comprises a target information retransmission control.
2. The method according to claim 1, wherein the method further comprises:
and in response to the fact that the transmission success prompt is not received within a preset time period after the target information is sent, displaying a transmission failure prompt through a display interface, wherein the transmission failure prompt comprises a target information retransmission control.
3. An information transmission method, the method comprising:
establishing communication connection with a first client through a plurality of first information transmission channels, wherein each first information transmission channel corresponds to different communication modes;
storing target information sent by each first information transmission channel in response to receiving the target information sent by the first client through at least one first information transmission channel;
establishing communication connection with a second client through a plurality of second information transmission channels, wherein each second information transmission channel corresponds to different communication modes;
and responding to the state of the second client to be online, and sending the target information to the second client through a second information transmission channel which has the same communication mode as the first information transmission channel corresponding to each target information.
4. A method according to claim 3, characterized in that the method comprises:
counting target information received through each of the first information transmission channels;
and sending a transmission success prompt to the first client in response to the counting result being greater than a preset threshold.
5. An information transmission method, the method comprising:
determining the current communication states of a plurality of second information transmission channels, wherein each second information transmission channel corresponds to different communication modes;
receiving target information from a server through a second information transmission channel in response to the existence of at least one second information transmission channel with normal communication state, wherein the target information is sent to the server through at least one first information transmission channel, and the second information transmission channel is an information transmission channel with the same communication mode as the first information transmission channel corresponding to each target information;
and performing a deduplication operation on the received target message to determine the received message.
6. The method according to claim 5, wherein the receiving the target information through the second information transmission channel is specifically:
and actively pulling the target information at the server side through the second information transmission channel.
7. The method according to claim 5, wherein determining the current communication state of the plurality of second information transmission channels is specifically:
and judging the current communication state of each second information transmission channel based on a heartbeat mechanism.
8. A computer readable storage medium storing computer program instructions which, when executed by a processor, implement the method of any one of claims 1-7.
9. An electronic device comprising a memory and a processor, wherein the memory is configured to store one or more computer program instructions, wherein the one or more computer program instructions are executed by the processor to implement the method of any of claims 1-7.
CN202010752239.XA 2020-07-30 2020-07-30 Information transmission method, readable storage medium, and electronic device Active CN111970340B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202010752239.XA CN111970340B (en) 2020-07-30 2020-07-30 Information transmission method, readable storage medium, and electronic device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202010752239.XA CN111970340B (en) 2020-07-30 2020-07-30 Information transmission method, readable storage medium, and electronic device

Publications (2)

Publication Number Publication Date
CN111970340A CN111970340A (en) 2020-11-20
CN111970340B true CN111970340B (en) 2023-06-16

Family

ID=73364079

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202010752239.XA Active CN111970340B (en) 2020-07-30 2020-07-30 Information transmission method, readable storage medium, and electronic device

Country Status (1)

Country Link
CN (1) CN111970340B (en)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112565421B (en) * 2020-12-03 2022-01-25 创盛视联数码科技(北京)有限公司 Information transmission method, system, electronic device and storage medium

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106851600A (en) * 2017-01-12 2017-06-13 和创(北京)科技股份有限公司 Short message distribution method and the server for carrying out short message distribution
CN109951260A (en) * 2018-02-12 2019-06-28 华为技术有限公司 A kind of data packet sending method and relevant device
CN109962953A (en) * 2017-12-25 2019-07-02 深圳市优必选科技有限公司 Client communication method for building up and device
CN110289991A (en) * 2019-05-31 2019-09-27 北京大米科技有限公司 A kind of failure gateway detection method, device, storage medium and terminal
CN110300115A (en) * 2019-07-05 2019-10-01 腾讯科技(深圳)有限公司 A kind of data transmission method and relevant apparatus based on multichannel

Family Cites Families (11)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
FR2963719B1 (en) * 2010-08-04 2012-09-21 Eads Defence & Security Sys METHOD FOR MANAGING DEGRADE MODE OF A CELL IN A RADIO COMMUNICATION NETWORK
US20120290664A1 (en) * 2011-05-11 2012-11-15 Tikl, Inc. Cross-media, cross-channel, cross-protocol, and cross-network capable autoreply within a single application
US20130332522A1 (en) * 2012-06-08 2013-12-12 Microsoft Corporation Fast channel for system management
CN106357364B (en) * 2015-07-15 2020-09-25 腾讯科技(深圳)有限公司 Data transmission method, device and system
CN106027599B (en) * 2016-04-29 2020-01-17 掌赢信息科技(上海)有限公司 Data transmission channel establishing method, system and server
US11233867B2 (en) * 2017-03-13 2022-01-25 Microsoft Technology Licensing, Llc On-demand push notification mechanism
CN109936390B (en) * 2018-12-29 2021-05-07 京信通信技术(广州)有限公司 Antenna active module management system and method
CN110022369A (en) * 2019-04-11 2019-07-16 上海拉扎斯信息科技有限公司 Message treatment method, device, electronic equipment and computer readable storage medium
CN110365643A (en) * 2019-06-04 2019-10-22 菜鸟智能物流控股有限公司 Communication method and device
CN110855792B (en) * 2019-11-19 2023-04-18 南京领行科技股份有限公司 Message pushing method, device, equipment and medium
CN111314433B (en) * 2020-01-20 2022-08-05 北京字节跳动网络技术有限公司 Message transmission method and device and electronic equipment

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106851600A (en) * 2017-01-12 2017-06-13 和创(北京)科技股份有限公司 Short message distribution method and the server for carrying out short message distribution
CN109962953A (en) * 2017-12-25 2019-07-02 深圳市优必选科技有限公司 Client communication method for building up and device
CN109951260A (en) * 2018-02-12 2019-06-28 华为技术有限公司 A kind of data packet sending method and relevant device
CN110289991A (en) * 2019-05-31 2019-09-27 北京大米科技有限公司 A kind of failure gateway detection method, device, storage medium and terminal
CN110300115A (en) * 2019-07-05 2019-10-01 腾讯科技(深圳)有限公司 A kind of data transmission method and relevant apparatus based on multichannel

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
数据中心内Incast流量的网内聚合研究;郭得科等;计算机研究与发展;全文 *

Also Published As

Publication number Publication date
CN111970340A (en) 2020-11-20

Similar Documents

Publication Publication Date Title
CN108173946B (en) Method, system and related method for realizing real-time classroom interaction
CN103795762B (en) A kind of test method and system of reverse proxy
CN103731499B (en) Terminal and document transmission method
CN109495530B (en) Real-time traffic data transmission method, transmission device and transmission system
EP4239974A1 (en) Data transmission method and apparatus, and computer-readable medium and electronic device
CN111970340B (en) Information transmission method, readable storage medium, and electronic device
CN111431964A (en) Message synchronous processing method, device and storage medium
EP2634995A1 (en) Apparatus and method of displaying contents using key frames in a terminal
CN103297326B (en) The method and apparatus of message push
US20100218120A1 (en) Rich signaling feedback mechanism for group communication
CN108268420A (en) Communication means, processor and electronic equipment between processor
JP2009110041A (en) Web screen sharing system, its terminal for sharing, and its sharing program
US20110299428A1 (en) Dynamic Multiple Access Protocol for Use in an Audience Response System
CN112866390A (en) Data transmission method, device, terminal equipment and storage medium
CN105721231B (en) A kind of quality of service perception detection method and device
EP2690560A2 (en) Method of benchmarking the behaviour of a replacement information system with the old system
CN115086203B (en) Data transmission method, device, electronic equipment and computer readable storage medium
CN112202616B (en) Fault processing method, readable storage medium and electronic device
CN111930548B (en) Fault simulation system for multi-cluster distributed service
CN112040564B (en) Information transmission method, readable storage medium and electronic device
CN110557436B (en) Data transmission method and device, electronic equipment and storage medium
CN114640705A (en) Large-scale heartbeat monitoring method for internet of things terminal
WO2016165289A1 (en) Inter-board data processing method and device
CN112187868B (en) Information transmission method, readable storage medium, and electronic device
CN111212253B (en) Monitoring processing method and device in video conference, electronic equipment and storage medium

Legal Events

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