Routing policy switching method and device, equipment, storage medium and program product

Through the two-level routing policy switching method, the problem of low routing policy switching efficiency in the existing technology is solved, and faster and more efficient routing policy switching is achieved.

CN120034478APending Publication Date: 2025-05-23TENCENT TECHNOLOGY (SHENZHEN) CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202311579703.X
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2023-11-22
Publication Date
2025-05-23

AI Technical Summary

Technical Problem

In the prior art, routing strategy switching is relatively inefficient, especially when switching between equivalent multipath routing (ECMP), the routing table needs to be refreshed, resulting in a significant increase in switching time.

Method used

The two-level routing policy switching method is adopted, by obtaining the first routing policy and the second routing policy, and obtaining the third routing policy when the data transmission path is updated, the second routing policy is switched to the third routing policy, and data transmission is continued based on the first routing policy and the third routing policy.

Benefits of technology

Improve the efficiency of routing policy switching and reduce the number of times routing table refreshes. Even if the number of routing information in the curbside table is too large, the switching time will not be increased.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120034478A_ABST
    Figure CN120034478A_ABST
Patent Text Reader

Abstract

The invention provides a routing strategy switching method and device, electronic equipment, a computer readable storage medium and a computer program product, and the method comprises the steps: obtaining a first routing strategy and a second routing strategy, and transmitting data from an initial node to a target node based on the first routing strategy and the second routing strategy, the first routing strategy is used for pointing to a second routing strategy from the starting node to the target node, and the second routing strategy comprises a first data transmission path set from the starting node to the target node; in the data transmission process, when a data transmission path from the starting node to the target node needs to be updated, a third routing strategy is obtained, and the third routing strategy comprises a second data transmission path set from the starting node to the target node; and switching the second routing strategy to a third routing strategy, and transmitting data from the starting node to the target node based on the first routing strategy and the third routing strategy. In this way, the efficiency of routing strategy switching can be improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of Internet technology, and in particular to a method, device, electronic device, computer-readable storage medium and computer program product for switching a routing strategy. Background Art

[0002] Related Technology During data transmission, when data transmission is performed based on Equal-Cost Multi-Path Routing (ECMP), if ECMP switching is required, that is, the data stream needs to be switched from one set of paths to another set of paths for transmission, a new ECMP containing the new path needs to be created, and then the routing table needs to be refreshed, and the routing information pointing to the original ECMP needs to be pointed to the new ECMP. Here, when the number of routing information in the roadside table is too large, the switching time will also increase significantly. Based on this, the switching method of the routing strategy in the related technology is inefficient. Summary of the invention

[0003] Embodiments of the present application provide a method, device, electronic device, computer-readable storage medium, and computer program product for switching a routing strategy, which can improve the efficiency of switching a routing strategy.

[0004] The technical solution of the embodiment of the present application is implemented as follows:

[0005] The present application provides a method for switching a routing policy, including:

[0006] Acquire a first routing strategy and a second routing strategy, and transmit data from a starting node to a target node based on the first routing strategy and the second routing strategy;

[0007] The first routing strategy is used to point to a second routing strategy from the starting node to the target node, the second routing strategy includes a first data transmission path set from the starting node to the target node, and the first data transmission path set includes at least one data transmission path;

[0008] During the data transmission process, when the data transmission path from the starting node to the target node needs to be updated, obtaining a third routing strategy;

[0009] The third routing strategy includes a second data transmission path set from the starting node to the target node, and the data transmission paths included in the second data transmission path set are at least partially different from the data transmission paths included in the first data transmission path set;

[0010] The second routing strategy is switched to the third routing strategy, and data is transmitted from the starting node to the target node based on the first routing strategy and the third routing strategy.

[0011] The present application provides a routing strategy switching device, including:

[0012] A first acquisition module is used to acquire a first routing strategy and a second routing strategy, and transmit data from a starting node to a target node based on the first routing strategy and the second routing strategy; wherein the first routing strategy is used to point to a second routing strategy from the starting node to the target node, the second routing strategy includes a first data transmission path set from the starting node to the target node, and the first data transmission path set includes at least one data transmission path;

[0013] a second acquisition module, configured to acquire a third routing strategy when the data transmission path from the starting node to the target node needs to be updated during the data transmission process; wherein the third routing strategy includes a second data transmission path set from the starting node to the target node, and the data transmission paths included in the second data transmission path set are at least partially different from the data transmission paths included in the first data transmission path set;

[0014] A switching module is used to switch the second routing strategy to the third routing strategy, and transmit data from the starting node to the target node based on the first routing strategy and the third routing strategy.

[0015] In the above scheme, the first acquisition module is also used to acquire a set of routing information, the routing information set includes at least one first routing information and a first identifier that has a one-to-one correspondence with the first routing information, each first identifier corresponds to a candidate first routing strategy, and different first routing information indicates different data transmission directions; from the at least one first routing information, select the target routing information with a data transmission direction from the starting node to the target node, and search for the target first identifier corresponding to the target routing information; determine the candidate first routing strategy corresponding to the target first identifier as the first routing strategy, and determine the second routing strategy based on the target routing information and the first routing strategy.

[0016] In the above scheme, the first acquisition module is also used to receive a data transmission request, and the data transmission request is used to request the transmission of data from the starting node to the target node; determine the data transmission direction corresponding to the data transmission request; and based on the data transmission direction corresponding to the data transmission request, search for the target routing information from the at least one first routing information.

[0017] In the above scheme, the first routing strategy includes at least one second routing information and a second identifier that has a one-to-one correspondence with the second routing information, each second identifier corresponds to a candidate second routing strategy, the at least one first routing information includes the at least one second routing information, and the at least one second routing information includes the target routing information; the first acquisition module is also used to find the target second identifier corresponding to the target routing information from the first routing strategy, and determine the candidate second routing strategy corresponding to the target second identifier as the second routing strategy.

[0018] In the above scheme, the device also includes a third acquisition module, which is used to acquire an initial routing information set, wherein the initial routing information set includes the at least one first routing information; acquire at least one data transmission path of the data transmission direction corresponding to each of the first routing information; construct a candidate second routing strategy based on the at least one data transmission path of the data transmission direction corresponding to each of the first routing information; wherein the candidate second routing strategy has a one-to-one correspondence with the first routing information; acquire a second identifier of each of the candidate second routing strategies, and construct at least one candidate first routing strategy based on each of the second identifiers and the at least one first routing information; acquire a first identifier of each of the candidate first routing strategies, and construct the routing information set based on each of the first identifiers and the at least one first routing information.

[0019] In the above scheme, the device also includes a first detection module, which is used to detect at least one data transmission path corresponding to the second routing strategy to obtain a first detection result; when the first detection result indicates that the number of data transmission paths that need to be updated in at least one data transmission path corresponding to the second routing strategy reaches the target number, it is determined that the data transmission path from the starting node to the target node needs to be updated.

[0020] In the above scheme, the device also includes a second detection module, which is used to obtain the data transmission speed from the starting node to the target node during the data transmission process, and based on the data transmission speed, detect the path selection mode of the second routing strategy to obtain a second detection result; wherein the path selection mode of the second routing strategy is used to indicate the selection method of at least one data transmission path included in the second routing strategy; when the second detection result indicates that the path selection mode of the second routing strategy needs to be switched from the current mode to the target mode, it is determined that the data transmission path from the starting node to the target node needs to be updated.

[0021] In the above scheme, the device also includes a fourth acquisition module, which is used to obtain an initial first routing strategy, wherein the initial first routing strategy includes a third data transmission path set from the starting node to the target node, and the third data transmission path set includes at least one data transmission path; based on the initial first routing strategy, data is transmitted from the starting node to the target node; the first acquisition module is also used to obtain the second routing strategy when the data transmission path from the starting node to the target node needs to be updated during data transmission based on the initial first routing strategy, and construct the first routing strategy based on the second routing strategy and the initial first routing strategy.

[0022] In the above scheme, the first acquisition module is also used to switch the third data transmission path set included in the initial first routing strategy to the first data transmission path set included in the second routing strategy; and determine the switched initial first routing strategy as the first routing strategy.

[0023] In the above scheme, the second acquisition module is also used to update the data transmission paths in the first data transmission path set included in the second routing strategy to obtain the second data transmission path set; based on the data transmission paths included in the second data transmission path set, the third routing strategy is constructed.

[0024] In the above scheme, the device also includes a target operation execution module, which is used to execute the target operation on the data transmission path in the first data transmission path set included in the second routing strategy when it is necessary to execute the target operation on the data transmission path from the starting node to the target node during the data transmission process, so as to obtain the target second routing strategy; wherein the target second routing strategy includes a fourth data transmission path set from the starting node to the target node, the fourth data transmission path set includes at least one data transmission path, and the data transmission paths included in the fourth data transmission path set are obtained by executing the target operation on the data transmission paths included in the first data transmission path set; based on the first routing strategy and the target second routing strategy, data is transmitted from the starting node to the target node.

[0025] An embodiment of the present application provides an electronic device, including:

[0026] A memory for storing computer executable instructions;

[0027] The processor is used to implement the routing strategy switching method provided in the embodiment of the present application when executing the computer executable instructions stored in the memory.

[0028] An embodiment of the present application provides a computer-readable storage medium storing computer-executable instructions for causing a processor to execute and implement a method for switching a routing strategy provided in an embodiment of the present application.

[0029] The embodiment of the present application provides a computer program product, which includes computer executable instructions, and the computer executable instructions are stored in a computer readable storage medium. The processor of the electronic device reads the computer executable instructions from the computer readable storage medium, and the processor executes the computer executable instructions, so that the electronic device executes the switching method of the routing strategy provided in the embodiment of the present application.

[0030] The embodiments of the present application have the following beneficial effects:

[0031] When transmitting data from the starting node to the target node based on the first routing strategy and the second routing strategy, if the data transmission path from the starting node to the target node needs to be updated, the third routing strategy is directly obtained, so that the second routing strategy is switched to the third routing strategy, and then based on the first routing strategy and the third routing strategy, data is transmitted from the starting node to the target node. In this way, compared with the solution in the related art that only one routing strategy is used for data transmission, if routing switching is required, the routing table needs to be refreshed, and the routing information pointing to the original routing strategy is pointed to the new routing strategy. This application is based on a two-level routing strategy for data transmission, so that the routing information in the routing table points to the first routing strategy, and the first routing strategy points to the second routing strategy. If routing switching is required, it is only necessary to switch the first routing strategy from pointing to the second routing strategy to pointing to the new routing strategy, that is, the third routing strategy, without changing the pointing relationship between the routing information and the first routing strategy. In this way, even if the number of routing information in the roadside table is too large, the switching time will not be increased, thereby improving the efficiency of routing strategy switching. BRIEF DESCRIPTION OF THE DRAWINGS

[0032] Figure 1 1 is a schematic diagram of the architecture of a switching system 100 for a routing strategy provided in an embodiment of the present application;

[0033] Figure 2 is a schematic diagram of the structure of an electronic device provided in an embodiment of the present application;

[0034] Figure 3 It is a flowchart of a method for switching a routing strategy provided in an embodiment of the present application;

[0035] Figure 4 It is a flowchart of a process of obtaining a first routing strategy and a second routing strategy provided in an embodiment of the present application;

[0036] Figure 5 is a schematic diagram of a routing table provided in an embodiment of the present application;

[0037] Figure 6 is a schematic diagram of a first routing strategy provided in an embodiment of the present application;

[0038] Figure 7 is a schematic diagram of a process of switching a second routing strategy to a third routing strategy provided by an embodiment of the present application;

[0039] Figure 8 It is a schematic diagram of a process of transmitting data from a starting node to a target node provided by an embodiment of the present application;

[0040] Fig. 9 It is a flowchart of a method for switching a routing strategy provided in an embodiment of the present application;

[0041] Fig.10 It is a schematic diagram of the process of routing switching provided by an embodiment of the present application;

[0042] Fig.11 It is a flowchart of the creation process of the two-level ECMP provided in the embodiment of the present application;

[0043] Fig.12 It is a schematic diagram of a process for adjusting a data transmission path indicated by ECMP provided in an embodiment of the present application;

[0044] Fig.13 It is a schematic diagram of the process of switching ECMP provided in an embodiment of the present application. DETAILED DESCRIPTION

[0045] In order to make the purpose, technical solutions and advantages of the present application clearer, the present application will be further described in detail below in conjunction with the accompanying drawings. The described embodiments should not be regarded as limiting the present application. All other embodiments obtained by ordinary technicians in the field without making creative work are within the scope of protection of this application.

[0046] In the following description, reference is made to “some embodiments”, which describe a subset of all possible embodiments, but it will be understood that “some embodiments” may be the same subset or different subsets of all possible embodiments and may be combined with each other without conflict.

[0047] In the following description, the terms "first\second\third" involved are merely used to distinguish similar objects and do not represent a specific ordering of the objects. It can be understood that "first\second\third" can be interchanged with a specific order or sequence where permitted, so that the embodiments of the present application described herein can be implemented in an order other than that illustrated or described herein.

[0048] Unless otherwise defined, all technical and scientific terms used herein have the same meaning as those commonly understood by those skilled in the art to which this application belongs. The terms used herein are only for the purpose of describing the embodiments of this application and are not intended to limit this application.

[0049] Before further describing the embodiments of the present application in detail, the nouns and terms involved in the embodiments of the present application are explained. The nouns and terms involved in the embodiments of the present application are subject to the following interpretations.

[0050] 1) In response, it is used to indicate the conditions or states on which the executed operations depend. When the dependent conditions or states are met, one or more operations executed may be in real time or have a set delay. Unless otherwise specified, there is no restriction on the order in which the multiple operations executed are executed.

[0051] 2) Client, also known as the user end, refers to the program corresponding to the server that provides local services to users. Except for some applications that can only run locally, it is generally installed on the terminal and needs to cooperate with the server to run, that is, it requires corresponding servers and service programs in the network to provide corresponding services. In this way, specific communication connections need to be established on the client and server sides to ensure the normal operation of the application.

[0052] 3) Artificial Intelligence (AI) is the theory, method, technology and application system that uses digital computers or machines controlled by digital computers to simulate, extend and expand human intelligence, perceive the environment, acquire knowledge and use knowledge to obtain the best results. In other words, artificial intelligence is a comprehensive technology in computer science that attempts to understand the essence of intelligence and produce a new intelligent machine that can respond in a similar way to human intelligence. Artificial intelligence is to study the design principles and implementation methods of various intelligent machines so that machines have the functions of perception, reasoning and decision-making.

[0053] 4) Equal-Cost Multi-Path Routing (ECMP) is a network routing strategy used to evenly distribute data flows among multiple optimal paths with the same cost. When a router or switch detects multiple equal-cost paths to the same destination, ECMP will decide which path each data packet should take based on a predetermined algorithm (such as a hash algorithm). This method not only improves bandwidth utilization and ensures balanced use of network resources, but also enhances network redundancy and reliability because even if a path fails, other paths can still ensure continuous data transmission.

[0054] 5) Node is a connection point, which means a redistribution point or a communication endpoint (some terminal device), depending on the network and protocol layer mentioned. A physical network node is an active electronic device connected to the network and capable of sending, receiving or forwarding information through a communication channel.

[0055] 6) Routing strategy, which is a way of modifying routing information in order to change the path taken by network traffic, mainly achieved by changing routing attributes (including reachability).

[0056] See also Figure 1 , Figure 1 It is an architectural diagram of a switching system 100 of a routing strategy provided in an embodiment of the present application, a terminal (terminal 400 is shown as an example), and terminal 400 is connected to server 200 via network 300, wherein network 300 may be a wide area network or a local area network, or a combination of the two, and data transmission is achieved using wireless or wired links.

[0057] The terminal 400 is used to send a data transmission request from the starting node to the target node to the server 200;

[0058] The server 200 is used to receive a data transmission request; based on the data transmission request, obtain a first routing strategy and a second routing strategy, and based on the first routing strategy and the second routing strategy, transmit data from a starting node to a target node; wherein the first routing strategy is used to point to a second routing strategy from a starting node to a target node, and the second routing strategy includes a first data transmission path set from the starting node to the target node, and the first data transmission path set includes at least one data transmission path; during the data transmission process, when the data transmission path from the starting node to the target node needs to be updated, obtain a third routing strategy; wherein the third routing strategy includes a second data transmission path set from the starting node to the target node, and the data transmission paths included in the second data transmission path set are at least partially different from the data transmission paths included in the first data transmission path set; the second routing strategy is switched to the third routing strategy, and based on the first routing strategy and the third routing strategy, data is transmitted from the starting node to the target node.

[0059] In some embodiments, the server 200 may be an independent physical server, or a server cluster or distributed system composed of multiple physical servers, or a cloud server that provides basic cloud computing services such as cloud services, cloud databases, cloud computing, cloud functions, cloud storage, network services, cloud communications, middleware services, domain name services, security services, content distribution networks (CDN, Content Deliver Network), and big data and artificial intelligence platforms. The terminal 400 may be a smart phone, a tablet computer, a laptop computer, a desktop computer, a set-top box, an intelligent voice interaction device, a smart home appliance, a virtual reality device, a vehicle-mounted terminal, an aircraft, a portable music player, a personal digital assistant, a dedicated messaging device, a portable gaming device, an intelligent speaker, and a smart watch, but is not limited thereto. The terminal and the server may be directly or indirectly connected via wired or wireless communication, which is not limited in the embodiments of the present application.

[0060] Next, an electronic device implementing the method for switching the routing strategy provided in the embodiment of the present application is described. Figure 2 , Figure 2 is a schematic diagram of the structure of an electronic device provided in an embodiment of the present application. The electronic device may be a server or a terminal. Figure 1 Take the server shown in as an example, Figure 2 The electronic device shown includes: at least one processor 410, a memory 450, at least one network interface 420 and a user interface 430. The various components in the terminal 400 are coupled together via a bus system 440. It is understood that the bus system 440 is used to achieve connection and communication between these components. In addition to the data bus, the bus system 440 also includes a power bus, a control bus and a status signal bus. However, for the sake of clarity, the bus system 440 is not shown in FIG. Figure 2 Various buses are labeled as bus system 440 .

[0061] Processor 410 can be an integrated circuit chip with signal processing capabilities, such as a general-purpose processor, a digital signal processor (DSP), or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc., where the general-purpose processor can be a microprocessor or any conventional processor, etc.

[0062] The user interface 430 includes one or more output devices 431 that enable display of media content, including one or more speakers and / or one or more visual display screens. The user interface 430 also includes one or more input devices 432, including user interface components that facilitate user input, such as a keyboard, mouse, microphone, touch screen display, camera, other input buttons and controls.

[0063] The memory 450 may be removable, non-removable, or a combination thereof. Exemplary hardware devices include solid-state memory, hard disk drives, optical disk drives, etc. The memory 450 may optionally include one or more storage devices that are physically remote from the processor 410.

[0064] The memory 450 includes a volatile memory or a non-volatile memory, and may also include both volatile and non-volatile memories. The non-volatile memory may be a read-only memory (ROM), and the volatile memory may be a random access memory (RAM). The memory 450 described in the embodiments of the present application is intended to include any suitable type of memory.

[0065] In some embodiments, memory 450 can store data to support various operations, examples of which include programs, modules, and data structures, or a subset or superset thereof, as exemplarily described below.

[0066] Operating system 451, including system programs for processing various basic system services and performing hardware-related tasks, such as a framework layer, a core library layer, a driver layer, etc., for implementing various basic services and processing hardware-based tasks;

[0067] A network communication module 452, used to reach other electronic devices via one or more (wired or wireless) network interfaces 420, exemplary network interfaces 420 include: Bluetooth, Wireless Compatibility Certification (WiFi), and Universal Serial Bus (USB), etc.;

[0068] a presentation module 453 for enabling display of information via one or more output devices 431 (e.g., display screen, speaker, etc.) associated with the user interface 430 (e.g., a user interface for operating peripherals and displaying content and information);

[0069] The input processing module 454 is used to detect one or more user inputs or interactions from one of the one or more input devices 432 and translate the detected inputs or interactions.

[0070] In some embodiments, the device provided in the embodiments of the present application can be implemented in software. Figure 2The switching device 455 of the routing strategy stored in the memory 450 is shown, which can be software in the form of a program and a plug-in, including the following software modules: a first acquisition module 4551, a second acquisition module 4552 and a switching module 4553. These modules are logical, so they can be arbitrarily combined or further split according to the functions implemented. The functions of each module will be described below.

[0071] In other embodiments, the device provided in the embodiments of the present application can be implemented in hardware. As an example, the routing strategy switching device provided in the embodiments of the present application can be a processor in the form of a hardware decoding processor, which is programmed to execute the routing strategy switching method provided in the embodiments of the present application. For example, the processor in the form of a hardware decoding processor can adopt one or more application-specific integrated circuits (ASICs), DSPs, programmable logic devices (PLDs), complex programmable logic devices (CPLDs), field programmable gate arrays (FPGAs) or other electronic components.

[0072] In some embodiments, the terminal or server can implement the switching method of the routing strategy provided in the embodiment of the present application by running a computer program. For example, the computer program can be a native program or software module in the operating system; it can be a local (Native) application (APP, Application), that is, a local client, that is, a program that needs to be installed in the operating system to run, such as an instant messaging APP, a web browser APP; it can also be a small program, that is, a program that can be run only by downloading it to a browser environment; it can also be a small program that can be embedded in any APP. In short, the above-mentioned computer program can be any form of client, module or plug-in.

[0073] Based on the above description of the switching system and electronic device of the routing strategy provided by the embodiment of the present application, the following describes the switching method of the routing strategy provided by the embodiment of the present application. In actual implementation, the switching method of the routing strategy provided by the embodiment of the present application can be implemented by the terminal or the server alone, or by the terminal and the server in collaboration, so that Figure 1 The method for switching the routing strategy provided in the embodiment of the present application is described as an example in which the server 200 alone executes the switching method of the routing strategy provided in the embodiment of the present application. Figure 3 , Figure 3 is a flow chart of a method for switching a routing strategy provided in an embodiment of the present application. Next, Figure 3 The steps shown are explained.

[0074] Step 101, the server obtains a first routing strategy and a second routing strategy, and based on the first routing strategy and the second routing strategy, transmits data from a starting node to a target node; wherein the first routing strategy is used to point to a second routing strategy from the starting node to the target node, and the second routing strategy includes a first data transmission path set from the starting node to the target node, and the first data transmission path set includes at least one data transmission path.

[0075] In actual implementation, the server receives a data transmission request for requesting data transmission from a starting node to a target node, and obtains a first routing strategy and a second routing strategy based on the data transmission request. The first routing strategy and the second routing strategy can both indicate equivalent multi-path routing, the first routing strategy points to the corresponding second routing strategy, and the second routing strategy points to the actual data transmission path. The target node and the starting node can be a server or a terminal, and this is not limited in the embodiments of the present application.

[0076] In actual implementation, the process of obtaining the first routing strategy and the second routing strategy is as follows: Figure 4 , Figure 4 is a flowchart of a process of obtaining a first routing strategy and a second routing strategy provided by an embodiment of the present application, based on Figure 4 , the process of obtaining the first routing strategy and the second routing strategy can be implemented through the following steps.

[0077] Step 1011, obtaining a routing information set, the routing information set including at least one first routing information and a first identifier having a one-to-one correspondence with the first routing information, each first identifier corresponds to a candidate first routing strategy, and different first routing information indicates different data transmission directions.

[0078] It should be noted that the routing information set may be in the form of a table, such as a routing table, where Figure 5 As shown, Figure 5 is a schematic diagram of a routing table provided in an embodiment of the present application, based on Figure 5 When the routing information set is a routing table, the routing table includes n+m first routing information and n+m first identifiers that have a one-to-one correspondence with the first routing information. Each first identifier corresponds to a candidate first routing strategy. For example, the first identifier 1 to the first identifier n can all correspond to the candidate first routing strategy 1. In this case, the first identifier 1 to the first identifier n are the same. The first identifier n+1 to the first identifier n+m all correspond to the candidate first routing strategy 2. In this case, the first identifier n+1 to the first identifier n+m are the same.

[0079] Among them, based on Figure 5 , the first routing information 1 to the first routing information n indicate different data transmission directions, and all correspond to the candidate first routing strategy 1. For example, when the candidate first routing strategy 1 indicates data transmission from node A to node B, and the data transmission direction indicated by each routing information in the first routing information 1 to the first routing information n has an intersection with the data transmission direction indicated by the candidate first routing strategy 1, then it can be considered that the first routing information 1 to the first routing information n are associated with the candidate first routing strategy 1, that is, the first routing information 1 to the first routing information n all correspond to the candidate first routing strategy 1.

[0080] Step 1012: Select target routing information whose data transmission direction is from the start node to the target node from at least one first routing information, and search for the target first identifier corresponding to the target routing information.

[0081] In actual implementation, after obtaining a set of routing information, the process of selecting target routing information with a data transmission direction from a starting node to a target node from at least one first routing information may be to receive a data transmission request, where the data transmission request is used to request data transmission from a starting node to a target node; determine the data transmission direction corresponding to the data transmission request; and search for the target routing information from at least one first routing information based on the data transmission direction corresponding to the data transmission request.

[0082] It should be noted that a data transmission request may be sent from a terminal. After receiving the data transmission request, the data transmission request is analyzed to obtain the data transmission direction corresponding to the data transmission request, that is, to request data transmission from a starting node to a target node, thereby finding the target routing information from at least one first routing information based on the data transmission direction corresponding to the data transmission request.

[0083] Among them, the process of searching for target routing information from at least one first routing information based on the data transmission direction corresponding to the data transmission request may be to match the data transmission direction of each first routing information with the data transmission direction corresponding to the data transmission request to obtain a matching result, thereby selecting a target matching result representing the data transmission direction of the corresponding first routing information and matching the data transmission direction corresponding to the data transmission request from multiple matching results, and determining the first routing information corresponding to the target matching result as the target routing information.

[0084] In actual implementation, after the target routing information is determined, the target first identifier corresponding to the target routing information is found based on the routing information set. Figure 5As shown, when the target routing information is routing information n associated with the candidate first routing policy 1, based on the routing information set, the target first identifier corresponding to the target routing information is found to be the first identifier n+1.

[0085] Step 1013: determine the candidate first routing policy corresponding to the target first identifier as the first routing policy, and determine the second routing policy based on the target routing information and the first routing policy.

[0086] In actual implementation, after the target first identifier is found, the candidate first routing policy corresponding to the target first identifier is determined as the first routing policy, thereby determining the second routing policy based on the target routing information and the first routing policy.

[0087] Among them, the first routing strategy includes at least one second routing information and a second identifier that has a one-to-one correspondence with the second routing information, each second identifier corresponds to a candidate second routing strategy, at least one first routing information includes at least one second routing information, and at least one second routing information includes target routing information. Therefore, based on the target routing information and the first routing strategy, the process of determining the second routing strategy can be to find the target second identifier corresponding to the target routing information from the first routing strategy, and determine the candidate second routing strategy corresponding to the target second identifier as the second routing strategy.

[0088] It should be noted that the first routing strategy may also be in the form of a table, such as Figure 6 As shown, Figure 6 is a schematic diagram of a first routing strategy provided in an embodiment of the present application, based on Figure 6 When the first routing strategy is in the form of a table, the first routing strategy includes n second routing information and n second identifiers that have a one-to-one correspondence with the second routing information. Each second identifier corresponds to a candidate second routing strategy, such as second identifier 1 corresponds to candidate second routing strategy 1, and second identifier n corresponds to candidate second routing strategy n. Thus, the target second identifier corresponding to the target routing information is found from the first routing strategy, and the candidate second routing strategy corresponding to the target second identifier is determined as the second routing strategy. Figure 5 and Figure 6 As shown, when the first routing strategy is Figure 5 When the candidate first routing strategies corresponding to the first identifier 1 to the first identifier n are Figure 6 The second routing information 1 to the second routing information n in the are respectively Figure 5 The first routing information 1 to the first routing information n in.

[0089] It should be noted that when there is one candidate first routing strategy in the routing information set, at least one second routing information in the first routing strategy is also at least one first routing information in the routing information set; when there is one first routing information in the routing information set, there is also one second routing information in the first routing strategy, and the second routing information is also the target routing information.

[0090] In actual implementation, after obtaining the first routing strategy, the second routing strategy is found based on the first routing strategy, and then based on the second routing strategy, a set of data transmission paths from the starting node to the target node is found, and based on the data transmission path set, the data transmission path from the starting node to the target node is determined, so that based on the data transmission path, data is transmitted from the starting node to the target node.

[0091] In some embodiments, before obtaining a routing information set, it is necessary to construct a routing information set, specifically, obtain an initial routing information set, the initial routing information set including at least one first routing information; obtain at least one data transmission path of the data transmission direction corresponding to each first routing information; construct a candidate second routing strategy based on at least one data transmission path of the data transmission direction corresponding to each first routing information; wherein the candidate second routing strategy has a one-to-one correspondence with the first routing information; obtain a second identifier of each candidate second routing strategy, and construct at least one candidate first routing strategy based on each second identifier and at least one first routing information; obtain a first identifier of each candidate first routing strategy, and construct a routing information set based on each first identifier and at least one first routing information.

[0092] It should be noted that the candidate first routing strategy points to at least one candidate second routing strategy, and as mentioned above, there is a one-to-one correspondence between the candidate second routing strategy and the first routing information. Based on this, the candidate second routing strategy includes a set of data transmission paths in the data transmission direction indicated by the corresponding first routing information, and the data transmission path set includes at least one data transmission path.

[0093] Therefore, the candidate first routing strategy is used to point to at least one candidate second routing strategy, that is, to at least one set of data transmission paths. As mentioned above, the candidate first routing strategy corresponds to at least one first routing information, that is, to at least one data transmission direction. Therefore, the set of data transmission paths pointed to by the candidate first routing strategy is the set of data transmission paths in the data transmission direction indicated by each first routing information corresponding to the candidate first routing strategy.

[0094] In actual implementation, after obtaining the initial routing information set, combined with the pre-set configuration information, at least one first routing information of the initial routing information set is analyzed to obtain at least one data transmission path for the data transmission direction corresponding to each first routing information, and then based on the at least one data transmission path for the data transmission direction corresponding to each first routing information, a data transmission path set corresponding to the data transmission direction corresponding to each first routing information is generated, thereby generating a candidate second routing strategy based on at least one data transmission path set.

[0095] Then, based on the data transmission direction corresponding to each first routing information, cluster processing is performed on the first routing information to obtain at least one routing information cluster, wherein there is a one-to-one correspondence between the routing information cluster and the candidate first routing strategy; then, the second identifier of each candidate second routing strategy is obtained, and for each routing information cluster, a correspondence is established between each first routing information under the routing information cluster and the second identifier of the candidate second routing strategy corresponding to the data transmission direction indicated by the corresponding first routing information, thereby generating the candidate first routing strategy corresponding to the routing information cluster based on the correspondence, each first routing information under the routing information cluster (that is, the second routing information included in the candidate first routing strategy) and the corresponding second identifier; then, the first identifier of each candidate first routing strategy is obtained, and for each candidate first routing strategy, a correspondence is established between the first identifier and each first routing information in the corresponding routing information cluster, thereby generating the routing information set based on the correspondence, at least one first routing information of the initial routing information set and the first identifier.

[0096] Step 102, during the data transmission process, when the data transmission path from the starting node to the target node needs to be updated, obtain a third routing strategy; wherein the third routing strategy includes a second data transmission path set from the starting node to the target node, and the data transmission paths included in the second data transmission path set are at least partially different from the data transmission paths included in the first data transmission path set.

[0097] In actual implementation, when the data transmission path from the starting node to the target node needs to be updated, the third routing strategy is obtained. Therefore, it is necessary to judge whether the data transmission path from the starting node to the target node needs to be updated. There are many ways to judge whether the data transmission path from the starting node to the target node needs to be updated. Next, taking two of them as examples, the judgment process of whether the data transmission path from the starting node to the target node needs to be updated is explained.

[0098] In some embodiments, based on the first routing strategy and the second routing strategy, after transmitting data from the starting node to the target node, at least one data transmission path corresponding to the second routing strategy can also be detected to obtain a first detection result; when the first detection result indicates that the number of data transmission paths that need to be updated in at least one data transmission path corresponding to the second routing strategy reaches the target number, it is determined that the data transmission path from the starting node to the target node needs to be updated.

[0099] It should be noted that the target number is pre-set, such as 3; at least one data transmission path corresponding to the second routing strategy is detected, that is, the number of data transmission paths that need to perform target operations such as deleting data transmission paths or adding data transmission paths in at least one data transmission path included in the second routing strategy is obtained, and the number is compared with the target number to obtain a comparison result, and the comparison result is used as the first detection result. When the comparison result, that is, the first detection result, indicates that the number of data transmission paths that need to be updated in at least one data transmission path corresponding to the second routing strategy reaches the target number, it is determined that the data transmission path from the starting node to the target node needs to be updated.

[0100] In actual implementation, when the comparison result, i.e., the first detection result, indicates that the number of data transmission paths that need to be updated in at least one data transmission path corresponding to the second routing strategy does not reach the target number, it means that the data transmission path from the starting node to the target node does not need to be updated, and therefore only at least one data transmission path included in the second routing strategy needs to be adjusted, i.e., the target operation needs to be performed on the data transmission path from the starting node to the target node. Here, the process of performing the target operation on the corresponding data transmission path included in the second routing strategy will be described in the subsequent process.

[0101] In other embodiments, based on the first routing strategy and the second routing strategy, after transmitting data from the starting node to the target node, it is also possible to obtain the data transmission speed from the starting node to the target node during the data transmission process, and based on the data transmission speed, detect the path selection mode of the second routing strategy to obtain a second detection result; wherein the path selection mode of the second routing strategy is used to indicate the selection method of at least one data transmission path included in the second routing strategy; when the second detection result indicates that the path selection mode of the second routing strategy needs to be switched from the current mode to the target mode, it is determined that the data transmission path from the starting node to the target node needs to be updated.

[0102] It should be noted that there are multiple path selection modes for the second routing strategy, such as packet-by-packet mode, hash mode, polling mode, etc. When the path selection mode of the second routing strategy needs to be changed, it means that the data transmission path included in the second routing strategy needs to be reselected, that is, the routing strategy needs to be re-determined, that is, the data transmission path from the starting node to the target node needs to be updated.

[0103] It should be noted that whether the path selection mode of the second routing strategy needs to be changed is determined by the data transmission speed during the data transmission process. Exemplarily, when the path selection mode of the second routing strategy is a packet-by-packet mode, the load of the data transmission path can be more balanced, but packets will be out of order. In order to prevent the network performance from decreasing in the packet-by-packet mode, the network needs to support out-of-order reception and selective retransmission capabilities. When the number of out-of-order messages exceeds the upper limit of the network's out-of-order reception capability, the network card cannot effectively receive and process out-of-order messages, which will cause the network bandwidth to decrease, that is, the data transmission speed to decrease. At this time, the path selection mode of the second routing strategy can be detected by the data transmission speed to obtain a second detection result. When the standard data transmission speed of the second detection result is less than the data transmission speed threshold, it is determined that the path selection mode of the second routing strategy needs to be changed, such as switching from the packet-by-packet mode to the hash mode, that is, it is determined that the data transmission path from the starting node to the target node needs to be updated; when the standard data transmission speed of the second detection result is not less than the data transmission speed threshold, it is determined that the path selection mode of the second routing strategy does not need to be changed, that is, the data transmission path included in the second routing strategy continues to be sampled for data transmission.

[0104] In actual implementation, when the data transmission path from the starting node to the target node needs to be updated, the process of obtaining the third routing strategy can be to update the data transmission path in the first data transmission path set included in the second routing strategy to obtain the second data transmission path set; based on the data transmission path included in the second data transmission path set, construct a third routing strategy.

[0105] It should be noted that the data transmission paths in the first data transmission path set included in the second routing strategy are updated to obtain the second data transmission path set, that is, based on the data transmission paths in the first data transmission path set included in the second routing strategy, a second data transmission path set is created, and the data transmission paths included in the second data transmission path set are at least partially different from the data transmission paths included in the first data transmission path set, so that the third routing strategy is constructed based on the data transmission paths included in the second data transmission path set.

[0106] Step 103: switch the second routing strategy to a third routing strategy, and transmit data from the start node to the target node based on the first routing strategy and the third routing strategy.

[0107] In actual implementation, after obtaining the third routing strategy, the second routing strategy is switched to the third routing strategy, that is, the first routing strategy is switched from pointing to the second routing strategy to pointing to the third routing strategy, that is, the first routing strategy is used to point to the third routing strategy, so that based on the first routing strategy and the third routing strategy, data is transmitted from the starting node to the target node, that is, based on the first routing strategy, the third routing strategy is found, and based on the third routing strategy, at least one data transmission path of the third data transmission path set included in the third routing strategy is found, so that based on the at least one data transmission path, data is transmitted from the starting node to the target node.

[0108] For example, see Figure 7 , Figure 7 is a schematic diagram of a process of switching the second routing strategy to the third routing strategy provided by an embodiment of the present application, based on Figure 7 , the first routing information 1 to the first routing information n in the routing table are all associated with the first routing strategy, that is, the first identifier 1 to the first identifier n all correspond to the first routing strategy, the second routing strategy indicated by the dotted box 701 includes a first data transmission path set including three data transmission paths, namely, data transmission path 1, data transmission path 2 and data transmission path 3, and the second data transmission path set indicated by the dotted box 702 includes three data transmission paths, namely, data transmission path 4, data transmission path set 5 and data transmission path set 6. When the data transmission path from the starting node to the target node needs to be updated, the third routing strategy indicated by the dotted box 702 is obtained, and the first routing strategy is switched from pointing to the second routing strategy indicated by the dotted box 701 to pointing to the third routing strategy indicated by the dotted box 702, that is, the second routing strategy is switched to the third routing strategy, so as to transmit data from the starting node to the target node based on the first routing strategy and the third routing strategy.

[0109] It should be noted that, during the data transmission process, sometimes the data transmission path needs to be adjusted, such as when the load is too large, it is necessary to add a data transmission path, or when a data transmission path fails, it is necessary to delete the corresponding data transmission path. For example, when the corresponding data transmission path needs to be adjusted for a certain data transmission direction, such as a data transmission direction for data transmission from a starting node to a target node, the corresponding data transmission path adjustment method can be determined by judging whether the data transmission path from the starting node to the target node needs to be updated. When the data transmission path from the starting node to the target node needs to be updated, a third routing strategy is obtained, and the corresponding data transmission path is adjusted based on the third routing strategy. Here, the process of adjusting the corresponding data transmission path based on the third routing strategy is as described above, and this embodiment of the present application will not be described in detail.

[0110] When the data transmission path from the starting node to the target node does not need to be updated, that is, when the target operation needs to be performed on the data transmission path from the starting node to the target node, at least one data transmission path included in the second routing strategy is directly adjusted. Specifically, during the data transmission process, when the target operation needs to be performed on the data transmission path from the starting node to the target node, the target operation is performed on the data transmission path in the first data transmission path set included in the second routing strategy to obtain the target second routing strategy; wherein the target second routing strategy includes a fourth data transmission path set from the starting node to the target node, the fourth data transmission path set includes at least one data transmission path, and the data transmission paths included in the fourth data transmission path set are obtained by performing the target operation on the data transmission paths included in the first data transmission path set; based on the first routing strategy and the target second routing strategy, data is transmitted from the starting node to the target node.

[0111] It should be noted that the target operation includes deleting a data transmission path and adding at least one of a data transmission path. When the target operation is to delete a data transmission path, the target operation is performed on the data transmission paths in the first data transmission path set included in the second routing policy to obtain a target second routing policy, that is, to delete the corresponding data transmission paths in the first data transmission path set included in the second routing policy; based on the remaining data transmission paths, a fourth data transmission path set is generated, and the first data transmission path set included in the second routing policy is updated to the fourth data transmission path set to obtain the target second routing policy; when the target operation is to add a data transmission path, the target operation is performed on the data transmission paths in the first data transmission path set included in the second routing policy to obtain a target second routing policy, that is, to add the corresponding data transmission paths to the first data transmission path set included in the second routing policy to obtain a fourth data transmission path set, and the first data transmission path set included in the second routing policy is updated to the fourth data transmission path set to obtain the target second routing policy.

[0112] In some embodiments, before obtaining the first routing strategy and the second routing strategy, an initial first routing strategy can also be obtained, the initial first routing strategy including a third data transmission path set from the starting node to the target node, the third data transmission path set including at least one data transmission path; based on the initial first routing strategy, data is transmitted from the starting node to the target node; thus, the process of obtaining the first routing strategy and the second routing strategy can be, in the process of data transmission based on the initial first routing strategy, when the data transmission path from the starting node to the target node needs to be updated, the second routing strategy is obtained, and based on the second routing strategy and the initial first routing strategy, the first routing strategy is constructed.

[0113] It should be noted that the data transmission paths included in the third data transmission path set are at least partially different from the data transmission paths included in the first data transmission path set.

[0114] In actual implementation, the process of constructing the first routing strategy based on the second routing strategy and the initial first routing strategy may be to switch the third data transmission path set included in the initial first routing strategy to the first data transmission path set included in the second routing strategy; and determine the switched initial first routing strategy as the first routing strategy.

[0115] It should be noted that the third data transmission path set included in the initial first routing strategy is switched to the first data transmission path set included in the second routing strategy, that is, the initial first routing strategy is switched from pointing to the third data transmission path set to pointing to the second routing strategy, thereby determining the initial first routing strategy after the pointing relationship is switched as the first routing strategy.

[0116] For example, see Figure 8 , Figure 8 is a schematic diagram of a process of transmitting data from a starting node to a target node provided by an embodiment of the present application, based on Figure 8 , the first routing information 1 to the first routing information n in the routing table are all associated with the first routing policy, that is, the first identifier 1 to the first identifier n all correspond to the first routing policy, Figure 8 The third data transmission path set included in the initial first routing strategy in a includes three data transmission paths, namely, data transmission path 1, data transmission path 2, and data transmission path 3. In the process of data transmission based on the initial first routing strategy, when the data transmission path from the starting node to the target node needs to be updated, obtain Figure 8 The second routing strategy indicated in b, the first data transmission path set included in the second routing strategy includes three data transmission paths, namely, data transmission path 4, data transmission path 5 and data transmission path 6, so that Figure 8 As shown in b, the third data transmission path set included in the initial first routing strategy is switched to the first data transmission path set included in the second routing strategy, that is, the initial first routing strategy is switched from pointing to the third data transmission path set to pointing to the second routing strategy, so that the initial first routing strategy after the pointing relationship is switched is determined as the first routing strategy, and then based on the first routing strategy and the second routing strategy, data is transmitted from the starting node to the target node.

[0117] It should be noted that, in the process of data transmission based on the first routing strategy and the second routing strategy, when the data transmission path from the starting node to the target node needs to be updated, such as Figure 7 As shown, the third routing strategy is obtained, and the second routing strategy is switched to the third routing strategy, so that data is transmitted from the starting node to the target node based on the first routing strategy and the third routing strategy.

[0118] Next, the switching method of the routing strategy provided in the embodiment of the present application is introduced. Fig. 9 , Fig. 9 is a flow chart of a method for switching routing strategies provided in an embodiment of the present application, based on Fig. 9 The routing strategy switching method provided in the embodiment of the present application is applied to be implemented collaboratively by the terminal and the server.

[0119] Step 201: In response to a routing policy building instruction, the terminal sends a routing policy building request carrying an initial routing information set to a server.

[0120] In actual implementation, a client supporting routing policy construction is provided on the terminal, so that the terminal responds to the routing policy construction instruction and sends a routing policy construction request carrying an initial routing information set to the server, that is, the client supporting data transmission on the terminal responds to the routing policy construction instruction and sends a routing policy construction request to the server; the routing policy construction instruction can be sent to the client by other devices connected to the terminal for communication, or it can be generated by the user based on the human-computer interaction interface of the client after triggering the corresponding confirmation function item, or it can be automatically generated by the client according to certain trigger conditions, and this is not limited in this embodiment of the present application.

[0121] Step 202: The server receives a routing policy building request carrying an initial routing information set, and analyzes the initial routing information set based on the routing policy building request to obtain an analysis result.

[0122] It should be noted that the initial routing information set also includes routing configuration information, which is used to indicate whether the two-level routing policy function is enabled. The initial routing information set is analyzed, that is, the routing configuration information of the initial routing information set is analyzed to determine whether the two-level routing policy function is enabled.

[0123] Step 203, when the analysis result indicates that the two-level routing strategy function is enabled, at least one candidate first routing strategy and at least one candidate second routing strategy are constructed based on the initial routing information set, and a routing information set is generated based on the at least one candidate first routing strategy, the at least one candidate second routing strategy and the initial routing information set.

[0124] It should be noted that after the routing information set is generated, the routing information set is stored for subsequent use; at the same time, the process of generating the routing information set based on the initial routing set is as described above, and this embodiment of the present application will not be repeated.

[0125] Step 204: Generate a prompt message indicating that the routing policy is successfully constructed, and send the prompt message to the terminal.

[0126] Step 205: In response to the data transmission instruction, the terminal sends a data transmission request to the server for requesting data transmission from the starting node to the target node.

[0127] It should be noted that the starting node and the target node here can be a server or a terminal, and this embodiment of the present application does not limit this.

[0128] Step 206: The server determines the data transmission direction corresponding to the data transmission request based on the data transmission request, and obtains a set of routing information.

[0129] It should be noted that the routing information set obtained here is a pre-stored routing information set, which includes at least one first routing information and a first identifier that has a one-to-one correspondence with the first routing information. Each first identifier corresponds to a candidate first routing strategy, and different first routing information indicates different data transmission directions.

[0130] Step 207, based on the data transmission direction corresponding to the data transmission request, select target routing information with a data transmission direction from the start node to the target node from at least one first routing information included in the routing information set, and search for the target first identifier corresponding to the target routing information.

[0131] Step 208, determine the candidate first routing policy corresponding to the target first identifier as the first routing policy, find the target second identifier corresponding to the target routing information from the first routing policy, and determine the candidate second routing policy corresponding to the target second identifier as the second routing policy.

[0132] It should be noted that the first routing strategy includes at least one second routing information and a second identifier that has a one-to-one correspondence with the second routing information, each second identifier corresponds to a candidate second routing strategy, at least one first routing information includes at least one second routing information, and at least one second routing information includes target routing information.

[0133] Step 209: Transmit data from the start node to the target node based on the first routing strategy and the second routing strategy.

[0134] Step 210: during the data transmission process, when the data transmission path from the starting node to the target node needs to be adjusted, determine a target adjustment method for the data transmission path from the starting node to the target node.

[0135] It should be noted that during the data transmission process, the data transmission path sometimes needs to be adjusted. For example, if the load is too large, an additional data transmission path needs to be added, or if a data transmission path fails, the corresponding data transmission path needs to be deleted.

[0136] In actual implementation, when adjusting the data transmission path, there are multiple adjustment methods. For example, when adjusting the data transmission path from the starting node to the target node, the data transmission path from the starting node to the target node can be directly updated to achieve the adjustment, or the data transmission path from the starting node to the target node can be adjusted by performing target operations such as deleting the data transmission path and / or adding the data transmission path.

[0137] In this way, during the data transmission process, when the number of data transmission paths that need to be changed is not large, such as the target number is not reached, the corresponding data transmission path can be fine-tuned, that is, the target operation is performed on the data transmission path. When the number of data transmission paths that need to be changed is large, such as the target number is reached, the data transmission path from the starting node to the target node can be directly updated. In this way, based on different adjustment methods, the data transmission path is adjusted in a targeted manner. On the basis of ensuring the efficiency of the data transmission path adjustment, the resource consumption when adjusting the data transmission path can also be reduced.

[0138] Step 211, when the adjustment method indicates that a target operation needs to be performed on the data transmission path from the starting node to the target node, the target operation is performed on the data transmission path in the first data transmission path set included in the second routing strategy to obtain the target second routing strategy, and based on the first routing strategy and the target second routing strategy, data is transmitted from the starting node to the target node.

[0139] It should be noted that the target second routing strategy includes a fourth data transmission path set from the starting node to the target node, the fourth data transmission path set includes at least one data transmission path, and the data transmission paths included in the fourth data transmission path set are obtained by performing the target operation on the data transmission paths included in the first data transmission path set.

[0140] In actual implementation, the target operation includes deleting a data transmission path and adding at least one of a data transmission path. When the target operation is to delete a data transmission path, the target operation is performed on the data transmission paths in the first data transmission path set included in the second routing policy to obtain a target second routing policy, that is, to delete the corresponding data transmission paths in the first data transmission path set included in the second routing policy; based on the remaining data transmission paths, a fourth data transmission path set is generated, and the first data transmission path set included in the second routing policy is updated to the fourth data transmission path set to obtain the target second routing policy; when the target operation is to add a data transmission path, the target operation is performed on the data transmission paths in the first data transmission path set included in the second routing policy to obtain a target second routing policy, that is, to add the corresponding data transmission paths to the first data transmission path set included in the second routing policy to obtain a fourth data transmission path set, and the first data transmission path set included in the second routing policy is updated to the fourth data transmission path set to obtain the target second routing policy.

[0141] Step 212: When the adjustment mode indicates that the data transmission path from the start node to the target node needs to be updated, a third routing strategy is obtained, and the second routing strategy is switched to the third routing strategy.

[0142] It should be noted that the third routing strategy includes a second data transmission path set from the start node to the target node, and the data transmission paths included in the second data transmission path set are at least partially different from the data transmission paths included in the first data transmission path set.

[0143] In actual implementation, when the data transmission path from the starting node to the target node needs to be updated, the process of obtaining the third routing strategy is as described above. At the same time, the second routing strategy is switched to the third routing strategy, which is also as described above. This embodiment of the present application will not be elaborated on.

[0144] It should be noted that when the data transmission path from the starting node to the target node needs to be updated, the third routing strategy is obtained. Therefore, it is necessary to judge whether the data transmission path from the starting node to the target node needs to be updated. The method for judging whether the data transmission path from the starting node to the target node needs to be updated is the same as described above. This embodiment of the present application will not be elaborated on.

[0145] Step 213: Transmit data from the start node to the target node based on the first routing strategy and the third routing strategy.

[0146] Applying the above embodiment of the present application, based on the first routing strategy and the second routing strategy, data is transmitted from the starting node to the target node. If the data transmission path from the starting node to the target node needs to be updated, the third routing strategy is directly obtained, so that the second routing strategy is switched to the third routing strategy, and then based on the first routing strategy and the third routing strategy, data is transmitted from the starting node to the target node. In this way, compared with the scheme in the related art in which data transmission is performed based on only one routing strategy, if routing switching is required, the routing table needs to be refreshed, and the routing information pointing to the original routing strategy is all pointed to the new routing strategy. The present application performs data transmission based on a two-level routing strategy, so that the routing information in the routing table points to the first routing strategy, and the first routing strategy points to the second routing strategy. If routing switching is required, it is only necessary to switch the first routing strategy from pointing to the second routing strategy to pointing to the new routing strategy, that is, the third routing strategy, without changing the pointing relationship between the routing information and the first routing strategy. In this way, even if the number of routing information in the roadside table is too large, the switching time will not be increased, thereby improving the efficiency of routing strategy switching.

[0147] The following is an explanation of an exemplary application of the embodiments of the present application in a practical application scenario.

[0148] Related Technology During the data transmission process, when data transmission is performed based on Equal-Cost Multi-Path Routing (ECMP), if ECMP switching is required, that is, the data stream needs to be switched from one set of paths to another set of paths for transmission, there are the following two methods: First, the original path is deleted from the current ECMP and the new path is added to the current ECMP; second, a new ECMP containing the new path is created, and then the routing table is refreshed to point all the routes pointing to the original ECMP to the new ECMP. However, for the first method mentioned above, when the number of ECMP paths increases, the switching time will increase significantly, and for the second method mentioned above, when the number of routes in the roadside table is too large, the switching time will also increase significantly. Therefore, the efficiency of ECMP switching in the related technology is low.

[0149] Based on this, the embodiment of the present application provides a route switching method based on hierarchical ECMP, which introduces two levels of ECMP in the route switching scenario, wherein the upper-level ECMP (first routing strategy) is responsible for determining the general direction of the traffic, while the lower-level ECMP (second routing strategy) is responsible for the specific traffic distribution. When it is necessary to switch the data stream from one set of paths to another, it is only necessary to create a new ECMP in advance, and then only one switch is required to transfer the traffic to the new path group. In this way, the route switching process only needs to be performed in the lower-level ECMP. Since the routes associated with the original ECMP upper level have not changed, there is no need to refresh the routing table (routing information set), which greatly reduces the time consumption of the route switching process, thereby achieving rapid and stable route switching.

[0150] Next, the technical solution of this application is described in detail. Fig.10 , Fig.10 This is a schematic diagram of the process of routing switching provided by the embodiment of the present application. Fig.10 In the embodiment of the present application, the process of performing routing switching based on two-level ECMP can be implemented in two ways. The first one is as follows: Fig.10 As shown in a, the default state of the first-level ECMP (initial first routing strategy) is retained, and data transmission is performed based on the first-level ECMP. When fast routing switching is required, a new ECMP subordinate (second routing strategy) and related data transmission paths are recreated, and the original ECMP is changed from pointing to the related data transmission path to pointing to the new ECMP subordinate; the second type, as shown in Fig.10As shown in b, two levels of ECMP (the first routing strategy and the second routing strategy) are created during initialization, and two levels of ECMP are used for data transmission. When fast routing switching is required, a new ECMP subordinate (the third routing strategy) and related data transmission paths are recreated, and the original ECMP is changed from pointing to the original ECMP subordinate to pointing to the new ECMP subordinate.

[0151] In actual implementation, it is first necessary to create a two-level ECMP. Then, during data transmission based on the two-level ECMP, the data transmission path indicated by the ECMP can be adjusted, including deleting and / or adding the corresponding data transmission path, or directly switching the ECMP.

[0152] For the process of creating ECMP, see Fig.11 , Fig.11 is a flowchart of the creation process of the two-level ECMP provided in the embodiment of the present application, based on Fig.11 The two-level ECMP creation process provided in the embodiment of the present application is implemented through steps 1101 to 1105. Specifically, first, it is determined whether the two-level ECMP function is enabled. When the two-level ECMP function is not enabled, a first-level ECMP is created; when the two-level ECMP function is enabled, it is determined whether to directly create a two-level ECMP. When it is determined to directly create a two-level ECMP, an upper-level ECMP is created, and then a lower-level ECMP is created based on the upper-level ECMP. When it is determined not to directly create a two-level ECMP, a first-level ECMP is created.

[0153] For the procedure to remove and / or add data transfer paths, see Fig.12 , Fig.12 is a schematic diagram of a process for adjusting the data transmission path indicated by ECMP provided in an embodiment of the present application, based on Fig.12 The process of deleting and / or adding a data transmission path provided in the embodiment of the present application is implemented through steps 1201 to 1205. Specifically, it is first determined whether the two-level ECMP function is enabled. When the two-level ECMP function is not enabled, the data transmission path of the first-level ECMP is obtained, and the acquired data transmission path of the first-level ECMP is deleted and / or added; when the two-level ECMP function is enabled, the pointing relationship of the upper-level ECMP is first obtained, and then based on the pointing relationship of the upper-level ECMP, the lower-level ECMP is obtained, that is, the data transmission path of the lower-level ECMP is obtained, and the acquired data transmission path of the lower-level ECMP is deleted and / or added.

[0154] It should be noted that, for the process of deleting and / or adding data transmission paths, when the two-level ECMP function is enabled and it is determined not to directly create a two-level ECMP, that is, when data transmission is performed based on the first-level ECMP, when routing switching is not performed, that is, when the original ECMP is not changed from pointing to the relevant data transmission path to pointing to the new ECMP subordinate, the process of deleting and / or adding data transmission paths is similar to the process of deleting and / or adding data transmission paths when the two-level ECMP function is not enabled; when routing switching is performed, that is, when the original ECMP is changed from pointing to the relevant data transmission path to pointing to the new ECMP subordinate, the process of deleting and / or adding data transmission paths is similar to the process of deleting and / or adding data transmission paths when the two-level ECMP function is enabled.

[0155] For the process of switching directly to ECMP, see Fig.13 , Fig.13 is a schematic diagram of the process of switching ECMP provided in an embodiment of the present application, based on Fig.13 The process of switching ECMP provided in the embodiment of the present application is implemented through steps 1301 to 1307. Specifically, it is first determined whether the two-level ECMP function is enabled. When the two-level ECMP function is not enabled, the process of switching ECMP is terminated, that is, ECMP cannot be directly switched. When the two-level ECMP function is enabled, a new lower-level ECMP is created, and a new data transmission path is added to the new ECMP lower level. Then, the pointing relationship of the upper-level ECMP is obtained, and the pointing relationship of the upper-level ECMP is switched from pointing to the original lower-level ECMP to pointing to the new lower-level ECMP, and the original lower-level ECMP is destroyed.

[0156] It should be noted that, for the process of directly switching ECMP, when the two-level ECMP function is enabled and it is determined not to directly create a two-level ECMP, that is, when data transmission is performed based on a first-level ECMP, when routing switching is not performed, that is, when the original ECMP is not changed from pointing to the relevant data transmission path to pointing to the new ECMP subordinate, the process of directly switching ECMP can be to recreate a new ECMP subordinate and relevant data transmission path, and change the original ECMP from pointing to the relevant data transmission path to pointing to the new ECMP subordinate; when routing switching is performed, that is, when the original ECMP is changed from pointing to the relevant data transmission path to pointing to the new ECMP subordinate, the process of directly switching ECMP is similar to the process of deleting and / or adding data transmission paths when the two-level ECMP function is enabled.

[0157] Applying the above embodiment of the present application, based on the first routing strategy and the second routing strategy, data is transmitted from the starting node to the target node. If the data transmission path from the starting node to the target node needs to be updated, the third routing strategy is directly obtained, so that the second routing strategy is switched to the third routing strategy, and then based on the first routing strategy and the third routing strategy, data is transmitted from the starting node to the target node. In this way, compared with the scheme in the related art in which data transmission is performed based on only one routing strategy, if routing switching is required, the routing table needs to be refreshed, and the routing information pointing to the original routing strategy is all pointed to the new routing strategy. The present application performs data transmission based on a two-level routing strategy, so that the routing information in the routing table points to the first routing strategy, and the first routing strategy points to the second routing strategy. If routing switching is required, it is only necessary to switch the first routing strategy from pointing to the second routing strategy to pointing to the new routing strategy, that is, the third routing strategy, without changing the pointing relationship between the routing information and the first routing strategy. In this way, even if the number of routing information in the roadside table is too large, the switching time will not be increased, thereby improving the efficiency of routing strategy switching.

[0158] The following continues to describe the exemplary structure of the switching device 455 of the routing strategy provided in the embodiment of the present application implemented as a software module. In some embodiments, such as Figure 2 As shown, the software modules stored in the switching device 455 of the routing strategy of the memory 450 may include:

[0159] The first acquisition module 4551 is used to acquire a first routing strategy and a second routing strategy, and transmit data from a starting node to a target node based on the first routing strategy and the second routing strategy; wherein the first routing strategy is used to point to a second routing strategy from the starting node to the target node, the second routing strategy includes a first data transmission path set from the starting node to the target node, and the first data transmission path set includes at least one data transmission path;

[0160] The second acquisition module 4552 is used to acquire a third routing strategy when the data transmission path from the starting node to the target node needs to be updated during the data transmission process; wherein the third routing strategy includes a second data transmission path set from the starting node to the target node, and the data transmission paths included in the second data transmission path set are at least partially different from the data transmission paths included in the first data transmission path set;

[0161] The switching module 4553 is used to switch the second routing strategy to the third routing strategy, and transmit data from the starting node to the target node based on the first routing strategy and the third routing strategy.

[0162] In some embodiments, the first acquisition module 4551 is also used to obtain a set of routing information, the set of routing information including at least one piece of first routing information and a first identifier that has a one-to-one correspondence with the first routing information, each of the first identifiers corresponds to a candidate first routing strategy, and different first routing information indicates different data transmission directions; from the at least one piece of first routing information, select the target routing information whose data transmission direction is from the starting node to the target node, and search for the target first identifier corresponding to the target routing information; determine the candidate first routing strategy corresponding to the target first identifier as the first routing strategy, and determine the second routing strategy based on the target routing information and the first routing strategy.

[0163] In some embodiments, the first acquisition module 4551 is also used to receive a data transmission request, wherein the data transmission request is used to request data transmission from the starting node to the target node; determine the data transmission direction corresponding to the data transmission request; and based on the data transmission direction corresponding to the data transmission request, search for the target routing information from the at least one first routing information.

[0164] In some embodiments, the first routing policy includes at least one second routing information and a second identifier that has a one-to-one correspondence with the second routing information, each second identifier corresponds to a candidate second routing policy, the at least one first routing information includes the at least one second routing information, and the at least one second routing information includes the target routing information; the first acquisition module 4551 is also used to find the target second identifier corresponding to the target routing information from the first routing policy, and determine the candidate second routing policy corresponding to the target second identifier as the second routing policy.

[0165] In some embodiments, the device also includes a third acquisition module, the third acquisition module is used to obtain an initial routing information set, the initial routing information set includes the at least one first routing information; obtain at least one data transmission path of the data transmission direction corresponding to each first routing information; construct a candidate second routing strategy based on at least one data transmission path of the data transmission direction corresponding to each first routing information; wherein the candidate second routing strategy has a one-to-one correspondence with the first routing information; obtain the second identifier of each candidate second routing strategy, and construct at least one candidate first routing strategy based on each second identifier and the at least one first routing information; obtain the first identifier of each candidate first routing strategy, and construct the routing information set based on each first identifier and the at least one first routing information.

[0166] In some embodiments, the device also includes a first detection module, which is used to detect at least one data transmission path corresponding to the second routing strategy to obtain a first detection result; when the first detection result indicates that the number of data transmission paths that need to be updated in at least one data transmission path corresponding to the second routing strategy reaches a target number, it is determined that the data transmission path from the starting node to the target node needs to be updated.

[0167] In some embodiments, the device also includes a second detection module, which is used to obtain the data transmission speed from the starting node to the target node during the data transmission process, and based on the data transmission speed, detect the path selection mode of the second routing strategy to obtain a second detection result; wherein the path selection mode of the second routing strategy is used to indicate the selection method of at least one data transmission path included in the second routing strategy; when the second detection result indicates that the path selection mode of the second routing strategy needs to be switched from the current mode to the target mode, it is determined that the data transmission path from the starting node to the target node needs to be updated.

[0168] In some embodiments, the device also includes a fourth acquisition module, which is used to acquire an initial first routing strategy, wherein the initial first routing strategy includes a third data transmission path set from the starting node to the target node, and the third data transmission path set includes at least one data transmission path; based on the initial first routing strategy, data is transmitted from the starting node to the target node; the first acquisition module 4551 is also used to acquire the second routing strategy when the data transmission path from the starting node to the target node needs to be updated during data transmission based on the initial first routing strategy, and construct the first routing strategy based on the second routing strategy and the initial first routing strategy.

[0169] In some embodiments, the first acquisition module 4551 is further used to switch the third data transmission path set included in the initial first routing strategy to the first data transmission path set included in the second routing strategy; and determine the switched initial first routing strategy as the first routing strategy.

[0170] In some embodiments, the second acquisition module 4552 is also used to update the data transmission paths in the first data transmission path set included in the second routing strategy to obtain the second data transmission path set; and construct the third routing strategy based on the data transmission paths included in the second data transmission path set.

[0171] In some embodiments, the device also includes a target operation execution module, which is used to execute the target operation on the data transmission path in the first data transmission path set included in the second routing strategy when it is necessary to execute the target operation on the data transmission path from the starting node to the target node during the data transmission process, so as to obtain a target second routing strategy; wherein the target second routing strategy includes a fourth data transmission path set from the starting node to the target node, the fourth data transmission path set includes at least one data transmission path, and the data transmission paths included in the fourth data transmission path set are obtained by executing the target operation on the data transmission paths included in the first data transmission path set; based on the first routing strategy and the target second routing strategy, data is transmitted from the starting node to the target node.

[0172] The embodiment of the present application provides a computer program product, which includes computer executable instructions, and the computer executable instructions are stored in a computer readable storage medium. The processor of the electronic device reads the computer executable instructions from the computer readable storage medium, and the processor executes the computer executable instructions, so that the electronic device executes the above-mentioned switching method of the routing strategy in the embodiment of the present application.

[0173] The embodiment of the present application provides a computer-readable storage medium storing computer-executable instructions, wherein the computer-executable instructions are stored. When the computer-executable instructions are executed by a processor, the processor will execute the method for switching the routing strategy provided in the embodiment of the present application, for example, Figure 3 The switching method of the routing policy is shown.

[0174] In some embodiments, the computer-readable storage medium may be a read-only memory (ROM), a random access memory (RAM), an erasable programmable read-only memory (EPROM), an electrically erasable programmable read-only memory (EEPROM), a flash memory, a magnetic surface memory, an optical disk, or a CD-ROM; or it may be various devices including one or any combination of the above memories.

[0175] In some embodiments, computer executable instructions may be in the form of a program, software, software module, script or code, written in any form of programming language (including compiled or interpreted languages, or declarative or procedural languages), and may be deployed in any form, including as a stand-alone program or as a module, component, subroutine or other unit suitable for use in a computing environment.

[0176] As an example, computer-executable instructions may, but need not, correspond to a file in a file system, may be stored as part of a file storing other programs or data, such as in one or more scripts in a HyperText Markup Language (HTML) document, in a single file dedicated to the program in question, or in multiple coordinated files (e.g., files storing one or more modules, subroutines, or code portions).

[0177] As an example, computer executable instructions may be deployed to be executed on one electronic device, or on multiple electronic devices located at one site, or on multiple electronic devices distributed at multiple sites and interconnected by a communication network.

[0178] In summary, the embodiments of the present application have the following beneficial effects:

[0179] (1) Compared with the related art in which data is transmitted based on only one routing strategy, if routing switching is required, the routing table needs to be refreshed, and the routing information pointing to the original routing strategy needs to be pointed to the new routing strategy. The present application performs data transmission based on a two-level routing strategy, so that the routing information in the routing table points to the first routing strategy, and the first routing strategy points to the second routing strategy. If routing switching is required, it is only necessary to switch the first routing strategy from pointing to the second routing strategy to pointing to the new routing strategy, i.e., the third routing strategy, without changing the pointing relationship between the routing information and the first routing strategy. In this way, even if the amount of routing information in the roadside table is too much, the switching time will not be increased, thereby improving the efficiency of routing strategy switching.

[0180] (2) During the data transmission process, when the number of data transmission paths that need to be changed is small, such as when the target number is not reached, the corresponding data transmission path can be fine-tuned, that is, the target operation is performed on the data transmission path. When the number of data transmission paths that need to be changed is large, such as when the target number is reached, the data transmission path from the start node to the target node can be directly updated. In this way, based on different adjustment methods, the data transmission path can be adjusted in a targeted manner. On the basis of ensuring the efficiency of the data transmission path adjustment, the resource consumption when adjusting the data transmission path can also be reduced.

[0181] (3) Introduce two-level ECMP in the route switching scenario, where the upper-level ECMP (first routing strategy) is responsible for determining the general direction of traffic, while the lower-level ECMP (second routing strategy) is responsible for specific traffic distribution. When it is necessary to switch the data flow from one set of paths to another, it is only necessary to create a new ECMP in advance, and then only one switch is required to transfer the traffic to the new path group. In this way, the route switching process only needs to be performed in the lower-level ECMP. Since the routes associated with the original ECMP upper level have not changed, there is no need to refresh the routing table (routing information set), which greatly reduces the time consumption of the route switching process, thereby achieving rapid and stable route switching.

[0182] It should be noted that in the embodiments of the present application, it involves obtaining relevant data such as routing information sets. When the embodiments of the present application are applied to specific products or technologies, user permission or consent is required, and the collection, use and processing of relevant data must comply with relevant laws, regulations and standards of relevant countries and regions.

[0183] The above is only an embodiment of the present application and is not intended to limit the protection scope of the present application. Any modifications, equivalent substitutions and improvements made within the spirit and scope of the present application are included in the protection scope of the present application.

Claims

1. A method for switching a routing strategy, It is characterized in that The method comprises: Acquire a first routing strategy and a second routing strategy, and transmit data from a starting node to a target node based on the first routing strategy and the second routing strategy; The first routing strategy is used to point to a second routing strategy from the starting node to the target node, the second routing strategy includes a first data transmission path set from the starting node to the target node, and the first data transmission path set includes at least one data transmission path; During the data transmission process, when the data transmission path from the starting node to the target node needs to be updated, obtaining a third routing strategy; The third routing strategy includes a second data transmission path set from the starting node to the target node, and the data transmission paths included in the second data transmission path set are at least partially different from the data transmission paths included in the first data transmission path set; The second routing strategy is switched to the third routing strategy, and data is transmitted from the starting node to the target node based on the first routing strategy and the third routing strategy.

2. The method according to claim 1, It is characterized in that The obtaining of the first routing strategy and the second routing strategy includes: Acquire a routing information set, the routing information set including at least one first routing information and a first identifier that has a one-to-one correspondence with the first routing information, each first identifier corresponds to a candidate first routing strategy, and different first routing information indicates different data transmission directions; From the at least one first routing information, select target routing information with a data transmission direction from the start node to the target node, and search for a target first identifier corresponding to the target routing information; The candidate first routing policy corresponding to the target first identifier is determined as the first routing policy, and the second routing policy is determined based on the target routing information and the first routing policy.

3. The method according to claim 2, It is characterized in that The selecting, from the at least one first routing information, target routing information in which the data transmission direction is from the start node to the target node comprises: receiving a data transmission request, the data transmission request being used to request data transmission from the starting node to the target node; Determining a data transmission direction corresponding to the data transmission request; The target routing information is searched from the at least one first routing information based on the data transmission direction corresponding to the data transmission request.

4. The method according to claim 2, It is characterized in that The first routing strategy includes at least one piece of second routing information and a second identifier that has a one-to-one correspondence with the second routing information, each second identifier corresponds to a candidate second routing strategy, the at least one piece of first routing information includes the at least one piece of second routing information, and the at least one piece of second routing information includes the target routing information; The determining the second routing strategy based on the target routing information and the first routing strategy includes: A target second identifier corresponding to the target routing information is found from the first routing policy, and a candidate second routing policy corresponding to the target second identifier is determined as the second routing policy.

5. The method according to claim 2, It is characterized in that Before obtaining the routing information set, the method further includes: Acquire an initial routing information set, where the initial routing information set includes the at least one first routing information; Acquire at least one data transmission path in the data transmission direction corresponding to each of the first routing information; Based on at least one data transmission path of the data transmission direction corresponding to each of the first routing information, construct a candidate second routing strategy; wherein the candidate second routing strategy has a one-to-one correspondence with the first routing information; Acquire the second identifier of each of the candidate second routing strategies, and construct at least one candidate first routing strategy based on each of the second identifiers and the at least one first routing information; The first identifier of each candidate first routing strategy is obtained, and the routing information set is constructed based on each first identifier and the at least one first routing information.

6. The method according to claim 1, It is characterized in that After transmitting data from the starting node to the target node based on the first routing strategy and the second routing strategy, the method further includes: Detecting at least one data transmission path corresponding to the second routing strategy to obtain a first detection result; When the first detection result indicates that the number of data transmission paths that need to be updated in at least one data transmission path corresponding to the second routing strategy reaches a target number, it is determined that the data transmission path from the start node to the target node needs to be updated.

7. The method according to claim 1, It is characterized in that After transmitting data from the starting node to the target node based on the first routing strategy and the second routing strategy, the method further includes: During the data transmission process, obtaining a data transmission speed from the starting node to the target node, and based on the data transmission speed, detecting a path selection mode of the second routing strategy to obtain a second detection result; The path selection mode of the second routing strategy is used to indicate a selection method of at least one data transmission path included in the second routing strategy; When the second detection result indicates that the path selection mode of the second routing strategy needs to be switched from the current mode to the target mode, it is determined that the data transmission path from the start node to the target node needs to be updated.

8. The method according to claim 1, It is characterized in that Before obtaining the first routing strategy and the second routing strategy, the method further includes: Acquire an initial first routing strategy, wherein the initial first routing strategy includes a third data transmission path set from the start node to the target node, and the third data transmission path set includes at least one data transmission path; Based on the initial first routing strategy, transmitting data from the starting node to the target node; The obtaining of the first routing strategy and the second routing strategy includes: During data transmission based on the initial first routing strategy, when the data transmission path from the starting node to the target node needs to be updated, the second routing strategy is obtained, and the first routing strategy is constructed based on the second routing strategy and the initial first routing strategy.

9. The method according to claim 8, It is characterized in that The constructing the first routing strategy based on the second routing strategy and the initial first routing strategy includes: Switching the third data transmission path set included in the initial first routing strategy to the first data transmission path set included in the second routing strategy; The initial first routing strategy after switching is determined as the first routing strategy.

10. The method according to claim 1, It is characterized in that The obtaining of the third routing strategy includes: Updating the data transmission paths in the first data transmission path set included in the second routing strategy to obtain the second data transmission path set; The third routing strategy is constructed based on the data transmission paths included in the second data transmission path set.

11. The method according to claim 1, It is characterized in that After transmitting data from the starting node to the target node based on the first routing strategy and the second routing strategy, the method further includes: During the data transmission process, when it is necessary to perform a target operation on the data transmission path from the starting node to the target node, the target operation is performed on the data transmission path in the first data transmission path set included in the second routing strategy to obtain a target second routing strategy; The target second routing strategy includes a fourth data transmission path set from the start node to the target node, the fourth data transmission path set includes at least one data transmission path, and the data transmission paths included in the fourth data transmission path set are obtained by performing a target operation on the data transmission paths included in the first data transmission path set; Based on the first routing policy and the target second routing policy, data is transmitted from the starting node to the target node.

12. A switching device for routing strategy, It is characterized in that The device comprises: A first acquisition module is used to acquire a first routing strategy and a second routing strategy, and transmit data from a starting node to a target node based on the first routing strategy and the second routing strategy; wherein the first routing strategy is used to point to a second routing strategy from the starting node to the target node, the second routing strategy includes a first data transmission path set from the starting node to the target node, and the first data transmission path set includes at least one data transmission path; a second acquisition module, configured to acquire a third routing strategy when the data transmission path from the starting node to the target node needs to be updated during the data transmission process; wherein the third routing strategy includes a second data transmission path set from the starting node to the target node, and the data transmission paths included in the second data transmission path set are at least partially different from the data transmission paths included in the first data transmission path set; A switching module is used to switch the second routing strategy to the third routing strategy, and transmit data from the starting node to the target node based on the first routing strategy and the third routing strategy.

13. An electronic device, It is characterized in that include: A memory for storing computer executable instructions; A processor, configured to implement the routing strategy switching method according to any one of claims 1 to 11 when executing the computer executable instructions stored in the memory.

14. A computer-readable storage medium, It is characterized in that Computer executable instructions are stored, which are used to cause a processor to execute and implement the method for switching the routing strategy described in any one of claims 1 to 11.

15. A computer program product comprising computer executable instructions, It is characterized in that When the computer executable instructions are executed by a processor, the routing strategy switching method described in any one of claims 1 to 11 is implemented.