CN107979876B - Data transmission method and terminal - Google Patents

Data transmission method and terminal Download PDF

Info

Publication number
CN107979876B
CN107979876B CN201711135415.XA CN201711135415A CN107979876B CN 107979876 B CN107979876 B CN 107979876B CN 201711135415 A CN201711135415 A CN 201711135415A CN 107979876 B CN107979876 B CN 107979876B
Authority
CN
China
Prior art keywords
server
information
servers
backup
backup server
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
CN201711135415.XA
Other languages
Chinese (zh)
Other versions
CN107979876A (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.)
Bigo Technology Singapore Pte Ltd
Original Assignee
Guangzhou Baiguoyuan Information 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 Guangzhou Baiguoyuan Information Technology Co Ltd filed Critical Guangzhou Baiguoyuan Information Technology Co Ltd
Priority to CN201711135415.XA priority Critical patent/CN107979876B/en
Publication of CN107979876A publication Critical patent/CN107979876A/en
Application granted granted Critical
Publication of CN107979876B publication Critical patent/CN107979876B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Abstract

The embodiment of the invention discloses a data transmission method and a terminal, wherein the method comprises the following steps: sending connection request information to at least two servers so that the at least two servers feed back connection confirmation information when receiving the connection request information; when receiving first connection confirmation information, determining a server sending the first connection confirmation information as a main server, wherein the first connection confirmation information is one or more pieces of connection confirmation information received earliest in the connection confirmation information fed back by at least two servers, or one or more pieces of connection confirmation information with strongest information intensity in the connection confirmation information fed back by at least two servers; the data is transmitted through the host server. By implementing the embodiment of the invention, the reliability of the connection between the terminal and the streaming media server can be improved.

Description

Data transmission method and terminal
Technical Field
The embodiment of the invention relates to the technical field of communication, in particular to a data transmission method and a terminal.
Background
Currently, the real-time performance and convenience for watching videos are much higher than the requirements of users before. Especially for real-time audio and video, the loading speed of a client player on a terminal is a very much concerned index. The streaming media client and the streaming media server can quickly establish connection, and the experience of watching streaming media contents by a user is improved.
However, when a streaming server communicating with a streaming client fails or the number of streaming clients communicating with the streaming server is too large, network congestion or the like occurs, connection is slowed down or even timed out, and connection failure occurs, thereby reducing reliability of connection between the terminal and the streaming server.
Disclosure of Invention
The embodiment of the invention provides a data transmission method and a terminal, which can increase the reliability of connection between the terminal and a streaming media server.
In a first aspect, an embodiment of the present invention provides a data transmission method, including:
sending connection request information to at least two servers so that the at least two servers feed back connection confirmation information when receiving the connection request information;
when first connection confirmation information is received, determining a server sending the first connection confirmation information as a main server, wherein the first connection confirmation information is the earliest received connection confirmation information in the connection confirmation information fed back by the at least two servers;
and transmitting data through the main server.
In a second aspect, an embodiment of the present invention provides a terminal, including:
the communication unit is used for sending connection request information to at least two servers so that the at least two servers feed back connection confirmation information when receiving the connection request information;
the communication unit is further used for receiving first connection confirmation information;
a determining unit, configured to determine a server that sends the first connection acknowledgement information as a primary server, where the first connection acknowledgement information is one or more connection acknowledgement information that is received earliest in the connection acknowledgement information fed back by the at least two servers, or one or more connection acknowledgement information with strongest information strength in the connection acknowledgement information fed back by the at least two servers;
the communication unit is further configured to transmit data through the main server.
The embodiment of the invention has the following beneficial effects:
the terminal may send connection request information to more than one server at the same time, the at least two servers may feed back connection confirmation information when receiving the connection request information sent by the terminal, the terminal determines one or more connection confirmation information received earliest in the received feedback connection confirmation information or one or more connection confirmation information with the strongest information quality as first connection confirmation information, and the server sending the first connection confirmation information is the main server. Data transmission then takes place through the one or more host servers. One or more servers with the fastest connection speed or the strongest communication information are selected from the plurality of servers to serve as the main server for communication, so that the successful connection probability between the terminal and the servers can be increased, and the connection reliability between the terminal and the servers can be improved.
Drawings
In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings used in the description of the embodiments or the prior art will be briefly described below, it is obvious that the drawings in the following description are only some embodiments of the present invention, and for those skilled in the art, other drawings can be obtained according to the drawings without creative efforts.
Wherein:
fig. 1 is a schematic structural diagram of a network architecture according to an embodiment of the present invention;
fig. 2 is a schematic flowchart of a data transmission method according to an embodiment of the present invention;
fig. 3 is a schematic structural diagram of a terminal according to an embodiment of the present invention;
fig. 4 is a schematic structural diagram of another terminal according to an embodiment of the present invention.
Detailed Description
The technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the drawings in the embodiments of the present invention, and it is obvious that the described embodiments are only a part of the embodiments of the present invention, and not all of the embodiments. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present invention.
In order to better understand a data transmission method and a terminal disclosed in the embodiments of the present application, a system architecture used in the embodiments of the present application is described below. Referring to fig. 1, fig. 1 is a schematic structural diagram of a network architecture according to an embodiment of the present invention. As shown in fig. 1, the network architecture may include a terminal 101, at least two servers 102, and a network 103. Wherein the terminal 101 may communicate with the network 103 through at least two servers 102. Specifically, the terminal device 102 may be a mobile phone (mobile phone), a tablet computer (Pad), a computer with a wireless transceiving function, a Virtual Reality (VR) terminal device, an Augmented Reality (AR) terminal device, or a wireless terminal in industrial control (industrial control). The server 102 may be a streaming media server. The network 103 may contain streaming media data uploaded by a user, and the terminal 101 may be configured to perform data communication with the server 102, so as to obtain data on the network 103 side.
In order to solve the technical problem that in the prior art, when a streaming media server communicating with a streaming media client fails or the number of streaming media clients communicating with the streaming media server is too large, network congestion and other conditions occur, connection becomes slow or even overtime, and connection failure is caused, so that the reliability of connection between a terminal and the streaming media server is reduced, a data transmission method is provided, and the reliability of connection between the terminal and the streaming media server can be improved.
Referring to fig. 2, fig. 2 is a flowchart illustrating a data transmission method according to an embodiment of the present invention. The data transmission method may include the steps of:
s101, the terminal sends connection request information to at least two servers.
In the embodiment of the invention, before the terminal acquires the streaming media data on the network through the server, the terminal firstly needs to establish connection with the server through the connection request information so as to acquire the streaming media data on the network through the server. When a streaming media client establishes a connection with streaming media data in a network through a server, a login packet may be sent to a plurality of streaming media servers, where the login packet may be regarded as connection request information. The server is used for requesting the streaming media servers to allow the streaming media client to access the server so as to acquire the streaming media data on the network. The process of the streaming media client interacting with the servers can be performed through UDP protocol data packets, and the login packet can be a UDP login packet in the UDP protocol.
S102, when the at least two servers receive the connection request information, the connection confirmation information is fed back to the terminal.
In this embodiment of the present invention, each of the at least two servers may send a UDP login confirmation packet, that is, connection confirmation information, to the streaming client when receiving the UDP login packet. The UDP login packet is used to notify the streaming client that the streaming data in the network can be obtained through the server sending the UDP login packet. In addition, when each of the at least two servers receives the connection request information, it may also be first detected whether the server has the capability of bearing the streaming client, that is, whether the server can load the streaming client to communicate with the network. The server sends the connection confirmation information to the streaming client only if the server evaluates that it can be loaded. The server sending the connection confirmation information is in one-to-one correspondence with the connection confirmation information. It will be appreciated that, of the at least two servers, there may be servers that are not capable of loading the streaming client to communicate with the network, and that these servers that are not capable of loading will not send connection confirmation information to the streaming client.
S103, the terminal receives the first connection confirmation information.
In this embodiment of the present invention, the first connection acknowledgement information is one or more connection acknowledgement information received earliest in the connection acknowledgement information fed back by the at least two servers, or one or more connection acknowledgement information with strongest information quality in the connection acknowledgement information fed back by the at least two servers.
Specifically, the streaming media client may receive connection confirmation information sent by multiple servers, the streaming media may select one or more connection confirmation information from the multiple connection confirmation information, and the server corresponding to the sent one or more connection confirmation information may carry an identifier of the server in the sent connection confirmation information.
The streaming client may receive connection confirmation information sent by multiple servers. One or more of the streaming clients can be selected as the first connection confirmation information. The selected criterion may be to evaluate the capability of the corresponding server to carry the streaming client according to the received connection confirmation information. Specifically, if the speed of feeding back the connection confirmation information by the server is fast, that is, feeding back the connection confirmation information earlier, or the signal quality of feeding back the connection confirmation information is better, it indicates that the capability of the server for carrying the streaming media client is stronger. The terminal may have the one or more servers as the primary server. The connection confirmation information may be a UDP registration confirmation packet for the UDP registration packet.
And S104, the terminal determines the server sending the first connection confirmation information as a main server.
In this embodiment, the server that sends the first connection acknowledgement information may be identified according to the server identifier carried in the first connection acknowledgement information. Since the first connection confirmation information may be one or more, the number of the master servers may also be one or more.
And S105, the terminal transmits data with the main server.
In this embodiment of the application, the streaming media client may communicate with the network through the main server to obtain streaming media data in the network or transmit the streaming media data to the network. Since the number of the main servers may be one or more, when the streaming media client performs data transmission with the network, the data transmission may be performed through one server or through a plurality of servers. The one or more servers are the primary servers.
In this embodiment, after the terminal transmits data through the main server, the terminal is further configured to send detection information to a first backup server, where the first backup server is a server other than the main server in the at least two servers, the detection information is used to feed back response information when the first backup server receives the detection information, and the response information is used to identify that the backup server can transmit the data.
In particular, at least two servers may be referred to as candidate servers of the streaming client in communication with the network, and among all the candidate servers, the main server is the server selected to communicate with the network. And those of the candidate servers other than the primary server may act as backup servers. In order to prevent the main server from generating an abnormality when the streaming media client is in communication with the network, for example, the main server fails to carry a communication task between the streaming media client and the network, the check of the backup server may be performed periodically, or according to an instruction. Specifically, the detection information may be sent to the backup server periodically, or according to an instruction, for detecting whether the backup server can carry the communication between the streaming media client and the network. If the backup server detects that the backup server can bear the communication between the streaming media client and the network, the backup server can feed back response information to the terminal, and after receiving the response information, the terminal knows that the backup server can bear the communication between the streaming media client and the network. If the backup server detects that the backup server can not bear the communication between the streaming media client and the network, the backup server does not feed back response information to the terminal, and when the terminal does not receive the response information, the backup server knows that the backup server can not bear the communication between the streaming media client and the network. It is understood that the number of backup servers may be one or more. The detection information and the response information here may be a UDP check packet and a UDP check response packet.
For example, if the candidate servers for the streaming client include server a, server B, and server C. When the streaming media client selects the main server, it is found that the time for the server a and the server B to feed back the connection confirmation information is shortest, or the time for the server a and the server B to feed back the connection confirmation information is lower than a preset threshold, or the signal quality for the server a and the server B to feed back the connection confirmation information is strongest, or the signal quality for the server a and the server B to feed back the connection confirmation information is larger than the preset threshold. The terminal may determine server a and server B as the primary servers. And then, the streaming media data communication with the network is realized through the server A and the server B. In addition, for the server C, the terminal may detect whether the server C can provide the streaming media data communication for the streaming media client by sending detection information to the server C periodically, or when the terminal receives an instruction for detecting the backup server. The method can prevent the streaming media data communication from being provided for the streaming media client if the server A and the server B fail to provide the streaming media data communication for the streaming media client when the streaming media data communication is carried out through the server A and the server B, and can realize the streaming media data communication for the streaming media client by using the server C. The backup servers are all first backup servers.
In the embodiment of the application, when the terminal does not receive the response message sent by the first backup server, the terminal acquires a second backup server and sends the detection message to the second backup server.
Specifically, if the first backup server is not capable of carrying data communication between the streaming client and the network, the first backup server does not feed back response information to the terminal when receiving the detection information sent by the terminal. When the terminal does not detect the response message, it may be that the response message is still received after a certain time, indicating that the first backup server cannot carry the data communication between the streaming media client and the network. The terminal may look for servers other than the first backup server. And sending detection information to other servers to detect whether the other servers can bear data communication between the streaming media client and the network.
For example, in the previous example, if the terminal does not receive the response message sent by the server C, it may be detected whether the server D can carry data communication between the streaming client and the network. The server D receives the detection information, detects whether the server D can bear data communication between the streaming media client and the network, and if the detection information can be borne, the server D feeds back response information to the terminal. The terminal knows that the server D can bear data communication between the streaming media client and the network, and takes the server D as a backup server. If the server a and the server B fail to provide streaming media data communication for the streaming media client, the server D may be used to provide streaming media data communication for the streaming media client.
In the embodiment of the application, after the terminal transmits data through the main server, when the terminal receives information which is sent by the main server and used for notifying the main server of offline, or when the main server transmits data and fails, or when detecting that the number of terminals connected to the main server exceeds a preset threshold value, the first backup server or the second backup server is set as the main server.
Specifically, the main server may be actively offline according to the functional requirement, or the capability of the main server to provide communication may cause problems, for example, the main server fails to transmit data, or the number of terminals connected to the main server exceeds too many, which results in poor fluency of data transmission of the streaming media client connected to the main server. In the above situation, the backup server may be selected to perform communication of the streaming media data. Namely, the first backup server or the second backup server is set as a main server. And performing streaming media data communication through the main server.
For example, in the previous example, the streaming client communicates data with the network through server a and server B. After a period of time, the server a and the server B need to be offline for some reasons, that is, data communication between the server a and the server B and the network cannot be realized any more, or both the server a and the server B have a fault, or the number of users performing data communication between the server a and the server B and the network is too large, the streaming media client is triggered to migrate from the server a and the server B to the backup server C or the backup server D. I.e. data communication with the network via backup server C and backup server D. Since whether the backup server C and the backup server D can carry data communication between the streaming media client and the network is detected regularly, periodically or according to instructions, it is reliable to directly transfer the data communication from the main server to the backup server for data communication with the network.
In an embodiment of the present application, the number of the first backup servers or the second backup servers is at least two, and setting the first backup servers or the second backup servers as the primary servers includes: acquiring the number of terminals connected to each server in the first backup server or the second backup server; selecting the server with the least connection number in the first backup server or the second backup server as a target backup server according to the number of terminals connected to each server; and setting the target backup server as a main server.
In particular, the streaming client may have two or more backup servers. When migration from the primary server is required, the backup server with a small number of users can be selected from the two or more backup servers as the primary server. The resources on the backup server with less number of loaded users are relatively loose, congestion is avoided, and the user experience of the user in streaming media data communication can be improved. Further, the streaming media client may also evaluate the capability of carrying the streaming media client, and select one or more servers with the strongest capability of carrying the streaming media client as the primary server. The streaming client may determine the capability of carrying the streaming client by evaluating the response speed of each backup server, for example, the speed of feeding back response information. The higher response speed indicates the stronger capability of bearing the streaming media client, and can be used as the preference of the main server. The streaming client may also determine the capability to carry the streaming client by evaluating the signal quality, e.g., the strength of the feedback information, of each backup server. The stronger the feedback signal strength is, the stronger the ability of carrying the streaming media client is, and the stronger the ability can be used as a preference of the main server.
For example, in the previous example, it is assumed that the current backup servers are a backup server D and a backup server E, and when the streaming media client needs to migrate from the original main servers a and B to the backup server, the two backup servers may be evaluated in advance or at the same time, and the number of users respectively borne by the backup server D and the backup server E may be obtained. Under the condition that hardware and network resources of the backup server D and the backup server E are equivalent, if the number of streaming media clients which are carried by the backup server D and perform data communication with the network is 50 ten thousand, and the number of streaming media clients which are carried by the backup server E and perform data communication with the network is 80 ten thousand, the backup server D may be selected as the main server. The number of the loaded streaming media clients in data communication with the network can be an average value or a real-time value. Further, the feedback speed of the response information received by the backup server D may be calculated, and the feedback speed of the response information received by the backup server E may be calculated. And selecting the backup server with the highest feedback speed as the main server. The feedback speed here may be an average of feedback speeds of response information fed back a plurality of times. Further, the information intensity of the response information received by the backup server D may be calculated, and the information intensity of the response information received by the backup server E may be calculated. And selecting the backup server with the highest information intensity as the main server. The information intensity here may be an average value of the information intensities of the response information fed back a plurality of times.
In the data transmission method described in fig. 2, the terminal may send connection request information to more than one server at the same time, the at least two servers may feed back connection confirmation information when receiving the connection request information sent by the terminal, the terminal determines one or more connection confirmation information received earliest in the received feedback connection confirmation information or one or more connection confirmation information with the strongest information quality as the first connection confirmation information, and the server sending the first connection confirmation information is the primary server. Data transmission then takes place through the one or more host servers. One or more servers with the fastest connection speed or the strongest communication information are selected from the plurality of servers to serve as the main server for communication, so that the successful connection probability between the terminal and the servers can be increased, and the connection reliability between the terminal and the servers can be improved.
Referring to fig. 3, fig. 3 is a schematic structural diagram of a terminal according to an embodiment of the present invention. As shown in fig. 3, the terminal includes:
a communication unit 101, configured to send connection request information to at least two servers, so that when the at least two servers receive the connection request information, connection confirmation information is fed back;
the communication unit 101 is further configured to receive first connection confirmation information;
a determining unit 102, configured to determine a server that sends the first connection acknowledgement information as a primary server, where the first connection acknowledgement information is one or more connection acknowledgement information that is received earliest in the connection acknowledgement information fed back by the at least two servers, or one or more connection acknowledgement information that has strongest information strength in the connection acknowledgement information fed back by the at least two servers;
the communication unit 101 is further configured to transmit data through the main server.
As a possible implementation manner, after the communication unit transmits the data through the main server, the communication unit is further configured to send detection information to a first backup server, where the first backup server is a server other than the main server in the at least two servers, the detection information is used to feed back response information when the first backup server receives the detection information, and the response information is used to identify that the backup server can transmit the data.
As a possible implementation, the terminal further includes:
an obtaining unit 103, configured to obtain a second backup server when the response information sent by the first backup server is not received;
the communication unit 101 is further configured to send the detection information to the second backup server.
As a possible implementation manner, after the communication unit 101 transmits data through the primary server, the determining unit 102 is further configured to set the first backup server or the second backup server as the primary server when receiving information sent by the primary server to notify that the primary server is offline, or when a failure occurs in data transmission through the primary server, or when detecting that the number of terminals connected to the primary server exceeds a preset threshold.
As a possible implementation manner, the number of the first backup servers or the second backup servers is at least two, and the determining unit 102 is specifically configured to obtain the number of terminals connected to each of the servers in the first backup servers or the second backup servers; selecting the server with the least connection number in the first backup server or the second backup server as a target backup server according to the number of terminals connected to each server; and setting the target backup server as a main server.
In the terminal described in fig. 3, the terminal may simultaneously send connection request information to more than one server, the at least two servers may feed back connection confirmation information when receiving the connection request information sent by the terminal, and the terminal determines one or more connection confirmation information received earliest in the received feedback connection confirmation information or one or more connection confirmation information with the strongest information quality as the first connection confirmation information, and the server sending the first connection confirmation information is the primary server. Data transmission then takes place through the one or more host servers. One or more servers with the fastest connection speed or the strongest communication information are selected from the plurality of servers to serve as the main server for communication, so that the successful connection probability between the terminal and the servers can be increased, and the connection reliability between the terminal and the servers can be improved.
Referring to fig. 4, fig. 4 is a schematic structural diagram of another terminal according to an embodiment of the present invention. As shown in fig. 4, the terminal in this embodiment may include: one or more processors 401; one or more input devices 402, one or more communication interfaces 403, memory 404, and a bus 405. The processor 401, the input device 402, the communication interface 403, and the memory 404 are connected by a bus 405. The memory 404 is used for storing instructions and the processor 401 is used for executing the instructions stored by the memory 404. Wherein, the input device 402 may be a touch screen for detecting an operation of a target application, the communication interface 403 is used for communicating with a server, and the processor 401 is used for invoking the communication interface 403 to perform the following operations:
sending connection request information to at least two servers so that the at least two servers feed back connection confirmation information when receiving the connection request information;
receiving first connection confirmation information;
the processor 401 is further configured to determine a server that sends the first connection acknowledgement information as a primary server, where the first connection acknowledgement information is one or more connection acknowledgement information that is received earliest in the connection acknowledgement information fed back by the at least two servers, or one or more connection acknowledgement information that has strongest information strength in the connection acknowledgement information fed back by the at least two servers;
the processor 401 is further configured to invoke the communication interface 403 to perform the following operations:
and transmitting data through the main server.
As a possible implementation manner, after the processor 401 is further configured to invoke the communication interface 403 to transmit data through the host server, the processor 401 is further configured to invoke the communication interface 403 to perform the following operations:
and sending detection information to a first backup server, wherein the first backup server is a server except for a main server in the at least two servers, the detection information is used for feeding back response information when the first backup server receives the detection information, and the response information is used for identifying that the backup server can transmit the data.
As a possible implementation, the processor 401 is further configured to:
and when the response information sent by the first backup server is not received, acquiring a second backup server, and sending the detection information to the second backup server.
As a possible implementation manner, after the processor 401 is further configured to invoke the communication interface 403 to transmit data through the primary server, the processor 401 is further configured to determine the first backup server or the second backup server as the primary server when receiving information sent by the primary server to notify that the primary server is offline, or when a failure occurs in data transmission through the primary server, or when detecting that the number of terminals connected to the primary server exceeds a preset threshold.
As a possible implementation manner, the number of the first backup server or the second backup server is at least two, and the determining, by the processor 401, that the first backup server or the second backup server is a primary server includes:
the processor 401 obtains the number of terminals connected to each server in the first backup server or the second backup server;
the processor 401 selects a server with the smallest connection number from the first backup server or the second backup server as a target backup server according to the number of terminals connected to each server;
processor 401 sets the target backup server as the primary server.
In the terminal described in fig. 4, the terminal may simultaneously send connection request information to more than one server, the at least two servers may feed back connection confirmation information when receiving the connection request information sent by the terminal, and the terminal determines one or more connection confirmation information received earliest in the received feedback connection confirmation information or one or more connection confirmation information with the strongest information quality as the first connection confirmation information, and the server sending the first connection confirmation information is the primary server. Data transmission then takes place through the one or more host servers. One or more servers with the fastest connection speed or the strongest communication information are selected from the plurality of servers to serve as the main server for communication, so that the successful connection probability between the terminal and the servers can be increased, and the connection reliability between the terminal and the servers can be improved.
In the above embodiments, all or part of the implementation may be realized by software, hardware, firmware, or any combination thereof. When implemented using a software program, may be implemented in whole or in part in the form of a computer program product. The computer program product includes one or more computer instructions. When loaded and executed on a computer, cause the processes or functions described in accordance with the embodiments of the invention to occur, in whole or in part. The computer may be a general purpose computer, a special purpose computer, a network of computers, or other programmable device. The computer instructions may be stored in a computer readable storage medium or transmitted from one computer readable storage medium to another, for example, the computer instructions may be transmitted from one website, computer, server, or data center to another website, computer, server, or data center via wired (e.g., coaxial cable, fiber optic, Digital Subscriber Line (DSL)) or wireless (e.g., infrared, wireless, microwave, etc.). The computer-readable storage medium can be any available medium that can be accessed by a computer or a data storage device, such as a server, a data center, etc., that incorporates one or more of the available media. The usable medium may be a magnetic medium (e.g., floppy Disk, hard Disk, magnetic tape), an optical medium (e.g., DVD), or a semiconductor medium (e.g., Solid State Disk (SSD)), among others.
The data transmission method and the terminal disclosed in the embodiments of the present invention are described in detail above, and the principle and the implementation of the present invention are explained in the present document by applying specific embodiments, and the description of the above embodiments is only used to help understanding the method and the core idea of the present invention; meanwhile, for a person skilled in the art, according to the idea of the present invention, there may be variations in the specific embodiments and the application scope, and in summary, the content of the present specification should not be construed as a limitation to the present invention.

Claims (8)

1. A method of data transmission, comprising:
sending connection request information to at least two servers, so that the at least two servers feed back connection confirmation information when receiving the connection request information and detecting that a streaming media client can be carried, wherein the servers feeding back the connection confirmation information are in one-to-one correspondence with the connection confirmation information;
when first connection confirmation information is received, determining a server sending the first connection confirmation information as a main server, wherein the first connection confirmation information is a plurality of pieces of connection confirmation information which are received earliest in the connection confirmation information fed back by the at least two servers, or a plurality of pieces of connection confirmation information with strongest information intensity in the connection confirmation information fed back by the at least two servers, and the number of the main servers is multiple;
transmitting data through the primary server;
in the process of transmitting data through the main server, sending detection information to a first backup server at regular time, regularly or according to an instruction, wherein the first backup server is a server other than the main server in the at least two servers, the detection information is used for feeding back response information when the first backup server receives the detection information, and the response information is used for identifying that the first backup server can transmit the data;
when the number of terminals connected to the main server exceeds a preset threshold value, selecting a first backup server with the fastest feedback speed of the response information or the strongest information intensity of the response information to perform data communication, wherein the feedback speed of the response information is the average value of the feedback speeds of the response information fed back for multiple times; the information intensity of the response information is an average value of the information intensities of the response information fed back for multiple times, wherein the number of the first backup servers is at least two.
2. The data transmission method of claim 1, further comprising:
and when the response information sent by the first backup server is not received, acquiring a second backup server, and sending the detection information to the second backup server.
3. The data transmission method according to claim 2, wherein after the data is transmitted by the master server, the method further comprises:
and when information for notifying that the main server is offline, which is sent by the main server, is received, or when a fault occurs in data transmission through the main server, determining the first backup server or the second backup server as the main server.
4. The data transmission method according to claim 3, wherein the number of the second backup servers is at least two, and the determining the first backup server or the second backup server as a primary server includes:
acquiring the number of terminals connected to each server in the first backup server or the second backup server;
selecting the server with the least connection number in the first backup server or the second backup server as a target backup server according to the number of terminals connected to each server;
and setting the target backup server as a main server.
5. A terminal, comprising:
a communication unit, configured to send connection request information to at least two servers, so that when the at least two servers receive the connection request information and detect a client capable of carrying streaming media, connection confirmation information is fed back, where the servers that feed back the connection confirmation information are in one-to-one correspondence with the connection confirmation information;
the communication unit is further used for receiving first connection confirmation information;
a determining unit, configured to determine a server that sends the first connection acknowledgement information as a primary server, where the first connection acknowledgement information is multiple pieces of connection acknowledgement information that are received earliest in the connection acknowledgement information fed back by the at least two servers, or multiple pieces of connection acknowledgement information with strongest information strength in the connection acknowledgement information fed back by the at least two servers, where the number of the primary servers is multiple;
the communication unit is also used for transmitting data through the main server;
the communication unit is further configured to send detection information to a first backup server at regular time, periodically or according to an instruction during data transmission through the main server, where the first backup server is a server other than the main server in the at least two servers, the detection information is used to feed back response information when the first backup server receives the detection information, and the response information is used to identify that the backup server can transmit the data;
the determining unit is further configured to select a first backup server with the fastest feedback speed of the response information or the strongest information strength of the response information to perform data communication when it is detected that the number of terminals connected to the main server exceeds a preset threshold, where the feedback speed of the response information is an average value of feedback speeds of the response information fed back for multiple times; the information intensity of the response information is an average value of the information intensities of the response information fed back for multiple times, wherein the number of the first backup servers is at least two.
6. The terminal of claim 5, further comprising:
an obtaining unit, configured to obtain a second backup server when the response information sent by the first backup server is not received;
the communication unit is further configured to send the detection information to the second backup server.
7. The terminal according to claim 6, wherein after the communication unit transmits data via the primary server, the determination unit is further configured to set the first backup server or the second backup server as the primary server when receiving information sent by the primary server to notify that the primary server is offline or when a failure occurs in data transmission via the primary server.
8. The terminal according to claim 7, wherein the number of the second backup servers is at least two, and the determining unit is specifically configured to obtain the number of terminals connected to each of the first backup server or the second backup server; selecting the server with the least connection number in the first backup server or the second backup server as a target backup server according to the number of terminals connected to each server; and setting the target backup server as a main server.
CN201711135415.XA 2017-11-16 2017-11-16 Data transmission method and terminal Active CN107979876B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201711135415.XA CN107979876B (en) 2017-11-16 2017-11-16 Data transmission method and terminal

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201711135415.XA CN107979876B (en) 2017-11-16 2017-11-16 Data transmission method and terminal

Publications (2)

Publication Number Publication Date
CN107979876A CN107979876A (en) 2018-05-01
CN107979876B true CN107979876B (en) 2022-01-07

Family

ID=62013638

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201711135415.XA Active CN107979876B (en) 2017-11-16 2017-11-16 Data transmission method and terminal

Country Status (1)

Country Link
CN (1) CN107979876B (en)

Families Citing this family (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110445639B (en) * 2019-07-05 2022-07-12 视联动力信息技术股份有限公司 Hot standby method and device for server
CN112653736B (en) * 2020-12-10 2022-05-06 北京金山云网络技术有限公司 Parallel source returning method and device and electronic equipment

Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103312677A (en) * 2012-03-15 2013-09-18 宇龙计算机通信科技(深圳)有限公司 Terminal, server and establishment method of communication connection
CN103595702A (en) * 2012-08-17 2014-02-19 中兴通讯股份有限公司 Selection method and apparatus for content providing device
CN103685398A (en) * 2012-09-17 2014-03-26 腾讯科技(深圳)有限公司 Communication connection establishment method and communication system
CN104158735A (en) * 2014-08-21 2014-11-19 网神信息技术(北京)股份有限公司 Network data package distribution method and device
CN105681266A (en) * 2014-11-20 2016-06-15 中国移动通信集团广东有限公司 Communication cluster method and device for MMTel (MultiMedia Telephony)
CN106250199A (en) * 2016-07-26 2016-12-21 北京北森云计算股份有限公司 The dynamic micro services call method of a kind of multilingual cloud compiling and device
WO2017034944A1 (en) * 2015-08-25 2017-03-02 Saudi Arabian Oil Company High performance and grid computing with fault tolerant data distributors quality of service

Family Cites Families (25)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US7356592B2 (en) * 2002-01-24 2008-04-08 International Business Machines Corporation Method and apparatus for web farm traffic control
CN101022413B (en) * 2007-03-26 2010-10-13 杭州华三通信技术有限公司 Load equalizing method and route server
CN102480512B (en) * 2010-11-29 2015-08-12 国际商业机器公司 For the method and apparatus of expansion servers end disposal ability
CN102624570B (en) * 2012-04-27 2015-04-15 杭州东信北邮信息技术有限公司 Monitoring system and method for detecting availability of web server
CN103810196B (en) * 2012-11-09 2017-09-22 阿里巴巴集团控股有限公司 The method that database performance measurement is carried out based on business model
EP2733502A1 (en) * 2012-11-15 2014-05-21 James Buchheim Locator beacon and radar application for mobile device
CN103188346A (en) * 2013-03-05 2013-07-03 北京航空航天大学 Distributed decision making supporting massive high-concurrency access I/O (Input/output) server load balancing system
CN103401904A (en) * 2013-07-19 2013-11-20 蓝盾信息安全技术股份有限公司 Method for backing up mobile terminal data
CN103546542B (en) * 2013-09-29 2017-01-04 北京航空航天大学 Server load balancing method and apparatus
CN104579996A (en) * 2013-10-17 2015-04-29 中国电信股份有限公司 Cluster load balancing method and system
CN103634312A (en) * 2013-11-26 2014-03-12 广州晶锐信息技术有限公司 Device management method for realizing multi-audio fast synchrony based on audio sharing
US10078811B2 (en) * 2013-11-29 2018-09-18 Fedex Corporate Services, Inc. Determining node location based on context data in a wireless node network
EP3074903A4 (en) * 2013-11-29 2017-08-02 Fedex Corporate Services, Inc. Methods and systems for managing shipment of an item using a wireless node network
US10453023B2 (en) * 2014-05-28 2019-10-22 Fedex Corporate Services, Inc. Methods and node apparatus for adaptive node communication within a wireless node network
CN104333488B (en) * 2014-11-04 2017-06-20 哈尔滨工业大学 Cloud service platform performance test methods
CN108282671B (en) * 2015-02-13 2020-08-25 海信集团有限公司 Streaming media data transmission method
CN106484713A (en) * 2015-08-27 2017-03-08 中国石油化工股份有限公司 A kind of based on service-oriented Distributed Request Processing system
CN105516360A (en) * 2016-01-19 2016-04-20 苏州帕科泰克物联技术有限公司 Method and device for load balance of computer
CN105721547B (en) * 2016-01-20 2019-05-31 北京京东尚科信息技术有限公司 The method and apparatus for cooperateing with processing business
CN105610651A (en) * 2016-02-24 2016-05-25 太仓市同维电子有限公司 Detection method of connecting to the Internet by wireless router
CN107231246A (en) * 2016-03-23 2017-10-03 北京佳讯飞鸿电气股份有限公司 A kind of server access system and method
CN106357727A (en) * 2016-08-24 2017-01-25 明算科技(北京)股份有限公司 Method and system to upload files to multiple servers simultaneously
CN106357747A (en) * 2016-08-30 2017-01-25 维沃移动通信有限公司 Server load management method and device
CN106534288B (en) * 2016-11-02 2019-08-20 Oppo广东移动通信有限公司 A kind of data transmission method and mobile terminal
CN106790356A (en) * 2016-11-15 2017-05-31 广东欧珀移动通信有限公司 A kind of data backup, method for down loading and relevant device

Patent Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103312677A (en) * 2012-03-15 2013-09-18 宇龙计算机通信科技(深圳)有限公司 Terminal, server and establishment method of communication connection
CN103595702A (en) * 2012-08-17 2014-02-19 中兴通讯股份有限公司 Selection method and apparatus for content providing device
CN103685398A (en) * 2012-09-17 2014-03-26 腾讯科技(深圳)有限公司 Communication connection establishment method and communication system
CN104158735A (en) * 2014-08-21 2014-11-19 网神信息技术(北京)股份有限公司 Network data package distribution method and device
CN105681266A (en) * 2014-11-20 2016-06-15 中国移动通信集团广东有限公司 Communication cluster method and device for MMTel (MultiMedia Telephony)
WO2017034944A1 (en) * 2015-08-25 2017-03-02 Saudi Arabian Oil Company High performance and grid computing with fault tolerant data distributors quality of service
CN106250199A (en) * 2016-07-26 2016-12-21 北京北森云计算股份有限公司 The dynamic micro services call method of a kind of multilingual cloud compiling and device

Also Published As

Publication number Publication date
CN107979876A (en) 2018-05-01

Similar Documents

Publication Publication Date Title
EP3577952B1 (en) Method and system for selection of an access and mobility management function in an access network environment
US9300733B2 (en) System and/or method for client-driven server load distribution
US20160072713A1 (en) Load balancing and migration of transport connections
CN112398689B (en) Network recovery method and device, storage medium and electronic equipment
WO2021237433A1 (en) Message pushing method and apparatus, and electronic device and computer-readable medium
JP5255035B2 (en) Failover system, storage processing apparatus, and failover control method
EP4287591A1 (en) Data transmission method and apparatus, and server, storage medium and program product
CN110417595B (en) Business service disaster tolerance method, device, system, management server and electronic equipment
CN107979876B (en) Data transmission method and terminal
CN111541555A (en) Group chat optimization method and related product
US20120072604A1 (en) technique for delivering content to a user
US11706301B2 (en) Server node selection method and terminal device
WO2019015040A1 (en) Signal strength based frequency point selection method and internet of things terminal
CN106817267B (en) Fault detection method and equipment
US20170279738A1 (en) Method, apparatus, and system for transmitting data
CN108600308B (en) Data uploading method and device, storage medium and server
CN114884805B (en) Data transmission method, device, terminal and storage medium
CN111385324A (en) Data communication method, device, equipment and storage medium
CN114143569B (en) Webpage recording and live broadcasting method and system
WO2023284232A1 (en) Path addressing method and network service system
CN109479214B (en) Load balancing method and related device
CN113132758B (en) Control method, device and computer program product of content distribution network
CN114173151B (en) Live broadcast stream pushing system, method and device and electronic equipment
KR20200110375A (en) Data volume reporting method of data replication, user device and network device
CN114095759B (en) Stream media redirection method and related device

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
TR01 Transfer of patent right
TR01 Transfer of patent right

Effective date of registration: 20231016

Address after: 31a, 15 / F, building 30, maple mall, bangrang Road, Brazil, Singapore

Patentee after: Baiguoyuan Technology (Singapore) Co.,Ltd.

Address before: 511449 25th floor, building B-1, Wanda Plaza North, Wanbo business district, 79 Wanbo 2nd Road, Nancun Town, Panyu District, Guangzhou City, Guangdong Province

Patentee before: GUANGZHOU BAIGUOYUAN NETWORK TECHNOLOGY Co.,Ltd.