Routing link switching method, device, electronic device and readable storage medium

By predicting and filtering routing links, network link switching is realized during video playback, solving the problem of lag in video playback when network is unstable and improving user experience.

CN119788584APending Publication Date: 2025-04-08TENCENT TECHNOLOGY (SHENZHEN) CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202311304752.2
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2023-10-08
Publication Date
2025-04-08

AI Technical Summary

Technical Problem

In the prior art, video playback is prone to lag or slow loading when the network state is unstable, which affects the user's viewing experience.

Method used

By obtaining the link handover request, predict the transmission quality indicators based on the historical transmission quality indicators of each candidate routing link, determine the transmission efficiency, and filter out the target routing link. Then, the play request is sent to the server through the target routing link, the transmission distance of the video resource node is determined, and the video resource data is obtained for playback.

Benefits of technology

The optimization of the routing link is achieved, ensuring the stability and efficiency of the current transmission network, avoiding lags or slow loading during video playback, and improving the user's viewing experience.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119788584A_ABST
    Figure CN119788584A_ABST
Patent Text Reader

Abstract

The embodiments of the present application provide a routing link switching method, device, electronic device and computer-readable storage medium, which relate to the field of network transmission technology. The method includes: obtaining a link switching request, predicting at least one predicted transmission quality indicator of each candidate routing link based on at least one historical transmission quality indicator of each candidate routing link; determining the transmission efficiency of each candidate routing link based on at least one predicted transmission quality indicator, and screening out a target routing link from each candidate routing link according to the transmission efficiency; sending a play request to the server through the target routing link, so that the server determines the main playback address based on the play request; obtaining video resource data from the main playback address, and playing the video resource data. The embodiments of the present invention can be applied to vehicle-mounted scenarios. When the vehicle-mounted client is playing online videos, the routing link can be switched through the above scheme, which can improve the efficiency and quality of video playback.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of network transmission technology. Specifically, the present application relates to a routing link switching method, device, electronic device and computer-readable storage medium. Background Art

[0002] With the development of wireless networks, the proportion of video services is increasing. Unlike data services, video services, such as live video, have strict requirements on the transmission rate, error rate and latency of wireless networks. Routing links are responsible for connecting network devices and ensuring reliable data transmission. The quality of routing links will directly affect the speed and stability of data transmission, so it is very important to optimize routing links.

[0003] In the prior art, data transmission is usually performed based on a single routing link to achieve video playback. For this single routing link, a specific encoding method can be used to reduce the packet loss rate of routing transmission to achieve optimization of the routing link. However, when the network status is unstable, the video playback is prone to freeze or slow loading, affecting the user's viewing experience. Summary of the invention

[0004] The embodiments of the present application provide a routing link switching method, device, electronic device and computer-readable storage medium, which can solve the problem of video playback freeze in the prior art. The technical solution is as follows:

[0005] According to one aspect of an embodiment of the present application, a routing link switching method is provided, which is applied to a client, and the method includes:

[0006] Obtaining a link switching request, and predicting at least one predicted transmission quality indicator of each candidate routing link based on at least one historical transmission quality indicator of each candidate routing link;

[0007] Determine the transmission efficiency of each candidate routing link based on at least one predicted transmission quality indicator, and select a target routing link from each candidate routing link according to the transmission efficiency; wherein the transmission efficiency of the target routing link is not less than a preset first threshold;

[0008] Sending a play request to the server through the target routing link, so that the server determines the transmission distance between the client and each video resource node based on the play request, takes the video resource node whose transmission distance is not greater than the second threshold as the main node, and takes the address of the main node as the main play address;

[0009] Get the video resource data from the main playback address and play the video resource data.

[0010] In a possible implementation, the link switching request is triggered based on at least one of the following situations:

[0011] Receiving an indication of routing link switching;

[0012] Detects changes in the network status of the current video playback;

[0013] It is detected that the transmission efficiency index of the current routing link meets the switching condition.

[0014] In a possible implementation, the link switching request is sent based on a preset detection period;

[0015] The above method further includes:

[0016] determining at least one current transmission quality indicator of a current routing link;

[0017] determining a transmission efficiency of a current routing link based on at least one current transmission quality indicator;

[0018] The target routing link is selected from each candidate routing link according to the transmission efficiency, including:

[0019] The target routing link is selected from the current routing link and each candidate routing link according to the transmission efficiency.

[0020] In yet another possible implementation, the determining of the transmission efficiency of each candidate routing link based on at least one predicted transmission quality indicator includes:

[0021] For each candidate routing link, perform the following operations:

[0022] For each predicted transmission quality indicator, determine the maximum value and the minimum value of the corresponding historical transmission quality indicator; determine a first difference between the maximum value and the minimum value; determine a second difference between the maximum value and the predicted transmission quality indicator, and determine a first transmission efficiency corresponding to the predicted transmission quality indicator based on a ratio of the first difference and the second difference;

[0023] The transmission efficiency of the candidate routing link is determined based on the weighted sum of the first transmission efficiencies.

[0024] In another possible implementation, the above-mentioned predicted transmission quality indicator is predicted based on the following method:

[0025] The historical transmission quality indicators are input into the pre-trained prediction model, and the prediction model makes predictions based on the historical transmission quality indicators and outputs the predicted transmission quality indicators of the candidate routing links;

[0026] Among them, the prediction model is trained based on the following method:

[0027] Obtaining historical transmission quality indicator samples and sample labels corresponding to the historical transmission quality indicator samples; wherein the historical transmission quality indicator samples and the sample labels are transmission quality indicators that are adjacent in time sequence;

[0028] Inputting historical transmission quality indicator samples into the initial model to obtain predicted transmission quality indicator samples corresponding to the historical transmission quality indicator samples;

[0029] The difference between the historical transmission quality index sample and the predicted transmission quality index sample is calculated based on the preset loss function, and the parameters of the initial model are iteratively updated based on the difference, until the difference between the predicted transmission quality index sample obtained based on the updated initial model and the historical transmission quality index sample is no greater than the preset threshold, and the updated initial model is used as the prediction model.

[0030] In another possible implementation, each candidate routing link is constructed based on the following method:

[0031] Based on the domain name of the server, resolve and obtain at least two Internet Protocol addresses corresponding to the server;

[0032] For each Internet Protocol address, do the following:

[0033] Obtaining a candidate queue of Internet Protocol addresses; wherein the candidate queue includes a first resolution address and a second resolution address; the transmission efficiency of the first resolution address is higher than the transmission efficiency of the second resolution address;

[0034] Sending link establishment requests based on the first resolution address and the second resolution address respectively, when the confirmation return information of the first resolution address is received first, building a candidate routing link based on the first resolution address; when the confirmation return information of the second resolution address is received first, building the candidate routing link after a preset delay;

[0035] After sending the link establishment request based on the first resolution address and the second resolution address respectively, the first resolution address and the second resolution address are deleted from the candidate queue.

[0036] In another possible implementation, the step of constructing a candidate routing link after waiting for a preset delay includes:

[0037] When confirmation return information of the first resolution address is received within a preset delay, a candidate routing link is constructed based on the first resolution address;

[0038] When no confirmation return information of the first resolution address is received within the preset delay, a candidate routing link is constructed based on the second resolution address, and the first resolution address is re-added to the candidate queue.

[0039] According to another aspect of an embodiment of the present application, a routing link switching device is provided, the device comprising:

[0040] A prediction module, configured to obtain a link switching request and predict at least one predicted transmission quality indicator of each candidate routing link based on at least one historical transmission quality indicator of each candidate routing link;

[0041] A screening module, configured to determine the transmission efficiency of each candidate routing link based on at least one predicted transmission quality indicator, and screen a target routing link from each candidate routing link according to the transmission efficiency; wherein the transmission efficiency of the target routing link is not less than a preset first threshold;

[0042] A sending module, used for sending a play request to the server through a target routing link, so that the server determines the transmission distance between the client and each video resource node based on the play request, takes the video resource node whose transmission distance is not greater than the second threshold as the main node, and takes the address of the main node as the main play address;

[0043] The playback module is used to obtain video resource data from the main playback address and play the video resource data.

[0044] In a possible implementation, the link switching request is triggered based on at least one of the following situations:

[0045] Receiving an indication of routing link switching;

[0046] Detects changes in the network status of the current video playback;

[0047] It is detected that the transmission efficiency index of the current routing link meets the switching condition.

[0048] In a possible implementation, the link switching request is sent based on a preset detection period;

[0049] The above screening module is also used for:

[0050] determining at least one current transmission quality indicator of a current routing link;

[0051] determining a transmission efficiency of a current routing link based on at least one current transmission quality indicator;

[0052] When the above-mentioned screening module screens out the target routing link from each candidate routing link according to the transmission efficiency, it is used to:

[0053] The target routing link is selected from the current routing link and each candidate routing link according to the transmission efficiency.

[0054] In yet another possible implementation, when determining the transmission efficiency of each candidate routing link based on at least one predicted transmission quality indicator, the screening module is configured to:

[0055] For each candidate routing link, perform the following operations:

[0056] For each predicted transmission quality indicator, determine the maximum value and the minimum value of the corresponding historical transmission quality indicator; determine a first difference between the maximum value and the minimum value; determine a second difference between the maximum value and the predicted transmission quality indicator, and determine a first transmission efficiency corresponding to the predicted transmission quality indicator based on a ratio of the first difference and the second difference;

[0057] The transmission efficiency of the candidate routing link is determined based on the weighted sum of the first transmission efficiencies.

[0058] In another possible implementation, the above-mentioned predicted transmission quality indicator is predicted based on the following method:

[0059] The historical transmission quality indicators are input into the pre-trained prediction model, and the prediction model makes predictions based on the historical transmission quality indicators and outputs the predicted transmission quality indicators of the candidate routing links;

[0060] Among them, the prediction model is trained based on the following method:

[0061] Obtaining historical transmission quality indicator samples and sample labels corresponding to the historical transmission quality indicator samples; wherein the historical transmission quality indicator samples and the sample labels are transmission quality indicators that are adjacent in time sequence;

[0062] Inputting historical transmission quality indicator samples into the initial model to obtain predicted transmission quality indicator samples corresponding to the historical transmission quality indicator samples;

[0063] The difference between the historical transmission quality index sample and the predicted transmission quality index sample is calculated based on the preset loss function, and the parameters of the initial model are iteratively updated based on the difference, until the difference between the predicted transmission quality index sample obtained based on the updated initial model and the historical transmission quality index sample is no greater than the preset threshold, and the updated initial model is used as the prediction model.

[0064] In another possible implementation, the apparatus further includes a building module, which is used to:

[0065] Based on the domain name of the server, resolve and obtain at least two Internet Protocol addresses corresponding to the server;

[0066] For each Internet Protocol address, do the following:

[0067] Obtaining a candidate queue of Internet Protocol addresses; wherein the candidate queue includes a first resolution address and a second resolution address; the transmission efficiency of the first resolution address is higher than the transmission efficiency of the second resolution address;

[0068] Sending link establishment requests based on the first resolution address and the second resolution address respectively, when the confirmation return information of the first resolution address is received first, building a candidate routing link based on the first resolution address; when the confirmation return information of the second resolution address is received first, building the candidate routing link after a preset delay;

[0069] After sending the link establishment request based on the first resolution address and the second resolution address respectively, the first resolution address and the second resolution address are deleted from the candidate queue.

[0070] In another possible implementation, when the construction module waits for a preset delay to construct the candidate routing link, it is used to:

[0071] When confirmation return information of the first resolution address is received within a preset delay, a candidate routing link is constructed based on the first resolution address;

[0072] When no confirmation return information of the first resolution address is received within the preset delay, a candidate routing link is constructed based on the second resolution address, and the first resolution address is re-added to the candidate queue.

[0073] According to another aspect of an embodiment of the present application, an electronic device is provided, which includes: a memory, a processor, and a computer program stored in the memory, and the processor executes the computer program to implement the steps of the method shown in the first aspect of the embodiment of the present application.

[0074] According to another aspect of the embodiments of the present application, a computer-readable storage medium is provided, on which a computer program is stored. When the computer program is executed by a processor, the steps of the method shown in the first aspect of the embodiments of the present application are implemented.

[0075] According to one aspect of an embodiment of the present application, a computer program product is provided, which includes a computer program, and when the computer program is executed by a processor, the steps of the method shown in the first aspect of the embodiment of the present application are implemented.

[0076] The beneficial effects of the technical solution provided by the embodiment of the present application are:

[0077] After obtaining the link switching request, the embodiment of the present application predicts at least one predicted transmission quality indicator of each candidate routing link based on at least one historical transmission quality indicator of each candidate routing link; then determines the transmission efficiency of each candidate routing link based on at least one predicted transmission quality indicator, and screens out the target routing link from each candidate routing link according to the transmission efficiency. Then, a play request is sent to the server through the target routing link, so that the server determines the transmission distance between the client and each video resource node based on the play request, takes the video resource node whose transmission distance is not greater than the second threshold as the main node, and takes the address of the main node as the main playback address; thereby obtaining the video resource data from the main playback address, and playing the video resource data. The embodiment of the present application screens out the target routing link and implements the switching of the routing link by predicting and analyzing the transmission indicators of multiple candidate routing links; since the transmission efficiency of the target routing link is not less than the preset first threshold, the optimization of the routing link is achieved, which can ensure the stability and efficiency of the current transmission network. Different from the prior art, a specific encoding method is used for a single routing link to reduce the packet loss rate of routing transmission; the embodiment of the present application can effectively ensure the stability of the network status, avoid freezes or slow loading during video playback, and effectively improve the user's viewing experience. BRIEF DESCRIPTION OF THE DRAWINGS

[0078] In order to more clearly illustrate the technical solutions in the embodiments of the present application, the following briefly introduces the drawings required for use in describing the embodiments of the present application.

[0079] Figure 1 A schematic diagram of an application scenario of a routing link switching method provided in an embodiment of the present application;

[0080] Figure 2 A schematic diagram of a flow chart of a routing link switching method provided in an embodiment of the present application;

[0081] Figure 3 A schematic diagram of a process for selecting a target routing link in a routing link switching method provided in an embodiment of the present application;

[0082] Figure 4 A schematic diagram of a flow chart of determining transmission efficiency in a routing link switching method provided in an embodiment of the present application;

[0083] Figure 5 A schematic diagram of a process of training a prediction model in a routing link switching method provided in an embodiment of the present application;

[0084] Figure 6 A schematic diagram of a process of constructing a candidate routing link in a routing link switching method provided in an embodiment of the present application;

[0085] Figure 7A schematic diagram of another process of constructing a routing link in a routing link switching method provided in an embodiment of the present application;

[0086] Figure 8 A schematic diagram of a flow chart of an exemplary routing link switching method provided in an embodiment of the present application;

[0087] Fig. 9 A schematic diagram of the structure of a routing link switching device provided in an embodiment of the present application;

[0088] Fig.10 A schematic diagram of the structure of a routing link switching electronic device provided in an embodiment of the present application. DETAILED DESCRIPTION

[0089] The embodiments of the present application are described below in conjunction with the drawings in the present application. It should be understood that the implementation methods described below in conjunction with the drawings are exemplary descriptions for explaining the technical solutions of the embodiments of the present application and do not constitute a limitation on the technical solutions of the embodiments of the present application.

[0090] It will be understood by those skilled in the art that, unless specifically stated, the singular forms "one", "said", and "the" used herein may also include plural forms. It should be further understood that the terms "including" and "comprising" used in the embodiments of the present application refer to that the corresponding features can be implemented as the presented features, information, data, steps, operations, elements and / or components, but do not exclude the implementation as other features, information, data, steps, operations, elements, components and / or combinations thereof supported by the technical field. It should be understood that when we say that an element is "connected" or "coupled" to another element, the one element may be directly connected or coupled to the other element, or it may refer to that the one element and the other element establish a connection relationship through an intermediate element. In addition, the "connection" or "coupling" used herein may include wireless connection or wireless coupling. The term "and / or" used herein indicates at least one of the items defined by the term, for example, "A and / or B" may be implemented as "A", or as "B", or as "A and B".

[0091] In order to make the objectives, technical solutions and advantages of the present application clearer, the implementation methods of the present application will be further described in detail below with reference to the accompanying drawings.

[0092] A router is a hardware device that connects two or more networks. It acts as a gateway between networks and is a dedicated intelligent network device that reads the address in each data packet and then decides how to transmit it. Routers are configured with different transmission protocols, such as the Ethernet protocol used by a local area network and the TCP / IP (Transmission Control Protocol / Internet Protocol) protocol used by the Internet. Routers can analyze the destination addresses of data packets from various types of networks, convert addresses of non-TCP / IP networks into TCP / IP addresses, and then transmit each data packet to the designated location along the best route based on the selected routing algorithm. Therefore, routers can store and forward packets between different networks.

[0093] Existing Internet is operated on the basis of IPv4 (Internet Protocol version 4, Internet Protocol the 4th version) protocol. With the rapid development of the Internet, the emergence of Web (World Wide Web, World Wide Web) leads to the explosive development of the Internet. The limited address space defined by IPv4 is insufficient, and the IP address is unprecedentedly tight, which affects the further development of the Internet. Therefore, the next version of the Internet Protocol, IPv6 (Internet Protocol version 6, Internet Protocol the 6th version), is proposed. IPv6 adopts 128-bit address length, and provides almost unlimited addresses. It not only solves the problem that IPv4 cannot solve, but also adds authentication and encryption security measures at the IP layer to ensure security. IPv6 has the advantages of expanding address space, improving the overall throughput of the network, effectively improving service quality, ensuring security, mobility, and supporting plug-and-play, realizing multicast functions, etc. In the embodiment of the present application, its candidate routing link can be constructed based on IPv4 or IPv6 protocol.

[0094] Traditional video playback often uses a single routing link for data transmission. When the network is unstable, it is easy to have problems such as video playback freezes and slow loading. In the prior art, relevant methods can be used to optimize the above routing link. For example, a specific encoding can be used to reduce the packet loss rate of routing transmission. However, video playback based on the optimized routing link still cannot improve the problems of playback freezes and slow loading.

[0095] The routing link switching method, device, electronic device and computer-readable storage medium provided in the present application are intended to solve the above technical problems in the prior art.

[0096] The following describes several exemplary embodiments to illustrate the technical solutions of the embodiments of the present application and the technical effects produced by the technical solutions of the present application. It should be noted that the following embodiments can refer to, draw on or combine with each other, and the same terms, similar features and similar implementation steps in different embodiments will not be described repeatedly.

[0097] like Figure 1 As shown, the routing link switching method of the present application can be applied to Figure 1 In the scenario shown, specifically, the client terminal 101 obtains a link switching request, and predicts at least one predicted transmission quality indicator of each candidate routing link based on at least one historical transmission quality indicator of each candidate routing link; then, the transmission efficiency of each candidate routing link is determined based on the at least one predicted transmission quality indicator, and a target routing link is screened out from each candidate routing link according to the transmission efficiency; the client terminal 101 sends a playback request to the server 102 through the above-mentioned target routing link, and the server 102 responds to the playback request, determines the transmission distance between the client terminal 101 and each video resource node, and uses the video resource node whose transmission distance is not greater than the second threshold as the main node, and uses the address of the main node as the main playback address; the client terminal 101 obtains the video resource data from the main playback address, and plays the obtained video resource data.

[0098] Figure 1 In the scenario shown, the above-mentioned routing link switching method can be performed in a user terminal, and in other scenarios, it can also be performed in a server.

[0099] Those skilled in the art can understand that the "user terminal" used here includes but is not limited to mobile phones, computers, intelligent voice interaction devices, smart home appliances, vehicle terminals, aircraft, etc.; "server" can be implemented by an independent server or a server cluster composed of multiple servers. The embodiments of the present invention can be applied to various scenarios, including but not limited to cloud technology, artificial intelligence, smart transportation, assisted driving, etc.

[0100] The present application provides a method for switching a routing link. Figure 2 As shown, it can be applied to a client for video playback, and the method includes:

[0101] S201, obtaining a link switching request, and predicting at least one predicted transmission quality indicator of each candidate routing link based on at least one historical transmission quality indicator of each candidate routing link.

[0102] Among them, at least one historical transmission quality indicator may include indicators such as transmission delay, bandwidth and packet loss rate of the routing link. Each historical transmission quality indicator corresponds to a predicted transmission quality indicator. The above historical transmission quality indicator may be a transmission indicator of each candidate routing link within a preset historical time period.

[0103] In some embodiments, the candidate routing links may be preset and constructed based on the happy eyeballs v2 (an improved connection establishment strategy) algorithm; specifically, the video playback client may obtain the IP (Internet Protocol) address corresponding to the server domain name through the DNS (Domain Name System) service, and then establish a candidate routing link connection based on the IP address, and put the constructed candidate routing link into a connection pool for reuse by the network library of the video playback client; the detailed routing link construction steps will be described in detail below.

[0104] Optionally, the link switching request may be determined based on a user input operation to a video playback client, may be determined by the video playback client according to the current network status of the video playback, or may be sent by the server to the video playback client based on the transmission status of the current routing link, which is not specifically limited in the embodiments of the present application.

[0105] Specifically, the video playback client can detect the network status of the current video playback in real time. When it is detected that the network status switches from high-definition playback to low-flow playback, a link switching request is determined; in response to the link switching request, at least one historical transmission quality indicator of each candidate routing link within a preset historical time period is obtained, and the corresponding predicted transmission quality indicator is predicted based on each historical transmission quality indicator.

[0106] S202: Determine the transmission efficiency of each candidate routing link based on at least one predicted transmission quality indicator, and select a target routing link from each candidate routing link according to the transmission efficiency.

[0107] The transmission efficiency of the target routing link is not less than a preset first threshold.

[0108] Optionally, the candidate routing links may be arranged in descending order of transmission efficiency and put into the connection pool according to the above arrangement order. The above first threshold may be the transmission efficiency of the first ranked candidate routing link, ie the maximum transmission efficiency of the candidate routing links in the connection pool.

[0109] Specifically, for each candidate routing link, the video playback client can determine the first transmission efficiency corresponding to each corresponding predicted transmission quality indicator, and then determine the transmission efficiency of the candidate routing link based on each first transmission efficiency; then the video playback client can filter out the candidate routing link whose transmission efficiency is greater than a preset first threshold from each candidate routing link as the target routing link.

[0110] S203, sending a play request to the server through the target routing link, so that the server determines the transmission distance between the client and each video resource node based on the play request, and takes the video resource node whose transmission distance is not greater than the second threshold as the main node, and takes the address of the main node as the main play address.

[0111] The video resource node may be a CDN (Content Delivery Network) node, and each video resource node stores video resource data to be played.

[0112] In the embodiment of the present application, the basic idea of ​​the CND network is to avoid the bottlenecks and links on the Internet that may affect the data transmission speed and stability as much as possible, so that the content can be transmitted faster and more stably. By placing node servers in various places on the network to form a layer of intelligent virtual network on the existing Internet, the CDN system can redirect the user's request to the service node closest to the user in real time based on comprehensive information such as network traffic and the connection and load status of each node, as well as the distance to the user and response time. CDN can enable users to obtain the required content, namely video resource data, nearby, solve the problem of Internet network congestion, and improve the response speed of users visiting websites.

[0113] Optionally, after the server determines the transmission distance between the client and each video resource node, the video resource nodes can be arranged in ascending order based on the transmission distance; wherein the second threshold can be the transmission distance of the video resource node ranked first, that is, the minimum value of the transmission distance of each video resource node.

[0114] Specifically, the video playback client establishes a wireless communication connection with the server through the target routing link, and then sends a playback request to the server; the server determines the transmission distance between the video playback client and each video resource node in response to the playback request, and selects the video resource node with the smallest transmission distance as the main node, and returns the address of the main node to the video playback client as the main playback address.

[0115] S204, obtaining video resource data from the main playback address, and playing the video resource data.

[0116] In an embodiment of the present application, after the server determines the main playback address, the video playback client can obtain the main playback address from the server to update the current playback address; then obtain the video resource data from the main playback address to play the video resource data.

[0117] After obtaining the link switching request, the embodiment of the present application predicts at least one predicted transmission quality indicator of each candidate routing link based on at least one historical transmission quality indicator of each candidate routing link; then determines the transmission efficiency of each candidate routing link based on at least one predicted transmission quality indicator, and screens out the target routing link from each candidate routing link according to the transmission efficiency. Then, a play request is sent to the server through the target routing link, so that the server determines the transmission distance between the client and each video resource node based on the play request, takes the video resource node whose transmission distance is not greater than the second threshold as the main node, and takes the address of the main node as the main playback address; thereby obtaining the video resource data from the main playback address, and playing the video resource data. The embodiment of the present application screens out the target routing link and implements the switching of the routing link by predicting and analyzing the transmission indicators of multiple candidate routing links; since the transmission efficiency of the target routing link is not less than the preset first threshold, the optimization of the routing link is achieved, which can ensure the stability and efficiency of the current transmission network. Different from the prior art, a specific encoding method is used for a single routing link to reduce the packet loss rate of routing transmission; the embodiment of the present application can effectively ensure the stability of the network status, avoid freezes or slow loading during video playback, and effectively improve the user's viewing experience.

[0118] In an embodiment of the present application, a possible implementation is provided, wherein the link switching request is triggered based on at least one of the following situations:

[0119] (1) Receive an instruction to switch the routing link.

[0120] The above-mentioned indication of the routing link switching may be determined based on the input operation of the user.

[0121] Specifically, the user's input operation includes at least one of the following:

[0122] Enter the text information of the link switching instruction in the preset text box;

[0123] Drag or move the preset link switching component to a preset range of the display interface;

[0124] Click operation for link switching component.

[0125] In the embodiment of the present application, the user may perform the above input operation on the video playback client, so that the video playback client receives an indication of routing link switching.

[0126] (2) A change in the network status of the current video playback is detected.

[0127] Specifically, the video playback client can detect the network status of the current video playback, and obtain a link switching request when a network status change is detected: for example, switching from high-definition playback to a stream-saving playback state, or from a stream-saving playback state to a cache waiting state.

[0128] (3) It is detected that the transmission efficiency index of the current routing link meets the switching conditions.

[0129] The transmission efficiency index of the current routing link may be obtained by monitoring the server. The transmission efficiency index may be determined based on at least one of the transmission indicators such as the transmission bandwidth, delay and packet loss rate of the current routing link.

[0130] Optionally, the switching condition may be that a transmission efficiency index is less than a preset transmission threshold.

[0131] Specifically, the server can monitor the transmission efficiency index of the current routing link based on a preset time interval, and send the monitored transmission efficiency index to the video playback client. The video playback client determines whether the above transmission efficiency index meets the preset switching condition. When the switching condition is met, a link switching request is obtained.

[0132] The embodiment of the present application dynamically monitors at least one of the user operation, the network status of the current video playback, and the transmission status of the current routing link, and triggers the video playback client to obtain a link switching request, so that the client can switch the current routing link in a timely manner based on the real-time network status of the video playback or the routing transmission status, thereby ensuring the timeliness and efficiency of the link switching and laying a good foundation for the smooth playback of subsequent videos.

[0133] A possible implementation method is provided in an embodiment of the present application, and the link switching request may also be sent based on a preset detection period.

[0134] like Figure 3 As shown, the above method also includes:

[0135] S301, determining at least one current transmission quality indicator of a current routing link.

[0136] The above-mentioned current transmission quality indicators may include indicators such as transmission delay, bandwidth and packet loss rate of the current routing link.

[0137] Optionally, the current transmission quality index may be index data from the current time point to a historical time point, and the historical time point may be a time point determined by a preset time period moving forward from the current time point. For example, if the current time point is 8:30 and the preset time period is 5 minutes, the index data between 8:25 and 8:30 may be used as the current transmission quality index.

[0138] S302: Determine a transmission efficiency of a current routing link based on at least one current transmission quality indicator.

[0139] Specifically, for each current transmission quality indicator, the video playback client can calculate the target mean of the current transmission quality indicator; and then determine the transmission efficiency of the current routing link based on each target mean. The transmission efficiency can be calculated by respectively calculating the first ratio between each target mean and the preset target value corresponding to the target mean, and then weighting the first ratio corresponding to each target mean to obtain the transmission efficiency of the current routing link.

[0140] In some implementations, the three indicator data of transmission delay, bandwidth and packet loss rate of the current link between 8:25 and 8:30 can be obtained respectively; then the average delay, average bandwidth and average packet loss rate in this time period can be calculated, and then the transmission efficiency of the current routing link can be calculated based on the average delay, average bandwidth and average packet loss rate.

[0141] S303, the above-mentioned step of selecting a target routing link from each candidate routing link according to the transmission efficiency includes:

[0142] The target routing link is selected from the current routing link and each candidate routing link according to the transmission efficiency.

[0143] The target routing link may be a link with the highest transmission efficiency among the current routing link and various candidate routing links.

[0144] The embodiment of the present application analyzes the link transmission quality of the current routing link and each candidate routing link, and then selects the target routing link with the highest transmission efficiency. Since the transmission efficiency of the routing link can change in real time with the network status, the transmission efficiency of the current routing link will also change accordingly. However, if the change does not affect the overall video playback status, the current routing link can be used as the target routing link, that is, without link switching, the video playback efficiency can still be guaranteed, and the efficiency of the current transmission network can be improved.

[0145] A possible implementation method is provided in the embodiment of the present application, such as Figure 4 As shown, the above-mentioned determining the transmission efficiency of each candidate routing link based on at least one predicted transmission quality indicator includes:

[0146] For each candidate routing link, perform the following operations:

[0147] S401, for each predicted transmission quality indicator, determine the maximum and minimum values ​​of the corresponding historical transmission quality indicator; determine a first difference between the maximum and minimum values; determine a second difference between the maximum and the predicted transmission quality indicator, and determine a first transmission efficiency corresponding to the predicted transmission quality indicator based on the ratio of the first difference and the second difference.

[0148] Specifically, the video playback client can measure and obtain the above historical transmission quality indicators based on the ping command or traceroute command; for example, the ping-c 5-s 64-w 1 112.90.80.31 command can be used to specify sending 5 ICMP (Internet Control Message Protocol) messages to the IP address 112.90.80.31 to obtain the average, minimum, maximum and average round-trip time; the traceroute-m 15-q 1-nw 1 112.90.80.31 command can be used to obtain the trace path from the current client to the target IP address 112.90.80.31, and the number of hops and the round-trip time to each node can be obtained to obtain the path length, delay and packet loss rate of the corresponding routing link. Through the above measurement method, the quality indicators of each routing link can be obtained to provide data support for subsequent adaptive routing selection.

[0149] In some embodiments, for each predicted transmission quality indicator, the maximum value, minimum value, and average value of the corresponding historical transmission quality indicator can be determined; the first difference between the maximum value and the minimum value can be determined; the second difference between the maximum value and the predicted transmission quality indicator can be determined, and then the first transmission efficiency corresponding to the predicted transmission quality indicator can be determined based on the first difference, the second difference, and the average value.

[0150] Taking the link transmission delay as an example, the maximum value MaxDelay, the minimum value MinDelay, and the average value AvgDelay of the historical delay values ​​in the historical time period can be measured. When the predicted transmission delay is Delay, the first transmission efficiency DelayScore corresponding to the link transmission delay can be calculated based on the following formula:

[0151] DelayScore=(MaxDelay-Delay) / (MaxDelay-MinDelay) / AvgDelay(1)

[0152] Specifically, when the first transmission efficiency DelayScore corresponding to the delay is higher, the delay of the routing link is smaller and the transmission quality of the routing link is higher. When the predicted transmission quality indicator is the link transmission bandwidth, the corresponding first transmission efficiency BandwidthScore is higher, the bandwidth of the routing link is larger, and the transmission quality of the routing link is better. When the predicted transmission quality indicator is the link transmission packet loss rate, the corresponding first transmission efficiency PacketLossScore is higher, the packet loss rate of the routing link is smaller, and the transmission quality of the routing link is better.

[0153] S402: Determine the transmission efficiency of the candidate routing link based on the weighted sum of each first transmission efficiency.

[0154] The weight of each first transmission efficiency may be determined based on a QoS (Quality of Service) requirement.

[0155] For example, when the video playback client is used in scenarios such as real-time audio and video streaming, the scenario is sensitive to transmission delay, so the QoS requirement can be set to the minimum delay routing link, and the weight of the first transmission efficiency corresponding to the delay can be set to the maximum, and the weights of other first transmission efficiencies can be set to 0.

[0156] Optionally, when the video playback client is used in scenarios such as real-time video conferencing or online games, there are high requirements for the integrity of the transmitted data in this scenario, so the QoS requirement can be set to the minimum packet loss rate routing link, and the weight of the first transmission efficiency corresponding to the packet loss rate can be set to the maximum, and the weights of other first transmission efficiencies can be set to 0.

[0157] Optionally, when the video playback client is used in scenarios such as online video on demand, the stability of the transmitted data needs to be guaranteed in this scenario, so the QoS requirement can be set to the minimum blocking routing link, and the weight of the first transmission efficiency corresponding to the blocking degree can be set to the maximum, and the weights of other first transmission efficiencies can be set to 0.

[0158] Optionally, in a scenario where multiple QoS demand factors need to be considered, the weight of the first transmission efficiency corresponding to each transmission quality indicator can be set according to the specific scenario requirements to meet the user's multiple QoS demand targets and achieve comprehensive optimization of routing links.

[0159] The embodiment of the present application determines the first transmission efficiency corresponding to each predicted transmission quality indicator through each predicted transmission quality indicator and the corresponding historical transmission quality indicator, and calculates the transmission efficiency of each candidate routing link based on each first transmission efficiency, thereby realizing a comprehensive analysis of the transmission efficiency of each candidate routing link; since the weight of each first transmission efficiency can be determined based on the user's QoS requirements or application scenarios, personalized routing link screening can be realized, effectively ensuring the stability and efficiency of video playback.

[0160] A possible implementation method is provided in an embodiment of the present application. The above-mentioned predicted transmission quality indicator is predicted based on the following method:

[0161] The historical transmission quality indicators are input into the pre-trained prediction model, and the prediction model makes predictions based on the historical transmission quality indicators and outputs the predicted transmission quality indicators of the candidate routing links.

[0162] Among them, Figure 5 As shown in the figure, the prediction model is trained based on the following method:

[0163] Obtaining historical transmission quality indicator samples and sample labels corresponding to the historical transmission quality indicator samples; wherein the historical transmission quality indicator samples and the sample labels are transmission quality indicators that are adjacent in time sequence;

[0164] Inputting historical transmission quality indicator samples into the initial model to obtain predicted transmission quality indicator samples corresponding to the historical transmission quality indicator samples;

[0165] The difference between the historical transmission quality index sample and the predicted transmission quality index sample is calculated based on the preset loss function, and the parameters of the initial model are iteratively updated based on the difference, until the difference between the predicted transmission quality index sample obtained based on the updated initial model and the historical transmission quality index sample is no greater than the preset threshold, and the updated initial model is used as the prediction model.

[0166] Among them, the above-mentioned preset threshold can be determined based on the loss value of the loss function. For example, the minimum value of the loss function can be solved based on the gradient descent method, and the minimum value is used as the preset threshold. In the embodiment of the present application, the gradient descent method is an iterative optimization algorithm, according to which the gradient of each parameter of the initial model can be evaluated, and the parameters can be updated using the gradient back propagation algorithm, and the model parameters can be iteratively optimized in the direction of minimizing the loss function until they converge to the minimum value point of the loss function; the specific operation steps of the above-mentioned iterative optimization algorithm are not specifically described in the embodiment of the present application.

[0167] In the embodiments of the present application, the above-mentioned prediction model can be established based on machine learning, statistics or other prediction methods, which can be a regression model, a time series model or a neural network model, etc., which is not specifically limited in the embodiments of the present application.

[0168] Optionally, before inputting the historical transmission quality indicators into the pre-trained prediction model, the historical transmission quality indicators need to be preprocessed. The data preprocessing operation may include: using statistical or filtering methods to extract time-related characteristics (such as data trends, periodicity, etc.) and path characteristics (such as path length, node blocking conditions, etc.) of the historical transmission quality indicators, and then screening the extracted feature data to remove outliers, noise or invalid values, etc., to obtain high-dimensional features of the historical transmission quality indicators. The prediction model then performs prediction processing based on the above high-dimensional features to obtain the predicted transmission quality indicators of the corresponding candidate routing links.

[0169] Optionally, taking the example that the historical transmission quality indicator data includes data in the segment between 08:00 and 08:10, the data in the segment between 08:00 and 08:09 can be used as the historical transmission quality sample, and the data in the segment between 08:09 and 08:10 can be used as the corresponding sample label.

[0170] The embodiment of the present application trains the initial model through historical transmission quality indicator samples and corresponding sample labels to obtain a trained prediction model, and then predicts the historical transmission quality indicator based on the prediction model to obtain the predicted transmission quality indicator of the candidate routing link. It can realize indicator prediction based on historical data of the transmission quality indicator, and can improve the accuracy of subsequent calculation of the transmission efficiency of the routing link.

[0171] A possible implementation method is provided in the embodiment of the present application, such as Figure 6 As shown, each candidate routing link is constructed based on the following method:

[0172] S501, based on the domain name of the server, resolve and obtain at least two Internet Protocol addresses corresponding to the server.

[0173] The above Internet Protocol address may be an IP address based on IPv6 or an IP address based on IPv4.

[0174] Specifically, the video playback client can resolve the domain name of the server through the DNS (Domain Name System) service to obtain multiple IP addresses. DNS is an Internet service that acts as a distributed database that maps domain names and IP addresses to each other, making it easier for people to access the Internet.

[0175] S502, performing the following operations for each Internet Protocol address:

[0176] S5021, obtain a candidate queue of Internet Protocol addresses.

[0177] The candidate queue includes a first resolution address and a second resolution address; the transmission efficiency of the first resolution address is higher than the transmission efficiency of the second resolution address. For example, the first resolution address may be an IP address based on IPv6, and the second resolution address may be an IP address based on IPv4.

[0178] S5022, sending link establishment requests based on the first resolution address and the second resolution address respectively, when the confirmation return information of the first resolution address is received first, constructing a candidate routing link based on the first resolution address; when the confirmation return information of the second resolution address is received first, constructing the candidate routing link after a preset delay.

[0179] S5023: After sending the link establishment request based on the first resolution address and the second resolution address respectively, delete the first resolution address and the second resolution address from the candidate queue.

[0180] In the embodiment of the present application, after each candidate routing link is constructed, the candidate routing link can be put into a connection pool for reuse by the network library of the video playback client.

[0181] A possible implementation method is provided in the embodiment of the present application, such as Figure 7 As shown, the above-mentioned construction of the candidate routing link after waiting for the preset delay includes:

[0182] When confirmation return information of the first resolution address is received within a preset delay, a candidate routing link is constructed based on the first resolution address;

[0183] When no confirmation return information of the first resolution address is received within the preset delay, a candidate routing link is constructed based on the second resolution address, and the first resolution address is re-added to the candidate queue.

[0184] In the embodiment of the present application, a link establishment request is sent through the first resolution address and the second resolution address. When the confirmation return information of the first resolution address is received first, a candidate routing link is constructed based on the first resolution address; when the confirmation return information of the second resolution address is received first, the candidate routing link is constructed after a preset delay; that is, in the embodiment of the present application, the candidate routing link is preferentially constructed based on the first resolution address, that is, the routing link with high transmission efficiency is preferentially constructed, which effectively improves the transmission efficiency of the candidate routing link; at the same time, while waiting for the preset delay, if the confirmation return information of the first resolution address is not received, the candidate routing link is constructed based on the second resolution address, and the first resolution address is re-added to the candidate queue, so that the video playback client continues to try to construct the candidate routing link based on the first resolution address when it obtains the candidate queue of the IP address next time, so as to improve the diversity of the candidate routing links and ensure the stability of the network connection.

[0185] In order to better understand the above-mentioned routing link switching method, Figure 8 An example of a routing link switching method of the present application is described in detail, the method comprising the following steps:

[0186] S601, the video playback client 801 detects the network status of the current video playback, and when a network status change is detected, such as switching from high-definition playback to a stream-saving playback state, or from a stream-saving playback state to a cache waiting state, a link switching request is obtained.

[0187] S602, the video playback client 801 obtains historical transmission quality indicators of each candidate routing link within a preset historical time period in response to the link switching request; wherein the historical transmission quality indicators include transmission delay data, bandwidth data and packet loss rate data.

[0188] The above delay data, bandwidth data and packet loss rate data are respectively input into the pre-trained prediction model to obtain the corresponding predicted delay data, predicted bandwidth data and predicted packet loss rate data.

[0189] Among them, the prediction model is trained based on the following method:

[0190] Obtain historical transmission quality indicator samples and sample labels corresponding to the historical transmission quality indicator samples; wherein the historical transmission quality indicator samples and the sample labels are transmission quality indicators that are adjacent in time series; input the historical transmission quality indicator samples into the initial model to obtain predicted transmission quality indicator samples corresponding to the historical transmission quality indicator samples; calculate the difference between the historical transmission quality indicator samples and the predicted transmission quality indicator samples based on a preset loss function, and iteratively update the parameters of the initial model based on the difference, until the difference between the predicted transmission quality indicator samples obtained based on the updated initial model and the historical transmission quality indicator samples is no greater than a preset threshold, and use the updated initial model as the prediction model.

[0191] Specifically, each candidate routing link is constructed based on the following method:

[0192] The video playback client 801 resolves the domain name of the server 802 through the DNS service and obtains multiple IP addresses. The following operations are performed for each Internet Protocol address:

[0193] A candidate queue of IP addresses is obtained; wherein the candidate queue includes IP addresses based on IPv6 and IP addresses based on IPv4.

[0194] Send link establishment requests based on the IPv6 address and the IPv4 address respectively, and when the confirmation return information of the first resolved address is received first, build a candidate routing link based on the IPv6 address;

[0195] When the confirmation return information of the IPv4 address is received first, and the confirmation return information of the IPv6 address is received within the preset delay, a candidate routing link is constructed based on the IPv6 address;

[0196] When the confirmation return information of the IPv4 address is received first, and the confirmation return information of the IPv6 address is not received within the preset delay, a candidate routing link is constructed based on the IPv4 address, and the IPv6 address is re-added to the candidate queue.

[0197] After sending the link establishment request based on the IPv6 address and the IPv4 address respectively, the first resolution address and the second resolution address are deleted from the candidate queue. After each candidate routing link is constructed, the candidate routing link can be put into the connection pool for reuse by the network library of the video playback client 801.

[0198] S603, performing the following operations for each candidate routing link:

[0199] For each predicted transmission quality indicator, determine the maximum and minimum values ​​of the corresponding historical transmission quality indicator; determine a first difference between the maximum and minimum values; determine a second difference between the maximum and the predicted transmission quality indicator, and determine a first transmission efficiency corresponding to the predicted transmission quality indicator based on a ratio of the first difference and the second difference; determine the transmission efficiency of the candidate routing link based on a weighted sum of the first transmission efficiencies.

[0200] The above-mentioned predicted transmission quality index includes at least one of predicted delay data, predicted bandwidth data and predicted packet loss rate data.

[0201] S604: The video playback client 801 selects a candidate routing link having a transmission efficiency greater than a preset first threshold from each candidate routing link as a target routing link.

[0202] S605 , the video playing client 801 establishes a wireless communication connection with the server 802 via the target routing link, and then sends a playing request to the server 802 .

[0203] S606, the server 802 determines the transmission distance between the video playback client 801 and each video resource node in response to the playback request, and selects the video resource node with the smallest transmission distance as the main node, and returns the address of the main node as the main playback address to the video playback client 801.

[0204] S607, the video playback client 801 may obtain the main playback address from the server 802 to update the current playback address; and then obtain the video resource data from the main playback address to play the video resource data.

[0205] After obtaining the link switching request, the embodiment of the present application predicts at least one predicted transmission quality indicator of each candidate routing link based on at least one historical transmission quality indicator of each candidate routing link; then determines the transmission efficiency of each candidate routing link based on at least one predicted transmission quality indicator, and screens out the target routing link from each candidate routing link according to the transmission efficiency. Then, a play request is sent to the server through the target routing link, so that the server determines the transmission distance between the client and each video resource node based on the play request, takes the video resource node whose transmission distance is not greater than the second threshold as the main node, and takes the address of the main node as the main playback address; thereby obtaining the video resource data from the main playback address, and playing the video resource data. The embodiment of the present application screens out the target routing link and implements the switching of the routing link by predicting and analyzing the transmission indicators of multiple candidate routing links; since the transmission efficiency of the target routing link is not less than the preset first threshold, the optimization of the routing link is achieved, which can ensure the stability and efficiency of the current transmission network. Different from the prior art, a specific encoding method is used for a single routing link to reduce the packet loss rate of routing transmission; the embodiment of the present application can effectively ensure the stability of the network status, avoid freezes or slow loading during video playback, and effectively improve the user's viewing experience.

[0206] The present application embodiment provides a routing link switching device, such as Fig. 9 As shown, the routing link switching device 90 may include: a prediction module 901, a screening module 902, a sending module 903 and a playing module 904;

[0207] The prediction module 901 is used to obtain a link switching request and predict at least one predicted transmission quality indicator of each candidate routing link based on at least one historical transmission quality indicator of each candidate routing link;

[0208] A screening module 902 is used to determine the transmission efficiency of each candidate routing link based on at least one predicted transmission quality indicator, and screen a target routing link from each candidate routing link according to the transmission efficiency; wherein the transmission efficiency of the target routing link is not less than a preset first threshold;

[0209] The sending module 903 is used to send a play request to the server through the target routing link, so that the server determines the transmission distance between the client and each video resource node based on the play request, takes the video resource node whose transmission distance is not greater than the second threshold as the main node, and takes the address of the main node as the main play address;

[0210] The playing module 904 is used to obtain the video resource data from the main playing address and play the video resource data.

[0211] In an embodiment of the present application, a possible implementation is provided, wherein the link switching request is triggered based on at least one of the following situations:

[0212] Receiving an indication of routing link switching;

[0213] Detects changes in the network status of the current video playback;

[0214] It is detected that the transmission efficiency index of the current routing link meets the switching condition.

[0215] A possible implementation method is provided in an embodiment of the present application, wherein the link switching request is sent based on a preset detection period;

[0216] The screening module 902 is also used for:

[0217] determining at least one current transmission quality indicator of a current routing link;

[0218] determining a transmission efficiency of a current routing link based on at least one current transmission quality indicator;

[0219] When the above-mentioned screening module screens out the target routing link from each candidate routing link according to the transmission efficiency, it is used to:

[0220] The target routing link is selected from the current routing link and each candidate routing link according to the transmission efficiency.

[0221] In an embodiment of the present application, a possible implementation manner is provided, in which the screening module 902 is used to:

[0222] For each candidate routing link, perform the following operations:

[0223] For each predicted transmission quality indicator, determine the maximum value and the minimum value of the corresponding historical transmission quality indicator; determine a first difference between the maximum value and the minimum value; determine a second difference between the maximum value and the predicted transmission quality indicator, and determine a first transmission efficiency corresponding to the predicted transmission quality indicator based on a ratio of the first difference and the second difference;

[0224] The transmission efficiency of the candidate routing link is determined based on the weighted sum of the first transmission efficiencies.

[0225] A possible implementation method is provided in an embodiment of the present application. The above-mentioned predicted transmission quality indicator is predicted based on the following method:

[0226] The historical transmission quality indicators are input into the pre-trained prediction model, and the prediction model makes predictions based on the historical transmission quality indicators and outputs the predicted transmission quality indicators of the candidate routing links;

[0227] Among them, the prediction model is trained based on the following method:

[0228] Obtaining historical transmission quality indicator samples and sample labels corresponding to the historical transmission quality indicator samples; wherein the historical transmission quality indicator samples and the sample labels are transmission quality indicators that are adjacent in time sequence;

[0229] Inputting historical transmission quality indicator samples into the initial model to obtain predicted transmission quality indicator samples corresponding to the historical transmission quality indicator samples;

[0230] The difference between the historical transmission quality index sample and the predicted transmission quality index sample is calculated based on the preset loss function, and the parameters of the initial model are iteratively updated based on the difference, until the difference between the predicted transmission quality index sample obtained based on the updated initial model and the historical transmission quality index sample is no greater than the preset threshold, and the updated initial model is used as the prediction model.

[0231] A possible implementation method is provided in an embodiment of the present application. The above-mentioned device further includes a building module for:

[0232] Based on the domain name of the server, resolve and obtain at least two Internet Protocol addresses corresponding to the server;

[0233] For each Internet Protocol address, do the following:

[0234] Obtaining a candidate queue of Internet Protocol addresses; wherein the candidate queue includes a first resolution address and a second resolution address; the transmission efficiency of the first resolution address is higher than the transmission efficiency of the second resolution address;

[0235] Sending link establishment requests based on the first resolution address and the second resolution address respectively, when the confirmation return information of the first resolution address is received first, building a candidate routing link based on the first resolution address; when the confirmation return information of the second resolution address is received first, building the candidate routing link after a preset delay;

[0236] After sending the link establishment request based on the first resolution address and the second resolution address respectively, the first resolution address and the second resolution address are deleted from the candidate queue.

[0237] In an embodiment of the present application, a possible implementation method is provided, in which the above-mentioned construction module is used to:

[0238] When confirmation return information of the first resolution address is received within a preset delay, a candidate routing link is constructed based on the first resolution address;

[0239] When no confirmation return information of the first resolution address is received within the preset delay, a candidate routing link is constructed based on the second resolution address, and the first resolution address is re-added to the candidate queue.

[0240] The device of the embodiments of the present application can execute the method provided by the embodiments of the present application, and the implementation principles are similar. The actions performed by each module in the device of each embodiment of the present application correspond to the steps in the method of each embodiment of the present application. For the detailed functional description of each module of the device, please refer to the description in the corresponding method shown in the previous text, which will not be repeated here.

[0241] After obtaining the link switching request, the embodiment of the present application predicts at least one predicted transmission quality indicator of each candidate routing link based on at least one historical transmission quality indicator of each candidate routing link; then determines the transmission efficiency of each candidate routing link based on at least one predicted transmission quality indicator, and screens out the target routing link from each candidate routing link according to the transmission efficiency. Then, a play request is sent to the server through the target routing link, so that the server determines the transmission distance between the client and each video resource node based on the play request, takes the video resource node whose transmission distance is not greater than the second threshold as the main node, and takes the address of the main node as the main playback address; thereby obtaining the video resource data from the main playback address, and playing the video resource data. The embodiment of the present application screens out the target routing link and implements the switching of the routing link by predicting and analyzing the transmission indicators of multiple candidate routing links; since the transmission efficiency of the target routing link is not less than the preset first threshold, the optimization of the routing link is achieved, which can ensure the stability and efficiency of the current transmission network. Different from the prior art, a specific encoding method is used for a single routing link to reduce the packet loss rate of routing transmission; the embodiment of the present application can effectively ensure the stability of the network status, avoid freezes or slow loading during video playback, and effectively improve the user's viewing experience.

[0242] In an embodiment of the present application, an electronic device is provided, including a memory, a processor and a computer program stored in the memory, and the processor executes the above-mentioned computer program to implement the steps of the routing link switching method. Compared with the related art, the following can be achieved: after obtaining the link switching request, the embodiment of the present application predicts at least one predicted transmission quality indicator of each candidate routing link based on at least one historical transmission quality indicator of each candidate routing link; then determines the transmission efficiency of each candidate routing link based on at least one predicted transmission quality indicator, and selects the target routing link from each candidate routing link according to the transmission efficiency. Then, a play request is sent to the server through the target routing link, so that the server determines the transmission distance between the client and each video resource node based on the play request, takes the video resource node whose transmission distance is not greater than the second threshold as the main node, and takes the address of the main node as the main playback address; thereby obtaining the video resource data from the main playback address, and playing the video resource data. The embodiment of the present application selects the target routing link by predicting and analyzing the transmission indicators of multiple candidate routing links, and realizes the switching of the routing link; because the transmission efficiency of the target routing link is not less than the preset first threshold, the optimization of the routing link is realized, and the stability and efficiency of the current transmission network can be guaranteed. Different from the prior art, a specific encoding method is used for a single routing link to reduce the packet loss rate of routing transmission; the embodiment of the present application can effectively ensure the stability of the network status, avoid freezes or slow loading during video playback, and effectively improve the user's viewing experience.

[0243] In an alternative embodiment, an electronic device is provided, such as Fig.10 As shown, Fig.10 The electronic device 100 shown includes: a processor 1001 and a memory 1003. The processor 1001 and the memory 1003 are connected, such as through a bus 1002. Optionally, the electronic device 100 may also include a transceiver 1004, which may be used for data interaction between the electronic device and other electronic devices, such as data transmission and / or data reception. It should be noted that in actual applications, the transceiver 1004 is not limited to one, and the structure of the electronic device 100 does not constitute a limitation on the embodiments of the present application.

[0244] Processor 1001 may be a CPU (Central Processing Unit), a general-purpose processor, a DSP (Digital Signal Processor), an ASIC (Application Specific Integrated Circuit), an FPGA (Field Programmable Gate Array) or other programmable logic devices, transistor logic devices, hardware components or any combination thereof. It may implement or execute various exemplary logic blocks, modules and circuits described in conjunction with the disclosure of this application. Processor 1001 may also be a combination that implements computing functions, such as a combination of one or more microprocessors, a combination of a DSP and a microprocessor, etc.

[0245] The bus 1002 may include a path to transmit information between the above components. The bus 1002 may be a PCI (Peripheral Component Interconnect) bus or an EISA (Extended Industry Standard Architecture) bus. The bus 1002 may be divided into an address bus, a data bus, a control bus, etc. For ease of representation, Fig.10 Only one thick line is used in the diagram, but this does not mean that there is only one bus or only one type of bus.

[0246] The memory 1003 may be a ROM (Read Only Memory) or other types of static storage devices that can store static information and instructions, a RAM (Random Access Memory) or other types of dynamic storage devices that can store information and instructions, or an EEPROM (Electrically Erasable Programmable Read Only Memory), a CD-ROM (Compact Disc Read Only Memory) or other optical disk storage, optical disk storage (including compressed optical disk, laser disk, optical disk, digital versatile disk, Blu-ray disk, etc.), magnetic disk storage media, other magnetic storage devices, or any other medium that can be used to carry or store computer programs and can be read by a computer, without limitation herein.

[0247] The memory 1003 is used to store the computer program for executing the embodiment of the present application, and the execution is controlled by the processor 1001. The processor 1001 is used to execute the computer program stored in the memory 1003 to implement the steps shown in the above method embodiment.

[0248] The electronic devices include, but are not limited to, mobile terminals such as mobile phones, notebook computers, PADs, etc., and fixed terminals such as digital TVs, desktop computers, etc.

[0249] An embodiment of the present application provides a computer-readable storage medium, on which a computer program is stored. When the computer program is executed by a processor, the steps and corresponding contents of the aforementioned method embodiment can be implemented.

[0250] The embodiment of the present application provides a computer program product or a computer program, which includes computer instructions stored in a computer-readable storage medium. A processor of a computer device reads the computer instructions from the computer-readable storage medium, and the processor executes the computer instructions, so that the computer device implements the following when executing:

[0251] Obtaining a link switching request, and predicting at least one predicted transmission quality indicator of each candidate routing link based on at least one historical transmission quality indicator of each candidate routing link;

[0252] Determine the transmission efficiency of each candidate routing link based on at least one predicted transmission quality indicator, and select a target routing link from each candidate routing link according to the transmission efficiency; wherein the transmission efficiency of the target routing link is not less than a preset first threshold;

[0253] Sending a play request to the server through the target routing link, so that the server determines the transmission distance between the client and each video resource node based on the play request, takes the video resource node whose transmission distance is not greater than the second threshold as the main node, and takes the address of the main node as the main play address;

[0254] Get the video resource data from the main playback address and play the video resource data.

[0255] The terms "first", "second", "third", "fourth", "1", "2", etc. (if any) in the specification and claims of this application and the above-mentioned drawings are used to distinguish similar objects, and are not necessarily used to describe a specific order or sequence. It should be understood that the numbers used in this way can be interchanged where appropriate, so that the embodiments of the present application described herein can be implemented in an order other than that shown or described in the drawings.

[0256] It should be understood that, although each operation step is indicated by arrows in the flowchart of the embodiment of the present application, the implementation order of these steps is not limited to the order indicated by the arrows. Unless clearly stated herein, in some implementation scenarios of the embodiment of the present application, the implementation steps in each flowchart can be performed in other orders according to demand. In addition, some or all of the steps in each flowchart may include multiple sub-steps or multiple stages based on actual implementation scenarios. Some or all of these sub-steps or stages may be executed at the same time, and each sub-step or stage in these sub-steps or stages may also be executed at different times respectively. In different scenarios of execution time, the execution order of these sub-steps or stages may be flexibly configured according to demand, and the embodiment of the present application does not limit this.

[0257] The above is only an optional implementation method for some implementation scenarios of the present application. It should be pointed out that for ordinary technicians in this technical field, without departing from the technical concept of the solution of the present application, other similar implementation methods based on the technical ideas of the present application are also within the protection scope of the embodiments of the present application.

Claims

1. A routing link switching method, applied to a client, characterized in that: include: Obtaining a link switching request, and predicting at least one predicted transmission quality indicator of each candidate routing link based on at least one historical transmission quality indicator of each candidate routing link; Determine the transmission efficiency of each of the candidate routing links based on at least one predicted transmission quality indicator, and select a target routing link from each of the candidate routing links according to the transmission efficiency; wherein the transmission efficiency of the target routing link is not less than a preset first threshold; Sending a play request to the server through the target routing link, so that the server determines the transmission distance between the client and each video resource node based on the play request, takes the video resource node whose transmission distance is not greater than the second threshold as the main node, and takes the address of the main node as the main play address; The video resource data is obtained from the main playback address, and the video resource data is played.

2. The method according to claim 1, characterized in that The obtaining of the link switching request is triggered based on at least one of the following situations: Receiving an indication of routing link switching; Detects changes in the network status of the current video playback; It is detected that the transmission efficiency index of the current routing link meets the switching condition.

3. The method according to claim 1, characterized in that The link switching request is sent based on a preset detection period; The method further comprises: determining at least one current transmission quality indicator of a current routing link; Determining a transmission efficiency of the current routing link based on the at least one current transmission quality indicator; Filtering a target routing link from each of the candidate routing links according to the transmission efficiency includes: A target routing link is selected from the current routing link and each candidate routing link according to the transmission efficiency.

4. The method according to claim 1, characterized in that: The determining the transmission efficiency of each of the candidate routing links based on at least one predicted transmission quality indicator comprises: For each candidate routing link, perform the following operations: For each predicted transmission quality indicator, determine the maximum value and the minimum value of the corresponding historical transmission quality indicator; determine a first difference between the maximum value and the minimum value; determine a second difference between the maximum value and the predicted transmission quality indicator, and determine a first transmission efficiency corresponding to the predicted transmission quality indicator based on a ratio of the first difference and the second difference; The transmission efficiency of the candidate routing link is determined based on a weighted sum of the first transmission efficiencies.

5. The method according to claim 1, characterized in that The predicted transmission quality indicator is predicted based on the following method: Inputting the historical transmission quality indicator into a pre-trained prediction model, the prediction model performs prediction based on the historical transmission quality indicator, and outputs the predicted transmission quality indicator of the candidate routing link; The prediction model is trained based on the following method: Acquire a historical transmission quality indicator sample and a sample label corresponding to the historical transmission quality indicator sample; wherein the historical transmission quality indicator sample and the sample label are transmission quality indicators that are adjacent in time sequence; Inputting the historical transmission quality indicator sample into the initial model to obtain a predicted transmission quality indicator sample corresponding to the historical transmission quality indicator sample; The difference between the historical transmission quality index sample and the predicted transmission quality index sample is calculated based on a preset loss function, and the parameters of the initial model are iteratively updated based on the difference, until the difference between the predicted transmission quality index sample obtained based on the updated initial model and the historical transmission quality index sample is no greater than a preset threshold, and the updated initial model is used as the prediction model.

6. The method according to claim 1, characterized in that Each of the candidate routing links is constructed based on the following method: Resolving, based on the domain name of the server, at least two Internet Protocol addresses corresponding to the server; For each Internet Protocol address, do the following: Acquire a candidate queue of the Internet Protocol address; wherein the candidate queue includes a first resolution address and a second resolution address; the transmission efficiency of the first resolution address is higher than the transmission efficiency of the second resolution address; Sending link establishment requests based on the first resolution address and the second resolution address respectively, and when the confirmation return information of the first resolution address is received first, building a candidate routing link based on the first resolution address; when the confirmation return information of the second resolution address is received first, building the candidate routing link after a preset delay; After sending link establishment requests based on the first resolution address and the second resolution address respectively, the first resolution address and the second resolution address are deleted from the candidate queue.

7. The method according to claim 6, characterized in that The step of constructing a candidate routing link after waiting for a preset delay includes: When confirmation return information of the first resolution address is received within a preset delay, a candidate routing link is constructed based on the first resolution address; When no confirmation return information of the first resolution address is received within a preset delay, a candidate routing link is constructed based on the second resolution address, and the first resolution address is re-added to the candidate queue.

8. A routing link switching device, characterized in that: include: A prediction module, configured to obtain a link switching request and predict at least one predicted transmission quality indicator of each candidate routing link based on at least one historical transmission quality indicator of each candidate routing link; A screening module, configured to determine the transmission efficiency of each of the candidate routing links based on at least one predicted transmission quality indicator, and screen a target routing link from each of the candidate routing links according to the transmission efficiency; wherein the transmission efficiency of the target routing link is not less than a preset first threshold; a sending module, configured to send a play request to the server through the target routing link, so that the server determines the transmission distance between the client and each video resource node based on the play request, takes the video resource node whose transmission distance is not greater than a second threshold as a master node, and takes the address of the master node as a master play address; The playing module is used to obtain the video resource data from the main playing address and play the video resource data.

9. An electronic device comprising a memory, a processor and a computer program stored in the memory, characterized in that: The processor executes the computer program to implement the steps of the method according to any one of claims 1 to 7.

10. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the steps of the method according to any one of claims 1 to 7 are implemented.

11. A computer program product, comprising a computer program, characterized in that When the computer program is executed by a processor, the steps of the method according to any one of claims 1 to 7 are implemented.