CN114285798B - Data transmission method and device - Google Patents

Data transmission method and device Download PDF

Info

Publication number
CN114285798B
CN114285798B CN202111580117.8A CN202111580117A CN114285798B CN 114285798 B CN114285798 B CN 114285798B CN 202111580117 A CN202111580117 A CN 202111580117A CN 114285798 B CN114285798 B CN 114285798B
Authority
CN
China
Prior art keywords
data transmission
client
transmission link
isp
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
CN202111580117.8A
Other languages
Chinese (zh)
Other versions
CN114285798A (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 Dajia Internet Information Technology Co Ltd
Original Assignee
Beijing Dajia Internet 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 Beijing Dajia Internet Information Technology Co Ltd filed Critical Beijing Dajia Internet Information Technology Co Ltd
Priority to CN202111580117.8A priority Critical patent/CN114285798B/en
Publication of CN114285798A publication Critical patent/CN114285798A/en
Application granted granted Critical
Publication of CN114285798B publication Critical patent/CN114285798B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Landscapes

  • Data Exchanges In Wide-Area Networks (AREA)

Abstract

The disclosure relates to a data transmission method and device. The data transmission method comprises the following steps: receiving a data packet transmitted by a client through a current data transmission link; determining that an ISP adopted by the client changes based on the source address of the data packet; sending the changed identification of the data transmission link corresponding to the ISP to the client; and switching the current data transmission link to the data transmission link corresponding to the identification, and continuously receiving the data packet transmitted by the client.

Description

Data transmission method and device
Technical Field
The present disclosure relates to the field of data transmission, and in particular, to a data transmission method and apparatus.
Background
At present, with the increasing scale of users of online live broadcast software, data transmission (such as providing on-air push stream by a host), and the bandwidth cost of a server for supporting data transmission are also increasing. The bandwidth cost mainly comes from the traffic cost generated by the service end accessing the internet through an internet service provider (Internet Service Provide, abbreviated as ISP) to provide network access and transmission functions (such as live push by the anchor).
For cost reasons, the edge server generally adopts a three-wire machine room to provide services for users from different ISPs, for example, three independent line accesses of mobile, communication and telecommunication are adopted, and an access line of the same ISP is actively selected for the users according to the network type of the access users. The three-wire machine room has the advantages of low cost, and fast speed when the user uses the access line of the same ISP as the server, but has the defects of poor cross ISP connection quality and even incapability of communication, for example, when the user side is switched to a new network, the corresponding ISP can be changed, but the ISP corresponding to the server can not be changed in time, so that the access line of the user side and the server still adopts the access line of the original ISP, and the network transmission effect is obviously deteriorated. For example, in a push scenario, mobile network push is adopted at the push client, and the multipath transmission algorithm uses a mobile line as a data transmission sub-link, and when the push client is switched from the mobile network to the connected network, the steps required by the multipath transmission algorithm to make feedback include: 1) Because of network delay, at least one Round Trip Time (RTT) is required to pass, the push user end can receive feedback of network state, and a certain amount of data needs to be accumulated to confirm that the current mobile line is not the optimal scheme (for example, the packet loss rate is continuously higher); 2) The push user terminal needs to detect all sub-links and collect network state feedback to confirm a new optimal transmission sub-link; 3) The new sub-link is used for data transmission. The method comprises the steps that 1) a push user can know after a period of time, an access line of a server is not matched with a communication network, and 2) the push user terminal can know an optimal transmission sub-link of the corresponding communication network after a period of time.
Disclosure of Invention
The disclosure provides a data transmission method and device, which at least solve the problem of untimely switching of data transmission links caused by network quality detection and link detection processes in the related art.
According to a first aspect of an embodiment of the present disclosure, there is provided a data transmission method, including: receiving a data packet transmitted by a client through a current data transmission link; determining that an ISP adopted by the client changes based on the source address of the data packet; sending the changed identification of the data transmission link corresponding to the ISP to the client; and switching the current data transmission link to the data transmission link corresponding to the identification, and continuously receiving the data packet transmitted by the client.
Optionally, before receiving the data packet transmitted by the client through the current data transmission link, the method further includes: receiving a data transmission request sent by a client; feeding back a target address set to the client based on the data transmission request, wherein the target address set comprises target addresses respectively corresponding to the ISPs; and respectively establishing connection with the client through the target addresses respectively corresponding to the ISPs to obtain a plurality of data transmission links.
Optionally, before receiving the data packet transmitted by the client through the current data transmission link, the method further includes: and taking a data transmission link corresponding to the ISP adopted by the client side in the plurality of data transmission links as a current data transmission link.
Optionally, determining that the internet service provider ISP employed by the client changes based on the source address of the data packet includes: acquiring a source address of a data packet and a source address of a last received data packet; and determining that the ISP adopted by the client changes under the condition that the source address of the data packet is inconsistent with the source address of the last received data packet.
According to a second aspect of the embodiments of the present disclosure, there is provided a data transmission method, including: transmitting a data packet to a server through a current data transmission link; receiving an identifier of a data transmission link corresponding to a changed Internet Service Provider (ISP) sent by a server, wherein the changed ISP is determined based on a source address of a data packet; and switching the current data transmission link to the data transmission link corresponding to the identification, and continuously transmitting the data packet to the server.
Optionally, before transmitting the data packet to the server through the current data transmission link, the method further includes: sending a data transmission request to a server; receiving a target address set fed back by a server based on a data transmission request, wherein the target address set comprises target addresses corresponding to ISPs respectively; and respectively establishing connection with the server through the target addresses respectively corresponding to the ISPs to obtain a plurality of data transmission links.
Optionally, before transmitting the data packet to the server through the current data transmission link, the method further includes: and taking a data transmission link corresponding to the ISP adopted locally in the plurality of data transmission links as a current data transmission link.
Optionally, receiving the identifier of the data transmission link corresponding to the changed ISP sent by the server side includes: and receiving a data transmission link switching notification sent by the server, wherein the data transmission link switching notification comprises the identification of the data transmission link corresponding to the changed ISP.
According to a third aspect of the embodiments of the present disclosure, there is provided a data transmission apparatus, comprising: the data packet receiving unit is configured to receive the data packet transmitted by the client through the current data transmission link; a determining unit configured to determine that an internet service provider ISP employed by the client is changed based on a source address of the data packet; an identifier transmitting unit configured to transmit, to the client, the identifier of the data transmission link corresponding to the changed ISP; and the switching unit is configured to switch the current data transmission link to the data transmission link corresponding to the identifier, and continuously receive the data packet transmitted by the client.
Optionally, the data packet receiving unit is further configured to receive a data transmission request sent by the client before receiving the data packet transmitted by the client through the current data transmission link; feeding back a target address set to the client based on the data transmission request, wherein the target address set comprises target addresses respectively corresponding to the ISPs; and respectively establishing connection with the client through the target addresses respectively corresponding to the ISPs to obtain a plurality of data transmission links.
Optionally, the data packet receiving unit is further configured to, before receiving the data packet transmitted by the client through the current data transmission link, use a data transmission link corresponding to the ISP employed by the client among the plurality of data transmission links as the current data transmission link.
Optionally, the determining unit is further configured to acquire a source address of the data packet and a source address of a last received data packet; and determining that the ISP adopted by the client changes under the condition that the source address of the data packet is inconsistent with the source address of the last received data packet.
According to a fourth aspect of embodiments of the present disclosure, there is provided a data transmission apparatus, comprising: the data packet sending unit is configured to transmit the data packet to the server through the current data transmission link; the device comprises an identifier receiving unit, a data transmission unit and a data transmission unit, wherein the identifier receiving unit is configured to receive an identifier of a data transmission link corresponding to a changed Internet Service Provider (ISP) sent by a server, and the changed ISP is determined based on a source address of a data packet; and the switching unit is configured to switch the current data transmission link to the data transmission link corresponding to the identifier and continue to transmit the data packet to the server.
Optionally, the data packet sending unit is configured to send a data transmission request to the server before the data packet is transmitted to the server through the current data transmission link; receiving a target address set fed back by a server based on a data transmission request, wherein the target address set comprises target addresses corresponding to ISPs respectively; and respectively establishing connection with the server through the target addresses respectively corresponding to the ISPs to obtain a plurality of data transmission links.
Optionally, the data packet sending unit is configured to take, as the current data transmission link, a data transmission link corresponding to the ISP adopted locally among the plurality of data transmission links before transmitting the data packet to the server through the current data transmission link.
Optionally, the identifier receiving unit is further configured to receive a data transmission link switching notification sent by the server, where the data transmission link switching notification includes an identifier of the data transmission link corresponding to the changed ISP.
According to a fifth aspect of embodiments of the present disclosure, there is provided an electronic device, comprising: a processor; a memory for storing processor-executable instructions; wherein the processor is configured to execute instructions to implement a data transmission method according to the present disclosure.
According to a sixth aspect of embodiments of the present disclosure, there is provided a computer readable storage medium, which when executed by at least one processor, causes the at least one processor to perform a data transmission method according to the present disclosure as above.
According to a seventh aspect of embodiments of the present disclosure, there is provided a computer program product comprising computer instructions which, when executed by a processor, implement a data transmission method according to the present disclosure.
The technical scheme provided by the embodiment of the disclosure at least brings the following beneficial effects:
according to the data transmission method and device, the source address of the data packet sent by the client is monitored at the server, namely whether the ISP used by the client is changed is judged by utilizing the source address, after the ISP used by the client is confirmed to be changed, the server actively sends the identification of a new optimal access line (namely the identification of the data transmission link corresponding to the changed ISP) to the client, so that the client can continuously transmit the data packet to the server through the optimal access line, the server can continuously receive the data packet through the optimal access line, the data transmission link can be switched timely, the problem that the data transmission link is not switched timely due to network quality detection and link detection flow in the related art is avoided, and the purposes of avoiding blocking and improving the transmission fluency are achieved.
It is to be understood that both the foregoing general description and the following detailed description are exemplary and explanatory only and are not restrictive of the disclosure.
Drawings
The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the disclosure and together with the description, serve to explain the principles of the disclosure and do not constitute an undue limitation on the disclosure.
Fig. 1 is an implementation scenario diagram illustrating a data transmission method according to an exemplary embodiment of the present disclosure;
FIG. 2 is a flowchart illustrating a method of data transmission according to an exemplary embodiment;
FIG. 3 is a schematic diagram of a three-wire connection shown in accordance with an exemplary embodiment;
FIG. 4 is a schematic diagram illustrating a circuit switching according to an example embodiment;
FIG. 5 is a flow chart II illustrating a method of data transmission according to an exemplary embodiment;
fig. 6 is a block diagram one of a data transmission apparatus according to an exemplary embodiment;
fig. 7 is a block diagram two of a data transmission apparatus according to an exemplary embodiment;
fig. 8 is a block diagram of an electronic device 800 according to an embodiment of the disclosure.
Detailed Description
In order to enable those skilled in the art to better understand the technical solutions of the present disclosure, the technical solutions of the embodiments of the present disclosure will be clearly and completely described below with reference to the accompanying drawings.
It should be noted that the terms "first," "second," and the like in the description and claims of the present disclosure and in the foregoing figures are used for distinguishing between similar objects and not necessarily for describing a particular sequential or chronological order. It is to be understood that the data so used may be interchanged where appropriate such that the embodiments of the disclosure described herein may be capable of operation in sequences other than those illustrated or described herein. The embodiments described in the examples below are not representative of all embodiments consistent with the present disclosure. Rather, they are merely examples of apparatus and methods consistent with some aspects of the present disclosure as detailed in the accompanying claims.
It should be noted that, in this disclosure, "at least one of the items" refers to a case where three types of juxtaposition including "any one of the items", "a combination of any of the items", "an entirety of the items" are included. For example, "including at least one of a and B" includes three cases side by side as follows: (1) comprises A; (2) comprising B; (3) includes A and B. For example, "at least one of the first and second steps is executed", that is, three cases are juxtaposed as follows: (1) performing step one; (2) executing the second step; (3) executing the first step and the second step.
In view of the foregoing, the present disclosure provides a data transmission method, which can bring a good experience to a user, and the following description will take live broadcast push as an example.
Fig. 1 is a schematic diagram illustrating an implementation scenario of a data transmission method according to an exemplary embodiment of the present disclosure, as shown in fig. 1, where the implementation scenario includes a server 100, a user terminal 110, and a user terminal 120, where the user terminals are not limited to 2, including but not limited to devices such as a mobile phone, a personal computer, and the like, and the user terminal may install and acquire an application program for live broadcasting, and the server may be one server, or several servers form a server cluster, or may be a cloud computing platform or a virtualization center.
After the user terminal 110 or the user terminal 120 starts an application program for live broadcasting, a push request is sent to the server 100, after the server 100 receives the push request, based on push target addresses corresponding to the user terminal 110 or the user terminal 120 respectively for each internet service provider ISP, the user terminal 110 or the user terminal 120 establishes push connection with the service end through the push target addresses respectively to obtain a plurality of push sub-links, then selects a push sub-link corresponding to the ISP adopted locally from the plurality of push sub-links, and transmits live broadcasting data packets to the server 100 by using the selected push sub-links, in the process of transmitting the data packets, the server 100 monitors the source address of the data packets, determines that the ISP adopted by the user terminal 110 or the user terminal 120 changes when the source address of the data packets is inconsistent with the source address of the last data packet, and simultaneously, switches the current data transmission link to the data transmission link corresponding to the identifier, and continuously receives the data packets transmitted by the user terminal 110 or the user terminal 120.
Hereinafter, a data transmission method and apparatus according to exemplary embodiments of the present disclosure will be described in detail with reference to fig. 2 to 7.
Fig. 2 is a flowchart illustrating a data transmission method according to an exemplary embodiment, as shown in fig. 2, including the steps of:
in step S201, a data packet transmitted by a client is received through a current data transmission link.
According to an exemplary embodiment of the present disclosure, before receiving the data packet transmitted by the client through the current data transmission link, the method further includes: receiving a data transmission request sent by a client; feeding back a target address set to the client based on the data transmission request, wherein the target address set comprises target addresses respectively corresponding to the ISPs; and respectively establishing connection with the client through the target addresses respectively corresponding to the ISPs to obtain a plurality of data transmission links. According to the embodiment, before receiving the data packet, the server sends the destination addresses corresponding to the ISPs to the client, so that the client can establish connection with all lines of the server, namely, a plurality of data transmission links, and after the subsequent network of the client changes, the client can also be directly switched to a proper link to perform data transmission, so that the problems of reconnection of the link and retransmission of the data are avoided, the data transmission is not interrupted in the switching process, additional network communication overhead is not generated, the data transmission basically has no obvious fluctuation, the optimal effect of the data and stable switching of the network are ensured, and the same network transmission quality is achieved and accessed by using a border gateway protocol (Border Gateway Protocol, abbreviated as BGP) while the cost is relatively saved by using a three-wire machine room. Therefore, the embodiment solves the problems of data transmission interruption and unnecessary network communication overhead caused by adopting a three-wire machine room for data transmission in the related technology.
For example, still taking live push as an example, when a push user switches to a new line, the new line needs to be re-established and push again, so that push interruption can be caused, a viewer end of the push experiences frame jump or even room disconnection, and at the same time, the reconstruction can cause additional network communication overhead, so that viewer perception in the switching process is aggravated, and the problem that data transmission is interrupted and unnecessary network communication overhead is caused by adopting a three-wire machine room for data transmission in the related art is solved. In this embodiment, when a specific ISP is used for pushing a push client (i.e., a push client) and a three-wire access is used for a server, a three-wire address may be issued to the push client at the same time, so that the push client may connect the three-wire address of the server at the same time by using multi-path transmission to obtain a plurality of push sub-links for pushing, as shown in fig. 3, the push host side represents the push client, the push server represents the server, and it is assumed that three lines exist in the server, such that the three lines are mobile, telecom and UNICOM, and the embodiment establishes connection between the server and the push client through the three lines, thereby obtaining three push sub-links. It should be noted that, the multipath transmission is an internet end-to-end transmission protocol, generally works in a transmission layer, and can establish a plurality of sub-links by using a plurality of network cards (such as Wifi and 4G) already provided by the terminal, and simultaneously perform end-to-end concurrent transmission of data, thereby improving transmission efficiency and robustness.
According to an exemplary embodiment of the present disclosure, before receiving the data packet transmitted by the client through the current data transmission link, the method further includes: and taking a data transmission link corresponding to the ISP adopted by the client side in the plurality of data transmission links as a current data transmission link. According to the embodiment, the data transmission link corresponding to the ISP adopted by the client is selected as the current data transmission link, so that the consistency with the ISP of the client can be ensured, and the network transmission effect can be improved. For example, an alternative way is to automatically select the plug sub-link with the best network quality by utilizing the characteristics of multipath transmission, and also automatically select the plug sub-link corresponding to the ISP adopted locally for data transmission.
In step S202, it is determined that the internet service provider ISP employed by the client has changed based on the source address of the data packet.
According to an exemplary embodiment of the present disclosure, determining that an internet service provider ISP employed by a client changes based on a source address of a data packet includes: acquiring a source address of a data packet and a source address of a last received data packet; and determining that the ISP adopted by the client changes under the condition that the source address of the data packet is inconsistent with the source address of the last received data packet. According to the embodiment, the change of the ISP of the Internet service provider adopted by the client can be conveniently and rapidly determined, so that the switching speed of the line is further improved.
In step S203, the changed identification of the data transmission link corresponding to the ISP is transmitted to the client.
According to an exemplary embodiment of the present disclosure, sending, to the client, an identification of a data transmission link corresponding to the changed ISP, including: and sending a data transmission link switching notification to the client, wherein the data transmission link switching notification comprises the identification of the data transmission link corresponding to the changed ISP. Through the embodiment, the server side directly informs the switching and gives the optimal line, so that the switching can be performed more quickly and smoothly, and the problem that delay exists in switching the plug flow sub-link is further avoided.
For example, still taking live push as an example, in order to solve the problem that the multi-path transmission mode still has insufficient time for sub-link switching when the network of the push user terminal is switched, the embodiment monitors the IP address change condition of the live data packet sent by the push user terminal at the server terminal, uses the IP address to determine whether the ISP used by the push user terminal changes, and after determining that the ISP used by the push user terminal changes, the server terminal actively sends a line switching notification to send a new optimal access line address to the push user terminal, and the push user terminal continues to transmit the live data packet to the server terminal by adopting the optimal access line sent by the server terminal, as shown in fig. 4, and mainly includes the following steps:
1) And the multipath transmission protocol receiving end located in the server records the source IP address of the received data packet, and actively notifies the push server when detecting that the source IP address of the current data packet is inconsistent with the source IP address of the last data packet. For example, the push anchor starts to adopt the mobile network to transmit the data packet through the mobile line, and then the push anchor changes into the connected network, and then continues to transmit the data packet through the mobile line, and when the source IP addresses of the two data packets are detected to be inconsistent, the push server is actively notified, and the push anchor side changes the network.
2) And the plug flow server adds a source IP detection module, when receiving a source IP address change notification of the multipath transmission protocol, judges the ISP to which the changed source IP address belongs by inquiring a database, determines a matched server access line, and feeds back a plug flow address (namely the identifier) corresponding to the new optimal access line to the plug flow user terminal. In addition, the multi-path transmission layer can automatically sense and switch to a new access line (such as a data transmission link corresponding to the changed ISP) for subsequent transmission, so that the problems of network delay, push stream blocking and the like caused by transmission across the ISP due to network switching are avoided. It should be noted that, the multipath transmission senses the state change of the underlying network, and automatically selecting the optimal link is a popular research problem in the industry, which is not discussed in this disclosure.
3) And the push user receives the new optimal push address, and directly switches to the corresponding push sub-link to transmit the data packet. For example, if the push sub-link corresponding to the received optimal push address is connected continuously, the link is directly switched to, and the data packet is continuously transmitted.
In step S204, the current data transmission link is switched to the data transmission link corresponding to the identifier, and the data packet transmitted by the client is continuously received.
In summary, the source address of the data packet sent by the client is monitored at the server, that is, whether the ISP used by the client is changed is judged by using the source address, after the ISP used by the client is determined to be changed, the server actively sends the identifier of the new optimal access line (that is, the identifier of the data transmission link corresponding to the changed ISP) to the client, so that the client can continuously transmit the data packet to the server through the optimal access line, and the server can continuously receive the data packet through the optimal access line, thereby timely switching the data transmission link, avoiding the problem of untimely switching of the data transmission link caused by network quality detection and link detection flow in the related art, and achieving the purposes of avoiding blocking and improving the transmission fluency. And the push user end also establishes a push sub-link by utilizing multi-path transmission and all line addresses of the server, and can directly designate a new access line as a push sub-link which is preferentially used when receiving a switching optimal access line signal sent by the server, thereby avoiding the problems of reconnection of a network switching link and data retransmission in the related art and achieving the purposes of avoiding blocking and improving transmission fluency.
Fig. 5 is a flowchart two of a data transmission method according to an exemplary embodiment, and as shown in fig. 5, the data transmission method includes the following steps:
in step S501, a data packet is transmitted to a server through a current data transmission link.
In step S502, the identification of the data transmission link corresponding to the changed ISP of the internet service provider sent by the server is received, where the changed ISP is determined based on the source address of the data packet.
In step S503, the current data transmission link is switched to the data transmission link corresponding to the identifier, and the data packet is continuously transmitted to the server.
According to an exemplary embodiment of the present disclosure, before transmitting the data packet to the server through the current data transmission link, the method further includes: sending a data transmission request to a server; receiving a target address set fed back by a server based on a data transmission request, wherein the target address set comprises target addresses corresponding to ISPs respectively; and respectively establishing connection with the server through the target addresses respectively corresponding to the ISPs to obtain a plurality of data transmission links.
According to an exemplary embodiment of the present disclosure, before transmitting the data packet to the server through the current data transmission link, the method further includes: and taking a data transmission link corresponding to the ISP adopted locally in the plurality of data transmission links as a current data transmission link.
According to an exemplary embodiment of the present disclosure, receiving an identifier of a data transmission link corresponding to a changed ISP sent by a server includes: and receiving a data transmission link switching notification sent by the server, wherein the data transmission link switching notification comprises the identification of the data transmission link corresponding to the changed ISP.
The method and the device can be applied to the scene that the push server is deployed in a three-wire machine room, and solve the problem that when the push user terminal is subjected to network switching, the push effect is poor due to inconsistent access lines. In addition, aiming at the problem that delay exists in multipath transmission switching sub-links, the server actively judges the network change of the push flow end and sends an optimal access line switching notification to realize a faster and smoother sub-link switching process, so that a smoother and more robust push flow effect can be achieved when the network of the push flow user end is switched.
Fig. 6 is a block diagram one of a data transmission apparatus according to an exemplary embodiment. Referring to fig. 6, the apparatus includes a packet receiving unit 60, a determining unit 62, an identification transmitting unit 64, and a switching unit 66.
A data packet receiving unit 60 configured to receive a data packet transmitted by a client through a current data transmission link; a determining unit 62 configured to determine that the internet service provider ISP employed by the client has changed based on the source address of the data packet; an identification transmitting unit 64 configured to transmit the changed identification of the data transmission link corresponding to the ISP to the client; and a switching unit 66 configured to switch the current data transmission link to the data transmission link corresponding to the identifier, and continue to receive the data packet transmitted by the client.
According to an exemplary embodiment of the present disclosure, the data packet receiving unit 60 is further configured to receive a data transmission request sent by the client before receiving the data packet transmitted by the client through the current data transmission link; feeding back a target address set to the client based on the data transmission request, wherein the target address set comprises target addresses respectively corresponding to the ISPs; and respectively establishing connection with the client through the target addresses respectively corresponding to the ISPs to obtain a plurality of data transmission links.
According to an exemplary embodiment of the present disclosure, the data packet receiving unit 60 is further configured to, prior to receiving the data packet transmitted by the client through the current data transmission link, take as the current data transmission link a data transmission link corresponding to the ISP employed by the client among the plurality of data transmission links.
According to an exemplary embodiment of the present disclosure, the determining unit 62 is further configured to obtain a source address of a data packet and a source address of a received last data packet; and determining that the ISP adopted by the client changes under the condition that the source address of the data packet is inconsistent with the source address of the last received data packet.
Fig. 7 is a block diagram two of a data transmission apparatus according to an exemplary embodiment. Referring to fig. 7, the apparatus includes a packet transmitting unit 70, an identification receiving unit 72, and a switching unit 74.
A data packet transmitting unit 70 configured to transmit a data packet to a server through a current data transmission link; an identifier receiving unit 72, configured to receive an identifier of a data transmission link corresponding to the changed ISP of the internet service provider sent by the server, where the changed ISP is determined based on the source address of the data packet; and a switching unit 74 configured to switch the current data transmission link to the data transmission link corresponding to the identifier, and continue transmitting the data packet to the server.
According to an exemplary embodiment of the present disclosure, the data packet transmitting unit 70 is configured to transmit a data transmission request to the server side before transmitting a data packet to the server side through the current data transmission link; receiving a target address set fed back by a server based on a data transmission request, wherein the target address set comprises target addresses corresponding to ISPs respectively; and respectively establishing connection with the server through the target addresses respectively corresponding to the ISPs to obtain a plurality of data transmission links.
According to an exemplary embodiment of the present disclosure, the data packet transmitting unit 70 is configured to take, as a current data transmission link, a data transmission link corresponding to an ISP employed locally among a plurality of data transmission links before transmitting a data packet to a server side through the current data transmission link.
According to an exemplary embodiment of the present disclosure, the identifier receiving unit 72 is further configured to receive a data transmission link switching notification sent by the server, where the data transmission link switching notification includes the identifier of the changed data transmission link corresponding to the ISP.
According to embodiments of the present disclosure, an electronic device may be provided. Fig. 8 is a block diagram of an electronic device 800 including at least one memory 801 and at least one processor 802, the at least one memory having stored therein a set of computer-executable instructions that, when executed by the at least one processor, perform a data transmission method according to an embodiment of the present disclosure.
By way of example, electronic device 800 may be a PC computer, tablet device, personal digital assistant, smart phone, or other device capable of executing the above-described set of instructions. Here, the electronic device 1000 is not necessarily a single electronic device, but may be any apparatus or a collection of circuits capable of executing the above-described instructions (or instruction sets) individually or in combination. The electronic device 800 may also be part of an integrated control system or system manager, or may be configured as a portable electronic device that interfaces with either locally or remotely (e.g., via wireless transmission).
In electronic device 800, processor 802 may include a Central Processing Unit (CPU), a Graphics Processor (GPU), a programmable logic device, a special purpose processor system, a microcontroller, or a microprocessor. By way of example, and not limitation, the processor 802 may also include an analog processor, a digital processor, a microprocessor, a multi-core processor, a processor array, a network processor, and the like.
The processor 802 may execute instructions or code stored in the memory, wherein the memory 801 may also store data. The instructions and data may also be transmitted and received over a network via a network interface device, which may employ any known transmission protocol.
The memory 801 may be integrated with the processor 802, for example, RAM or flash memory disposed within an integrated circuit microprocessor or the like. In addition, the memory 801 may include a stand-alone device, such as an external disk drive, storage array, or other storage device usable by any database system. The memory 801 and the processor 802 may be operatively coupled or may communicate with each other, for example, through an I/O port, network connection, etc., such that the processor 802 is able to read files stored in the memory 801.
In addition, the electronic device 800 may also include a video display (such as a liquid crystal display) and a user interaction interface (such as a keyboard, mouse, touch input device, etc.). All components of the electronic device may be connected to each other via a bus and/or a network.
According to an embodiment of the present disclosure, there may also be provided a computer-readable storage medium, wherein instructions in the computer-readable storage medium, when executed by at least one processor, cause the at least one processor to perform the data transmission method of the embodiment of the present disclosure. Examples of the computer readable storage medium herein include: read-only memory (ROM), random-access programmable read-only memory (PROM), electrically erasable programmable read-only memory (EEPROM), random-access memory (RAM), dynamic random-access memory (DRAM), static random-access memory (SRAM), flash memory, nonvolatile memory, CD-ROM, CD-R, CD + R, CD-RW, CD+RW, DVD-ROM, DVD-R, DVD + R, DVD-RW, DVD+RW, DVD-RAM, BD-ROM, BD-R, BD-R LTH, BD-RE, blu-ray or optical disk storage, hard Disk Drives (HDD), solid State Disks (SSD), card-type memories (such as multimedia cards, secure Digital (SD) cards or ultra-fast digital (XD) cards), magnetic tapes, floppy disks, magneto-optical data storage devices, hard disks, solid state disks, and any other devices configured to store computer programs and any associated data, data files and data structures in a non-transitory manner and to provide the computer programs and any associated data, data files and data structures to a processor or computer to cause the processor or computer to execute the programs. The computer programs in the computer readable storage media described above can be run in an environment deployed in a computer device, such as a client, host, proxy device, server, etc., and further, in one example, the computer programs and any associated data, data files, and data structures are distributed across networked computer systems such that the computer programs and any associated data, data files, and data structures are stored, accessed, and executed in a distributed fashion by one or more processors or computers.
According to an embodiment of the present disclosure, there is provided a computer program product comprising computer instructions which, when executed by a processor, implement a data transmission method of an embodiment of the present disclosure.
Other embodiments of the disclosure will be apparent to those skilled in the art from consideration of the specification and practice of the disclosure disclosed herein. This disclosure is intended to cover any adaptations, uses, or adaptations of the disclosure following the general principles of the disclosure and including such departures from the present disclosure as come within known or customary practice within the art to which the disclosure pertains. It is intended that the specification and examples be considered as exemplary only, with a true scope and spirit of the disclosure being indicated by the following claims.
It is to be understood that the present disclosure is not limited to the precise arrangements and instrumentalities shown in the drawings, and that various modifications and changes may be effected without departing from the scope thereof. The scope of the present disclosure is limited only by the appended claims.

Claims (10)

1. A data transmission method, comprising:
receiving a data transmission request sent by a client;
feeding back a target address set to the client based on the data transmission request, wherein the target address set comprises target addresses corresponding to ISPs respectively;
respectively establishing connection with the client through the target addresses respectively corresponding to the ISPs to obtain a plurality of data transmission links;
receiving a data packet transmitted by a client through a current data transmission link, wherein the current data transmission link is a data transmission link corresponding to an ISP adopted by the client in the plurality of data transmission links;
determining that an ISP adopted by the client changes based on the source address of the data packet;
sending the changed identification of the data transmission link corresponding to the ISP to the client;
and switching the current data transmission link to a data transmission link corresponding to the identifier, and continuously receiving the data packet transmitted by the client.
2. The data transmission method of claim 1, wherein the determining that the internet service provider ISP employed by the client is changed based on the source address of the data packet comprises:
acquiring a source address of the data packet and a source address of a last received data packet;
and determining that the Internet service provider ISP adopted by the client changes under the condition that the source address of the data packet is inconsistent with the source address of the last received data packet.
3. A data transmission method, applied to a client, comprising:
sending a data transmission request to a server;
receiving a target address set fed back by the server based on the data transmission request, wherein the target address set comprises target addresses corresponding to ISPs respectively;
respectively establishing connection with the server through the target addresses respectively corresponding to the ISPs to obtain a plurality of data transmission links;
transmitting a data packet to a server through a current data transmission link, wherein the current data transmission link is a data transmission link corresponding to an ISP adopted by the client in the plurality of data transmission links;
receiving an identifier of a data transmission link corresponding to a changed Internet Service Provider (ISP) sent by the server, wherein the changed ISP is determined based on a source address of the data packet;
and switching the current data transmission link to a data transmission link corresponding to the identifier, and continuing to transmit the data packet to the server.
4. The data transmission method according to claim 3, wherein the receiving the identifier of the data transmission link corresponding to the changed ISP sent by the server includes:
and receiving a data transmission link switching notification sent by the server, wherein the data transmission link switching notification comprises the identification of the data transmission link corresponding to the changed ISP.
5. A data transmission apparatus, comprising:
the data packet receiving unit is configured to receive a data transmission request sent by the client; feeding back a target address set to the client based on the data transmission request, wherein the target address set comprises target addresses corresponding to ISPs respectively; respectively establishing connection with the client through the target addresses respectively corresponding to the ISPs to obtain a plurality of data transmission links; receiving a data packet transmitted by a client through a current data transmission link, wherein the current data transmission link is a data transmission link corresponding to an ISP adopted by the client in the plurality of data transmission links;
a determining unit configured to determine that an internet service provider ISP employed by the client has changed based on a source address of the data packet;
an identifier sending unit configured to send, to the client, an identifier of a data transmission link corresponding to the changed ISP;
and the switching unit is configured to switch the current data transmission link to the data transmission link corresponding to the identifier, and continuously receive the data packet transmitted by the client.
6. The data transmission apparatus according to claim 5, wherein the determination unit is further configured to acquire a source address of the data packet and a source address of a received previous data packet; and determining that the Internet service provider ISP adopted by the client changes under the condition that the source address of the data packet is inconsistent with the source address of the last received data packet.
7. A data transmission apparatus, for use in a client, comprising:
a data packet sending unit configured to send a data transmission request to a server; receiving a target address set fed back by the server based on the data transmission request, wherein the target address set comprises target addresses corresponding to ISPs respectively; respectively establishing connection with the server through the target addresses respectively corresponding to the ISPs to obtain a plurality of data transmission links; transmitting a data packet to a server through a current data transmission link, wherein the current data transmission link is a data transmission link corresponding to an ISP adopted by the client in the plurality of data transmission links;
an identifier receiving unit, configured to receive an identifier of a data transmission link corresponding to a changed internet service provider ISP sent by the server, where the changed ISP is determined based on a source address of the data packet;
and the switching unit is configured to switch the current data transmission link to the data transmission link corresponding to the identifier, and continue to transmit the data packet to the server.
8. The data transmission apparatus according to claim 7, wherein the identifier receiving unit is further configured to receive a data transmission link switching notification sent by the server, where the data transmission link switching notification includes an identifier of a data transmission link corresponding to the changed ISP.
9. An electronic device, comprising:
a processor;
a memory for storing the processor-executable instructions;
wherein the processor is configured to execute the instructions to implement the data transmission method of any one of claims 1 to 4.
10. A computer-readable storage medium, wherein instructions in the computer-readable storage medium, when executed by at least one processor, cause the at least one processor to perform the data transmission method of any one of claims 1 to 4.
CN202111580117.8A 2021-12-22 2021-12-22 Data transmission method and device Active CN114285798B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202111580117.8A CN114285798B (en) 2021-12-22 2021-12-22 Data transmission method and device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202111580117.8A CN114285798B (en) 2021-12-22 2021-12-22 Data transmission method and device

Publications (2)

Publication Number Publication Date
CN114285798A CN114285798A (en) 2022-04-05
CN114285798B true CN114285798B (en) 2023-12-26

Family

ID=80873688

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202111580117.8A Active CN114285798B (en) 2021-12-22 2021-12-22 Data transmission method and device

Country Status (1)

Country Link
CN (1) CN114285798B (en)

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2003073700A2 (en) * 2002-02-21 2003-09-04 Hewlett-Packard Company A system and method for providing personal connectivity between a computing device and a computer network
CN105847875A (en) * 2016-05-13 2016-08-10 武汉斗鱼网络科技有限公司 Live video broadcast platform watching line intelligent choosing method and system
CN108833567A (en) * 2018-06-26 2018-11-16 深圳市网心科技有限公司 Selection method, system and the dispatch server of optimal data transfer server
CN112822088A (en) * 2020-12-31 2021-05-18 山石网科通信技术股份有限公司 Network connection method and device, electronic equipment, processor and storage medium
CN113133076A (en) * 2019-12-30 2021-07-16 荣耀终端有限公司 Communication method, related equipment and communication system

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2003073700A2 (en) * 2002-02-21 2003-09-04 Hewlett-Packard Company A system and method for providing personal connectivity between a computing device and a computer network
CN105847875A (en) * 2016-05-13 2016-08-10 武汉斗鱼网络科技有限公司 Live video broadcast platform watching line intelligent choosing method and system
CN108833567A (en) * 2018-06-26 2018-11-16 深圳市网心科技有限公司 Selection method, system and the dispatch server of optimal data transfer server
CN113133076A (en) * 2019-12-30 2021-07-16 荣耀终端有限公司 Communication method, related equipment and communication system
CN112822088A (en) * 2020-12-31 2021-05-18 山石网科通信技术股份有限公司 Network connection method and device, electronic equipment, processor and storage medium

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
企业多ISP 线路负载均衡解决方案;江明;《电子技术与软件工程》;全文 *

Also Published As

Publication number Publication date
CN114285798A (en) 2022-04-05

Similar Documents

Publication Publication Date Title
US11503112B2 (en) Selective access of multi-rate data from a server and/or peer
US10666522B2 (en) Server side content delivery network quality of service
US9391856B2 (en) End-to-end monitoring and optimization of a content delivery network using anycast routing
US8090813B2 (en) Methods and apparatus for data transfer
CN107733950B (en) Method and device for accessing website
TWI535255B (en) A metod and device thereof for sending business requirements
US10630531B2 (en) Propagating state information to network nodes
CN106411629B (en) Method and equipment for monitoring state of CDN node
KR20130088172A (en) Method and system for network element service recovery
US11252267B2 (en) Content stream integrity and redundancy system
TW201505426A (en) Method for adapting the downloading behavior of a client terminal configured to receive multimedia content, and corresponding terminal
WO2012075970A1 (en) Method, device and system for obtaining media content
CN109964493B (en) Network connection detection method, device, terminal and computer storage medium
CN110312140B (en) Live broadcast data processing method, device and system and computer readable storage medium
US7502863B2 (en) Method of distributing stream data and system thereof
JP7180954B2 (en) Method and apparatus for conditional broadcasting of network configuration data
US9509777B2 (en) Connection method and management server
CN110661673A (en) Heartbeat detection method and device
CN112532714B (en) Data processing method, processing device, server and storage medium
CN114285798B (en) Data transmission method and device
CN114928615B (en) Load balancing method, device, equipment and readable storage medium
CN112822088B (en) Network connection method and device, electronic equipment, processor and storage medium
CN113411228B (en) Network condition determining method and server
CN115996188A (en) Service scheduling method, device, equipment and computer readable storage medium
CN110474807A (en) A kind of log processing method and 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