Network link switching method and device, electronic equipment and storage medium
Through the intelligent gateway to detect network quality and switch to a virtual private network, the problem of high backup link cost in case of physical dedicated link failure is solved, and efficient and low-cost data transmission is achieved.
Patent Information
- Application Number
- CN202310731120.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2023-06-16
- Publication Date
- 2024-12-17
AI Technical Summary
In the prior art, when cloud users fail to transmit data between physical dedicated line links and cloud services, additional physical dedicated line links are needed as backups, resulting in complex construction and high cost.
The network quality is detected through the intelligent gateway. If the physical dedicated line link is abnormal, the traffic will be switched to the virtual dedicated network link, and the virtual dedicated network is used as a backup of the physical dedicated line link to reduce the cost of the backup link.
While ensuring the quality of data transmission, it effectively reduces the cost of backup links and avoids high costs and complex construction in the event of physical dedicated link failure.
Smart Images

Figure CN119155238A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of the Internet. Specifically, the present application relates to a method, device, electronic device and storage medium for switching a network link. Background Art
[0002] With the development of cloud computing technology and market, more and more enterprises are planning their own network systems. Currently, if cloud users want to connect local terminals or computer rooms to cloud computing in a safe and reliable way, they usually use physical dedicated lines to achieve data transmission between cloud users and cloud services.
[0003] Taking the cloud service as a virtual private cloud (VPC) on the cloud as an example, cloud users usually use physical dedicated lines to transmit data between the cloud VPC. In order to avoid the impact of physical dedicated line failures on data transmission, additional physical dedicated lines are used as backup links. However, the construction of physical dedicated lines is complex and has high environmental requirements and costs. Summary of the invention
[0004] The purpose of the embodiments of the present application is to provide a network link switching method, device and electronic device. The technical solutions provided by the embodiments of the present application are as follows:
[0005] On the one hand, an embodiment of the present application provides a method for switching a network link, the method comprising:
[0006] Detecting network quality assessment parameters of a current detection cycle of a physical dedicated line link between an intelligent gateway and a cloud service according to a preset detection cycle; wherein the intelligent gateway is a traffic interface between a client and a cloud service;
[0007] If the current communication link between the smart gateway and the cloud service includes a physical dedicated line link, and it is determined that there is an abnormality in the physical dedicated line link based on the network quality assessment parameters of the current detection cycle, at least part of the traffic of the physical dedicated line link is switched to the virtual private network link between the smart gateway and the cloud service, wherein the virtual private network link is a communication channel established by the customer's front-end device through a wireless network to connect to the cloud service.
[0008] In some possible implementations, determining that an abnormality exists in a physical dedicated line link based on a network quality evaluation parameter of a current detection period includes:
[0009] If the network quality assessment parameters corresponding to the current assessment period all meet the link abnormality conditions, it is determined that there is an abnormality in the link quality of the physical dedicated link, wherein the current assessment period includes the most recent first number of consecutive detection periods; the most recent first number of consecutive detection periods at least includes the current detection period.
[0010] In some possible implementations, if there is an abnormality in the physical dedicated line link, the start time of the next evaluation cycle is the end time of the current evaluation cycle; if there is no abnormality in the physical dedicated line link, the start time of the next evaluation cycle is the end time of the first detection cycle in the current evaluation cycle.
[0011] In some possible implementations, if there is an abnormality in the physical dedicated line link, the method further includes:
[0012] Issue a network anomaly prompt;
[0013] Switching at least part of the traffic of the physical dedicated line link to the virtual private network link between the intelligent gateway and the cloud service, including:
[0014] If a network link switching instruction is received in response to a network anomaly prompt, all traffic of the physical dedicated line link is switched to the virtual private network link based on the network link switching instruction.
[0015] In some possible implementations, if the current communication link between the intelligent gateway and the cloud service includes a physical dedicated line link, and it is determined based on the network quality assessment parameter that the physical dedicated line link is abnormal, at least part of the traffic of the physical dedicated line link is switched to a virtual private network link between the intelligent gateway and the cloud service, including:
[0016] If the current communication link includes a physical dedicated line link and at least one of the following conditions is met, all traffic on the physical dedicated line link is switched to the virtual private network link:
[0017] There are link anomalies in the physical dedicated line link for the second consecutive evaluation period;
[0018] There is an abnormality in the link of the physical dedicated line link in the current evaluation period, and the link quality corresponding to the network quality evaluation parameters of the physical dedicated line link in the previous evaluation period is better than the link quality corresponding to the network quality evaluation parameters of the physical dedicated line link in the current evaluation period.
[0019] In some possible implementations, the following further includes:
[0020] If the current communication link includes a virtual private network link and there is no abnormality in the physical dedicated line link, all traffic of the virtual private network link is switched to the physical dedicated line link.
[0021] In some possible implementations, if it is determined based on the link quality that the physical dedicated line link is abnormal, the method further includes:
[0022] Determine the abnormality level of the physical dedicated line link based on the network quality assessment parameters;
[0023] determining a target amount of traffic to be switched to the virtual private network link based on the anomaly level;
[0024] Switching at least part of the traffic of the physical dedicated line link to the virtual private network link between the intelligent gateway and the cloud service, including:
[0025] Switch the target amount of traffic corresponding to the physical dedicated line link to the virtual private network link.
[0026] In some possible implementations, the intelligent gateway corresponds to a plurality of virtual communication channels;
[0027] Switch the target amount of traffic corresponding to the physical dedicated line link to the virtual private network link, including:
[0028] determining a target number of virtual communication channels corresponding to a target amount of traffic;
[0029] Switch a target number of virtual communication channels in the virtual communication channels corresponding to the physical dedicated line link to the virtual private network link.
[0030] In some possible implementations, the following further includes:
[0031] Determine the link quality level of the physical dedicated line link based on the network quality evaluation parameters of the current detection period;
[0032] Determine, based on the link quality level, a first channel quantity of virtual communication channels corresponding to the physical dedicated line link among multiple virtual communication channels of the intelligent gateway;
[0033] Determine the number of second channels of the virtual communication channel corresponding to the physical dedicated line link in the current detection cycle;
[0034] Determine a target channel number to be adjusted for a virtual communication channel of a physical dedicated line link based on the target channel number and the current channel number;
[0035] The number of virtual communication channels of the physical dedicated line link is adjusted based on the target number of channels.
[0036] On the other hand, an embodiment of the present application provides a network link switching device, the device comprising:
[0037] A detection module, used to detect the network quality assessment parameters of the current detection cycle of the physical dedicated line link between the intelligent gateway and the cloud service according to a preset detection cycle; wherein the intelligent gateway is the traffic interface between the client and the cloud service;
[0038] The first switching module is used to switch at least part of the traffic of the physical dedicated line link to the virtual private network link between the intelligent gateway and the cloud service if the current communication link between the intelligent gateway and the cloud service includes a physical dedicated line link and it is determined based on the network quality assessment parameters of the current detection period that the physical dedicated line link is abnormal, wherein the virtual private network link is a communication channel established by the customer front-end device to connect to the cloud service through a wireless network.
[0039] In some possible implementations, when the first switching module determines that there is an abnormality in the physical dedicated line link based on the network quality evaluation parameter of the current detection period, the first switching module is specifically configured to:
[0040] If the network quality assessment parameters corresponding to the current assessment period all meet the link abnormality conditions, it is determined that there is an abnormality in the link quality of the physical dedicated link, wherein the current assessment period includes the most recent first number of consecutive detection periods; the most recent first number of consecutive detection periods at least includes the current detection period.
[0041] In some possible implementations, if there is an abnormality in the physical dedicated line link, the start time of the next evaluation cycle is the end time of the current evaluation cycle; if there is no abnormality in the physical dedicated line link, the start time of the next evaluation cycle is the end time of the first detection cycle in the current evaluation cycle.
[0042] In some possible implementations, if there is an abnormality in the physical dedicated line link, the method further includes a prompt module, which is used to:
[0043] Issue a network anomaly prompt;
[0044] When the first switching module switches at least part of the traffic of the physical dedicated line link to the virtual private network link between the intelligent gateway and the cloud service, it is specifically used to:
[0045] If a network link switching instruction is received in response to a network anomaly prompt, all traffic of the physical dedicated line link is switched to the virtual private network link based on the network link switching instruction.
[0046] In some possible implementations, if the current communication link between the intelligent gateway and the cloud service includes a physical dedicated line link, and it is determined based on the network quality evaluation parameter that the physical dedicated line link is abnormal, then the first switching module switches at least part of the traffic of the physical dedicated line link to the virtual private network link between the intelligent gateway and the cloud service, specifically for:
[0047] If the current communication link includes a physical dedicated line link and at least one of the following conditions is met, all traffic on the physical dedicated line link is switched to the virtual private network link:
[0048] There are link anomalies in the physical dedicated line link for the second consecutive evaluation period;
[0049] There is an abnormality in the link of the physical dedicated line link in the current evaluation period, and the link quality corresponding to the network quality evaluation parameters of the physical dedicated line link in the previous evaluation period is better than the link quality corresponding to the network quality evaluation parameters of the physical dedicated line link in the current evaluation period.
[0050] In some possible implementations, a second switching module is further included, which is used to:
[0051] If the current communication link includes a virtual private network link and there is no abnormality in the physical dedicated line link, all traffic of the virtual private network link is switched to the physical dedicated line link.
[0052] In some possible implementations, if it is determined based on the link quality that the physical dedicated line link is abnormal, the method further includes a determination module, which is used to:
[0053] Determine the abnormality level of the physical dedicated line link based on the network quality assessment parameters;
[0054] determining a target amount of traffic to be switched to the virtual private network link based on the anomaly level;
[0055] When the first switching module switches at least part of the traffic of the physical dedicated line link to the virtual private network link between the intelligent gateway and the cloud service, it is specifically used to:
[0056] Switch the target amount of traffic corresponding to the physical dedicated line link to the virtual private network link.
[0057] In some possible implementations, the intelligent gateway corresponds to a plurality of virtual communication channels;
[0058] When the first switching module switches the target amount of traffic corresponding to the physical dedicated line link to the virtual private network link, the first switching module is specifically used to:
[0059] determining a target number of virtual communication channels corresponding to a target amount of traffic;
[0060] Switch a target number of virtual communication channels in the virtual communication channels corresponding to the physical dedicated line link to the virtual private network link.
[0061] In some possible implementations, an adjustment module is further included, which is used to:
[0062] Determine the link quality level of the physical dedicated line link based on the network quality evaluation parameters of the current detection period;
[0063] Determine, based on the link quality level, a first channel quantity of virtual communication channels corresponding to the physical dedicated line link among multiple virtual communication channels of the intelligent gateway;
[0064] Determine the number of second channels of the virtual communication channel corresponding to the physical dedicated line link in the current detection cycle;
[0065] Determine a target channel number to be adjusted for a virtual communication channel of a physical dedicated line link based on the target channel number and the current channel number;
[0066] The number of virtual communication channels of the physical dedicated line link is adjusted based on the target number of channels.
[0067] On the other hand, an embodiment of the present application further provides an electronic device, which includes a memory and a processor, wherein a computer program is stored in the memory, and the processor executes the computer program to implement the method provided in any optional embodiment of the present application.
[0068] On the other hand, an embodiment of the present application further provides a computer-readable storage medium, in which a computer program is stored. When the computer program is executed by a processor, the method provided in any optional embodiment of the present application is implemented.
[0069] On the other hand, an embodiment of the present application further provides a computer program product, which includes a computer program, and when the computer program is executed by a processor, it implements the method provided in any optional embodiment of the present application.
[0070] The beneficial effects of the technical solution provided by the embodiment of the present application are as follows:
[0071] The intelligent gateway is used as the traffic interface between the cloud client and the cloud service, and the virtual private network link between the cloud client and the cloud service is used as the backup link of the physical dedicated line link. When there is an abnormality in the physical dedicated line link, at least part of the traffic of the physical dedicated line link is switched to the virtual private network link between the intelligent gateway and the cloud service. This can effectively reduce the cost of the backup link while ensuring the quality of data transmission. BRIEF DESCRIPTION OF THE DRAWINGS
[0072] Figure 1 A schematic diagram of an application environment of a network link switching method provided in an example;
[0073] Figure 2 A schematic diagram of a flow chart of a method for switching a network link provided in an embodiment of the present application;
[0074] Figure 3 A schematic diagram of a solution for establishing a connection between a client and a VPC on a cloud provided in an embodiment of the present application;
[0075] Figure 4 A schematic diagram of a solution for establishing a connection between a client and a VPC on a cloud provided in an embodiment of the present application;
[0076] Figure 5 A schematic diagram of a solution for periodically detecting and evaluating the link quality of a physical dedicated line link in an example of the present application;
[0077] Figure 6 A schematic diagram of a solution for periodically detecting and evaluating the link quality of a physical dedicated line link in an example of the present application;
[0078] Figure 7 A schematic diagram of a solution for periodically detecting and evaluating the link quality of a physical dedicated line link in an example of the present application;
[0079] Figure 8 A schematic diagram of a solution for switching a network link in an example of the present application;
[0080] Fig. 9 A schematic diagram of a solution for switching a network link in an example of the present application;
[0081] Fig.10 A schematic diagram of the structure of a network link switching device provided in an embodiment of the present application;
[0082] Fig.11 A schematic diagram of the structure of an electronic device applicable to an embodiment of the present application. DETAILED DESCRIPTION
[0083] The embodiments of the present application are described below in conjunction with the drawings in the present application. It should be understood that the implementation methods described below in conjunction with the drawings are exemplary descriptions for explaining the technical solutions of the embodiments of the present application and do not constitute a limitation on the technical solutions of the embodiments of the present application.
[0084] It will be understood by those skilled in the art that, unless specifically stated, the singular forms "one", "said", and "the" used herein may also include plural forms. It should be further understood that the terms "including" and "comprising" used in the embodiments of the present application refer to that the corresponding features can be implemented as the presented features, information, data, steps, operations, elements and / or components, but do not exclude the implementation as other features, information, data, steps, operations, elements, components and / or combinations thereof supported by the technical field. It should be understood that when we say that an element is "connected" or "coupled" to another element, the one element may be directly connected or coupled to the other element, or it may refer to that the one element and the other element establish a connection relationship through an intermediate element. In addition, the "connection" or "coupling" used herein may include wireless connection or wireless coupling. The term "and / or" used herein indicates at least one of the items defined by the term, for example, "A and / or B" may be implemented as "A", or as "B", or as "A and B". When describing multiple (two or more) items, if the relationship between the multiple items is not clearly defined, the multiple items may refer to one, multiple or all of the multiple items. For example, the description of "parameter A includes A1, A2, A3" can be implemented as parameter A including A1 or A2 or A3, and can also be implemented as parameter A including at least two of the three items A1, A2, A3.
[0085] In order to better explain and understand the solution provided by the embodiments of the present application, some relevant technical terms involved in the embodiments of the present application are first introduced:
[0086] Virtual Private Cloud (VPC), a dynamically configured pool of public cloud computing resources, requires the use of encryption protocols, tunneling protocols and other security procedures to transmit data between private enterprises and cloud service providers. A VPC basically turns the provider's multi-tenant architecture into a single-tenant architecture.
[0087] A Virtual Private Network (VPN) is a private network established on a public network for encrypted communication. It is widely used in corporate networks. VPN gateways achieve remote access by encrypting data packets and converting the destination addresses of data packets. VPN can be implemented in a variety of ways, such as servers, hardware, and software. VPN is a remote access technology. Simply put, it is to use a public network to build a private network. For example, if an employee of a company is on a business trip to another place and wants to access the server resources of the company's intranet, this access is remote access.
[0088] Internet Data Center (IDC) refers to a platform with complete equipment (including high-speed Internet access bandwidth, high-performance local area network, safe and reliable computer room environment, etc.), professional management, and complete application service platform. Based on this platform, IDC service providers provide customers with Internet basic platform services (server hosting, virtual hosting, mail cache, virtual mail, etc.) and various value-added services (site rental services, domain name system services, load balancing systems, database systems, data backup services, etc.).
[0089] Customer Premise Equipment (CPE) is actually a mobile signal access device that receives mobile signals and forwards them as wireless WIFI signals. CPE is a device that can convert high-speed 4G / 5G signals into WiFi (wireless) signals and can support a large number of mobile terminals accessing the Internet at the same time. CPE can be widely used in rural areas, towns, hospitals, units, factories, communities, etc., and can provide wireless network access, saving broadband costs and eliminating wiring.
[0090] Optionally, the data processing involved in the embodiments of the present application can be implemented based on cloud technology. For example, steps such as data transmission between cloud services through physical dedicated links can be implemented using cloud technology. Cloud technology refers to a hosting technology that unifies a series of resources such as hardware, software, and networks within a wide area network or local area network to achieve data calculation, storage, processing, and sharing. Cloud technology is a general term for network technology, information technology, integration technology, management platform technology, application technology, etc. based on the cloud computing business model application. It can form a resource pool that can be used on demand and is flexible and convenient.
[0091] Cloud computing is a computing model that distributes computing tasks on a resource pool composed of a large number of computers, allowing various application systems to obtain computing power, storage space and information services as needed. The network that provides resources is called a "cloud". From the user's perspective, the resources in the "cloud" are infinitely scalable and can be obtained at any time, used on demand, expanded at any time, and paid for by use.
[0092] As a provider of basic cloud computing capabilities, a cloud computing resource pool (referred to as a cloud platform, generally referred to as an IaaS (Infrastructure as a Service) platform) will be established, and various types of virtual resources will be deployed in the resource pool for external customers to choose to use. The cloud computing resource pool mainly includes: computing devices (virtualized machines, including operating systems), storage devices, and network devices.
[0093] According to the logical function division, the PaaS (Platform as a Service) layer can be deployed on the IaaS (Infrastructure as a Service) layer, and the SaaS (Software as a Service) layer can be deployed on the PaaS layer. SaaS can also be deployed directly on IaaS. PaaS is a platform for software operation, such as databases, web containers, etc. SaaS is a variety of business software, such as web portals, SMS mass senders, etc. Generally speaking, SaaS and PaaS are upper layers relative to IaaS.
[0094] A private cloud is a cloud infrastructure with software and hardware resources created within a firewall so that departments within an organization or enterprise can share resources within the data center. In addition to hardware resources, cloud equipment (IaaS, Infrastructure as a Service) software is generally required to create a private cloud.
[0095] Private cloud computing also includes three levels: cloud hardware, cloud platform, and cloud service. The difference is that cloud hardware is the user's own personal computer or server, not the cloud computing vendor's data center. The purpose of cloud computing vendors to build data centers is to provide public cloud services to millions of users, so they need to have tens of millions of servers. Private cloud computing only serves friends and relatives for individuals, and only serves employees, customers, and suppliers for enterprises. Therefore, an individual or enterprise's own personal computer or server is sufficient to provide cloud services.
[0096] The following describes several optional embodiments to illustrate the technical solution provided by the present application and the technical effects produced by the technical solution of the present application. It should be noted that the following implementations can refer to, draw on or combine with each other, and the same terms, similar features and similar implementation steps in different implementations will not be described repeatedly.
[0097] The network link switching method provided in the embodiment of the present application can be executed by any computer device, and optionally, can be executed by a server, wherein the server can be an independent physical server, a server cluster or distributed system composed of multiple physical servers, or a cloud server providing cloud computing services.
[0098] Figure 1 A schematic diagram of the application environment of the network link switching method provided in an embodiment of the present application.
[0099] The application environment may include a cloud client 101, a cloud service end 102, and an intelligent gateway 103. The cloud client 101 includes an intelligent gateway, and the intelligent gateway is a traffic interface between the client and the cloud service. Specifically, the intelligent gateway detects the network quality evaluation parameters of the current detection cycle of the physical dedicated line link according to a preset detection cycle; if the current communication link between the intelligent gateway and the cloud service end 102 includes a physical dedicated line link, and it is determined based on the network quality evaluation parameters of the current detection cycle that the physical dedicated line link is abnormal, the intelligent gateway switches at least part of the traffic of the physical dedicated line link to the virtual private network link between the intelligent gateway and the cloud service.
[0100] It can be understood by those skilled in the art that the cloud service end can be a cloud server or server cluster 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, CDN (Content Delivery Network), and big data and artificial intelligence platforms. The terminal can be a smart phone (such as an Android phone, an iOS phone, etc.), a tablet computer, a laptop computer, a digital broadcast receiver, a MID (Mobile Internet Devices), a PDA (personal digital assistant), a desktop computer, a smart home appliance, a vehicle-mounted terminal (such as a vehicle-mounted navigation terminal, a vehicle-mounted computer, etc.), a smart speaker, a smart watch, etc. The terminal and the server can be directly or indirectly connected via wired or wireless communication, but are not limited to this. The embodiments of the present invention can be applied to various scenarios, including but not limited to cloud technology, artificial intelligence, smart transportation, assisted driving, etc. The specific requirements can also be determined based on the actual application scenario requirements, and are not limited here.
[0101] The cloud client (also referred to as a user terminal or user device) can be an IDC, or a smart phone, tablet computer, laptop computer, desktop computer, intelligent voice interaction device (such as a smart speaker), wearable electronic device (such as a smart watch), vehicle terminal, smart home appliance (such as a smart TV), AR / VR device, aircraft, etc., but is not limited thereto. The embodiments of the present invention can be applied to various scenarios, including but not limited to cloud technology, artificial intelligence, smart transportation, assisted driving, etc.
[0102] In some possible implementations, a network link switching method is provided, which can be executed by an intelligent gateway.
[0103] Figure 2 A flow chart of a method for switching a network link provided in an embodiment of the present application is shown. Taking the execution subject as an intelligent gateway as an example, the method for switching a network link provided in the present application may include:
[0104] S201, detecting network quality assessment parameters of a current detection period of a physical dedicated line link between an intelligent gateway and a cloud service according to a preset detection period.
[0105] Among them, the smart gateway is a network device and the key to the intelligence of the local area network. It generally supports virtual network access, WIFI access, wired broadband access, etc. Through it, it can realize information collection, information input, information output, centralized control, remote control, linkage control and other functions of various sensors, network devices, cameras, host devices and other devices in the local area network.
[0106] In this application, the smart gateway is the traffic interface between the cloud client and the cloud service, that is, the cloud client accesses the cloud service through the smart gateway.
[0107] The network quality evaluation parameter may include parameters related to network quality, and the network quality evaluation parameter may include at least one of a packet loss rate and a network delay.
[0108] Specifically, the intelligent gateway detects the network quality evaluation parameter according to a preset detection period, that is, the intelligent gateway detects the network quality evaluation parameter once every preset time interval.
[0109] S202: If the current communication link between the smart gateway and the cloud service includes a physical dedicated line link, and it is determined that there is an abnormality in the physical dedicated line link based on the network quality assessment parameters of the current detection cycle, at least part of the traffic of the physical dedicated line link is switched to the virtual private network link between the smart gateway and the cloud service.
[0110] Among them, the virtual private network link is a communication channel connected to the cloud service established by the customer premise equipment (i.e., the user CPE) through the wireless network.
[0111] Specifically, there are two available links between the smart gateway and the cloud service (i.e., VPC on the cloud), one is a physical dedicated line link, and the other backup link is a virtual private network link.
[0112] like Figure 3 As shown in the figure, with the intelligent gateway as a unified traffic interface, traffic on one end directly reaches the VPC on the cloud through a dedicated line connection. The other end is connected to the customer's front-end equipment CPE, which establishes a VPN encrypted tunnel with the VPC on the cloud through a wireless network connection (4G / 5G) as a backup network. When the physical dedicated line link fails, at least part of the business traffic can be dispatched to the backup VPN connection through the intelligent gateway and forwarded through VPN.
[0113] Specifically, at least part of the traffic of the physical dedicated line link is switched to the virtual private network link between the intelligent gateway and the cloud service, that is, part of the traffic can be switched to the virtual private network link, or all of the traffic can be switched to the virtual private network link.
[0114] In the above embodiment, the intelligent gateway is used as the traffic interface between the cloud client and the cloud service, and the virtual private network link between the cloud client and the cloud service is used as the backup link of the physical dedicated line link. When there is an abnormality in the physical dedicated line link, at least part of the traffic of the physical dedicated line link is switched to the virtual private network link between the intelligent gateway and the cloud service, which can effectively reduce the cost of the backup link while ensuring the quality of data transmission.
[0115] The following will explain the specific configuration process of the virtual private network link with examples.
[0116] Specifically, the user's CPE needs to establish an IPSEC (Internet Protocol Security) encrypted tunnel with the cloud access gateway, and the user's service route must be configured on the CPE to forward traffic. In order to achieve fast switching, the encrypted tunnel is created when the backup link, that is, the virtual private network link, is established. The establishment and maintenance of the network tunnel does not require too much server resources.
[0117] like Figure 4 As shown in the figure, when deploying a virtual private network link, first create a user CPE instance through the network management system, enter the management interface of the CPE into the system, and send the parameters for creating the IPSEC tunnel to the user CPE through the management interface. When the user needs to configure cloud services, the operation and maintenance personnel configure the IP (Internet Protocol) route of the service through the network management system, and the system will configure the route to the VPN gateway. At the same time, the network management system will also send the route to the user CPE. Therefore, at this time, the IPSEC tunnel and forwarding route have been created on the user CPE, and traffic forwarding can be performed at any time. When the dedicated line link fails, the intelligent gateway dispatches the traffic to the user CPE, and no further configuration is required, and it can be forwarded directly.
[0118] In some possible implementations, determining that an abnormality exists in a physical dedicated line link based on a network quality evaluation parameter of a current detection period includes:
[0119] If the network quality evaluation parameters corresponding to the current evaluation period all meet the link abnormality condition, it is determined that the link quality of the physical dedicated line link is abnormal.
[0120] The current evaluation cycle includes the most recent first number of consecutive detection cycles; and the most recent first number of consecutive detection cycles at least includes the current detection cycle.
[0121] Specifically, the network quality evaluation parameter includes at least one of network delay and packet loss rate. The user can pre-set thresholds for network delay and packet loss rate. When the network quality evaluation parameter exceeds the preset threshold, the link abnormality condition is met.
[0122] That is to say, if the network quality assessment parameters corresponding to the most recent multiple consecutive detection cycles are all abnormal, then the link quality of the physical dedicated line link is abnormal.
[0123] like Figure 5 As shown, the detection cycle is once every 10 seconds, and the evaluation cycle includes three consecutive detection cycles, that is, if the network quality evaluation parameters obtained by three consecutive 10-second detections all meet the abnormal link conditions, then the link quality of the physical dedicated line link is abnormal.
[0124] In other implementations, the average value of the network quality assessment parameter corresponding to the most recent first number of consecutive detection cycles may be determined, and whether the link quality of the physical dedicated line link is abnormal may be determined based on whether the average value meets the link abnormality condition.
[0125] In some possible implementations, if there is an abnormality in the physical dedicated line link, the start time of the next evaluation cycle is the end time of the current evaluation cycle.
[0126] That is, if it is determined that the network quality evaluation parameters corresponding to the most recent first number of consecutive detection cycles all meet the link abnormality condition, then these detection cycles will no longer be counted into the next evaluation cycle.
[0127] like Figure 6 As shown, the detection cycle is once every 10 seconds, and the evaluation cycle includes 3 consecutive detection cycles. If the network quality evaluation parameters for 3 consecutive 10 seconds shown in the figure all meet the abnormal link conditions, the next evaluation cycle starts from the 4th 10 seconds.
[0128] Specifically, if there is no abnormality in the physical dedicated line link, the start time of the next evaluation cycle is the end time of the first detection cycle in the current evaluation cycle.
[0129] That is to say, if it is determined that the network quality assessment parameters corresponding to the most recent first number of consecutive detection cycles do not all meet the link abnormality condition, that is, the network quality assessment parameters corresponding to at least one detection cycle do not meet the link abnormality condition, then there are still detection cycles within the current evaluation cycle that will be counted in the next evaluation cycle.
[0130] like Figure 7As shown, the detection cycle is once every 10 seconds, and the evaluation cycle includes 3 consecutive detection cycles. If one of the network quality evaluation parameters for 3 consecutive 10 seconds shown in the figure does not meet the abnormal link condition, the next evaluation cycle starts from the second 10 seconds.
[0131] In the above embodiment, when there is no abnormality in the physical dedicated line link, a sliding window is used, and the start time of the next evaluation cycle is the end time of the first detection cycle in the current evaluation cycle. This network quality evaluation parameter for each detection cycle may be evaluated more than once, which can more accurately determine whether there is an abnormality in the physical dedicated line link.
[0132] In some possible implementations, if there is an abnormality in the physical dedicated line link, the method further includes:
[0133] Issue a network anomaly prompt.
[0134] Specifically, the intelligent gateway can send network anomaly prompts to the operation and maintenance terminal.
[0135] S202 switches at least part of the traffic of the physical dedicated line link to the virtual private network link between the intelligent gateway and the cloud service, which may include:
[0136] If a network link switching instruction is received in response to a network anomaly prompt, all traffic of the physical dedicated line link is switched to the virtual private network link based on the network link switching instruction.
[0137] Specifically, if the operation and maintenance personnel receive a network anomaly prompt and are instructed to switch links, all traffic will be switched to the virtual private network link, that is, the physical dedicated line link will not be used for traffic transmission, but only the virtual private network link will be used for traffic transmission.
[0138] In some possible implementations, if the current communication link between the intelligent gateway and the cloud service includes a physical dedicated line link, and it is determined based on the network quality assessment parameter that the physical dedicated line link is abnormal, then at least part of the traffic of the physical dedicated line link is switched to a virtual private network link between the intelligent gateway and the cloud service, including:
[0139] If the current communication link includes a physical dedicated line link and at least one of the following conditions is met, all traffic on the physical dedicated line link is switched to the virtual private network link:
[0140] (1) There is an abnormality in the physical dedicated line link for the second consecutive evaluation period.
[0141] Specifically, there is an abnormality in the link of the physical dedicated line link in the most recent second consecutive evaluation period, that is, the second number of network abnormality prompts are sent continuously. At this time, regardless of whether a network link switching instruction is received, the link switching is automatically performed, that is, even if no network link switching instruction is received in response to the network abnormality prompt, the link switching is performed.
[0142] (2) There is an abnormality in the link of the physical dedicated line link in the current evaluation period, and the link quality corresponding to the network quality evaluation parameter of the physical dedicated line link in the previous evaluation period is better than the link quality corresponding to the network quality evaluation parameter of the physical dedicated line link in the current evaluation period.
[0143] Specifically, the link quality corresponding to the network quality evaluation parameters of the physical dedicated line link in the previous evaluation cycle is better than the link quality corresponding to the network quality evaluation parameters of the physical dedicated line link in the current evaluation cycle, that is, the network quality of the physical dedicated line link is getting worse and worse. At this time, regardless of whether a switching indication for the network link is received, the link switching is automatically performed.
[0144] Taking the network quality evaluation parameter as packet loss rate or network delay as an example, if the network quality evaluation parameter becomes larger and larger, it can be determined that the network quality of the physical dedicated line link is getting worse and worse.
[0145] In the above embodiment, when there is an abnormality in the link of the physical dedicated line link in the most recent second consecutive evaluation cycle, and / or there is an abnormality in the link of the physical dedicated line link in the current evaluation cycle, and the link quality corresponding to the network quality evaluation parameters of the physical dedicated line link in the previous evaluation cycle is better than the link quality corresponding to the network quality evaluation parameters of the physical dedicated line link in the current evaluation cycle, link switching is automatically performed regardless of whether a network link switching indication is received, thereby avoiding automatic link switching when the operation and maintenance personnel do not have time to handle it in time, thereby ensuring normal transmission of traffic.
[0146] In some possible implementations, the following further includes:
[0147] If the current communication link includes a virtual private network link and there is no abnormality in the physical dedicated line link, all traffic of the virtual private network link is switched to the physical dedicated line link.
[0148] Specifically, if there is no abnormality in the physical dedicated line link, the physical dedicated line link can be used preferentially. If the current communication link includes a virtual private network link, all traffic of the virtual private network link can be switched to the physical dedicated line link, and only the physical dedicated line link can be used for traffic transmission.
[0149] In the specific implementation process, if the current communication link only has a virtual private network link, that is, there is no business traffic in the physical dedicated line link, the test traffic can be used to detect the network quality of the physical dedicated line link.
[0150] The switching process of the above network link will be described below with reference to examples.
[0151] like Figure 8 As shown, in one example, the network link switching method of the present application may include:
[0152] The operation and maintenance terminal pre-configures the detection parameters of the intelligent gateway; the detection parameters may include a preset cycle, an evaluation cycle, and a judgment threshold of the network quality evaluation parameter; for example, the detection parameter may be a detection cycle of 10 seconds, and every three consecutive cycles is an evaluation cycle; the judgment threshold of the network quality evaluation parameter is a packet loss rate of 5% and a delay of 30ms;
[0153] Based on the detection parameters configured by the operation and maintenance terminal, the intelligent gateway detects the network quality assessment parameters of the current detection cycle of the physical dedicated line link between the intelligent gateway and the cloud service according to the preset detection cycle; that is, the periodic quality detection shown in the figure detects the network quality of the dedicated line link between the intelligent gateway and the cloud access gateway;
[0154] If the network quality assessment parameters corresponding to the current assessment period all meet the link abnormality condition, it is determined that the link quality of the physical dedicated line link is abnormal, wherein the current assessment period includes the most recent continuous first number of detection periods; a network abnormality prompt is issued, that is, when the continuous detection periods all exceed the threshold, a dedicated line quality alarm is generated;
[0155] Among them, if there is an abnormality in the physical dedicated line link, the start time of the next evaluation cycle is the end time of the current evaluation cycle; if there is no abnormality in the physical dedicated line link, the start time of the next evaluation cycle is the end time of the first detection cycle in the current evaluation cycle, that is, the sliding window calculation shown in the figure.
[0156] When the operation and maintenance terminal receives an alarm, it decides whether to switch the link based on the actual situation. If the link is switched, all traffic on the physical dedicated line link is switched to the virtual private network link between the smart gateway and the cloud service. That is, the traffic is dispatched to the CPE through the smart gateway for transmission.
[0157] Alternatively, if the current communication link includes a physical dedicated line link and at least one of the following conditions is met, all traffic on the physical dedicated line link is switched to the virtual private network link:
[0158] There are link anomalies in the physical dedicated line link for the second consecutive evaluation period;
[0159] There is an abnormality in the link of the physical dedicated line in the current evaluation period, and the link quality corresponding to the network quality evaluation parameter of the physical dedicated line in the previous evaluation period is better than the link quality corresponding to the network quality evaluation parameter of the physical dedicated line in the current evaluation period;
[0160] That is to say, if the operation and maintenance personnel do not take any action after the alarm is generated for a period of time, such as when there is no one on duty at night, the intelligent gateway will automatically switch the traffic to prevent business damage. There are two conditions for automatic switching: one is that the network alarm continues to be generated and no one handles it; the other is that the network quality drops to a worse threshold and the link is directly switched.
[0161] The above embodiment describes how to switch all traffic of a physical dedicated line link to a virtual private network link. The following will further describe the process of switching part or all traffic of a physical dedicated line link to a virtual private network link in conjunction with the embodiment.
[0162] In some possible implementations, if it is determined based on the link quality that the physical dedicated line link is abnormal, the method further includes:
[0163] (1) Determine the abnormality level of the physical dedicated line link based on the network quality assessment parameters;
[0164] (2) Based on the abnormality level, determine the target amount of traffic to be switched to the virtual private network link.
[0165] S202 switches at least part of the traffic of the physical dedicated line link to the virtual private network link between the intelligent gateway and the cloud service, which may include:
[0166] Switch the target amount of traffic corresponding to the physical dedicated line link to the virtual private network link.
[0167] The abnormality level may be positively correlated with the amount by which the network quality assessment parameter exceeds the determination threshold.
[0168] That is to say, the more the network quality assessment parameters exceed the judgment threshold, the higher the abnormality level.
[0169] In a specific implementation process, the abnormality level is also positively correlated with the target amount of traffic to be switched to the virtual private network link.
[0170] That is to say, the higher the abnormality level is, the more traffic needs to be switched to the virtual private network link. If the abnormality level reaches a maximum threshold, all business traffic can be switched to the virtual private network link.
[0171] In some possible implementations, the intelligent gateway corresponds to multiple virtual communication channels, and the business traffic can be evenly distributed through the multiple virtual communication channels. The intelligent gateway can achieve the switching of part of the business traffic by adjusting the exits of different virtual communication channels.
[0172] S202 switches the target amount of traffic corresponding to the physical dedicated line link to the virtual private network link, which may include:
[0173] (1) determining a target number of virtual communication channels corresponding to a target amount of traffic;
[0174] (2) Switch a target number of virtual communication channels in the virtual communication channels corresponding to the physical dedicated line link to the virtual private network link.
[0175] Specifically, the target number of virtual communication channels is also positively correlated with the target volume, that is, by switching a greater number of virtual communication channels to the virtual private network link, more traffic can be switched to the virtual private network link.
[0176] In the above embodiments, when it is determined that an abnormality exists in the physical dedicated line link, how to switch at least part of the traffic of the physical dedicated line link to the virtual private network link between the intelligent gateway and the cloud service. In other embodiments, it is not necessary to first determine whether the physical dedicated line link is abnormal and then determine the abnormality level. Instead, it is possible to directly determine the link quality level of the physical dedicated line link and allocate the virtual communication channel in the intelligent gateway according to the link quality level of the physical dedicated line link.
[0177] In some possible implementations, the following further includes:
[0178] (1) Determine the link quality level of the physical dedicated line link based on the network quality evaluation parameters of the current detection period;
[0179] (2) determining, based on the link quality level, a first channel number of virtual communication channels corresponding to the physical dedicated line link among multiple virtual communication channels of the intelligent gateway;
[0180] (3) determining the number of second channels of the virtual communication channel corresponding to the physical dedicated line link in the current detection period;
[0181] (4) determining a target number of channels to be adjusted for the virtual communication channel of the physical dedicated line link based on the target number of channels and the current number of channels;
[0182] (5) Adjust the number of virtual communication channels of the physical dedicated line link based on the target channel number.
[0183] Among them, the link quality level can also be determined according to the network quality evaluation parameters. That is, when the network quality evaluation parameters do not exceed the abnormal threshold, there can also be a corresponding link quality level. For example, the smaller the packet loss rate or network delay, the better the link quality, and the more virtual communication channels allocated to the physical dedicated link should be.
[0184] like Fig. 9 As shown, in an example, 10 virtual communication channels can be created on the intelligent gateway, and the service traffic is evenly distributed through the 10 virtual communication channels. The intelligent gateway can schedule the exit of each virtual communication channel. The intelligent gateway is divided into several levels according to the quality of the main line, and the distribution strategy is configured according to the level. The lower the link quality level of the physical dedicated line link, that is, the lower the quality level of the main link, the more virtual communication channels are configured to the backup link, that is, the number of virtual communication channels configured to the virtual private network link. Initially, the physical dedicated line link is normal and has the highest quality level. The exits of all virtual communication channels point to the physical dedicated line link. When the physical dedicated line link jitters, the exits of some virtual communication channels are directed to the backup link, that is, switched to the virtual private network link. Only when the quality of the physical dedicated line link drops to the lowest level will all traffic be scheduled to the virtual private network link.
[0185] In the above embodiment, the accuracy of link switching timing can be guaranteed as much as possible through dynamic switching to prevent misjudgment of alarms. Even if all traffic of the physical dedicated line link is switched to the virtual private network link, the intelligent gateway still needs to detect the link quality of the physical dedicated line link so that the traffic can be switched back to the physical dedicated line link when the network quality of the physical dedicated line link is restored, which can most reliably ensure service transmission.
[0186] The above-mentioned network link switching method uses the intelligent gateway as the traffic interface between the cloud client and the cloud service, and uses the virtual private network link between the cloud client and the cloud service as the backup link of the physical dedicated line link. When there is an abnormality in the physical dedicated line link, at least part of the traffic of the physical dedicated line link is switched to the virtual private network link between the intelligent gateway and the cloud service, which can effectively reduce the cost of the backup link while ensuring the quality of data transmission.
[0187] Furthermore, a sliding window is used, and the start time of the next evaluation cycle is the end time of the first detection cycle in the current evaluation cycle. This network quality evaluation parameter for each detection cycle may be evaluated more than once, which can more accurately determine whether there is an abnormality in the physical dedicated line link.
[0188] Furthermore, when there is an abnormality in the link of the physical dedicated line link in the most recent second consecutive evaluation cycles, and / or there is an abnormality in the link of the physical dedicated line link in the current evaluation cycle, and the link quality corresponding to the network quality evaluation parameters of the physical dedicated line link in the previous evaluation cycle is better than the link quality corresponding to the network quality evaluation parameters of the physical dedicated line link in the current evaluation cycle, the link switching is automatically performed regardless of whether a network link switching indication is received, thereby avoiding automatic link switching when the operation and maintenance personnel have no time to handle it in time, thereby ensuring normal transmission of traffic.
[0189] Furthermore, through dynamic switching, the accuracy of link switching timing can be guaranteed as much as possible to prevent false alarms. Even if all traffic on the physical dedicated line is switched to the virtual private network link, the intelligent gateway still needs to detect the link quality of the physical dedicated line so that the traffic can be switched back to the physical dedicated line when the network quality of the physical dedicated line is restored. This can most reliably ensure business transmission.
[0190] like Fig.10 As shown, in some possible implementations, a network link switching device is provided, including:
[0191] The detection module 1001 is used to detect the network quality evaluation parameters of the current detection cycle of the physical dedicated line link between the intelligent gateway and the cloud service according to a preset detection cycle; wherein the intelligent gateway is the traffic interface between the client and the cloud service;
[0192] The first switching module 1002 is used to switch at least part of the traffic of the physical dedicated line link to the virtual private network link between the smart gateway and the cloud service if the current communication link between the smart gateway and the cloud service includes a physical dedicated line link and it is determined based on the network quality assessment parameters of the current detection cycle that the physical dedicated line link is abnormal, wherein the virtual private network link is a communication channel established by the customer front-end device to connect to the cloud service through a wireless network.
[0193] In some possible implementations, when the first switching module 1002 determines that there is an abnormality in the physical dedicated line link based on the network quality evaluation parameter of the current detection period, it is specifically configured to:
[0194] If the network quality assessment parameters corresponding to the current assessment period all meet the link abnormality conditions, it is determined that there is an abnormality in the link quality of the physical dedicated link, wherein the current assessment period includes the most recent first number of consecutive detection periods; the most recent first number of consecutive detection periods at least includes the current detection period.
[0195] In some possible implementations, if there is an abnormality in the physical dedicated line link, the start time of the next evaluation cycle is the end time of the current evaluation cycle; if there is no abnormality in the physical dedicated line link, the start time of the next evaluation cycle is the end time of the first detection cycle in the current evaluation cycle.
[0196] In some possible implementations, if there is an abnormality in the physical dedicated line link, the method further includes a prompt module, which is used to:
[0197] Issue a network anomaly prompt;
[0198] When the first switching module 1002 switches at least part of the traffic of the physical dedicated line link to the virtual private network link between the intelligent gateway and the cloud service, it is specifically used to:
[0199] If a network link switching instruction is received in response to a network anomaly prompt, all traffic of the physical dedicated line link is switched to the virtual private network link based on the network link switching instruction.
[0200] In some possible implementations, if the current communication link between the intelligent gateway and the cloud service includes a physical dedicated line link, and it is determined based on the network quality evaluation parameter that the physical dedicated line link is abnormal, then the first switching module 1002 switches at least part of the traffic of the physical dedicated line link to the virtual private network link between the intelligent gateway and the cloud service, specifically for:
[0201] If the current communication link includes a physical dedicated line link and at least one of the following conditions is met, all traffic on the physical dedicated line link is switched to the virtual private network link:
[0202] There are link anomalies in the physical dedicated line link for the second consecutive evaluation period;
[0203] There is an abnormality in the link of the physical dedicated line link in the current evaluation period, and the link quality corresponding to the network quality evaluation parameters of the physical dedicated line link in the previous evaluation period is better than the link quality corresponding to the network quality evaluation parameters of the physical dedicated line link in the current evaluation period.
[0204] In some possible implementations, a second switching module is further included, which is used to:
[0205] If the current communication link includes a virtual private network link and there is no abnormality in the physical dedicated line link, all traffic of the virtual private network link is switched to the physical dedicated line link.
[0206] In some possible implementations, if it is determined based on the link quality that the physical dedicated line link is abnormal, the method further includes a determination module, which is used to:
[0207] Determine the abnormality level of the physical dedicated line link based on the network quality assessment parameters;
[0208] determining a target amount of traffic to be switched to the virtual private network link based on the anomaly level;
[0209] When the first switching module 1002 switches at least part of the traffic of the physical dedicated line link to the virtual private network link between the intelligent gateway and the cloud service, it is specifically used to:
[0210] Switch the target amount of traffic corresponding to the physical dedicated line link to the virtual private network link.
[0211] In some possible implementations, the intelligent gateway corresponds to a plurality of virtual communication channels;
[0212] When the first switching module 1002 switches the target amount of traffic corresponding to the physical dedicated line link to the virtual private network link, it is specifically used to:
[0213] determining a target number of virtual communication channels corresponding to a target amount of traffic;
[0214] Switch a target number of virtual communication channels in the virtual communication channels corresponding to the physical dedicated line link to the virtual private network link.
[0215] In some possible implementations, an adjustment module is further included, which is used to:
[0216] Determine the link quality level of the physical dedicated line link based on the network quality evaluation parameters of the current detection period;
[0217] Determine, based on the link quality level, a first channel quantity of virtual communication channels corresponding to the physical dedicated line link among multiple virtual communication channels of the intelligent gateway;
[0218] Determine the number of second channels of the virtual communication channel corresponding to the physical dedicated line link in the current detection cycle;
[0219] Determine a target channel number to be adjusted for a virtual communication channel of a physical dedicated line link based on the target channel number and the current channel number;
[0220] The number of virtual communication channels of the physical dedicated line link is adjusted based on the target number of channels.
[0221] The above-mentioned network link switching device uses the intelligent gateway as the traffic interface between the cloud client and the cloud service, and uses the virtual private network link between the cloud client and the cloud service as the backup link of the physical dedicated line link. When there is an abnormality in the physical dedicated line link, at least part of the traffic of the physical dedicated line link is switched to the virtual private network link between the intelligent gateway and the cloud service, which can effectively reduce the cost of the backup link while ensuring the quality of data transmission.
[0222] Furthermore, a sliding window is used, and the start time of the next evaluation cycle is the end time of the first detection cycle in the current evaluation cycle. This network quality evaluation parameter for each detection cycle may be evaluated more than once, which can more accurately determine whether there is an abnormality in the physical dedicated line link.
[0223] Furthermore, when there is an abnormality in the link of the physical dedicated line link in the most recent second consecutive evaluation cycles, and / or there is an abnormality in the link of the physical dedicated line link in the current evaluation cycle, and the link quality corresponding to the network quality evaluation parameters of the physical dedicated line link in the previous evaluation cycle is better than the link quality corresponding to the network quality evaluation parameters of the physical dedicated line link in the current evaluation cycle, the link switching is automatically performed regardless of whether a network link switching indication is received, thereby avoiding automatic link switching when the operation and maintenance personnel have no time to handle it in time, thereby ensuring normal transmission of traffic.
[0224] Furthermore, through dynamic switching, the accuracy of link switching timing can be guaranteed as much as possible to prevent false alarms. Even if all traffic on the physical dedicated line is switched to the virtual private network link, the intelligent gateway still needs to detect the link quality of the physical dedicated line so that the traffic can be switched back to the physical dedicated line when the network quality of the physical dedicated line is restored. This can most reliably ensure business transmission.
[0225] The device of the embodiments of the present application can execute the method provided by the embodiments of the present application, and the implementation principles are similar. The actions performed by each module in the device of each embodiment of the present application correspond to the steps in the method of each embodiment of the present application. For the detailed functional description of each module of the device, please refer to the description in the corresponding method shown in the previous text, which will not be repeated here.
[0226] An embodiment of the present application provides an electronic device, including a memory, a processor, and a computer program stored in the memory. When the processor executes the computer program stored in the memory, the method in any optional embodiment of the present application can be implemented.
[0227] Fig.11 FIG. 1 is a schematic diagram showing a structure of an electronic device to which an embodiment of the present invention is applicable. Fig.11 As shown, the electronic device may be a server or a user terminal, and the electronic device may be used to implement the method provided in any embodiment of the present invention.
[0228] like Fig.11 As shown in FIG. 1 , the electronic device 1100 may mainly include at least one processor 1101 ( Fig.111104, a memory 1102, a communication module 1103, an input / output interface 1104 and other components are shown in FIG. Optionally, each component can be connected and communicated through a bus 1105. It should be noted that Fig.11 The structure of the electronic device 1100 shown in the figure is merely illustrative and does not constitute a limitation on the electronic device to which the method provided in the embodiment of the present application is applicable.
[0229] The memory 1102 may be used to store an operating system and an application program, etc. The application program may include a computer program that implements the method shown in the embodiment of the present invention when called by the processor 1101, and may also include a program for implementing other functions or services. The memory 1102 may be a ROM (Read Only Memory) or other types of static storage devices that can store static information and instructions, a RAM (Random Access Memory) or other types of dynamic storage devices that can store information and computer programs, or an EEPROM (Electrically Erasable Programmable Read Only Memory), a CD-ROM (Compact Disc Read Only Memory) or other optical disk storage, optical disk storage (including compressed optical disk, laser disk, optical disk, digital versatile disk, Blu-ray disk, etc.), a magnetic disk storage medium or other magnetic storage device, or any other medium that can be used to carry or store the desired program code in the form of instructions or data structures and can be accessed by a computer, but is not limited thereto.
[0230] The processor 1101 is connected to the memory 1102 via the bus 1105, and implements the corresponding functions by calling the application program stored in the memory 1102. Among them, the processor 1101 can be a CPU (Central Processing Unit), a general processor, a DSP (Digital Signal Processor), an ASIC (Application Specific Integrated Circuit), an FPGA (Field Programmable Gate Array) or other programmable logic devices, transistor logic devices, hardware components or any combination thereof, which can implement or execute various exemplary logic blocks, modules and circuits described in conjunction with the disclosure of the present invention. The processor 1101 can also be a combination that implements computing functions, such as a combination of one or more microprocessors, a combination of a DSP and a microprocessor, etc.
[0231] The electronic device 1100 can be connected to the network through the communication module 1103 (which may include but is not limited to components such as a network interface) to communicate with other devices (such as a user terminal or a server, etc.) through the network to achieve data interaction, such as sending data to other devices or receiving data from other devices. Among them, the communication module 1103 may include a wired network interface and / or a wireless network interface, etc., that is, the communication module may include at least one of a wired communication module or a wireless communication module.
[0232] The electronic device 1100 can be connected to the required input / output devices, such as a keyboard, a display device, etc., through the input / output interface 1104. The electronic device 1100 itself can have a display device, and can also be connected to other display devices through the interface 1104. Optionally, a storage device, such as a hard disk, can also be connected through the interface 1104, so that data in the electronic device 1100 can be stored in the storage device, or data in the storage device can be read, and data in the storage device can also be stored in the memory 1102. It can be understood that the input / output interface 1104 can be a wired interface or a wireless interface. Depending on the actual application scenario, the device connected to the input / output interface 1104 can be a component of the electronic device 1100, or it can be an external device connected to the electronic device 1100 when needed.
[0233] The bus 1105 for connecting the components may include a path to transmit information between the above components. The bus 1105 may be a PCI (Peripheral Component Interconnect) bus or an EISA (Extended Industry Standard Architecture) bus, etc. According to different functions, the bus 1105 may be divided into an address bus, a data bus, a control bus, etc.
[0234] Optionally, for the solution provided by the embodiment of the present invention, the memory 1102 can be used to store a computer program for executing the solution of the present invention, and run by the processor 1101. When the processor 1101 runs the computer program, the action of the method or device provided by the embodiment of the present invention is implemented.
[0235] Based on the same principle as the method provided in the embodiment of the present application, the embodiment of the present application provides a computer-readable storage medium, on which a computer program is stored. When the computer program is executed by a processor, the corresponding content of the aforementioned method embodiment can be implemented.
[0236] An embodiment of the present application also provides a computer program product, which includes a computer program. When the computer program is executed by a processor, the corresponding content of the aforementioned method embodiment can be implemented.
[0237] It should be noted that the terms "first", "second", "third", "fourth", "1", "2", etc. (if any) in the specification and claims of this application and the above-mentioned drawings are used to distinguish similar objects, and are not necessarily used to describe a specific order or sequence. It should be understood that the numbers used in this way can be interchangeable where appropriate, so that the embodiments of the application described herein can be implemented in an order other than that shown or described in the drawings.
[0238] It should be understood that, although each operation step is indicated by arrows in the flowchart of the embodiment of the present application, the implementation order of these steps is not limited to the order indicated by the arrows. Unless clearly stated herein, in some implementation scenarios of the embodiment of the present application, the implementation steps in each flowchart can be performed in other orders according to demand. In addition, some or all of the steps in each flowchart may include multiple sub-steps or multiple stages based on actual implementation scenarios. Some or all of these sub-steps or stages may be executed at the same time, and each sub-step or stage in these sub-steps or stages may also be executed at different times respectively. In different scenarios of execution time, the execution order of these sub-steps or stages may be flexibly configured according to demand, and the embodiment of the present application does not limit this.
[0239] The above is only an optional implementation method for some implementation scenarios of the present application. It should be pointed out that for ordinary technicians in this technical field, without departing from the technical concept of the solution of the present application, other similar implementation methods based on the technical ideas of the present application are also within the protection scope of the embodiments of the present application.
Claims
1. A method for switching a network link, characterized in that: The method comprises: Detecting network quality assessment parameters of a current detection cycle of a physical dedicated line link between an intelligent gateway and a cloud service according to a preset detection cycle; wherein the intelligent gateway is a traffic interface between a client and a cloud service; If the current communication link between the intelligent gateway and the cloud service includes the physical dedicated line link, and it is determined that the physical dedicated line link is abnormal based on the network quality assessment parameters of the current detection period, at least part of the traffic of the physical dedicated line link is switched to the virtual private network link between the intelligent gateway and the cloud service, wherein the virtual private network link is a communication channel connected to the cloud service established by the customer front-end device through a wireless network.
2. The method according to claim 1, characterized in that The determining that the physical dedicated line link is abnormal based on the network quality evaluation parameter of the current detection period includes: If the network quality assessment parameters corresponding to the current assessment cycle all meet the link abnormality conditions, it is determined that there is an abnormality in the link quality of the physical dedicated link, wherein the current assessment cycle includes the most recent first number of consecutive detection cycles; the most recent first number of consecutive detection cycles at least includes the current detection cycle.
3. The method according to claim 2, characterized in that If there is an abnormality in the physical dedicated line link, the start time of the next evaluation cycle is the end time of the current evaluation cycle; if there is no abnormality in the physical dedicated line link, the start time of the next evaluation cycle is the end time of the first detection cycle in the current evaluation cycle.
4. The method according to any one of claims 1 to 3, characterized in that: If the physical dedicated line link is abnormal, the method further includes: Issue a network anomaly prompt; The step of switching at least part of the traffic of the physical dedicated line link to the virtual private network link between the intelligent gateway and the cloud service includes: If a network link switching instruction is received in response to the network anomaly prompt, all traffic of the physical dedicated line link is switched to the virtual private network link based on the network link switching instruction.
5. The method according to claim 2, characterized in that: If the current communication link between the intelligent gateway and the cloud service includes the physical dedicated line link, and it is determined based on the network quality assessment parameter that the physical dedicated line link is abnormal, then at least part of the traffic of the physical dedicated line link is switched to the virtual private network link between the intelligent gateway and the cloud service, including: If the current communication link includes the physical dedicated line link and satisfies at least one of the following conditions, all traffic of the physical dedicated line link is switched to the virtual private network link: There is an abnormality in the physical dedicated line link in the most recent second consecutive evaluation cycles; There is an abnormality in the link of the physical dedicated line link in the current evaluation cycle, and the link quality corresponding to the network quality evaluation parameters of the physical dedicated line link in the previous evaluation cycle is better than the link quality corresponding to the network quality evaluation parameters of the physical dedicated line link in the current evaluation cycle.
6. The method according to any one of claims 1 to 5, characterized in that: Also includes: If the current communication link includes a virtual private network link and there is no abnormality in the physical dedicated line link, all traffic of the virtual private network link is switched to the physical dedicated line link.
7. The method according to claim 1, characterized in that If it is determined based on the link quality that the physical dedicated line link is abnormal, the method further includes: Determining the abnormality level of the physical dedicated line link based on the network quality assessment parameter; determining a target amount of traffic to be switched to the virtual private network link based on the abnormality level; The step of switching at least part of the traffic of the physical dedicated line link to the virtual private network link between the intelligent gateway and the cloud service includes: Switch the target amount of traffic corresponding to the physical dedicated line link to the virtual private network link.
8. The method according to claim 7, characterized in that The intelligent gateway corresponds to a plurality of virtual communication channels; The step of switching the target amount of traffic corresponding to the physical dedicated line link to the virtual private network link includes: determining a target number of virtual communication channels corresponding to the target amount of traffic; Switch the target number of virtual communication channels in the virtual communication channels corresponding to the physical dedicated line link to the virtual private network link.
9. The method according to claim 1, characterized in that: Also includes: Determine the link quality level of the physical dedicated line link based on the network quality assessment parameter of the current detection cycle; Based on the link quality level, determining a first channel quantity of virtual communication channels corresponding to the physical dedicated line link among a plurality of virtual communication channels of the intelligent gateway; Determine the number of second channels of the virtual communication channel corresponding to the physical dedicated line link in the current detection cycle; Determine a target number of channels to be adjusted for the virtual communication channel of the physical dedicated line link based on the target number of channels and the current number of channels; The number of virtual communication channels of the physical dedicated line link is adjusted based on the target number of channels.
10. A network link switching device, characterized in that: The device comprises: A detection module, used to detect the network quality assessment parameters of the current detection cycle of the physical dedicated line link between the intelligent gateway and the cloud service according to a preset detection cycle; wherein the intelligent gateway is the traffic interface between the client and the cloud service; A first switching module is used to switch at least part of the traffic of the physical dedicated line link to a virtual private network link between the intelligent gateway and the cloud service if the current communication link between the intelligent gateway and the cloud service includes the physical dedicated line link and it is determined based on the network quality assessment parameters of the current detection period that the physical dedicated line link is abnormal, wherein the virtual private network link is a communication channel connected to the cloud service established by the customer front-end device through a wireless network.
11. An electronic device, characterized in that: The electronic device comprises a memory and a processor, wherein a computer program is stored in the memory, and the processor executes the computer program to implement the method according to any one of claims 1 to 9.
12. A computer-readable storage medium, characterized in that: The storage medium stores a computer program, and when the computer program is executed by a processor, the method according to any one of claims 1 to 9 is implemented.
