CN111970340A - 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
CN111970340A
CN111970340A CN202010752239.XA CN202010752239A CN111970340A CN 111970340 A CN111970340 A CN 111970340A CN 202010752239 A CN202010752239 A CN 202010752239A CN 111970340 A CN111970340 A CN 111970340A
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.)
Granted
Application number
CN202010752239.XA
Other languages
Chinese (zh)
Other versions
CN111970340B (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. When receiving target information sent by a first client through at least one first information transmission channel, storing each target information, and sending the target information to a second client through a second information transmission channel which has the same communication mode with the first information transmission channel corresponding to each target information. The embodiment of the invention can carry out information transmission through a plurality of information transmission channels with different communication modes, thereby avoiding information transmission failure caused by the problems of disconnection, packet loss, blockage, time 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 on line through a network, and 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, which causes phenomena such as disconnection, packet loss, jamming, time delay and the like, so that the communication quality is not high, 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 state of a plurality of first information transmission channels, wherein each first information transmission channel corresponds to different communication modes;
and responding to the existence of at least one first information transmission channel with normal communication state, and sending the target information through the first information transmission channel.
Further, the method further comprises:
and in response to the fact that a 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 resending control.
Further, the method further comprises:
and responding to the received transmission failure prompt, and 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 resending 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;
in response to receiving target information sent by a first client through at least one first information transmission channel, storing the target information sent by each 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 condition that the second client is on line, and sending the target information to the second client through a second information transmission channel which has the same communication mode with the first information transmission channel corresponding to each target information.
Further, the method comprises:
counting target information received through each first transmission channel;
and responding to the counting result larger than the preset threshold value, and sending a transmission success prompt to the first client.
In a third aspect, an embodiment of the present invention provides an information transmission method, where the method includes:
determining the current communication state of a plurality of second information transmission channels, wherein each second information transmission channel corresponds to different communication modes;
responding to the existence of at least one second information transmission channel with normal communication state, and receiving target information through the second information transmission channel;
and carrying out a deduplication operation on the received target message to determine a 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 end 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 for storing computer program instructions, which when executed by a processor implement the method according to any one of the first, second and third aspects.
In a fifth aspect, an embodiment of the present invention provides an electronic device, including a memory and a processor, the memory being 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 according to any one of the first, second and third aspects.
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 a second client through a plurality of second information transmission channels with different communication modes. When receiving target information sent by a first client through at least one first information transmission channel, storing each target information, and sending the target information to a second client through a second information transmission channel which has the same communication mode with the first information transmission channel corresponding to each target information. Therefore, the embodiment of the invention can carry out information transmission through a plurality of information transmission channels with different communication modes, avoids information transmission failure caused by problems of disconnection, packet loss, blockage, time delay and the like in the information transmission process, and ensures 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 the 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 an information transmission method on a server side according to an embodiment of the present invention;
fig. 5 is a schematic diagram of an information transmission process at the 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 the 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 will be 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. It will be apparent to one skilled in the art that the present invention may be practiced without these specific details. Well-known methods, procedures, components and circuits have not been described in detail so as not to obscure the present invention.
Further, those of ordinary skill in the art will appreciate that the drawings provided herein are for illustrative purposes and are not necessarily drawn to scale.
Unless the context clearly requires otherwise, throughout the description, the words "comprise", "comprising", and the like are to be construed in an inclusive sense as opposed to an exclusive or exhaustive sense; that is, what is meant is "including, but not limited to".
In the description of the present invention, it is to 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. In addition, in the description of the present invention, "a plurality" means two or more unless otherwise specified.
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 target information sent by the information sending terminal 11 through a plurality of first information transmission channels, count and store at least one piece of received target information, and return a transmission success prompt 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 piece of target information, so as to send each piece of 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 the server. Application scenarios such as social software, live software, and online education 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 data processing terminals capable of running computer programs and having communication functions, such as smart phones or tablet computers.
The information transmission method is used for explaining an application scene of an online education platform. The first client 11 may be a teacher terminal used by a teacher user, the server 10 may be an online education platform server, and the second client 12 may be a student terminal used by a student user. When a teacher user needs to send data information such as courseware, test questions and homework to a student user in the online teaching process, a teacher terminal first 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 prompt to the teacher terminal when the counting result meets a preset condition. Meanwhile, the server 10 determines a corresponding communication mode according to a first information transmission channel corresponding to the received target information, and transmits the target information to the student terminal through a second information transmission channel corresponding to the communication mode. When the student terminal receives more than one same 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:
and step S100, determining target information to be transmitted.
Specifically, the target information is determined by 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, such as information of pictures, texts, audio, videos, web pages, and the like. The information transmission method is applied to an online education platform as an example for explanation. The first client can be a teacher terminal for a teacher user to log in or a student terminal for a student user to log in. When the first client is a teacher terminal, the target information may be courseware, test questions, homework, courseware page turning instructions and other information which need 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 answers, notes, completed test paper pages and other information which are required to be fed back to the teacher terminal by the student terminal in the online teaching process.
And step S200, determining the current communication states of the plurality of first information transmission channels.
Specifically, the first client establishes a communication connection with the server through a plurality of first information transmission channels, and each of the first information transmission channels corresponds to a different communication mode. The communication mode comprises a communication protocol and a communication rule, namely the communication protocol or the communication rule corresponding to each first information transmission channel is different. Before the first client sends the target information, it needs to determine whether the current communication state of each first information transmission channel is normal. In the embodiment of the present invention, the first client may determine the current communication state by detecting whether each of the first information transmission channels is opened. Optionally, after detecting that the first information transmission channel is opened, the first client may further determine whether the current communication state of the opened first information transmission channel is normal by performing three-way handshake with the server according to the characteristics of each first information channel.
For example, the first client may establish a connection with the server through a first information transmission channel with 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 firstly judges whether each first information transmission channel is opened or not, and directly judges that the communication state of the opened first information transmission channel is normal.
Step S300, responding to the existence of at least one first information transmission channel with normal communication state, and sending the target information through the first information transmission channel.
Specifically, after the first client determines the current communication state of each first information transmission channel, when it is determined 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 respectively based on corresponding communication modes, namely, packaging and transmitting the target information through corresponding communication protocols and rules. Optionally, in the embodiment of the present invention, information transmission priorities of the first information transmission channels may be preset, and information transmission may be performed in sequence. 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 the first information transmission channels with different communication modes, namely, the long connection websocket channel, the http long polling channel, and the UDP connectionless channel, and the communication states of the first information transmission channels are normal. Under the condition that the long connection websocket channel establishes connection between the server and the first client, connection does not need to be reestablished, 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. For the http long polling channel, the first client sends an information transmission request (Ajax request) to the 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 target information 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 data frame format to the server through the UDP channel.
Further, the target information further includes corresponding identification information. And after the first client sends the 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 greater than the preset number threshold 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 number threshold of the server, the target information is judged to be failed to send, and a transmission failure prompt comprising a target information resending 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. 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 first information transmission channel, or returned to the first client through a preset reminder information transmission channel. Optionally, the first client does not receive a transmission success prompt within a predetermined time period after sending the target information, that is, it is determined that the target information is failed to be transmitted, and a transmission failure prompt including a target information resending control is displayed 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 opened first information transmission channel.
Optionally, after receiving at least one piece of target information sent to the first client 30, the server 31 returns a transmission success prompt to the first client 30, so as to prompt that the first client information is successfully sent. When the server 31 does not receive the target information sent by the first client 30, a transmission failure prompt is returned to the first client 30 to prompt the first client 30 to resend the target information. Further, the transmission success prompt and the transmission failure prompt may be sent to the first client 30 through each of the first information transmission channels, or returned to the first client 30 through a preset prompt information transmission channel.
When the information transmission method of the embodiment of the invention sends the target information, the information transmission can be carried out through a plurality of information transmission channels with different communication modes, thereby avoiding the failure of information transmission caused by the problems of disconnection, packet loss, blockage, time delay and the like in the information transmission process and ensuring the reliability of the information transmission process.
Fig. 4 is a flowchart of an information transmission method at a server side 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, establishing a communication connection with the first client through a plurality of first information transmission channels.
Specifically, the server establishes communication connection with a first client through a plurality of first information transmission channels so as to perform information transmission with the first client. Each of the first information transmission channels corresponds to a different communication mode. The communication mode comprises a communication protocol and a communication rule, namely the communication protocol or the communication rule corresponding to each first information transmission channel is different. Optionally, the information transmission priority of each first information transmission channel may be preset, and information transmission may be performed in sequence. 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 side transmits information with the server, whether the current communication state of each first information transmission channel is normal or not is determined. In the embodiment of the present invention, the current communication state may be determined by the first client detecting whether each of the first information transmission channels is opened, and if the first information transmission channel is opened, the determination result is normal, and if the first information transmission channel is closed, the determination result is unavailable.
For example, the first client may establish a connection with the server through a first information transmission channel with different communication modes, i.e., a long connection websocket channel, an http long polling channel, and a UDP connectionless channel. Before sending the target information, the first client firstly judges whether each first information transmission channel is opened or not, and directly judges that the communication state of the opened first information transmission channel is normal.
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 received target information is stored. 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 three first information transmission channels, namely, a long connection websocket channel, an http long polling channel and a 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.
Further, the target information also includes 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. And when the counting result reaches a preset number threshold value, the server judges that the target information of the first client is successfully sent, and returns a transmission success prompt to the first client. Meanwhile, when the counting result is not larger than the preset number threshold of the server, the server judges that the target information of the first client fails to be sent, and returns a transmission failure prompt comprising a target information resending 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. 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 first information transmission channel, or returned to the first client through a preset reminder information transmission channel.
The number threshold preset by the server is 0, and the server is connected to the first client through three first information transmission channels. 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 a 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 sent. 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 a communication connection with a second client through a plurality of second information transmission channels.
Specifically, the second client is a receiving terminal of the target information, is connected to the server through a plurality of second information transmission channels, and is configured to receive the target information stored by the server. And each second information transmission channel corresponds to different communication modes. The communication mode comprises a communication protocol and a communication rule, namely the communication protocol or the communication rule corresponding to each second information transmission channel is different. Optionally, the information transmission priority of each second information transmission channel may be preset, and information transmission may be performed in sequence. 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 classmate states. In the embodiment of the present invention, the current communication state may be determined by detecting, by the second client, whether each of the second information transmission channels is open, where the determination result is normal when the second information transmission channel is open, and the determination result is unavailable when the second information transmission channel is closed.
Step S700, responding to the second client end being on-line, sending the target information to the second client end through a second information transmission channel with the same communication mechanism as the first information transmission channel corresponding to each target information.
Specifically, the server further determines a state of a second client before transmitting the target information to the second client. And when the second client is on line, 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. Namely, the target information is sent to the second client through the second information transmission channel with the same communication mechanism as the first information transmission channel corresponding to each target information.
The following description will be given by taking as an example that the target information formats identical to the identification information stored in the server are respectively a data frame format specified in a communication protocol corresponding to a websocket, a data frame format specified in a communication protocol corresponding to http, and a data frame format specified in a communication protocol corresponding to UDP. When a second information transmission channel for establishing connection between the server and the second client is an overlong connection websocket channel, an http long polling channel and a UDP connectionless channel, sending target information in a data frame format specified in a communication protocol corresponding to the websocket to the second client through the long connection websocket channel, sending target information in a data frame format specified in the communication protocol corresponding to the http to the second client through the http long polling channel, and sending target information in a data frame format specified in the communication protocol corresponding to the UDP to the second client through the UDP connectionless channel.
Fig. 5 is a schematic diagram of an information transmission process 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 a first client 51 through a plurality of first information transmission channels, and simultaneously establish a communication connection with a second client 52 through a plurality of second information transmission channels. In the process of information transmission, the first client 51 simultaneously sends the 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 piece of target information sent to the first client 51, the server 50 stores the target information and returns a transmission success prompt to the first client 51, so as to prompt that the first client information is successfully sent. When the server 50 does not receive the target information sent by the first client 51, a transmission failure prompt is returned to the first client 51 to prompt the first client 51 to resend the target information. Further, the transmission success prompt and the transmission failure prompt may be sent to the first client 51 through each first information transmission channel, or returned to the first client 51 through a preset prompt 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. So as to transmit the corresponding target information to the second client 52 through each of the second information transmission channels.
In the information transmission method provided by the embodiment of the invention, the processes of sending the target information by the first client and receiving the target information by the second client are all carried out information transmission 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, blockage, time delay and the like of one information transmission channel in the information transmission process is avoided, 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 steps of:
and step S800, determining the current communication states of the plurality of second information transmission channels.
Specifically, the second client establishes a communication connection with the server through a plurality of second information transmission channels, and each of the second information transmission channels corresponds to a different communication mode. The communication mode comprises a communication protocol and a communication rule, namely the communication protocol or the communication rule corresponding to each second information transmission channel is 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, 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 channel is opened, the second client may further determine whether the current communication state of the opened second information transmission channel is normal by performing 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 through a heartbeat mechanism. And judging the communication fault of the second information transmission channel when the second client side does not receive the feedback signal after sending the heartbeat signal of the preset times to the server.
In the embodiment of the present invention, the information transmission priority of each second information transmission channel may be preset, and information transmission may be performed in sequence. 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 a connection with the server through a second information transmission channel with different communication modes, i.e., a long connection websocket channel, an http long polling channel, and a UDP connectionless channel. Before receiving the target information, the second client firstly judges whether each second information transmission channel is opened or not, and directly judges that the communication state of the opened second information transmission channel is normal.
And step S900, responding to the existence of at least one second information transmission channel with a normal communication state, and receiving the target information through the second information transmission channel.
Specifically, when the second client determines that at least one second information transmission channel with a normal communication state exists, the second client monitors each second information transmission channel with a 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 format transmitted by each second information transmission channel is a data frame format specified in a 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.
Because the server generally needs to send the target information when the second client is online, in order to ensure the timely sending of the target information, the server directly sends the target information to the second client through each second information transmission channel when 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 characteristics of different channels after reconnection. 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 and the like. The process of actively pulling the target information may be to send an information pulling request to a server through each of the second information transmission channels, 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 heartbeat mechanism timing.
And step S1000, carrying out deduplication operation on the received target message to determine the received message.
Specifically, since the second client may receive a plurality of pieces of target information with the same content through each of the second information transmission channels, 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 this embodiment of the present invention, the second client may determine whether each piece of received target information is the same information according to the information identifier in the target information, and after determining that a plurality of pieces of target information with the same content are received, sort each piece of target information according to a preset priority order, so as to determine that the target information with the highest priority is the received message. For example, the second client may sort each piece of target information having the same content according to the time when the piece of target information is received, and select the earliest received piece of target information as a received message.
Optionally, the second client displays the received message through a display interface after determining to receive the message.
Fig. 7 is a schematic diagram of an information transmission process at the 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, 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 monitors the opened second information transmission channel to obtain the target information sent by the server 71. After receiving at least one piece of target information sent by the server 71 through each second information transmission channel, the second client 70 performs a deduplication operation on the target information with the same content to determine a received message. Further, the received message can be displayed through a display interface.
According to the information transmission method, when the second client receives the target information, information can be transmitted through the plurality of information transmission channels with different communication modes, so that information transmission failure caused by problems of disconnection, packet loss, blockage, time delay and the like in the information transmission process is avoided, and the reliability of the information transmission process is ensured. And meanwhile, the duplicate removal is carried out when a plurality of same target messages are received, so that the receiving of repeated redundant messages is prevented.
Fig. 8 is a signaling flowchart of an information transmission method according to an embodiment of the present invention. As shown in fig. 8, in the information transmission method, information transmission between a first client 80 and a second client 82 is performed via a server 81.
Specifically, the first client 80 sends target information 83 to the server 81 through a plurality of first information transmission channels, and the server 81 receives corresponding target information through each first information transmission channel, counts and stores 84 the target information. When the target information amount is greater than the preset amount threshold, the server 81 sends a transmission success prompt 85 to the first client 80. Meanwhile, the server 81 also sends 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 be connected to a plurality of first clients 80 and a plurality of second clients 82 to satisfy application scenarios of information transmission, such as transmission of information from one first client to one second client, transmission of information from one first client to a plurality of second clients, transmission of information from a plurality of first clients to one second client, and transmission of information from a plurality of first clients to a plurality of second clients.
In the information transmission method provided by the embodiment of the invention, the processes of sending the target information by the first client and receiving the target information by the second client are all carried out information transmission 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, blockage, time delay and the like of one information transmission channel in the information transmission process is avoided, and the reliability of the information transmission process is ensured. Meanwhile, the second client performs duplicate removal when receiving a plurality of same target information, so that the receiving of repeated redundant messages is avoided.
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, which includes at least a processor 90 and a memory 91. The processor 90 and the memory 91 are connected by a 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 a collection of one or more microprocessors. Thus, the processor 90 implements the processing of data and the 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, as well as to a display controller 93 and a 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, motion sensing 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.
As will be appreciated by one skilled in the art, 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 flow in the flow diagrams can 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 invention is directed to a non-transitory storage medium storing a computer-readable program for causing a computer to perform some or all of the above-described method embodiments.
That is, as can be understood by those skilled in the art, all or part of the steps in the method for implementing the embodiments described above may be accomplished by specifying the relevant hardware through a program, where the program is stored in a storage medium and includes several instructions to enable a device (which may be a single chip, a chip, or the like) or a processor (processor) to execute all or part of the steps of the method described in the embodiments of the present application. And the aforementioned storage medium includes: a U-disk, a removable hard disk, a Read-Only Memory (ROM), a Random Access Memory (RAM), a magnetic disk or an optical disk, and other various media capable of storing program codes.
The above description is only a preferred embodiment of the present invention and is not intended to limit the present invention, and various modifications and changes may be made by those skilled in the art. Any modification, equivalent replacement, or improvement made within the spirit and principle of the present invention should be included in the protection scope of the present invention.

Claims (10)

1. An information transmission method, characterized in that the method comprises:
determining target information to be transmitted;
determining the current communication state of a plurality of first information transmission channels, wherein each first information transmission channel corresponds to different communication modes;
and responding to the existence of at least one first information transmission channel with normal communication state, and sending the target information through the first information transmission channel.
2. The method of claim 1, further comprising:
and in response to the fact that a 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 resending control.
3. The method of claim 1, further comprising:
and responding to the received transmission failure prompt, and 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 resending control.
4. An information transmission method, characterized in that the method comprises:
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;
in response to receiving target information sent by a first client through at least one first information transmission channel, storing the target information sent by each 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 condition that the second client is on line, and sending the target information to the second client through a second information transmission channel which has the same communication mode with the first information transmission channel corresponding to each target information.
5. The method of claim 4, wherein the method comprises:
counting target information received through each first transmission channel;
and responding to the counting result larger than the preset threshold value, and sending a transmission success prompt to the first client.
6. An information transmission method, characterized in that the method comprises:
determining the current communication state of a plurality of second information transmission channels, wherein each second information transmission channel corresponds to different communication modes;
responding to the existence of at least one second information transmission channel with normal communication state, and receiving target information through the second information transmission channel;
and carrying out a deduplication operation on the received target message to determine a received message.
7. The method according to claim 6, wherein the receiving the target information through the second information transmission channel is specifically:
and actively pulling the target information at the server end through the second information transmission channel.
8. The method according to claim 6, wherein the determining the current communication status 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.
9. A computer readable storage medium storing computer program instructions, which when executed by a processor implement the method of any one of claims 1-8.
10. 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-8.
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 true CN111970340A (en) 2020-11-20
CN111970340B 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)

Cited By (1)

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

Citations (16)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
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
US20130201818A1 (en) * 2010-08-04 2013-08-08 Cassidian Sas Method for managing a degraded mode of a cell in a radiocommunication network
US20130332522A1 (en) * 2012-06-08 2013-12-12 Microsoft Corporation Fast channel for system management
CN106027599A (en) * 2016-04-29 2016-10-12 掌赢信息科技(上海)有限公司 Data transmission channel establishing method and system, and server
CN106357364A (en) * 2015-07-15 2017-01-25 腾讯科技(深圳)有限公司 Data transmission method, device and system
CN106851600A (en) * 2017-01-12 2017-06-13 和创(北京)科技股份有限公司 Short message distribution method and the server for carrying out short message distribution
US20180262587A1 (en) * 2017-03-13 2018-09-13 Microsoft Technology Licensing, Llc. On-demand push notification mechanism
CN109936390A (en) * 2018-12-29 2019-06-25 京信通信技术(广州)有限公司 The management system and method for antenna active module
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
CN110022369A (en) * 2019-04-11 2019-07-16 上海拉扎斯信息科技有限公司 Message treatment method, device, electronic equipment and computer readable storage medium
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
CN110365643A (en) * 2019-06-04 2019-10-22 菜鸟智能物流控股有限公司 Communication method and device
CN110855792A (en) * 2019-11-19 2020-02-28 南京领行科技股份有限公司 Message pushing method, device, equipment and medium
CN111314433A (en) * 2020-01-20 2020-06-19 北京字节跳动网络技术有限公司 Message transmission method and device and electronic equipment

Patent Citations (16)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20130201818A1 (en) * 2010-08-04 2013-08-08 Cassidian Sas Method for managing a degraded mode of a cell in a radiocommunication 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
CN106357364A (en) * 2015-07-15 2017-01-25 腾讯科技(深圳)有限公司 Data transmission method, device and system
CN106027599A (en) * 2016-04-29 2016-10-12 掌赢信息科技(上海)有限公司 Data transmission channel establishing method and system, and server
CN106851600A (en) * 2017-01-12 2017-06-13 和创(北京)科技股份有限公司 Short message distribution method and the server for carrying out short message distribution
US20180262587A1 (en) * 2017-03-13 2018-09-13 Microsoft Technology Licensing, Llc. On-demand push notification mechanism
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
CN109936390A (en) * 2018-12-29 2019-06-25 京信通信技术(广州)有限公司 The management system and method for antenna active module
CN110022369A (en) * 2019-04-11 2019-07-16 上海拉扎斯信息科技有限公司 Message treatment method, device, electronic equipment and computer readable storage medium
CN110289991A (en) * 2019-05-31 2019-09-27 北京大米科技有限公司 A kind of failure gateway detection method, device, storage medium and terminal
CN110365643A (en) * 2019-06-04 2019-10-22 菜鸟智能物流控股有限公司 Communication method and device
CN110300115A (en) * 2019-07-05 2019-10-01 腾讯科技(深圳)有限公司 A kind of data transmission method and relevant apparatus based on multichannel
CN110855792A (en) * 2019-11-19 2020-02-28 南京领行科技股份有限公司 Message pushing method, device, equipment and medium
CN111314433A (en) * 2020-01-20 2020-06-19 北京字节跳动网络技术有限公司 Message transmission method and device and electronic equipment

Non-Patent Citations (1)

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

Cited By (1)

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

Also Published As

Publication number Publication date
CN111970340B (en) 2023-06-16

Similar Documents

Publication Publication Date Title
EP2528397B1 (en) Method and apparatus for synchronization based on hypertext transfer protocol (http)
CN108173946B (en) Method, system and related method for realizing real-time classroom interaction
CN115004673B (en) Message pushing method, device, electronic equipment and computer readable medium
CN112738548B (en) Streaming media scheduling method, device, equipment and storage medium
EP4239974A1 (en) Data transmission method and apparatus, and computer-readable medium and electronic device
CN103731499B (en) Terminal and document transmission method
CN109495530B (en) Real-time traffic data transmission method, transmission device and transmission system
CN111970340B (en) Information transmission method, readable storage medium, and electronic device
CN110233856B (en) Message processing method and device and computer readable storage medium
EP2634995A1 (en) Apparatus and method of displaying contents using key frames in a terminal
US8161113B2 (en) Rich signaling feedback mechanism for group communication
US8780708B2 (en) Transmission control system
JP2009110041A (en) Web screen sharing system, its terminal for sharing, and its sharing program
CN112866390A (en) Data transmission method, device, terminal equipment and storage medium
CN105721231B (en) A kind of quality of service perception detection method and device
CN115086203B (en) Data transmission method, device, electronic equipment and computer readable storage medium
JP2014026480A (en) Output comparison method for plural information systems
CN112202616B (en) Fault processing method, readable storage medium and electronic device
CN110557436B (en) Data transmission method and device, electronic equipment and storage medium
CN112040564B (en) Information transmission method, readable storage medium and electronic device
CN112187868B (en) Information transmission method, readable storage medium, and electronic device
CN114257630B (en) Classroom real-time interaction method, system, terminal equipment and readable storage medium
CN110314374B (en) Game processing method, game processing device, electronic equipment and medium
CN107172179B (en) Bilateral acceleration transmission method and system
CN108574622B (en) Instant message processing method and device based on XMPP

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