CN109286957B - Switching method and device of return link, electronic equipment and storage medium - Google Patents

Switching method and device of return link, electronic equipment and storage medium Download PDF

Info

Publication number
CN109286957B
CN109286957B CN201810928680.1A CN201810928680A CN109286957B CN 109286957 B CN109286957 B CN 109286957B CN 201810928680 A CN201810928680 A CN 201810928680A CN 109286957 B CN109286957 B CN 109286957B
Authority
CN
China
Prior art keywords
source
link
current
source link
switching
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
CN201810928680.1A
Other languages
Chinese (zh)
Other versions
CN109286957A (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.)
Wangsu Science and Technology Co Ltd
Original Assignee
Wangsu Science and 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 Wangsu Science and Technology Co Ltd filed Critical Wangsu Science and Technology Co Ltd
Priority to CN201810928680.1A priority Critical patent/CN109286957B/en
Publication of CN109286957A publication Critical patent/CN109286957A/en
Application granted granted Critical
Publication of CN109286957B publication Critical patent/CN109286957B/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
    • H04W36/0016Hand-off preparation specially adapted for end-to-end data sessions
    • 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
    • H04W36/0085Hand-off measurements
    • H04W36/0088Scheduling hand-off measurements
    • 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

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Mobile Radio Communication Systems (AREA)

Abstract

The embodiment of the invention relates to the technical field of computers, and discloses a switching method and device of a return link, electronic equipment and a storage medium. In the invention, the switching method of the return link comprises the following steps: acquiring communication quality information of a current back source link; determining a switching strategy of the return link according to the communication quality information of the current return link; wherein, the switching strategy is to continue using the current back-source link, or to switch from the current back-source link to other back-source links; and switching the current back-source link after determining that the switching strategy is to switch from the current back-source link to other back-source links. The switching method of the source returning link enables the electronic equipment to be switched to other source returning links when the communication quality of the current source returning link is poor, and the source returning efficiency is improved.

Description

Switching method and device of return link, electronic equipment and storage medium
Technical Field
The embodiment of the invention relates to the technical field of computers, in particular to a method and a device for switching a back source link, electronic equipment and a storage medium.
Background
With the rapid development of the internet, the number of users carried by many streaming media service websites and download platforms is showing explosive growth. When a link selected by a user request back to a source is poor, the response speed of the source station is low, and the user experience is poor, which is particularly obvious in the field of video live broadcast. In recent years, there have been many proposed methods for selecting a source-returning line, and the general principles of the methods are as follows: and according to each source returning request of the user, counting the quality condition of each source returning link, and directly selecting the optimal route when a subsequent request comes.
However, the inventors found that at least the following problems exist in the prior art: the method can improve the user source returning efficiency to a certain extent, but still has the following disadvantages:
(1) if the back source link is a poor link, switching to other links cannot be performed, so that the current user experience is poor.
(2) The selection of the back source link depends on the interaction between the server and the dispatching center, and the back source delay is increased.
Disclosure of Invention
An object of embodiments of the present invention is to provide a method and an apparatus for switching a source return link, an electronic device, and a storage medium, which enable switching to another source return link when a communication quality of a current source return link is poor, thereby improving source return efficiency.
In order to solve the above technical problem, an embodiment of the present invention provides a method for switching a back source link, including the following steps: acquiring communication quality information of a current back source link; determining a switching strategy of the return link according to the communication quality information of the current return link; wherein, the switching strategy is to continue using the current back-source link, or to switch from the current back-source link to other back-source links; and switching the current back-source link after determining that the switching strategy is to switch from the current back-source link to other back-source links.
The embodiment of the present invention further provides a switching device for a back source link, including: the device comprises a first determining module, a second determining module and a switching module; the first determining module is used for acquiring the communication quality information of the current back-to-source link; the second determining module is used for determining a switching strategy of the back source link according to the communication quality information of the current back source link; wherein, the switching strategy is to continue using the current back-source link, or to switch from the current back-source link to other back-source links; the switching module is used for switching the current back-source link after determining that the switching strategy is switched from the current back-source link to other back-source links.
An embodiment of the present invention also provides an electronic device, including: at least one processor; and a memory communicatively coupled to the at least one processor; wherein the memory stores instructions executable by the at least one processor to enable the at least one processor to perform the method of switching back to the source link as mentioned in the above embodiments.
The embodiment of the present invention also provides a computer-readable storage medium, which stores a computer program, and when the computer program is executed by a processor, the method for switching a source link mentioned in the above embodiment is implemented.
Compared with the prior art, the method and the device for switching the source-returning link have the advantages that the communication quality of the current source-returning link is monitored, and when the communication quality of the current source-returning link is poor, the current source-returning link is timely switched to other source-returning links, so that the influence of network fluctuation on the current source-returning connection can be effectively prevented, the problems of low source-returning efficiency or source-returning failure caused by the fact that the electronic equipment continues to use the source-returning link in the source-returning link due to the poor communication quality of the source-returning link are solved, the flexibility and the timeliness of switching of the source-returning link are improved, and the source-returning efficiency of the electronic equipment. In addition, the electronic equipment automatically determines whether the current source returning link needs to be switched, interaction with a dispatching center is not needed, dependency of the electronic equipment on the dispatching center is reduced, source returning delay and source station response time are reduced, and user experience is improved.
In addition, after determining that the handover policy is to switch from the current back-to-source link to another back-to-source link, the method for switching back-to-source links further includes: determining the switching times of the current back source link; and judging whether to mark the current back source link or not according to the switching times of the current back source link. In the implementation, after the number of times that the communication quality of the current source returning link does not meet the requirement reaches the first preset value, the current source returning link is marked as an unhealthy link, so that the source returning of the source returning link is prevented from being reused by the electronic equipment in the near term, and the source returning efficiency is further improved.
In addition, judging whether to mark the current back source link according to the switching times of the current back source link specifically comprises: judging whether the switching times of the current back source link is larger than a first preset value or not; if yes, the current back source link is marked as an unhealthy link.
In addition, the communication quality information of the current return-to-source link comprises at least one of first indication information, second indication information and communication index data of the current return-to-source link; the first indication information is used for indicating whether the source station returns response data, and the second indication information is used for indicating whether the response data returned by the source station is an error state code.
In addition, the communication quality information of the current return-to-source link is communication index data of the current return-to-source link; determining a switching strategy of the return link according to the communication quality information of the current return link, specifically comprising: judging whether the communication index data of the current return link meets the preset requirement; if so, determining that the switching strategy is to continue using the current back-source link, otherwise, determining that the switching strategy is to switch from the current back-source link to other back-source links.
In addition, the communication quality information of the current return-to-source link is the first indication information and the communication index data of the current return-to-source link; wherein the first indication information indicates whether the source station returns response data; determining a switching strategy of the return link according to the communication quality information of the current return link, specifically comprising: judging whether the first indication information indicates that the source station does not return response data; if the first indication information indicates that the source station does not return response data, determining that the switching strategy is switched from the current back-to-source link to other back-to-source links; if the first indication information indicates that the source station returns response data is determined, judging whether the communication index data of the current return link meets the preset requirement; and if the communication index data of the current back-source link does not meet the preset requirement, determining that the switching strategy is to continue using the current back-source link, otherwise, determining that the switching strategy is to switch from the current back-source link to other back-source links.
In addition, the communication quality information of the current return-to-source link is second indication information and communication index data of the current return-to-source link; the second indication information is used for indicating whether response data returned by the source station is an error state code or not; determining a switching strategy of the return link according to the communication quality information of the current return link, specifically comprising: judging whether the second indication information indicates that response data returned by the source station is an error state code; if the second indication information indicates that the response data returned by the source station is the error state code, determining that the switching strategy is to be switched from the current source returning link to other source returning links; if the second indication information indicates that the response data returned by the source station is not the error state code, judging whether the communication index data of the current source returning link meets the preset requirement; and if the communication index data of the current back-source link does not meet the preset requirement, determining that the switching strategy is to continue using the current back-source link, otherwise, determining that the switching strategy is to switch from the current back-source link to other back-source links.
In addition, the communication quality information of the current return-to-source link comprises first indication information, second indication information and communication index data of the current return-to-source link; determining a switching strategy of the return link according to the communication quality information of the current return link, specifically comprising: judging whether the first indication information indicates that the source station does not return response data; if yes, determining that the switching strategy is switched from the current back source link to other back source links; otherwise, judging whether the second indication information indicates that the response data returned by the source station is an error state code; if yes, determining that the switching strategy is switched from the current back source link to other back source links; otherwise, judging whether the communication index data of the current return link meets the preset requirement; if so, determining that the switching strategy is to continue using the current back-source link, otherwise, determining that the switching strategy is to switch from the current back-source link to other back-source links. In the implementation, the response of the source station and the communication index data of the current source returning link are comprehensively considered, so that the electronic equipment can find the problem of the current source returning link in time and switch to other source returning links in time.
In addition, each back source link supports breakpoint continuous transmission. In the realization, after the switching to other source returning links, the electronic equipment can continue to transmit at the breakpoint, thereby avoiding the waste of downloaded data before the switching and effectively reducing the waste of source returning bandwidth.
In addition, before the communication quality information of the current back-to-source link is acquired, the back-to-source link switching method further includes: if the current source returning total times are determined to be larger than a second preset value, selecting one source returning link from the source returning links marked as unhealthy links as the current source returning link; after the communication quality information of the current back-to-source link is acquired, the back-to-source link switching method further includes: and if the communication quality information of the current back-source link indicates that the communication quality of the current back-source link is good, marking the current back-source link as a healthy link. In the implementation, when the total times of source returning reaches the second preset value, the source returning link marked as the unhealthy link is called again, so that the problem that the source returning link marked as the unhealthy link cannot be used after the communication quality is recovered is avoided, and resource waste is caused.
In addition, before the communication quality information of the current back-to-source link is acquired, the back-to-source link switching method further includes: and selecting one back source link from the back source links marked as healthy links as the current back source link.
In addition, switching the current back source link specifically includes: and switching from the current back source link to other back source links marked as healthy links.
Drawings
One or more embodiments are illustrated by way of example in the accompanying drawings, which correspond to the figures in which like reference numerals refer to similar elements and which are not to scale unless otherwise specified.
Fig. 1 is a flowchart of a handover method of a return link according to a first embodiment of the present invention;
fig. 2 is a flowchart of a handover method for a back source link according to a second embodiment of the present invention;
fig. 3 is a flowchart of a handover method for a back source link according to a third embodiment of the present invention;
fig. 4 is a flowchart of a handover method of a back source link according to a fourth embodiment of the present invention;
fig. 5 is a schematic structural diagram of a switching device of a return link according to a fifth embodiment of the present invention;
fig. 6 is a schematic structural diagram of an electronic device according to a sixth embodiment of the present invention.
Detailed Description
In order to make the objects, technical solutions and advantages of the embodiments of the present invention more apparent, embodiments of the present invention will be described in detail below with reference to the accompanying drawings. However, it will be appreciated by those of ordinary skill in the art that numerous technical details are set forth in order to provide a better understanding of the present application in various embodiments of the present invention. However, the technical solution claimed in the present application can be implemented without these technical details and various changes and modifications based on the following embodiments.
A first embodiment of the present invention relates to a switching method for a source return link, which is applied to an electronic device, such as each node server in a Content Delivery Network (CDN), or a client. The switching method of the back source link is shown in fig. 1, and comprises the following steps:
step 101: and acquiring the communication quality information of the current back source link.
Specifically, when the data in the memory of the electronic device cannot meet the needs of the visitor, the electronic device needs to obtain the needed data in a source returning manner. And the electronic equipment monitors the communication quality of the current link in the process of returning to the source.
In a specific implementation, the communication quality information of the current return-to-source link may include at least one of the first indication information, the second indication information, and communication index data of the current return-to-source link. The communication index data may be any one or any combination of a download rate, a packet loss rate, and a response time of the link.
In a specific implementation, each back source link is provided with a mark for indicating whether the back source link is a healthy link or an unhealthy link. When the electronic equipment requests data from a source station, all source returning links corresponding to the source station are determined, and one source returning link is selected from the source returning links marked as healthy links to serve as the current source returning link.
Step 102: and determining a switching strategy of the back source link according to the communication quality information of the current back source link.
Specifically, the switching policy is to continue using the current back-source link or to switch from the current back-source link to another back-source link.
In a specific implementation, when the communication quality information of the current back-to-source link indicates that the communication quality of the current back-to-source link is poor, the electronic device determines that the handover policy is to be switched from the current back-to-source link to another back-to-source link, and when the communication quality information of the current back-to-source link indicates that the communication quality of the current back-to-source link is good, determines that the handover policy is to continue using the current back-to-source link.
In a specific implementation, the communication quality information of the current return-to-source link is communication index data of the current return-to-source link. The electronic equipment judges whether the communication index data of the current return link meets the preset requirement; if so, determining that the switching strategy is to continue using the current back-source link, otherwise, determining that the switching strategy is to switch from the current back-source link to other back-source links.
In another specific implementation, the communication quality information of the current back-to-source link is first indication information and communication index data of the current back-to-source link, where the first indication information indicates whether the source station returns response data. The electronic equipment judges whether the first indication information indicates that the source station does not return response data; if the first indication information indicates that the source station does not return response data, determining that the switching strategy is switched from the current back-to-source link to other back-to-source links; if the first indication information indicates that the source station returns response data is determined, judging whether the communication index data of the current return link meets the preset requirement; and if the communication index data of the current back-source link does not meet the preset requirement, determining that the switching strategy is to continue using the current back-source link, otherwise, determining that the switching strategy is to switch from the current back-source link to other back-source links.
In another specific implementation, the communication quality information of the current back-to-source link is second indication information and communication index data of the current back-to-source link, where the second indication information is used to indicate whether response data returned by the source station is an error status code. The electronic equipment judges whether the second indication information indicates that the response data returned by the source station is an error state code; if the second indication information indicates that the response data returned by the source station is the error state code, determining that the switching strategy is to be switched from the current source returning link to other source returning links; if the second indication information indicates that the response data returned by the source station is not the error state code, judging whether the communication index data of the current source returning link meets the preset requirement; and if the communication index data of the current back-source link does not meet the preset requirement, determining that the switching strategy is to continue using the current back-source link, otherwise, determining that the switching strategy is to switch from the current back-source link to other back-source links.
It should be noted that, as can be understood by those skilled in the art, the current communication quality information of the return-to-source link may also be information reflecting the communication quality of the return-to-source link, which is not listed here, and in practical applications, any one or more information reflecting the communication quality of the return-to-source link may be selected as the communication quality information according to needs.
Step 103: and switching the current back-source link after determining that the switching strategy is to switch from the current back-source link to other back-source links.
In a specific implementation, after switching a current back-to-source link, the electronic device determines the number of times of switching the current back-to-source link. And the electronic equipment judges whether to mark the current back source link according to the switching times of the current back source link. Specifically, if the number of times of switching the current return-to-source link is high, which indicates that the communication quality of the current return-to-source link cannot meet the requirement for a long time, the electronic device may mark the current return-to-source link to avoid selecting the return-to-source link again.
In a specific implementation, each back source link is provided with a mark for indicating whether the back source link is a healthy link or an unhealthy link. When the electronic equipment is switched back to the source link, the current back to source link is switched to other back to source links marked as healthy links. For example, the back-source link between the electronic device and the source station includes link a, link B, and link C. When the electronic equipment returns to the source, the link A is determined to be a healthy link, and data is downloaded through the link A. In the downloading process, the communication quality of the link A is suddenly reduced, the electronic equipment firstly judges whether the link B is marked as an unhealthy link, if the link B is marked as the unhealthy link, the link B is directly switched to the link C, and if the link B is not marked as the unhealthy link, the link B is directly switched to the link B.
It should be noted that, as can be understood by those skilled in the art, after the electronic device completes one back-source request, the back-source link used in the back-source request may be scored or graded according to the communication quality information of the back-source link used in the back-source request.
It is worth mentioning that the electronic device scores or ranks the back source links, so that when the electronic device returns the source next time, a link with the best communication quality can be selected as the current back source link according to the score or rank of each back source link, thereby further improving the back source efficiency.
The above description is only for illustrative purposes and does not limit the technical aspects of the present invention.
Compared with the prior art, the switching method of the source return link provided in the embodiment monitors the communication quality of the current source return link, and switches to other source return links in time when the communication quality of the current source return link is poor, so that the influence of network fluctuation on the current source return connection can be effectively prevented, the problem that the source return efficiency is low or the source return fails due to the fact that the current source return link is continuously used when the communication quality of the source return link is poor by the electronic device is avoided, the flexibility and timeliness of switching of the source return link are improved, and the source return efficiency of the electronic device is improved. In addition, the electronic equipment automatically determines whether the current source returning link needs to be switched, interaction with a dispatching center is not needed, dependency of the electronic equipment on the dispatching center is reduced, source returning delay and source station response time are reduced, and user experience is improved.
The second embodiment of the invention relates to a switching method of a return link, which is applied to electronic equipment. This embodiment is a further refinement of the first embodiment, and specifically describes a specific execution procedure of step 102 when the communication quality information of the current back-to-source link includes the first instruction information, the second instruction information, and the communication index data of the current back-to-source link. As shown in fig. 2, in this embodiment, the method for switching the back-source link includes the following steps:
step 201: and acquiring the first indication information, the second indication information and the communication index data of the current back source link.
Step 202: and judging whether the first indication information indicates that the source station does not return response data.
Specifically, in the case where a problem occurs in the function of the source station or the connection of the source return link fails, the source station cannot respond to the source return request of the electronic device. If the electronic device receives the response data of the source station within the first preset time of sending the request to the source, the first indication information indicates that the source station returns the response data, step 203 is executed, and if the response data of the source station is not received and the first indication information indicates that the source station does not return the response data, step 207 is executed.
Step 203: and judging whether the second indication information indicates that the response data returned by the source station is an error state code.
Specifically, after receiving the response data from the source station, the electronic device determines whether the response data is an error status code, and determines the second indication information according to the determination result. If the second indication information indicates that the response data returned by the source station is not an error status code, step 204 is executed, and if the second indication information indicates that the response data returned by the source station is an error status code, step 207 is executed. For example, if the response data of the source station is 5XX (503, 504, etc. indicate a status code of the response exception), the second indication information indicates that the response data returned by the source station is an error status code, and the electronic device determines that the switching policy is to switch from the current back-to-source link to another back-to-source link.
Step 204: and judging whether the communication index data of the current return source link meets the preset requirement.
Specifically, the preset requirement may be that each communication index in the communication index data of the current back-to-source link is greater than a preset threshold. If the electronic device determines that the communication index data of the current return link meets the preset requirement, step 205 is executed, otherwise, step 207 is executed.
In a specific implementation, in order to monitor the communication quality of the return link in real time, the electronic device may obtain the communication index data of the current return link for multiple times. For example, the electronic device calculates the communication quality of the return link within the period time with the time T as the period, and in the current time period T1, when the communication index data of the current return link reaches the threshold, the communication index data of the current return link is recalculated in the next time period T2, if the communication index data reaches the threshold, the switching is not performed, otherwise, the switching is performed to other return links, and the process is repeated until the end.
It should be noted that, as can be understood by those skilled in the art, the electronic device may also acquire, at the initial stage of returning to the source, the communication index data of the current returning-to-source link at the first frequency, and if the communication index data of the current returning-to-source link acquired at the initial stage all meets the preset requirement, acquire, at the second frequency, the communication index data of the current returning-to-source link, where the second frequency is smaller than the first frequency. The present embodiment does not limit the number of times and the manner of acquiring the communication index data of the current return link by the electronic device.
Step 205: and determining the switching strategy as continuing to use the current back-source link.
Step 206: the current back-source link continues to be used. The flow is then ended.
Step 207: and determining that the switching strategy is to switch from the current back source link to other back source links.
Step 208: and switching to other back source links.
Specifically, the electronic device selects one back-source link marked as a healthy link from other back-source links, and switches from the current back-source link to the other back-source links marked as healthy links.
In a specific implementation, each return link between the electronic device and the source station supports breakpoint continuous transmission. The electronic device may continue to complete incomplete downloads at the data breakpoint after switching to other back-to-source links. For example, the source return link between the electronic device and the source station comprises a link A and a link B, the file size of the source return request of the electronic device is 3M, 1M is downloaded on the link A, at this time, the link A suddenly has a quality problem and is determined to be an unhealthy link, and the electronic device is switched from the link A to the link B, and the downloading is continued on the link B from the place of 1M.
It is worth mentioning that after switching to other source return links, the electronic device can continue to transmit at a breakpoint, thereby avoiding the waste of downloaded data before switching and effectively reducing the waste of source return bandwidth.
It should be noted that, in this embodiment, for clarity of illustration, the first indication information, the second indication information, and the communication index data of the current back-source link are obtained as previous steps from step 202 to step 204, and in practical applications, the electronic device may obtain the data in stages, that is, the electronic device may obtain the first indication information before performing step 202, obtain the second indication information after performing step 202 and before performing step 203, and obtain the communication index data after performing step 203 and before performing step 204, which does not limit the specific time when the electronic device obtains the information.
The switching method of the back source link is described below with reference to practical situations. Assume that a configured link of a certain frequency channel includes a primary source station and a secondary source station, a link corresponding to the primary source station includes a link a, a link B, and a link C, and a link corresponding to the secondary source station includes a link D and a link E. When a user accesses a Uniform Resource Locator (URL), if the resolved CDN node server does not cache the corresponding content, or the cached content is expired, the CDN node server returns to the source station to obtain the corresponding content. When the CDN node server returns to the source, the link A is selected as a source returning link, and a source returning request is sent to the main source station. If the main source station responds to the request, the CDN service node judges whether response data of the main source station are error state codes or not, if not, the CDN node server calculates the downloading rate of the link A within the appointed time, if the downloading rate of the link A within the appointed time is lower than a set threshold value, the link A is considered to be unhealthy, the link A is switched to the link B, whether the downloading rate of the link B is greater than the threshold value or not is judged, and if not, the link B is determined to be unhealthy, the link C is switched to. When the link A, the link B and the link C of the main source station are unhealthy, switching to the standby source station, and carrying out similar switching logic operation on the link D and the link E of the standby source station.
It should be noted that, when a certain channel or website is only provided with a main source station, the electronic device may switch between the source return links corresponding to the main source station, that is, between link a, link B, and link C, and when a certain channel or website is provided with a main source station and a standby source station, the electronic device may switch between the source return link corresponding to the main source station and the source return link corresponding to the standby source station.
The above description is only for illustrative purposes and does not limit the technical aspects of the present invention.
Compared with the prior art, the switching method of the source return link provided in the embodiment monitors the communication quality of the current source return link, and switches to other source return links in time when the communication quality of the current source return link is poor, so that the influence of network fluctuation on the current source return connection can be effectively prevented, the problem that the source return efficiency is low or the source return fails due to the fact that the current source return link is continuously used when the communication quality of the source return link is poor by the electronic device is avoided, the flexibility and timeliness of switching of the source return link are improved, and the source return efficiency of the electronic device is improved. In addition, the electronic equipment automatically determines whether the current source returning link needs to be switched, interaction with a dispatching center is not needed, dependency of the electronic equipment on the dispatching center is reduced, source returning delay and source station response time are reduced, and user experience is improved. In addition, after the electronic equipment is switched to other source return links, the transmission can be continued at a breakpoint, the waste of downloaded data before switching is avoided, and the waste of source return bandwidth is effectively reduced.
The third embodiment of the present invention relates to a method for switching a back source link, which is a further improvement of the first embodiment, and the specific improvement is as follows: after the electronic device determines that the switching policy is to switch from the current back-source link to another back-source link, other related steps are added.
Specifically, as shown in fig. 3, the present embodiment includes steps 301 to 308, where steps 301 and 302 are substantially the same as steps 101 and 102 of the first embodiment, respectively, and are not repeated here. The following mainly introduces the differences:
step 301 and step 302 are performed.
Step 303: and judging whether the switching strategy is to be switched from the current back source link to other back source links.
Specifically, if the electronic device determines that the handover policy is to switch from the current back-source link to another back-source link, step 305 is performed, otherwise, step 304 is performed.
Step 304: and continuing to download data by using the current back source link. The flow is then ended.
Step 305: and determining the switching times of the current back source link.
Specifically, the electronic device counts the number of times of switching of each return link. In the process of returning to the source by using a certain back-source link, if the switching strategy is an event of switching from the current back-source link to other back-source links, adding 1 to the switching times corresponding to the back-source link.
Step 306: and judging whether the switching times of the current back source link is greater than a first preset value.
Specifically, if the number of times of switching the current back-source link is greater than the first preset value, step 307 is executed, otherwise, step 308 is executed, where the first preset value may be set according to an actual situation.
Step 307: the current back-source link is marked as an unhealthy link.
Specifically, if the switching times of the current back-source link is greater than a first preset value, it is indicated that the current back-source link is in an unstable state in the near future, and the electronic device marks the current back-source link as an unhealthy link, so that the electronic device can be prevented from using the back-source link in the near future and affecting back-source efficiency. For example, when the number of handovers reaches M times in N back-source requests made using back-source link a, back-source link a is marked as an unhealthy link. Wherein, N is the statistical period, and M is the first default, can set up according to actual conditions.
Step 308: and switching to other back source links.
It should be noted that, for clarity, in this embodiment, steps 305 to 307 are taken as steps before step 308, and in practical applications, steps 305 to 307 may also be taken as steps after step 308, and this embodiment does not limit the execution sequence of steps 305 to 307 and step 308.
Compared with the prior art, in the switching method of the source return link provided in the embodiment, after the number of times that the communication quality of the current source return link does not meet the requirement reaches the first preset value, the current source return link is marked as an unhealthy link, so that the electronic device is prevented from using the source return link in the near future, and the source return efficiency is further improved.
A fourth embodiment of the present invention relates to a method for switching a back source link, and the present embodiment is a further improvement of the first embodiment, and the specific improvement is as follows: in this embodiment, the selected back-source link is determined according to the current total number of back-source links. As shown in fig. 4, the method for switching back to the source link includes the following steps:
step 401: and determining the current total times of returning to the source.
Step 402: and judging whether the current total times of returning to the source is greater than a second preset value.
Specifically, the electronic device marks each of the back-source links to determine whether the back-source link is a healthy link or an unhealthy link. The electronic equipment counts the times of returning to the source through a counter, and the value of the counter is added with 1 each time of returning to the source. When the electronic equipment selects the back source link, the healthy back source link or the unhealthy back source link is selected for back source according to the current total times of back source. If the current total number of times of returning to the source is not greater than the second preset value, step 403 is executed, and if the current total number of times of returning to the source is greater than the second preset value, step 407 is executed. Wherein, the second preset value can be set according to the requirement.
It should be noted that, as can be understood by those skilled in the art, in order to avoid that the electronic device always selects the source returning link marked as an unhealthy link as the current source returning link after the current source returning total number reaches the second preset value, the current source returning total number may be cleared when the current source returning total number exceeds the second preset value.
It should be noted that, in practical applications, as will be understood by those skilled in the art, each source return link may correspond to a counter, the counter starts counting when the source return link corresponding to the counter is marked as an unhealthy link, the electronic device increments the count value by 1 each time the electronic device returns the source, and sends a prompt message to a processor of the electronic device when the count value reaches a second preset value. And the processor of the electronic equipment selects the back source link when the back source link is next back source so as to detect the back source link again and determine the current communication quality of the back source link.
It is worth mentioning that when the total number of times of returning to the source reaches the second preset value, the returning source link marked as the unhealthy link is called again, so that the phenomenon that the returning source link marked as the unhealthy link cannot be used after the communication quality is recovered is avoided, and resource waste is caused.
Step 403: and selecting one back source link from the back source links marked as healthy links as the current back source link.
Step 404: and acquiring the communication quality information of the current back-to-source link, and determining a switching strategy according to the communication quality information of the current back-to-source link.
Step 405: and judging whether the switching strategy is to continue using the current back source link. If yes, go to step 406, otherwise, go to step 411.
Step 406: and continuing to download data by using the current back source link. The flow is then ended.
Specifically, steps 404 to 406 may refer to the description of the handover method for the back source link in the first embodiment, and will not be described in detail here.
Step 407: and selecting one back source link from the back source links marked as unhealthy links as the current back source link.
Step 408: and acquiring the communication quality information of the current back-to-source link, and determining a switching strategy according to the communication quality information of the current back-to-source link.
Step 409: and judging whether the switching strategy is to continue using the current back source link. If yes, go to step 410, otherwise, go to step 411.
Step 410: and marking the current back source link as a healthy link, and continuing to use the current back source link to download data. The flow is then ended.
Specifically, when the handover policy is to continue using the current back-source link, it is described that the communication quality information of the current back-source link indicates that the communication quality of the current back-source link is good, the electronic device marks the back-source link as a healthy link, and then the back-source link can be returned through the current back-source link, thereby avoiding resource waste.
Step 411: and switching to other back source links, and continuously downloading the data through the other back source links.
It should be noted that, as can be understood by those skilled in the art, in practical applications, the electronic device may mark the current back-source link as a healthy link after the communication quality information of the current back-source link indicates that the communication quality of the current back-source link is good, and mark the current back-source link as an unhealthy link after the communication quality information of the current back-source link indicates that the communication quality of the current back-source link is poor, and this embodiment does not limit a specific time when the electronic device changes the mark of the back-source link.
The switching method of the back source link is described below with reference to practical situations. Assume that link a between the electronic device and the source station has been marked as an unhealthy link and link B is marked as a healthy link. When the number of times of source return reaches G (G is a positive integer greater than 1), the electronic device retries source return through the link A. If the communication quality information of the link A indicates that the communication quality of the link A is good and no switching event occurs in the source returning process, the link A is marked as a healthy link after the source returning request is finished. If the communication quality information of the link A indicates that the communication quality of the link A is poor in the source returning process, the link A is switched to the link B, and the mark of the link A is not changed.
It is worth mentioning that when the total number of times of returning to the source reaches the second preset value, the returning source link marked as the unhealthy link is called again, so that the phenomenon that the returning source link marked as the unhealthy link cannot be used after the communication quality is recovered is avoided, and resource waste is caused.
Compared with the prior art, according to the switching method of the source returning link, the electronic device selects the source returning link marked as the healthy link as the current source returning link in the normal source returning request, so that the source returning efficiency is further improved, and when the total source returning times reach the second preset value, the source returning link marked as the unhealthy link is called again, so that the problem that the source returning link marked as the unhealthy link cannot be used after the communication quality is recovered is avoided, and the resource waste is caused.
The steps of the above methods are divided for clarity, and the implementation may be combined into one step or split some steps, and the steps are divided into multiple steps, so long as the same logical relationship is included, which are all within the protection scope of the present patent; it is within the scope of the patent to add insignificant modifications to the algorithms or processes or to introduce insignificant design changes to the core design without changing the algorithms or processes.
A fifth embodiment of the present invention relates to a switching apparatus for a return link, as shown in fig. 5, including: a first determining module 501, a second determining module 502 and a switching module 503. The first determining module 501 is configured to obtain communication quality information of a current back-to-source link; the second determining module 502 is configured to determine a handover policy of the return-to-source link according to the communication quality information of the current return-to-source link; wherein, the switching strategy is to continue using the current back-source link, or to switch from the current back-source link to other back-source links; the switching module 503 is configured to switch the current back-source link after determining that the switching policy is to switch from the current back-source link to another back-source link.
It should be understood that this embodiment is a system example corresponding to the first embodiment, and may be implemented in cooperation with the first embodiment. The related technical details mentioned in the first embodiment are still valid in this embodiment, and are not described herein again in order to reduce repetition. Accordingly, the related-art details mentioned in the present embodiment can also be applied to the first embodiment.
It should be noted that each module referred to in this embodiment is a logical module, and in practical applications, one logical unit may be one physical unit, may be a part of one physical unit, and may be implemented by a combination of multiple physical units. In addition, in order to highlight the innovative part of the present invention, elements that are not so closely related to solving the technical problems proposed by the present invention are not introduced in the present embodiment, but this does not indicate that other elements are not present in the present embodiment.
A sixth embodiment of the present invention relates to an electronic device, as shown in fig. 6, including at least one processor 601; and a memory 602 communicatively coupled to the at least one processor 601; the memory 602 stores instructions executable by the at least one processor 601, and the instructions are executed by the at least one processor 601 to enable the at least one processor 601 to execute the back source link switching method according to the above embodiments.
The electronic device includes one or more processors 601 and a memory 602, and one processor 601 is taken as an example in fig. 6. The processor 601 and the memory 602 may be connected by a bus or other means, and fig. 6 illustrates an example of a connection by a bus. The memory 602, which is a non-volatile computer-readable storage medium, may be used to store non-volatile software programs, non-volatile computer-executable programs, and modules. The processor 601 executes various functional applications and data processing of the device by running nonvolatile software programs, instructions and modules stored in the memory 602, that is, the above-mentioned switching method of the back source link is realized.
The memory 602 may include a storage program area and a storage data area, wherein the storage program area may store an operating system, an application program required for at least one function; the storage data area may store a list of options, etc. Further, the memory 602 may include high speed random access memory, and may also include non-volatile memory, such as at least one magnetic disk storage device, flash memory device, or other non-volatile solid state storage device. In some embodiments, the memory 602 may optionally include memory located remotely from the processor 601, which may be connected to an external device via a network. Examples of such networks include, but are not limited to, the internet, intranets, local area networks, mobile communication networks, and combinations thereof.
One or more modules are stored in the memory 602 and when executed by the one or more processors 601 perform the method for switching back to the source link in any of the above-described method embodiments.
The product can execute the method provided by the embodiment of the application, has corresponding functional modules and beneficial effects of the execution method, and can refer to the method provided by the embodiment of the application without detailed technical details in the embodiment.
A seventh embodiment of the present invention relates to a computer-readable storage medium storing a computer program. The computer program realizes the above-described method embodiments when executed by a processor.
That is, as can be understood by those skilled in the art, all or part of the steps in the method for implementing the embodiments described above may be implemented by a program instructing related hardware, where the program is stored in a storage medium and includes several instructions to enable a device (which may be a single chip, a chip, or the like) or a processor (processor) to execute all or part of the steps of the method described in the embodiments of the present application. And the aforementioned storage medium includes: a U-disk, a removable hard disk, a Read-Only Memory (ROM), a Random Access Memory (RAM), a magnetic disk or an optical disk, and other various media capable of storing program codes.
It will be understood by those of ordinary skill in the art that the foregoing embodiments are specific examples for carrying out the invention, and that various changes in form and details may be made therein without departing from the spirit and scope of the invention in practice.

Claims (13)

1. A method for switching back to a source link, comprising:
acquiring communication quality information of a current back source link;
determining a switching strategy of the back source link according to the communication quality information of the current back source link; wherein the switching policy is to continue using the current back-source link or to switch from the current back-source link to another back-source link;
switching the current back-to-source link after determining that the switching policy is to switch from the current back-to-source link to another back-to-source link;
after determining that the handover policy is to be switched from the current back-to-source link to another back-to-source link, the method for switching back-to-source links further includes:
determining the switching times of the current back source link;
judging whether the switching times of the current back source link is larger than a first preset value or not;
if yes, marking the current back source link as an unhealthy link so as to avoid selecting the current back source link again.
2. The method according to claim 1, wherein the communication quality information of the current back-source link includes at least one of first indication information, second indication information, and communication index data of the current back-source link; the first indication information is used for indicating whether the source station returns response data, and the second indication information is used for indicating whether the response data returned by the source station is an error status code.
3. The method according to claim 1, wherein the communication quality information of the current back-to-source link is communication index data of the current back-to-source link;
the determining a switching policy of the back-source link according to the communication quality information of the current back-source link specifically includes:
judging whether the communication index data of the current return link meets a preset requirement or not;
if so, determining that the switching strategy is to continue using the current back-to-source link, otherwise, determining that the switching strategy is to be switched from the current back-to-source link to other back-to-source links.
4. The method according to claim 1, wherein the communication quality information of the current back-to-source link is first indication information and communication index data of the current back-to-source link; wherein the first indication information indicates whether the source station returns response data;
the determining a switching policy of the back-source link according to the communication quality information of the current back-source link specifically includes:
judging whether the first indication information indicates that the source station does not return response data;
if the first indication information indicates that the source station does not return response data, determining that the switching policy is switched from the current back-to-source link to other back-to-source links;
if the first indication information indicates that the source station returns response data is determined, judging whether the communication index data of the current source returning link meets a preset requirement;
and if the communication index data of the current back-to-source link is determined not to meet the preset requirement, determining that the switching strategy is to continue using the current back-to-source link, otherwise, determining that the switching strategy is to be switched from the current back-to-source link to other back-to-source links.
5. The method according to claim 1, wherein the communication quality information of the current back-to-source link is second indication information and communication index data of the current back-to-source link; the second indication information is used for indicating whether response data returned by the source station is an error state code or not;
the determining a switching policy of the back-source link according to the communication quality information of the current back-source link specifically includes:
judging whether the second indication information indicates that response data returned by the source station is an error state code;
if the second indication information indicates that the response data returned by the source station is an error state code, determining that the switching strategy is switched from the current back-to-source link to other back-to-source links;
if the second indication information indicates that the response data returned by the source station is not an error state code, judging whether the communication index data of the current source returning link meets a preset requirement;
and if the communication index data of the current back-to-source link is determined not to meet the preset requirement, determining that the switching strategy is to continue using the current back-to-source link, otherwise, determining that the switching strategy is to be switched from the current back-to-source link to other back-to-source links.
6. The method according to claim 1, wherein the communication quality information of the current back-to-source link includes first indication information, second indication information, and communication index data of the current back-to-source link; the first indication information is used for indicating whether the source station returns response data or not, and the second indication information is used for indicating whether the response data returned by the source station is an error state code or not;
the determining a switching policy of the back-source link according to the communication quality information of the current back-source link specifically includes:
judging whether the first indication information indicates that the source station does not return response data;
if the first indication information indicates that the source station does not return response data, determining that the switching policy is switched from the current back-to-source link to other back-to-source links;
if the first indication information indicates that the source station returns response data is determined, whether the second indication information indicates that the response data returned by the source station is an error state code is judged;
if the second indication information indicates that the response data returned by the source station is an error state code, determining that the switching strategy is switched from the current back-to-source link to other back-to-source links;
if the second indication information indicates that the response data returned by the source station is not an error state code, judging whether the communication index data of the current source returning link meets a preset requirement;
and if the communication index data of the current back source link meets the preset requirement, determining that the switching strategy is to continue using the current back source link, otherwise, determining that the switching strategy is to be switched from the current back source link to other back source links.
7. The method according to any one of claims 1 to 6, wherein each back source link supports breakpoint transmission.
8. The method according to any one of claims 1 to 6, wherein before the obtaining the communication quality information of the current back-to-source link, the method further comprises:
if the current source returning total times are determined to be larger than a second preset value, selecting one source returning link from the source returning links marked as unhealthy links as the current source returning link;
after the obtaining of the communication quality information of the current back-to-source link, the back-to-source link switching method further includes:
and if the communication quality information of the current back-source link indicates that the communication quality of the current back-source link is good, marking the current back-source link as a healthy link.
9. The method of claim 1, wherein before the obtaining the communication quality information of the current back-to-source link, the method further comprises:
and selecting one back source link from the back source links marked as healthy links as the current back source link.
10. The method for switching the back source link according to claim 1, wherein the switching the current back source link specifically includes:
and switching from the current back source link to other back source links marked as healthy links.
11. A switching device for a return link, comprising: the device comprises a first determining module, a second determining module and a switching module;
the first determining module is used for acquiring the communication quality information of the current back source link;
the second determining module is used for determining a switching strategy of the return-to-source link according to the communication quality information of the current return-to-source link; wherein the switching policy is to continue using the current back-source link or to switch from the current back-source link to another back-source link;
the switching module is used for switching the current back-source link after determining that the switching strategy is switched from the current back-source link to other back-source links;
wherein, after determining that the handover policy is to be handed over from the current back-to-source link to another back-to-source link, the handover module is further configured to:
determining the switching times of the current back source link;
judging whether the switching times of the current back source link is larger than a first preset value or not;
if yes, marking the current back source link as an unhealthy link so as to avoid selecting the current back source link again.
12. An electronic device, comprising: at least one processor; and the number of the first and second groups,
a memory communicatively coupled to the at least one processor; wherein the memory stores instructions executable by the at least one processor to enable the at least one processor to perform the method of switching back to the source link of any of claims 1 to 10.
13. A computer-readable storage medium storing a computer program, wherein the computer program, when executed by a processor, implements the method for switching back to a source link according to any one of claims 1 to 10.
CN201810928680.1A 2018-08-15 2018-08-15 Switching method and device of return link, electronic equipment and storage medium Active CN109286957B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201810928680.1A CN109286957B (en) 2018-08-15 2018-08-15 Switching method and device of return link, electronic equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201810928680.1A CN109286957B (en) 2018-08-15 2018-08-15 Switching method and device of return link, electronic equipment and storage medium

Publications (2)

Publication Number Publication Date
CN109286957A CN109286957A (en) 2019-01-29
CN109286957B true CN109286957B (en) 2021-03-16

Family

ID=65183471

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201810928680.1A Active CN109286957B (en) 2018-08-15 2018-08-15 Switching method and device of return link, electronic equipment and storage medium

Country Status (1)

Country Link
CN (1) CN109286957B (en)

Families Citing this family (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113364639B (en) * 2020-03-03 2023-09-08 成都鼎桥通信技术有限公司 Method, system and device for switching transmission links of small station
CN113452539B (en) * 2020-03-26 2022-07-19 北京金山云网络技术有限公司 Source station switching method and device, electronic equipment and storage medium
CN111555918B (en) * 2020-04-27 2023-01-20 北京爱奇艺科技有限公司 Return source optimization method and device and electronic equipment
CN112671718B (en) * 2020-12-03 2023-07-21 网宿科技股份有限公司 Switching method of return source link, server and storage medium
CN114466000B (en) * 2021-12-22 2023-10-10 天翼云科技有限公司 CDN gateway source returning method and device

Citations (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107517228A (en) * 2016-06-15 2017-12-26 阿里巴巴集团控股有限公司 Dynamic accelerating method and device in a kind of content distributing network

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
GB2505680B (en) * 2012-09-06 2018-06-06 Ubiquisys Ltd Handover in a cellular communication network

Patent Citations (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107517228A (en) * 2016-06-15 2017-12-26 阿里巴巴集团控股有限公司 Dynamic accelerating method and device in a kind of content distributing network

Also Published As

Publication number Publication date
CN109286957A (en) 2019-01-29

Similar Documents

Publication Publication Date Title
CN109286957B (en) Switching method and device of return link, electronic equipment and storage medium
US8320916B2 (en) Method and apparatus for pre-fetching data in a mobile network environment using edge data storage
US9071655B2 (en) Managing access to digital content sources
CN111628847A (en) Data transmission method and device
CN109936514B (en) Message processing method and device
CN106612284B (en) Streaming data transmission method and device
CN109802997B (en) Node equipment selection method and related equipment thereof
US9781474B2 (en) Content playback information estimation apparatus and method and program
CN108668146B (en) Method and equipment for adjusting streaming media code rate
CN109729396B (en) Video slicing data transmission method and device
US20140120930A1 (en) Method, Apparatus, Computer Program Product and System for Communicating Predictions
EP3253065B1 (en) Streaming media resource downloading method and apparatus, and terminal device
CN110855792A (en) Message pushing method, device, equipment and medium
US11734077B2 (en) Evaluation device, evaluation method and evaluation program
CN111988101A (en) Wireless channel switching method, system, access point and workstation
CN109257335B (en) Method for maintaining back source link, back source method, related device and storage medium
CN113572750B (en) Video data transmission method and device
CN106105145B (en) Method for operating a buffer arranged along a transmission path between a client terminal and at least one server, and corresponding buffer
CN112995783A (en) Advertisement insertion method, electronic device and storage medium
CN109194706B (en) Network resource dial testing method and terminal
CN109995824B (en) Task scheduling method and device in peer-to-peer network
US10778571B2 (en) Flow entry timing processing method and apparatus
CN108156086B (en) Policy rule issuing method and device
EP2930617A1 (en) Resource management method and device
CN104469427A (en) Data transmission method and terminal and server

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