CN110545566B - Link switching method, device, equipment and storage medium - Google Patents

Link switching method, device, equipment and storage medium Download PDF

Info

Publication number
CN110545566B
CN110545566B CN201910859299.9A CN201910859299A CN110545566B CN 110545566 B CN110545566 B CN 110545566B CN 201910859299 A CN201910859299 A CN 201910859299A CN 110545566 B CN110545566 B CN 110545566B
Authority
CN
China
Prior art keywords
link
quality
client
switching
packet
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
CN201910859299.9A
Other languages
Chinese (zh)
Other versions
CN110545566A (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.)
Tencent Technology Shenzhen Co Ltd
Original Assignee
Tencent Technology Shenzhen 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 Tencent Technology Shenzhen Co Ltd filed Critical Tencent Technology Shenzhen Co Ltd
Priority to CN201910859299.9A priority Critical patent/CN110545566B/en
Publication of CN110545566A publication Critical patent/CN110545566A/en
Application granted granted Critical
Publication of CN110545566B publication Critical patent/CN110545566B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04WWIRELESS COMMUNICATION NETWORKS
    • H04W36/00Hand-off or reselection arrangements
    • H04W36/0005Control or signalling for completing the hand-off
    • H04W36/0011Control or signalling for completing the hand-off for data sessions of end-to-end connection
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04WWIRELESS COMMUNICATION NETWORKS
    • H04W36/00Hand-off or reselection arrangements
    • H04W36/0005Control or signalling for completing the hand-off
    • H04W36/0083Determination of parameters used for hand-off, e.g. generation or modification of neighbour cell lists
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04WWIRELESS COMMUNICATION NETWORKS
    • H04W36/00Hand-off or reselection arrangements
    • H04W36/24Reselection being triggered by specific parameters
    • H04W36/30Reselection being triggered by specific parameters by measured or perceived connection quality data

Abstract

The embodiment of the application discloses a link switching method, which is used for realizing seamless switching of a communication link in a link layer in a communication process after a network environment changes, so that communication can be continued without reestablishing the communication link as in an application layer, the bandwidth cost in the communication process is reduced, and the user experience is improved. The method for switching the link provided by the embodiment of the application comprises the following steps: determining a first link currently used for communication between a first client and a second client; monitoring a first quality of a first link and a second quality of a second link within a preset time, wherein the first link and the second link are deployed in a link layer; determining a mass difference between the first mass and the second mass; and determining a switching result according to the quality difference, wherein the switching result is used for indicating whether to switch a first link currently used for communication between the first client and the second client to a second link.

Description

Link switching method, device, equipment and storage medium
Technical Field
The embodiment of the application relates to the technical field of communication, in particular to a method, a device, equipment and a storage medium for link switching.
Background
In the end-to-end network communication, the user experience can be better improved due to lower delay and stable transmission speed. How to change communication strategies and communication means in real time according to the change of the current network in a complex and changeable network environment is a key part in the network communication technology.
Currently, two approaches are commonly used when implementing peer-to-peer communication. The first means is realized by adopting a server-to-server (P2S) link which is transferred by a server; another approach is to establish point-to-point (P2P) links directly from end to end. Before communication begins, the quality of the two links is compared, the link of the superior link is selected to enter a ready state and is used as a subsequent communication channel, and the other link is idle.
However, at present, both links for realizing end-to-end communication are deployed in an application layer, and once a network environment changes in a communication process, the quality of a communication link originally selected to have a better communication quality is seriously reduced, delay and speed jitter are increased or a network is disconnected, and since both links are deployed in the application layer, the communication link needs to be reestablished to continue the communication, which greatly increases the bandwidth cost in the communication process and reduces user experience.
Disclosure of Invention
The embodiment of the application provides a link switching method, a link switching device, link switching equipment and a storage medium, which are used for realizing seamless switching of a communication link at a link layer, reducing bandwidth cost in a communication process and improving user experience.
In a first aspect, an embodiment of the present application provides a method for link handover, including:
determining a first link currently used for communication between a first client and a second client;
monitoring a first quality of the first link and a second quality of a second link within a preset time, wherein the first link and the second link are deployed at a link layer;
determining a mass difference between the first mass and the second mass;
and determining a switching result according to the quality difference, wherein the switching result is used for indicating whether to switch a first link currently used for communication between the first client and the second client to the second link.
In a second aspect, an embodiment of the present application provides an apparatus for link switching, where the apparatus for link switching includes:
a first determining unit, configured to determine a first link currently used for communication between a first client and a second client;
a monitoring unit, configured to monitor, within a preset time duration, a first quality of the first link and a second quality of a second link that are determined by the first determining unit, where the first link and the second link are deployed in a link layer;
a second determining unit, configured to determine a quality difference between the first quality and the second quality monitored by the monitoring unit;
a third determining unit, configured to determine a switching result according to the quality difference determined by the second determining unit, where the switching result is used to indicate whether to switch a first link currently used for communication between the first client and the second client to the second link.
In a possible design, in a first possible implementation manner of the second aspect of the embodiment of the present application, the monitoring unit 502 includes:
an obtaining module, configured to obtain a service data packet from the first link and obtain a second detection packet from the second link, where a packet header of the service data packet carries first detection information and a packet header of the second detection packet carries second detection information;
the analysis module is used for analyzing the service data packet and the second detection packet obtained by the obtaining module to obtain the first detection information and the second detection information;
a detection module, configured to detect, within the preset time period, a first quality condition of the service data packet in the first link according to the first detection information obtained by the analysis module, and detect, according to the second detection information obtained by the analysis module, a second quality condition of the second probe packet in the second link;
a determining module, configured to determine a first quality of the first link according to the first quality condition detected by the detecting module, and determine a second quality of the second link according to the second quality condition detected by the detecting module.
In one possible design, in a second possible implementation manner of the second aspect of the embodiment of the present application, the third determining unit includes:
a first determining module, configured to determine a first handover result when the quality difference is smaller than a preset threshold, where the first handover result is used to indicate that the first link is not to be handed over to the second link;
a second determining module, configured to determine a second handover result when the quality difference is greater than or equal to the preset threshold, where the second handover result is used to indicate that the first link is handed over to the second link.
In one possible design, in a third possible implementation of the second aspect of the embodiments of the present application,
the acquisition module: the first detection packet of the first link is acquired within the preset time before a second switching result is determined, and the second detection packet carries third detection information; the detecting module 5023 is configured to detect a speed and a frequency of the second probe packet in the first link according to the third detection information; the determining module 5024 is configured to determine that the quality difference is greater than or equal to the preset threshold value when the speed and the frequency do not meet preset conditions.
In a third aspect, an embodiment of the present application provides a computer apparatus, including:
the method comprises the following steps: an input/output (I/O) interface, a processor and a memory,
the memory stores program instructions;
the processor is adapted to execute program instructions stored in the memory for implementing the method according to any one of the possible implementations of the first aspect as described above.
A fourth aspect of the present application provides a computer-readable storage medium having stored thereon computer-executable instructions for performing the method according to any one of the possible implementation manners of the first aspect and the first aspect.
A fifth aspect of embodiments of the present application provides a computer program product comprising instructions which, when run on a computer or processor, cause the computer or processor to perform the method of any of the above aspects.
According to the technical scheme, the embodiment of the application has the following advantages:
in the embodiment of the application, the first link and the second link are deployed in the link layer, so that after the first quality of the first link and the second quality of the second link are monitored within a preset time, a quality difference between the first quality and the second quality is determined, and a switching result for indicating whether to switch the first link currently used for communication between the first client and the second client to the second link is determined according to the quality difference. Therefore, in the communication process after the network environment changes, seamless switching of the communication link is realized in the link layer, so that communication can be continued without reestablishing the communication link as in the application layer, the bandwidth cost in the communication process is reduced, and the user experience is improved.
Drawings
In order to more clearly illustrate the embodiments of the present application 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 application, and for those skilled in the art, other drawings can be obtained according to the drawings without creative efforts.
Fig. 1 is a schematic diagram of a network structure provided in an embodiment of the present application;
FIG. 2 is an alternative structure diagram of the distributed system applied to the blockchain system according to the embodiment of the present invention;
FIG. 3 is an alternative block structure according to an embodiment of the present disclosure;
fig. 4 is a schematic diagram of an embodiment of a method for link switching provided in an embodiment of the present application;
fig. 5 is a schematic diagram of an embodiment of a link switching apparatus provided in an embodiment of the present application;
fig. 6 is a schematic diagram of another embodiment of a link switching apparatus provided in an embodiment of the present application;
fig. 7 is a schematic diagram of another embodiment of a link switching apparatus provided in an embodiment of the present application;
fig. 8 is a schematic structural diagram of a computer device provided in an embodiment of the present application.
Detailed Description
The embodiment of the application provides a link switching method, a link switching device, link switching equipment and a storage medium, which are used for realizing seamless switching of a communication link at a link layer, reducing bandwidth cost in a communication process and improving user experience.
The technical solutions in the embodiments of the present application will be clearly and completely described below with reference to the drawings in the embodiments of the present application, and it is obvious that the described embodiments are only a part of the embodiments of the present application, 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 application.
The terms "first," "second," "third," "fourth," and the like in the description and in the claims of the present application and in the drawings described above, if any, are used for distinguishing between similar elements and not necessarily for describing a particular sequential or chronological order. It is to be understood that the data so used is interchangeable under appropriate circumstances such that the embodiments of the application described herein are capable of operation in sequences other than those illustrated or described herein. Furthermore, the terms "comprises," "comprising," and "having," and any variations thereof, are intended to cover a non-exclusive inclusion, such that a process, method, system, article, or apparatus that comprises a list of steps or elements is not necessarily limited to those steps or elements expressly listed, but may include other steps or elements not expressly listed or inherent to such process, method, article, or apparatus. The naming or numbering of the steps appearing in the present application does not mean that the steps in the method flow have to be executed in the chronological/logical order indicated by the naming or numbering, and the named or numbered process steps may be executed in a modified order depending on the technical purpose to be achieved, as long as the same or similar technical effects are achieved.
The following introduces a system architecture to which the embodiments of the present application are applicable:
the method provided by the embodiment of the application is mainly applied to a scene of service data transmission through a link. For example, users need to perform network communication in a game, and at this time, it is required that service data that the local user needs to send to the opposite user is transmitted as fast as possible over a communication link, and it is also required to ensure a low network delay and improve user experience. Besides, similar scenes such as voice, video and the like also need to be transmitted through the link. Please refer to fig. 1, which is a schematic diagram of a network structure according to an embodiment of the present application. As shown in fig. 1, the switching system mainly includes a first terminal installed with a first client and a second terminal installed with a second client. Wherein, a corresponding link switching device may be deployed on the first client or the second client, such as: switching components, etc.; for example: if the first client sends the service data to the second client, the switching component can be deployed on the first client; otherwise, if the second client sends the service data to the first client, the switching component may be deployed on the second client. In addition, the above-mentioned switching component may automatically establish a first link between the first client and the second client by sending the first data packet, and then implement the exchange of an internet protocol address (IP) port and an external IP port between the first client and the second client based on the first link. After that, the first client and the second client can punch holes in parallel according to the intranet IP port and the extranet IP port of the opposite terminal, so that a second link between the first client and the second client is established. It should be understood that, in the embodiment of the present application, a method for switching a link will be described in detail by taking a switching component as an example, but an apparatus for executing the method of the embodiment of the present application is not limited to the switching component, and may also be a user of the switching component, that is, a first client, a second client, a first terminal, a second terminal, or the like, which is not limited in the embodiment of the present application.
It should be noted that the first client described above may be installed in the first terminal, and the second client may be installed in the second terminal. And the first terminal and the second terminal may be a block link point device in the block chain, that is, the first terminal and the second terminal may be a node in the block chain. The system related to the embodiment of the invention can be a distributed system formed by connecting a client, a plurality of nodes (any form of computing equipment in an access network, such as a server and a user terminal) through a network communication mode. Taking the distributed system as an example of a blockchain system, referring to fig. 2, fig. 2 is an optional structural schematic diagram of the distributed system 200 applied to the blockchain system, which is formed by a plurality of nodes (computing devices in any form in an access network, such as servers and user terminals) and clients, and a peer-to-peer (P2P) network is formed between the nodes, and the P2P protocol is an application layer protocol operating on a Transmission Control Protocol (TCP) protocol. In a distributed system, any machine, such as a server or a terminal, can join to become a node, and the node comprises a hardware layer, a middle layer, an operating system layer and an application layer. And the above-mentioned switching components are included in the link layer.
Referring to the functions of each node in the blockchain system shown in fig. 2, the functions involved include:
1) routing, a basic function that a node has, is used to support communication between nodes.
Besides the routing function, the node may also have the following functions:
2) the application is used for being deployed in a block chain, realizing specific services according to actual service requirements, recording data related to the realization functions to form recording data, carrying a digital signature in the recording data to represent a source of task data, and sending the recording data to other nodes in the block chain system, so that the other nodes add the recording data to a temporary block when the source and integrity of the recording data are verified successfully.
For example, the services implemented by the application include:
2.1) team game, which is used to provide the function of data exchange between games, including initiating team formation request, exchanging game props between both parties in the process of team formation game, etc. (i.e. sending the request record in the current team game, the exchange record of game props, etc. to other nodes in the block chain system, after the other nodes are successfully verified, storing the record data in the temporary blocks of the block chain as the response for acknowledging the request and the exchange of game props;
3) and the Block chain comprises a series of blocks (blocks) which are mutually connected according to the generated chronological order, new blocks cannot be removed once being added into the Block chain, and recorded data submitted by nodes in the Block chain system are recorded in the blocks.
Referring to fig. 3, fig. 3 is an optional schematic diagram of a Block Structure (Block Structure) provided in this embodiment, each Block includes a hash value of a transaction record stored in the Block (hash value of the Block) and a hash value of a previous Block, and the blocks are connected by the hash values to form a Block chain. The block may include information such as a time stamp at the time of block generation. A block chain (Blockchain), which is essentially a decentralized database, is a string of data blocks associated by using cryptography, and each data block contains related information for verifying the validity (anti-counterfeiting) of the information and generating a next block.
The handover method in this embodiment may be applied to the system architectures shown in fig. 1 and fig. 2, and may also be applied to other system architectures, which are not limited herein.
To better understand the proposed solution in the embodiment of the present application, a detailed flow in the embodiment is described below, please refer to fig. 4, which is a schematic diagram of an embodiment of a method for link handover provided in the embodiment of the present application, where the method includes:
401. a first link currently used for communication between a first client and a second client is determined.
In this embodiment, the switching component is actually a device for performing seamless switching on the first link and the second link on a link layer in combination with end-to-end connection between the first link and the second link, and the first client or the second client only needs to call a packet receiving and sending interface corresponding to the switching component, and the switching component can perform free switching on the communication link on the link layer in the process of communication between the first client and the second client.
The first link mentioned above may be the P2S link established by the switching component first sending the first packet.
402. Monitoring a first quality of a first link and a second quality of a second link within a preset time, wherein the first link and the second link are deployed in a link layer.
In this embodiment, if the communication link between the first client and the second client is to be directly and freely switched in the link layer through the switching component, starting from the aspect of determining the quality of the communication link, a link with a better current quality may be selected as the link in the current communication process. If the switching component determines that the first link is the current communication link between the first client and the second client when the communication process starts, after a period of time elapses, a phenomenon that the transmission effect is poor due to link jitter caused by changes in network environment and the like may occur, and the switching component may monitor the first quality of the first link and the second quality of the second link simultaneously within a preset time period. For example: the first link is always used for communication within 0-5s during communication, and if the link jitter occurs at 6s, the switching component may select to monitor the first quality of the first link and the second quality of the second link simultaneously within a preset time period, for example, within a time period of 6s-10s, so as to select a communication link with a better quality as the current communication process. Of course, the switching component is in a state of monitoring the quality of the first link and the second link in real time during the whole communication process, for example, the switching component is also required to monitor the quality of the two links within the time period of 10s to 15 s.
It should be noted that the preset time period described above can be set by a user according to actual application requirements, and 0-5s,6s-10s, and the like in this embodiment are examples for illustrating the embodiment of the present application in detail, and should not be limited thereto.
Optionally, in other embodiments, for the handover component to monitor the quality of the first link and the second link, the following may be performed: acquiring a service data packet from the first link and acquiring a first detection packet from the second link, wherein a packet header of the service data packet carries first detection information, and a packet header of the first detection packet carries second detection information; analyzing the service data packet and the first detection packet to obtain the first detection information and the second detection information; detecting a first quality condition of the service data packet in the first link according to the first detection information within the preset time length, and detecting a second quality condition of the second detection packet in the second link according to the second detection information; determining a first quality of the first link based on the first quality condition and determining a second quality of the second link based on the second quality condition.
In this embodiment, in order not to excessively increase the burden in the network communication process, the first detection information may be added in the packet header of the service data packet, so that the switching component may acquire the service data packet from the first link in the communication process, and then analyze the first detection information carried by the packet header in the service data packet, so as to detect the first quality condition of the first link by using the first detection information, and determine the first quality of the first link according to the first quality condition. In addition, since the second link is an alternative link that can be selected when the first link is in poor quality, for the second quality of the second link, second detection information may also be added to the packet header of the first probe packet, so that the switching component may acquire the first probe packet from the second link in the communication process, and analyze second detection information carried by the packet header in the first probe packet from the first probe packet, so as to detect the second quality condition of the second link according to the second detection information, thereby determining the second quality of the second link according to the second quality condition.
Optionally, in other embodiments, the above-mentioned first quality condition may include, but is not limited to, link delay information, fluctuation information or packet loss rate during transmission of the service data packet in the first link; of course, the above-mentioned second quality condition may include, but is not limited to, link delay information, fluctuation information or packet loss rate during transmission of the service data packet in the second link. Accordingly, the first quality of the first link or the second quality of the second link may be determined from aspects including, but not limited to, link delay information, fluctuation information, or packet loss rate. For example: assuming that the quality is 100 points, taking the packet loss rate as an example, the handover component detects that the packet loss rate of the first link is 35% and the packet loss rate of the second link is 28%, it is obvious that the quality of the first link is (1-35%). 100 ═ 65 points, and the quality of the second link is (1-28%). 100 ═ 72 points.
403. A mass difference between the first mass and the second mass is determined.
In this embodiment, the quality difference between the first quality and the second quality is determined, mainly because when the first link is assumed to have a negligible quality degradation, the link does not need to be switched, and communication can still be performed through the first link. Therefore, whether the link is switched or not is determined according to the quality difference between the two links, network jitter caused by switching in the communication process can be reduced, and the user experience is maximized.
It should be understood that the above-mentioned quality differences can be expressed in absolute value. For example: based on the example described in step 402, it is determined that the first quality of the first link is 65 points and the second quality of the second link is 72 points from the point of the packet loss rate, and then the quality difference is |65-72| -7 points.
404. And determining a switching result according to the quality difference, wherein the switching result is used for indicating whether to switch a first link currently used for communication between the first client and the second client to a second link.
In this embodiment, the quality difference is used to determine whether to switch the first link to the second link, i.e. to determine the switching result. The above mentioned handover result comprises two branches, first: the switching result is that the first link is switched to the second link; secondly, the method comprises the following steps: the switching results in the first link not being switched to the second link, mainly because the first link has a negligible quality degradation, and communication can still continue through the first link.
Optionally, in other embodiments, whether to switch the first link is determined by setting a certain preset threshold, which is as follows: when the quality difference is smaller than a preset threshold value, determining a first switching result, wherein the first switching result is used for indicating that the first link is not switched to the second link; and when the quality difference is greater than or equal to the preset threshold, determining a second switching result, wherein the second switching result is used for indicating that the first link is switched to the second link.
In this embodiment, the preset threshold mentioned above may be set by a user according to an actual application situation, and is not specifically limited in this embodiment. For example: assuming that the preset threshold is 10, the difference between the quality of the first link and the quality of the second link is 7 points based on the example described in step 403. Obviously, the quality difference is smaller than the preset threshold, and the switching component determines that the first switching result for switching the first link to the second link is not needed. For another example: assuming that the preset threshold is 5, based on the example described in step 403, the quality difference between the first link and the second link is 7 minutes, and obviously the quality difference is greater than the preset threshold, then the switching component needs to switch the first link to the second link, so that the first client and the second client seamlessly switch from the first link to the second link in the link layer, thereby realizing communication between the two ends through the second link.
Optionally, in other embodiments, to ensure the reasonability of the handover and avoid blind handover, before determining the second handover result, a second probe packet of the first link may be further obtained within the preset time duration, where the second probe packet carries third detection information; detecting the speed and the frequency of the second probe packet in the first link according to the third detection information; and if the speed and the frequency do not meet preset conditions, determining that the quality difference is greater than or equal to the preset threshold.
In this embodiment, a second probe packet of a first link is obtained, and third detection information carried in the second probe packet is analyzed from the second probe packet, so as to detect a transmission speed and a frequency of the second probe packet in the first link, and if the transmission speed and the frequency do not satisfy a preset condition, that is, are lower than a threshold set by a user, it is largely indicated that the first quality of the first link is poor, at this time, a switching component may determine that a quality difference between the first quality of the first link and the second quality of the second link is greater than or equal to the preset threshold, at this time, the switching component needs to switch the first link to the second link, so that a seamless transition from the first link to the second link is performed between a first client and a second client in a link layer, and communication between the two ends is achieved through the second link.
In the embodiment of the application, the first link and the second link are deployed in a link layer, so that after monitoring the first quality of the first link and the second quality of the second link within a preset time, the switching component determines a quality difference between the first quality and the second quality, and determines a switching result for indicating whether to switch the first link currently used for communication between the first client and the second client to the second link according to the quality difference. Therefore, in the communication process after the network environment changes, the communication link is seamlessly switched on the link layer through the switching component, so that the communication can be continued without reestablishing the communication link as in the application layer, the bandwidth cost in the communication process is reduced, and the user experience is improved.
The scheme provided by the embodiment of the application is mainly introduced from the perspective of a method. It is to be understood that the hardware structure and/or software modules for performing the respective functions are included to realize the above functions. Those of skill in the art will readily appreciate that the various illustrative modules and algorithm steps described in connection with the embodiments disclosed herein may be implemented as hardware or combinations of hardware and computer software. Whether a function is performed as hardware or computer software drives hardware depends upon the particular application and design constraints imposed on the solution. Skilled artisans may implement the described functionality in varying ways for each particular application, but such implementation decisions should not be interpreted as causing a departure from the scope of the present application.
In the embodiment of the present application, functional modules of the apparatus may be divided according to the above method example, for example, each functional module may be divided corresponding to each function, or two or more functions may be integrated into one processing module. The integrated module can be realized in a hardware mode, and can also be realized in a software functional module mode. It should be noted that, in the embodiment of the present application, the division of the module is schematic, and is only one logic function division, and there may be another division manner in actual implementation.
Referring to fig. 5, fig. 5 is a schematic view of an embodiment of a link switching apparatus provided in an embodiment of the present application, where the link switching apparatus may include:
a first determining unit 501, configured to determine a first link currently used for communication between a first client and a second client;
a monitoring unit 502, configured to monitor, within a preset time duration, the first quality of the first link and the second quality of the second link that are determined by the first determining unit 501, where the first link and the second link are deployed in a link layer;
a second determining unit 503, configured to determine a quality difference between the first quality and the second quality monitored by the monitoring unit 502;
a third determining unit 504, configured to determine a switching result according to the quality difference determined by the second determining unit 503, where the switching result is used to indicate whether to switch a first link currently used for communication between the first client and the second client to the second link.
Optionally, on the basis of the embodiment corresponding to fig. 5, please refer to fig. 6, which is a schematic diagram of another embodiment of the apparatus for link switching according to the embodiment of the present application, where the monitoring unit 502 includes:
an obtaining module 5021, configured to obtain a service data packet from the first link and obtain a second probe packet from the second link, where a packet header of the service data packet carries first detection information and a packet header of the second probe packet carries second detection information;
an analyzing module 5022, configured to analyze the service data packet and the second probing packet obtained by the obtaining module 5021 to obtain the first detection information and the second detection information;
a detecting module 5023, configured to detect, within the preset time duration, a first quality condition of the service data packet in the first link according to the first detection information obtained by the analyzing module 5022, and detect a second quality condition of the second probe packet in the second link according to the second detection information obtained by the analyzing module;
a determining module 5024, configured to determine a first quality of the first link according to the first quality condition detected by the detecting module 5023, and determine a second quality of the second link according to the second quality condition detected by the detecting module.
Optionally, on the basis of the embodiment corresponding to fig. 5 or fig. 6, please refer to fig. 7, which is a schematic diagram of another embodiment of the apparatus for switching a link according to the embodiment of the present application, where the third determining unit 504 includes:
a first determining module 5041, configured to determine a first handover result when the quality difference is smaller than a preset threshold, where the first handover result is used to indicate that the first link is not to be handed over to the second link;
a second determining module 5042, configured to determine a second handover result when the quality difference is greater than or equal to the preset threshold, where the second handover result is used to indicate that the first link is handed over to the second link.
Optionally, on the basis of the embodiment corresponding to the foregoing 7, in another embodiment of the switching assembly provided in this embodiment of the application, the obtaining module 5021: the first detection packet of the first link is acquired within the preset time before a second switching result is determined, and the second detection packet carries third detection information; the detecting module 5023 is configured to detect a speed and a frequency of the second probe packet in the first link according to the third detection information; the determining module 5024 is configured to determine that the quality difference is greater than or equal to the preset threshold value when the speed and the frequency do not meet preset conditions.
Optionally, on the basis of the embodiment corresponding to fig. 3, in another embodiment of the apparatus for switching a link provided in the embodiment of the present application, the first quality condition includes link delay information, fluctuation information, or a packet loss rate, and the second quality condition includes link delay information, fluctuation information, or a packet loss rate.
In this embodiment of the application, since the first link and the second link are deployed in the link layer, after the monitoring unit 502 monitors the first quality of the first link and the second quality of the second link within a preset time, the second determining unit 503 determines a quality difference between the first quality and the second quality, and thus the third determining unit 503 determines a switching result indicating whether to switch the first link currently used for communication between the first client and the second client to the second link according to the quality difference. Therefore, in the communication process after the network environment changes, the communication link is seamlessly switched in the link layer, so that the communication can be continued without reestablishing the communication link as in the application layer, the bandwidth cost in the communication process is reduced, and the user experience is improved.
The above describes the link switching apparatus in the embodiment of the present application from the perspective of the modular functional entity, and the following describes the computer device in the embodiment of the present application from the perspective of hardware processing. Fig. 8 is a schematic structural diagram of a computer device according to an embodiment of the present disclosure, where the computer device may include the above-described link switching apparatus, and the like, and the computer device may have a relatively large difference due to different configurations or performances, and the computer device may include at least one processor 601, a communication line 607, a memory 603, and at least one communication interface 604.
The processor 601 may be a general processing unit (CPU), a microprocessor, an application-specific integrated circuit (server IC), or one or more ICs for controlling the execution of programs in accordance with the present invention.
The communication link 607 may include a path for transmitting information between the aforementioned components.
The communication interface 604 may be any device, such as a transceiver, for communicating with other devices or communication networks, such as an ethernet, a Radio Access Network (RAN), a Wireless Local Area Network (WLAN), etc.
The memory 603 may be a read-only memory (ROM) or other type of static storage device that may store static information and instructions, a Random Access Memory (RAM) or other type of dynamic storage device that may store information and instructions, and may be separate and coupled to the processor via a communication link 607. The memory may also be integral to the processor.
The memory 603 is used for storing computer-executable instructions for executing the present application, and is controlled by the processor 601 to execute the instructions. The processor 601 is configured to execute computer-executable instructions stored in the memory 603, so as to implement the link switching method provided by the above-mentioned embodiment of the present application.
Optionally, the computer-executable instructions in the embodiments of the present application may also be referred to as application program codes, which are not specifically limited in the embodiments of the present application.
In particular implementations, the computer device may include multiple processors, such as processor 601 and processor 602 in FIG. 8, for example, as an embodiment. Each of these processors may be a single-core (single-CPU) processor or a multi-core (multi-CPU) processor. A processor herein may refer to one or more devices, circuits, and/or processing cores for processing data (e.g., computer program instructions).
In particular implementations, the computer device may also include an output device 605 and an input device 606, as one embodiment. Output device 605 is in communication with processor 601 and may display information in a variety of ways. The input device 606 is in communication with the processor 601 and may receive user input in a variety of ways. For example, the input device 606 may be a mouse, a touch screen device, or a sensing device, among others.
The computer apparatus may be a general-purpose device or a special-purpose device. In particular implementations, the computer device may be a desktop, laptop, nas server, wireless end device, embedded device, or a device with a similar structure as in fig. 8. The embodiment of the application does not limit the type of the computer equipment.
In the embodiment of the present application, the processor 601 included in the computer device further has the following functions:
determining a first link currently used for communication between a first client and a second client;
monitoring a first quality of the first link and a second quality of a second link within a preset time, wherein the first link and the second link are deployed at a link layer;
determining a mass difference between the first mass and the second mass;
and determining a switching result according to the quality difference, wherein the switching result is used for indicating whether to switch a first link currently used for communication between the first client and the second client to the second link.
In some embodiments of the present application, the processor 601 may also be specifically configured to,
acquiring a service data packet from the first link and acquiring a first detection packet from the second link, wherein a packet header of the service data packet carries first detection information, and a packet header of the first detection packet carries second detection information;
analyzing the service data packet and the first detection packet to obtain the first detection information and the second detection information;
detecting a first quality condition of the service data packet in the first link according to the first detection information within the preset time length, and detecting a second quality condition of the second detection packet in the second link according to the second detection information;
determining a first quality of the first link based on the first quality condition and determining a second quality of the second link based on the second quality condition.
In the embodiment of the present application, the processor 601 included in the computer device further has the following functions:
when the quality difference is smaller than a preset threshold value, determining a first switching result, wherein the first switching result is used for indicating that the first link is not switched to the second link;
and when the quality difference is greater than or equal to the preset threshold, determining a second switching result, wherein the second switching result is used for indicating that the first link is switched to the second link.
In the embodiment of the present application, the processor 601 included in the computer device further has the following functions:
before a second switching result is determined, a second detection packet of the first link is obtained within the preset time length, wherein the second detection packet carries third detection information;
detecting the speed and the frequency of the second probe packet in the first link according to the third detection information;
and if the speed and the frequency do not meet preset conditions, determining that the quality difference is greater than or equal to the preset threshold.
It is clear to those skilled in the art that, for convenience and brevity of description, the specific working processes of the above-described systems, apparatuses and units may refer to the corresponding processes in the foregoing method embodiments, and are not described herein again.
In the several embodiments provided in the present application, it should be understood that the disclosed system, apparatus and method may be implemented in other manners. For example, the above-described apparatus embodiments are merely illustrative, and for example, a division of a unit is merely a logical division, and an actual implementation may have another division, for example, a plurality of units or components may be combined or integrated into another system, or some features may be omitted, or not executed. In addition, the shown or discussed mutual coupling or direct coupling or communication connection may be an indirect coupling or communication connection through some interfaces, devices or units, and may be in an electrical, mechanical or other form.
Units described as separate parts may or may not be physically separate, and parts displayed as units may or may not be physical units, may be located in one place, or may be distributed on a plurality of network units. Some or all of the units can be selected according to actual needs to achieve the purpose of the solution of the embodiment.
In addition, functional units in the embodiments of the present application may be integrated into one processing unit, or each unit may exist alone physically, or two or more units are integrated into one unit. The integrated unit can be realized in a form of hardware, and can also be realized in a form of a software functional unit.
The integrated unit, if implemented in the form of a software functional unit and sold or used as a stand-alone product, may be stored in a computer readable storage medium. Based on such understanding, the technical solution of the present application may be substantially implemented or contributed to by the prior art, or all or part of the technical solution may be embodied in a software product, which is stored in a storage medium and includes instructions for causing a computer device (which may be a personal computer, a server, or a network device) to execute all or part of the steps of the method of the embodiments of the present application. And the aforementioned storage medium includes: various media capable of storing program codes, such as a usb disk, a removable hard disk, a read-only memory (ROM), a Random Access Memory (RAM), a magnetic disk, or an optical disk.
The above embodiments are only used to illustrate the technical solutions of the present application, and not to limit the same; although the present application has been described in detail with reference to the foregoing embodiments, it should be understood by those of ordinary skill in the art that: the technical solutions described in the foregoing embodiments may still be modified, or some technical features may be equivalently replaced; and such modifications or substitutions do not depart from the spirit and scope of the corresponding technical solutions in the embodiments of the present application.

Claims (8)

1. A method of link switching, comprising:
determining a first link currently used for communication between a first client and a second client;
monitoring a first quality of the first link and a second quality of a second link between the first client and the second client within a preset time, wherein the monitoring includes: acquiring a service data packet from the first link and acquiring a first detection packet from the second link, wherein a packet header of the service data packet carries first detection information, and a packet header of the first detection packet carries second detection information; analyzing the service data packet and the first detection packet to obtain the first detection information and the second detection information; detecting a first quality condition of the service data packet in the first link according to the first detection information within the preset time length, and detecting a second quality condition of the second detection packet in the second link according to the second detection information; determining a first quality of the first link according to the first quality condition and determining a second quality of the second link according to the second quality condition, wherein the first link and the second link are deployed at a link layer; the first link and the second link are determined by: establishing the first link by sending a first data packet between the first client and the second client through a switching component, wherein the first link is a P2S link; the switching component is a device which combines end-to-end connection of the first link and the second link and is used for seamlessly switching the first link and the second link on a link layer;
determining a mass difference between the first mass and the second mass;
and determining a switching result according to the quality difference, and calling a corresponding transceiving packet interface of a switching component to perform seamless switching on a communication link at a link layer when the switching result is a second switching result and the second switching result is used for indicating that the first link is switched to the second link, wherein the switching result is used for indicating whether the first link currently used for communication between the first client and the second client is switched to the second link.
2. The method of claim 1, wherein determining a handover result based on the quality difference comprises:
when the quality difference is smaller than a preset threshold value, determining a first switching result, wherein the first switching result is used for indicating that the first link is not switched to the second link;
and when the quality difference is greater than or equal to the preset threshold, determining a second switching result, wherein the second switching result is used for indicating that the first link is switched to the second link.
3. The method of claim 2, wherein prior to determining the second handover result, the method further comprises:
acquiring a second detection packet of the first link within the preset time length, wherein the second detection packet carries third detection information;
detecting the speed and the frequency of the second probe packet in the first link according to the third detection information;
and if the speed and the frequency do not meet preset conditions, determining that the quality difference is greater than or equal to the preset threshold.
4. The method of claim 1, wherein the first quality condition comprises link delay information, fluctuation information, or packet loss rate, and wherein the second quality condition comprises link delay information, fluctuation information, or packet loss rate.
5. The method of claim 1, wherein the first client is installed on a first terminal, and wherein the first terminal is a block link point device in a block chain;
the second client is installed on a second terminal, and the second terminal is block chain link point equipment in the block chain.
6. An apparatus for link switching, the apparatus comprising:
a first determining unit, configured to determine a first link currently used for communication between a first client and a second client;
a monitoring unit, configured to monitor, within a preset time duration, a first quality of the first link and a second quality of a second link between the first client and the second client, where the first link and the second link are deployed in a link layer, and the first quality of the first link and the second quality of the second link are determined by the first determining unit; the first link and the second link are determined by: establishing the first link by sending a first data packet between the first client and the second client through a switching component, wherein the first link is a P2S link; the switching component is a device which combines end-to-end connection of the first link and the second link and is used for seamlessly switching the first link and the second link on a link layer;
a second determining unit, configured to determine a quality difference between the first quality and the second quality monitored by the monitoring unit;
a third determining unit, configured to determine a switching result according to the quality difference determined by the second determining unit, and call a packet receiving and sending interface corresponding to a switching component to perform seamless switching on a communication link at a link layer when the switching result is a second switching result and the second switching result is used to indicate that the first link is switched to the second link, where the switching result is used to indicate whether to switch the first link currently used for communication between the first client and the second client to the second link;
wherein the monitoring unit comprises
An obtaining module, configured to obtain a service data packet from the first link and obtain a second detection packet from the second link, where a packet header of the service data packet carries first detection information and a packet header of the second detection packet carries second detection information;
the analysis module is used for analyzing the service data packet and the second detection packet obtained by the obtaining module to obtain the first detection information and the second detection information;
a detection module, configured to detect, within the preset time period, a first quality condition of the service data packet in the first link according to the first detection information obtained by the analysis module, and detect, according to the second detection information obtained by the analysis module, a second quality condition of the second probe packet in the second link;
a determining module, configured to determine a first quality of the first link according to the first quality condition detected by the detecting module, and determine a second quality of the second link according to the second quality condition detected by the detecting module.
7. A computer device, characterized in that the computer device comprises: an input/output (I/O) interface, a processor and a memory,
the memory has stored therein program instructions;
the processor is configured to execute program instructions stored in the memory to perform the method of any of claims 1 to 5.
8. A computer-readable storage medium comprising instructions that, when executed on a computer device, cause the computer device to perform the method of any of claims 1 to 5.
CN201910859299.9A 2019-09-11 2019-09-11 Link switching method, device, equipment and storage medium Active CN110545566B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201910859299.9A CN110545566B (en) 2019-09-11 2019-09-11 Link switching method, device, equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201910859299.9A CN110545566B (en) 2019-09-11 2019-09-11 Link switching method, device, equipment and storage medium

Publications (2)

Publication Number Publication Date
CN110545566A CN110545566A (en) 2019-12-06
CN110545566B true CN110545566B (en) 2021-04-27

Family

ID=68713308

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201910859299.9A Active CN110545566B (en) 2019-09-11 2019-09-11 Link switching method, device, equipment and storage medium

Country Status (1)

Country Link
CN (1) CN110545566B (en)

Families Citing this family (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113038316A (en) * 2019-12-25 2021-06-25 Oppo广东移动通信有限公司 Earphone control method and device, Bluetooth earphone and storage medium
CN111654440B (en) * 2020-02-29 2022-05-27 新华三技术有限公司合肥分公司 Intelligent routing method, electronic equipment and storage medium
CN112822102B (en) * 2020-12-30 2023-01-24 瑞斯康达科技发展股份有限公司 Link switching method, device, equipment, system and storage medium
CN113784411A (en) * 2021-09-13 2021-12-10 展讯通信(上海)有限公司 Link quality evaluation method, link switching method, device and storage medium
CN116708304B (en) * 2023-08-01 2023-11-14 腾讯科技(深圳)有限公司 Switching method and device of data transmission paths, storage medium and electronic equipment

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102984743A (en) * 2012-12-13 2013-03-20 迈普通信技术股份有限公司 Main/standby link switching method and wireless route equipment
CN103718532A (en) * 2013-03-26 2014-04-09 华为技术有限公司 Data transmission method, apparatus and terminal device
CN105897478A (en) * 2016-04-12 2016-08-24 腾讯科技(深圳)有限公司 Chain decision method and decision device
CN107682882A (en) * 2017-09-29 2018-02-09 努比亚技术有限公司 Data transmission method, mobile terminal and computer-readable recording medium
CN109831328A (en) * 2019-01-30 2019-05-31 杭州迪普科技股份有限公司 Switching method, device, the electronic equipment of intelligent route selection
CN110087335A (en) * 2019-04-30 2019-08-02 上海寰创通信科技股份有限公司 A kind of data transmission system and method polymerizeing a variety of Radio Links

Family Cites Families (10)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US7746799B2 (en) * 2003-06-20 2010-06-29 Juniper Networks, Inc. Controlling data link layer elements with network layer elements
FI20031414A (en) * 2003-09-30 2005-03-31 Nokia Corp Transmission of data in a mobile telephony in a wireless packet switching computer system
CN101183921B (en) * 2007-12-25 2012-04-18 杭州华三通信技术有限公司 Method and apparatus for guaranteeing continuousness of service stream
CN101309135B (en) * 2008-03-07 2011-06-22 华中科技大学 Method for enhancing reliability of industrial wireless sensor network
CN101309495B (en) * 2008-07-08 2011-08-10 中兴通讯股份有限公司 Carrier chain link failure diagnosis method and apparatus in base station device
CN102025594A (en) * 2009-09-14 2011-04-20 中国科学院声学研究所 Dynamic route adjusting method and system under NAT environment
CN102448136B (en) * 2012-01-10 2018-09-28 中兴通讯股份有限公司 Multi-mode terminal service switching method and device
CN104796329B (en) * 2014-01-16 2017-11-28 中国移动通信集团北京有限公司 A kind of link automatic switching method and device
CN106416418B (en) * 2014-06-17 2020-01-31 华为技术有限公司 Network communication method and device
JP6809027B2 (en) * 2016-08-08 2021-01-06 ソニー株式会社 Communication device and communication method

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102984743A (en) * 2012-12-13 2013-03-20 迈普通信技术股份有限公司 Main/standby link switching method and wireless route equipment
CN103718532A (en) * 2013-03-26 2014-04-09 华为技术有限公司 Data transmission method, apparatus and terminal device
CN105897478A (en) * 2016-04-12 2016-08-24 腾讯科技(深圳)有限公司 Chain decision method and decision device
CN107682882A (en) * 2017-09-29 2018-02-09 努比亚技术有限公司 Data transmission method, mobile terminal and computer-readable recording medium
CN109831328A (en) * 2019-01-30 2019-05-31 杭州迪普科技股份有限公司 Switching method, device, the electronic equipment of intelligent route selection
CN110087335A (en) * 2019-04-30 2019-08-02 上海寰创通信科技股份有限公司 A kind of data transmission system and method polymerizeing a variety of Radio Links

Also Published As

Publication number Publication date
CN110545566A (en) 2019-12-06

Similar Documents

Publication Publication Date Title
CN110545566B (en) Link switching method, device, equipment and storage medium
CN113261247B (en) Method and client device for maintaining continuous network service
Kakhki et al. Taking a long look at QUIC: an approach for rigorous evaluation of rapidly evolving transport protocols
JP7178646B2 (en) Network security monitoring method, network security monitoring device and system
JP6994505B2 (en) Relocation of mobile edge applications
US7643426B1 (en) Path selection in a network
KR101037020B1 (en) System and method for selecting data providers
JP7455164B2 (en) Network route selection method and system for VoIP media transmission
CN108075934B (en) Network quality monitoring method, device and system
WO2018102992A1 (en) Network performance measurement method and detection device
Azzouni et al. Topology discovery performance evaluation of opendaylight and onos controllers
CN110769019B (en) Session processing method, device, system, storage medium and computing equipment
Batista et al. Performance analysis of available bandwidth estimation tools for grid networks
US10498591B1 (en) Isolating service faults using loopbacks
CN108574615B (en) Content transmission method, device and system based on multipath MPTCP
CN112242937B (en) Network speed measuring method and device, electronic equipment and computer readable medium
US20210336878A1 (en) High-availability networking as a service via wi-fi
CN106161051B (en) Custom end intelligent route selection
Akanbi et al. Proactive load shifting for distributed sdn control plane architecture
CN110474807A (en) A kind of log processing method and device
Huang et al. Tuning the aggressive TCP behavior for highly concurrent HTTP connections in data center
Toll et al. IoTreeplay: Synchronous Distributed Traffic Replay in IoT Environments
Nemati et al. A multi-source streaming model for mobile peer-to-peer (P2P) overlay networks
US11916701B2 (en) Coordinated observability for dynamic VPN switchover
WO2022003820A1 (en) Performance monitoring device, program, and performance monitoring method

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