Communication link protection method, system, device and medium

By establishing main and backup links in 5G networks, and monitoring and switching using VXLAN tunneling technology and ebtables tools, the network interruption problem caused by signal instability is solved, and communication stability and user experience are improved.

CN114938516BActive Publication Date: 2024-12-13杭州初灵信息技术股份有限公司
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202210438738.0
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-04-21
Publication Date
2024-12-13
Estimated Expiration
2042-04-21

AI Technical Summary

Technical Problem

In 5G networks, unstable signal or emergencies lead to network interruption, resulting in paralysis of communication systems, and seriously affecting the user experience.

Method used

By establishing main and backup links in a 5G network, using VXLAN tunneling technology and ebtables tool to monitor the link situation, switch communications to the backup link to ensure stable communication, and switch back to the main link after normal recovery.

Benefits of technology

It effectively avoids the communication system paralysis caused by 5G network interruption, improves the user experience, and ensures the stability and rapid recovery of communication.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN114938516B_ABST
    Figure CN114938516B_ABST
Patent Text Reader

Abstract

The present application relates to a communication link protection method, system, device and medium, the method comprising: communicating with a client through a first 5G device, communicating with a server through a second 5G device, establishing a primary link between the first 5G device and the second 5G device based on the 5G network, and when an abnormality is detected in the primary link, switching the communication link between the first 5G device and the second 5G device from the primary link to the backup link, so that the client and the server can communicate through the backup link between the first 5G device and the second 5G device, so as to ensure the normal communication of the entire communication link, thereby improving the stability of the entire communication system, and solving the problem in the related art that the 5G signal instability or the 5G network interruption caused by an emergency cannot be ruled out, causing the communication system to be paralyzed, thereby seriously affecting the user experience.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of communications, and in particular to a communication link protection method, system, electronic device and storage medium. Background Art

[0002] The fifth generation mobile communication technology (5G) is a new generation of broadband mobile communication technology with the characteristics of high speed, low latency and large connection. It is the network infrastructure for realizing the interconnection between man, machine and things.

[0003] At present, when implementing the second-layer dedicated line solution through the vxlan tunnel of the 5G network, it is impossible to rule out the possibility that the 5G signal is unstable or an emergency situation causes the 5G network to be interrupted. In this way, not only the entire communication system is paralyzed, but also, if the 5G network is interrupted for a very long time, it may even cause huge economic losses to users, which will seriously affect the user experience. Summary of the invention

[0004] The embodiment of the present application provides a communication link protection method to at least solve the problem in the related art that it is impossible to eliminate the situation where 5G signal instability or emergencies lead to 5G network interruption, causing the communication system to be paralyzed and thus seriously affecting the user experience.

[0005] In a first aspect, an embodiment of the present application provides a communication link protection method, which is applied to a 5G network, wherein the 5G network includes at least one 5G device, and the method includes:

[0006] The first 5G device is used to communicate with the client, and the second 5G device is used to communicate with the server;

[0007] Enable the first 5G device and the second 5G device to establish a primary link based on the 5G network;

[0008] When an abnormality is detected in the main link, the communication link between the first 5G device and the second 5G device is switched from the main link to the backup link, so that the client and the server can communicate through the backup link between the first 5G device and the second 5G device, wherein the backup link is a wired connection link connected between the first 5G device and the second 5G device.

[0009] In some embodiments, establishing a primary link between the first 5G device and the second 5G device based on the 5G network includes:

[0010] Establish a first VXLAN tunnel link through the first 5G device and the second 5G device;

[0011] The first VXLAN tunnel link is used as the primary link, so that the client and the server communicate through the primary link between the first 5G device and the second 5G device, wherein the first VXLAN tunnel link is established by a communication connection between the first wireless port of the first 5G device and the first wireless port of the second 5G device.

[0012] In some embodiments, after establishing a first VXLAN tunnel link through the first 5G device and the second 5G device, the method further includes:

[0013] Bridging the second wired port of the first 5G device and the first virtual interface to generate a first bridge interface;

[0014] Forming a first large Layer 2 link based on the second wired port of the first 5G device, the first virtual interface, and the first bridge interface;

[0015] Bridging the second wired port of the first 5G device and the first virtual interface while bridging the second wired port of the second 5G device and the second virtual interface to generate a second bridge interface;

[0016] A second large Layer 2 link is formed based on the second wired port of the second 5G device, the second virtual interface and the second bridge interface, so that the client and the server establish a communication connection based on the first large Layer 2 link and the second large Layer 2 link, wherein the first virtual interface is a virtual interface connected to the first wireless port of the first 5G device generated when the first VXLAN tunnel link is established, and the second virtual interface is a virtual interface connected to the first wireless port of the second 5G device generated when the first VXLAN tunnel link is established.

[0017] In some embodiments, when the first VXLAN tunnel link is used as the primary link, the step of monitoring the working status of the primary link includes:

[0018] Configure the first virtual interface and the second virtual interface with IP addresses of the same network segment respectively;

[0019] Configure the kernel based on the ebtables tool to allow the ARP message to bypass the first bridge interface and the second bridge interface respectively, and confirm whether the first virtual interface and the second virtual interface are connected through the ping command. If so, the first VXLAN tunnel link works normally. If not, the first VXLAN tunnel works abnormally, wherein the ARP message is a message sent by the client based on the ARP protocol.

[0020] In some embodiments, while establishing a primary link between the first 5G device and the second 5G device based on the 5G network, the method further includes:

[0021] Establish a second VXLAN tunnel link through the first 5G device and the second 5G device;

[0022] The second VXLAN tunnel link is used as a backup link, wherein the second VXLAN tunnel link is established by a communication connection between the first wired port of the first 5G device and the first wired port of the second 5G device.

[0023] In some embodiments, when the monitoring of the primary link is abnormal, switching the communication link between the first 5G device and the second 5G device from the primary link to the backup link so that the client and the server communicate through the backup link includes:

[0024] When an abnormality is detected in the primary link, the bridging between the second wired port of the first 5G device and the first virtual interface is canceled, and the bridging between the second wired port of the second 5G device and the second virtual interface is canceled, and then the second wired port of the first 5G device and the third virtual interface are bridged to generate a third bridge interface;

[0025] Forming a third layer 2 link based on the second wired port of the first 5G device, the third virtual interface, and the third bridge interface;

[0026] Bridging the second wired port of the first 5G device and the third virtual interface while bridging the second wired port of the second 5G device and the fourth virtual interface to generate a fourth bridge interface;

[0027] A fourth largest Layer 2 link is formed based on the second wired port of the second 5G device, the fourth virtual interface and the fourth bridge interface, so that the client and the server establish a communication connection based on the third largest Layer 2 link and the fourth largest Layer 2 link, wherein the third virtual interface is a virtual interface connected to the first wired port of the first 5G device generated when the second VXLAN tunnel link is established, and the fourth virtual interface is a virtual interface connected to the first wired port of the second 5G device generated when the second VXLAN tunnel link is established.

[0028] In some embodiments, when an abnormality is detected in the primary link, the communication link between the first 5G device and the second 5G device is switched from the primary link to the backup link so that the client and the server communicate through the backup link, and the method further includes:

[0029] When it is monitored that the main link resumes normal communication, the communication link between the first 5G device and the second 5G device is switched from the backup link to the main link, so that the client and the server can communicate through the main link between the first 5G device and the second 5G device.

[0030] In a second aspect, an embodiment of the present application provides a communication link protection system, the system comprising:

[0031] A first connection module, configured to communicate with a client via a first 5G device;

[0032] A second connection module is used to communicate with the server through a second 5G device;

[0033] An establishing module, configured to enable the first 5G device and the second 5G device to establish a primary link based on the 5G network;

[0034] A switching module is used to switch the communication link between the first 5G device and the second 5G device from the main link to the backup link when an abnormality is detected in the main link, so that the client and the server can communicate through the backup link between the first 5G device and the second 5G device, wherein the backup link is a wired connection link connected between the first 5G device and the second 5G device.

[0035] In a third aspect, an embodiment of the present application provides an electronic device, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor implements the method described in the first aspect when executing the computer program.

[0036] In a fourth aspect, an embodiment of the present application provides a storage medium having a computer program stored thereon, which, when executed by a processor, implements the method described in the first aspect above.

[0037] In the technical solution of this embodiment, first, the first 5G device is used to communicate with the client, and the second 5G device is used to communicate with the server. Then, based on the 5G network, the first 5G device and the second 5G device establish a primary link. Then, when an abnormality is detected in the primary link, the communication link between the first 5G device and the second 5G device is switched from the primary link to the backup link. Compared with the previous situation where the entire system was paralyzed when an abnormality occurred in the primary link, in this embodiment, when an abnormality is detected in the primary link, the communication link between the first 5G device and the second 5G device is switched from the primary link to the backup link, so that the client and the server can communicate normally through the backup link between the first 5G device and the second 5G device to ensure the stability of the communication of the entire system, thereby improving the user experience and solving the problem in the related technology that the 5G signal is unstable or the 5G network is interrupted due to an emergency, resulting in the communication system being paralyzed, which seriously affects the user experience. BRIEF DESCRIPTION OF THE DRAWINGS

[0038] The drawings described herein are used to provide a further understanding of the present application and constitute a part of the present application. The illustrative embodiments of the present application and their descriptions are used to explain the present application and do not constitute an improper limitation on the present application. In the drawings:

[0039] Figure 1 is a schematic diagram of an application environment of a communication link protection method according to an embodiment of the present application;

[0040] Figure 2 is a first flow chart of a communication link protection method according to an embodiment of the present application;

[0041] Figure 3 is a first schematic diagram of an overall structure of a communication link according to an embodiment of the present application;

[0042] Figure 4 is a second schematic diagram of the overall structure of a communication link according to an embodiment of the present application;

[0043] Figure 5 is a structural block diagram of a communication link protection system according to an embodiment of the present application;

[0044] Figure 6 It is a schematic diagram of the internal structure of an electronic device according to 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 is described and illustrated below in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present application and are not intended to limit the present application. Based on the embodiments provided in the present application, all other embodiments obtained by ordinary technicians in this field without making creative work are within the scope of protection of the present application. In addition, it can also be understood that although the efforts made in this development process may be complex and lengthy, for ordinary technicians in the field related to the contents disclosed in the present application, some changes such as design, manufacturing or production based on the technical contents disclosed in the present application are only conventional technical means, and should not be understood as insufficient contents disclosed in the present application.

[0046] Reference to "embodiments" in this application means that a particular feature, structure, or characteristic described in conjunction with the embodiments may be included in at least one embodiment of the present application. The appearance of the phrase in various locations in the specification does not necessarily refer to the same embodiment, nor is it an independent or alternative embodiment that is mutually exclusive with other embodiments. It is explicitly and implicitly understood by those of ordinary skill in the art that the embodiments described in this application may be combined with other embodiments without conflict.

[0047] Unless otherwise defined, the technical terms or scientific terms involved in this application should be understood by people with ordinary skills in the technical field to which this application belongs. The words "one", "a", "a", "the" and the like involved in this application do not indicate a quantitative limitation, and may represent the singular or plural. The terms "include", "comprise", "have" and any of their variations involved in this application are intended to cover non-exclusive inclusions; for example, a process, method, system, product or device that includes a series of steps or modules (units) is not limited to the listed steps or units, but may also include steps or units that are not listed, or may also include other steps or units inherent to these processes, methods, products or devices. The words "connect", "connected", "coupled" and the like involved in this application are not limited to physical or mechanical connections, but may include electrical connections, whether direct or indirect. The "multiple" involved in this application refers to greater than or equal to two. "And / or" describes the association relationship of associated objects, indicating that there can be three relationships, for example, "A and / or B" can represent: A exists alone, A and B exist at the same time, and B exists alone. The terms "first", "second", "third" and the like involved in the present application are merely used to distinguish similar objects and do not represent a specific ordering of the objects.

[0048] First, for the convenience of understanding, the terms involved in the writing process of the present invention are introduced as follows:

[0049] 5G network: The fifth generation mobile communication technology (5th Generation Mobile Communication Technology, referred to as 5G) is a new generation of broadband mobile communication technology with high speed, low latency and large connection characteristics. It is the network infrastructure for realizing the interconnection of man, machine and things. The International Telecommunication Union (ITU) has defined three major application scenarios for 5G, namely enhanced mobile broadband (eMBB), ultra-high reliability and low latency communication (uRLLC) and massive machine type communication (mMTC). Enhanced mobile broadband (eMBB) is mainly aimed at the explosive growth of mobile Internet traffic, providing mobile Internet users with a more extreme application experience; ultra-high reliability and low latency communication (uRLLC) is mainly aimed at vertical industry application needs with extremely high requirements for latency and reliability, such as industrial control, telemedicine, and autonomous driving; massive machine type communication (mMTC) is mainly aimed at smart cities, smart homes, environmental monitoring and other applications with sensing and data collection as the goal. In order to meet the diverse application scenario requirements of 5G, the key performance indicators of 5G are more diversified. ITU has defined eight key performance indicators for 5G, among which high speed, low latency and large connections have become the most prominent features of 5G. The user experience rate reaches 1Gbps, the latency is as low as 1ms, and the user connection capacity reaches 1 million connections / square kilometer.

[0050] Bridge: A two-port Layer 2 network device that forwards frames. A bridge, also called a bridge, is a storage / forwarding device that connects two local area networks. It can divide a large LAN into multiple segments, or interconnect more than two LANs into a logical LAN, so that all users on the LAN can access the server.

[0051] The most common way to extend a LAN is to use a bridge. The simplest bridge has two ports, and more complex bridges can have more ports. Each port of the bridge is connected to a network segment.

[0052] ebtables: Linux kernel bridge firewall tool; specifically, Ebtables is a Linux kernel firewall configuration tool, which is specially used to control and filter the traffic of the bridge interface in the Linux system kernel, and can also control the takeover of the ARP protocol by the bridge interface;

[0053] VXLAN (Virtual eXtensible Local Area Network): used to achieve Layer 2 network expansion that penetrates Layer 3 networks; in addition, VXLAN technology is a large Layer 2 virtual network technology. The main principle is to introduce an outer tunnel in UDP format as the data link layer, and the original data message content is transmitted as the tunnel payload. Since the outer layer uses UDP as the transmission method, the payload data can be easily transmitted in the Layer 2 and Layer 3 networks.

[0054] The present application provides a communication link protection method, which can be applied to Figure 1 In the application environment shown, Figure 1 is a schematic diagram of an application environment of a communication link protection method according to an embodiment of the present application, such as Figure 1 As shown, the first 5G device 110 and the client 130 are connected by wired communication, and the second 5G device 120 and the server 140 are connected by wired communication. Based on the 5G network, the first 5G device 110 and the second 5G device 120 establish a primary link; when an abnormality is detected in the primary link, the communication link between the first 5G device 110 and the second 5G device 120 is switched from the primary link to the backup link, so that the client 130 and the server 140 communicate through the backup link between the first 5G device 110 and the second 5G device 120 to ensure the stable operation of the entire communication link. Among them, the backup link is a wired connection link connected between the first 5G device 110 and the second 5G device 120. In addition, the client 130 can be, but is not limited to, various personal computers, laptops, smart phones, tablet computers and portable wearable devices, and the server 140 can be implemented by an independent server 140 or a server 140 cluster composed of multiple servers 140.

[0055] This application proposes a communication link protection method, which is applied to 5G networks. Figure 2 is a first flow chart of a communication link protection method according to an embodiment of the present application, such as Figure 2 As shown, the method comprises the following steps:

[0056] Step S201, communicating with the client 130 through the first 5G device 110, and communicating with the server 140 through the second 5G device 120;

[0057] Step S202, based on the 5G network, the first 5G device 110 and the second 5G device 120 establish a primary link; that is, the communication link formed between the client 130 and the server 140 through the 5G network is used as the primary link to provide a dedicated line service;

[0058] Step S203, when an abnormality is detected in the primary link, the communication link between the first 5G device 110 and the second 5G device 120 is switched from the primary link to the backup link, so that the client 130 and the server 140 communicate through the backup link between the first 5G device 110 and the second 5G device 120, wherein the backup link is a wired connection link connected between the first 5G device 110 and the second 5G device 120. Those skilled in the art can monitor the communication status of the primary link through some existing software, programs or algorithms, that is, as long as the monitoring purpose can be achieved, it is not specifically limited here;

[0059] Through the above steps S201 to S203, compared with the previous situation where the 5G network number is unstable or the signal is abnormal, which causes the main link to be abnormal and the entire system is paralyzed, when the main link is detected to be abnormal, the communication link between the first 5G device 110 and the second 5G device 120 is switched from the main link to the backup link in this embodiment, so that the client 130 and the server 140 can communicate normally through the backup link between the first 5G device 110 and the second 5G device 120. In this way, not only the stability of the communication of the entire system is improved, but also a good experience is brought to the user, and the problem that the relevant technology cannot exclude the situation that the 5G signal is unstable or the 5G network is interrupted due to an emergency, resulting in the communication system being in a paralyzed state, thereby seriously affecting the user experience is solved.

[0060] Figure 3 is a first schematic diagram of an overall structure of a communication link according to an embodiment of the present application, Figure 4 is a second schematic diagram of the overall structure of a communication link according to an embodiment of the present application, referring to Figure 3 and Figure 4 In some embodiments, establishing a primary link between the first 5G device 110 and the second 5G device 120 based on the 5G network includes the following steps:

[0061] Establish a first VXLAN tunnel link through the first 5G device 110 and the second 5G device 120;

[0062] The first VXLAN tunnel link is used as the primary link, so that the client 130 and the server 140 communicate through the primary link between the first 5G device 110 and the second 5G device 120, wherein the first VXLAN tunnel link is established by the communication connection between the first wireless port 310 of the first 5G device 110 and the first wireless port 311 of the second 5G device 120. Figure 3 and Figure 4In this embodiment, the name of the first wireless port 310 of the first 5G device 110 is lte1, and the name of the first wireless port 311 of the second 5G device 120 is lte2. Of course, in other embodiments, the interface names of the above wireless ports can be set to other names, which are not specifically limited here;

[0063] In some embodiments, after establishing the first VXLAN tunnel link through the first 5G device 110 and the second 5G device 120, the method further includes the following steps:

[0064] Bridge the second wired port 330 of the first 5G device 110 and the first virtual interface 3100 to generate a first bridge interface 3101;

[0065] A first large Layer 2 link is formed based on the second wired port 330 of the first 5G device 110, the first virtual interface 3100, and the first bridge interface 3101;

[0066] While bridging the second wired port 330 and the first virtual interface 3100 of the first 5G device 110, the second wired port 331 and the second virtual interface 3110 of the second 5G device 120 are bridged to generate a second bridge interface 3111; Figure 3 and Figure 4 The name of the first bridge interface 3101 is br-vxlan-lte1-lan1, and the name of the second bridge interface 3111 is br-vxlan-lte2-lan2. Of course, in other embodiments, the names of the above bridge interfaces can be set to other names, which are not specifically limited here.

[0067] A second large Layer 2 link is formed based on the second wired port 331, the second virtual interface 3110 and the second bridge interface 3111 of the second 5G device 120, so that the client 130 and the server 140 establish a communication connection based on the first large Layer 2 link and the second large Layer 2 link, wherein the first virtual interface 3100 is a virtual interface connected to the first wireless port 310 of the first 5G device 110 generated when the first VXLAN tunnel link is established, and the second virtual interface 3110 is a virtual interface connected to the first wireless port 311 of the second 5G device 120 generated when the first VXLAN tunnel link is established. Figure 3 and Figure 4 In this embodiment, the name of the first virtual interface 3100 is vxlan-lte1, and the name of the second virtual interface 3110 is vxlan-lte2. Of course, in other embodiments, the names of the above virtual interfaces can be set to other names, which are not specifically limited here;

[0068] To facilitate monitoring, in some embodiments, when the first VXLAN tunnel link is used as the primary link, the step of monitoring the working status of the primary link includes the following steps:

[0069] The first virtual interface 3100 and the second virtual interface 3110 are respectively configured with IP addresses of the same network segment; for example, the first virtual interface 3100 and the second virtual interface 3110 are respectively configured with IP addresses of 1.1.1.1 / 24 and 1.1.1.2 / 24 of the same network segment;

[0070] Based on the ebtables tool, the kernel is configured to allow the ARP message to bypass the first bridge interface 3101 and the second bridge interface 3111 respectively, and the ping command is used to confirm whether the first virtual interface 3100 and the second virtual interface 3110 are connected. If so, the first VXLAN tunnel link works normally, and if not, the first VXLAN tunnel works abnormally, wherein the ARP message is a message sent by the client 130 based on the ARP protocol. That is, if the ping is successful, it is considered that the first VXLAN tunnel link works normally, otherwise, it is considered that the first VXLAN tunnel link works abnormally. Since those skilled in the art know how to use the ping command, they will not be described one by one here.

[0071] In order to prevent the entire system from being paralyzed due to an abnormality in the primary link, in some embodiments, while the primary link is established between the first 5G device 110 and the second 5G device 120 based on the 5G network, the method further includes the following steps:

[0072] Establish a second VXLAN tunnel link through the first 5G device 110 and the second 5G device 120;

[0073] The second VXLAN tunnel link is used as a backup link. In this way, even if an abnormality occurs in the primary link, the client 130 and the server 140 can communicate through the backup link between the first 5G device 110 and the second 5G device 120 to ensure the stability of the communication of the entire system. The second VXLAN tunnel link is established by the communication connection between the first wired port 320 of the first 5G device 110 and the first wired port 321 of the second 5G device 120.

[0074] In order to ensure that the entire system can communicate normally, in some embodiments, when an abnormality occurs in the primary link, the communication link between the first 5G device 110 and the second 5G device 120 is switched from the primary link to the backup link, so that the client 130 and the server 140 communicate through the backup link, including the following steps:

[0075] When an abnormality is detected in the primary link, the bridge connection between the second wired port 330 of the first 5G device 110 and the first virtual interface 3100 is canceled, and the bridge connection between the second wired port 331 of the second 5G device 120 and the second virtual interface 3110 is canceled, and then the second wired port 330 of the first 5G device 110 and the third virtual interface 3200 are bridged to generate a third bridge interface 410;

[0076] A third layer 2 link is formed based on the second wired port 330 of the first 5G device 110, the third virtual interface 3200 and the third bridge interface 410;

[0077] While bridging the second wired port 330 of the first 5G device 110 and the third virtual interface 3200, the second wired port 331 of the second 5G device 120 and the fourth virtual interface 3210 are bridged to generate a fourth bridge interface 411; Figure 3 and Figure 4 The name of the third bridge interface 410 is br-vxlan-wan1-lan1, and the name of the fourth bridge interface 411 is br-vxlan-wan2-lan2. Of course, in other embodiments, the names of the above bridge interfaces can be set to other names, which are not specifically limited here.

[0078] A fourth Layer 2 link is formed based on the second wired port 331 of the second 5G device 120, the fourth virtual interface 3210 and the fourth bridge interface 411, so that the client 130 and the server 140 establish a communication connection based on the third Layer 2 link and the fourth Layer 2 link. In other words, when an abnormality occurs in the 5G network communication, it immediately switches to the wired backup link, reducing the risk of communication abnormality.

[0079] The third virtual interface 3200 is a virtual interface connected to the first wired port 320 of the first 5G device 110 generated when the second VXLAN tunnel link is established, and the fourth virtual interface 3210 is a virtual interface connected to the first wired port 321 of the second 5G device 120 generated when the second VXLAN tunnel link is established. Figure 3 and Figure 4 In this embodiment, the name of the third virtual interface 3200 is vxlan-wan1, and the name of the fourth virtual interface 3210 is vxlan-wan2. It should be noted that the above-mentioned wired ports can be implemented by Ethernet ports. Of course, other ports can also be used in other embodiments, which are not specifically limited here;

[0080] Since the transmission speed of communication data in the 5G network is faster than the transmission speed of the wired link based on the backup link, in order to improve the user experience, in some embodiments, when an abnormality is detected in the primary link, the communication link between the first 5G device 110 and the second 5G device 120 is switched from the primary link to the backup link, so that the client 130 and the server 140 communicate through the backup link, and the method further includes the following steps:

[0081] When it is monitored that the main link has resumed normal communication, the communication link between the first 5G device 110 and the second 5G device 120 is switched from the backup link to the main link, so that the client 130 and the server 140 can communicate through the main link between the first 5G device 110 and the second 5G device 120, so as to re-enable the 5G network, which not only achieves faster data transmission but also improves the user experience.

[0082] In another embodiment, switching the communication link between the first 5G device 110 and the second 5G device 120 from a backup link to a primary link includes:

[0083] When it is monitored that the first VXLAN tunnel link has resumed normal communication, the bridging between the second wired port 330 of the first 5G device 110 and the third virtual interface 3200 is canceled, and the bridging between the second wired port 331 of the second 5G device 120 and the fourth virtual interface 3210 is canceled. Then, the second wired port 330 of the first 5G device 110 and the first virtual interface 3100 are re-bridged, and the second wired port 331 of the second 5G device 120 and the second virtual interface 3110 are re-bridged.

[0084] It should be noted that the steps shown in the above process or the flowchart in the accompanying drawings can be executed in a computer system such as a set of computer executable instructions, and although a logical order is shown in the flowchart, in some cases, the steps shown or described can be executed in an order different from that shown here.

[0085] This embodiment also provides a system for protecting a communication link, which is used to implement the above-mentioned embodiments and preferred implementation modes, and will not be repeated hereafter. As used below, the terms "module", "unit", "subunit", etc. may implement a combination of software and / or hardware of a predetermined function. Although the devices described in the following embodiments are preferably implemented in software, the implementation of hardware, or a combination of software and hardware, is also possible and conceivable.

[0086] Figure 5 is a structural block diagram of a protection system for a communication link according to an embodiment of the present application, such as Figure 5 As shown, the system includes:

[0087] A first connection module 51, configured to communicate with the client 130 via the first 5G device 110;

[0088] The second connection module 52 is used to communicate with the server 140 through the second 5G device 120;

[0089] An establishing module 53, configured to enable the first 5G device 110 and the second 5G device 120 to establish a primary link based on the 5G network;

[0090] The switching module 54 is used to switch the communication link between the first 5G device 110 and the second 5G device 120 from the main link to the backup link when an abnormality is detected in the main link, so that the client 130 and the server 140 communicate through the backup link between the first 5G device 110 and the second 5G device 120, wherein the backup link is a wired connection link connected between the first 5G device 110 and the second 5G device 120. Compared with the previous situation where the entire system is paralyzed when an abnormality occurs in the main link, in this embodiment, when an abnormality is detected in the main link, the communication link between the first 5G device 110 and the second 5G device 120 is switched from the main link to the backup link, so that the client 130 and the server 140 communicate normally through the backup link between the first 5G device 110 and the second 5G device 120, so as to ensure the stability of the communication of the entire system, thereby improving the user experience, and solving the problem in the related art that the 5G signal instability or the 5G network interruption caused by the sudden situation cannot be ruled out, resulting in the communication system being paralyzed, thereby seriously affecting the user experience.

[0091] It should be noted that the above modules can be functional modules or program modules, and can be implemented by software or hardware. For modules implemented by hardware, the above modules can be located in the same processor; or the above modules can be located in different processors in any combination.

[0092] This embodiment further provides an electronic device, including a memory and a processor, wherein the memory stores a computer program, and the processor is configured to run the computer program to execute the steps in any one of the above method embodiments.

[0093] Optionally, the electronic device may further include a transmission device and an input / output device, wherein the transmission device is connected to the processor, and the input / output device is connected to the processor.

[0094] Optionally, in this embodiment, the processor may be configured to perform the following steps through a computer program:

[0095] Step S201, communicating with the client 130 through the first 5G device 110, and communicating with the server 140 through the second 5G device 120;

[0096] Step S202, establishing a primary link between the first 5G device 110 and the second 5G device 120 based on the 5G network;

[0097] Step S203, when an abnormality is detected in the main link, the communication link between the first 5G device 110 and the second 5G device 120 is switched from the main link to the backup link, so that the client 130 and the server 140 can communicate through the backup link between the first 5G device 110 and the second 5G device 120, wherein the backup link is a wired connection link connected between the first 5G device 110 and the second 5G device 120.

[0098] It should be noted that the specific examples in this embodiment can refer to the examples described in the above embodiments and optional implementation modes, and this embodiment will not be described in detail here.

[0099] In addition, in combination with a communication link protection method in the above embodiment, the present application embodiment can provide a storage medium for implementation. The storage medium stores a computer program; when the computer program is executed by a processor, any communication link protection method in the above embodiment is implemented.

[0100] In one embodiment, a computer device is provided, which may be a terminal. The computer device includes a processor, a memory, a network interface, a display screen, and an input device connected via a system bus. The processor of the computer device is used to provide computing and control capabilities. The memory of the computer device includes a non-volatile storage medium and an internal memory. The non-volatile storage medium stores an operating system and a computer program. The internal memory provides an environment for the operation of the operating system and the computer program in the non-volatile storage medium. The network interface of the computer device is used to communicate with an external terminal via a network connection. When the computer program is executed by the processor, a method for protecting a communication link is implemented. The display screen of the computer device may be a liquid crystal display screen or an electronic ink display screen, and the input device of the computer device may be a touch layer covering the display screen, or a key, trackball, or touchpad provided on the housing of the computer device, or an external keyboard, touchpad, or mouse, etc.

[0101] In one embodiment, Figure 6 is a schematic diagram of the internal structure of an electronic device according to an embodiment of the present application, such as Figure 6 As shown, an electronic device is provided, which may be a server 140, and its internal structure diagram may be as shown in FIG. Figure 6As shown. The electronic device includes a processor, a network interface, an internal memory and a non-volatile memory connected through an internal bus, wherein the non-volatile memory stores an operating system, a computer program and a database. The processor is used to provide computing and control capabilities, the network interface is used to communicate with an external terminal through a network connection, the internal memory is used to provide an environment for the operation of the operating system and the computer program, the computer program is executed by the processor to implement a communication link protection method, and the database is used to store data.

[0102] Those skilled in the art will understand that Figure 6 The structure shown in the figure is merely a block diagram of a partial structure related to the scheme of the present application, and does not constitute a limitation on the electronic device to which the scheme of the present application is applied. The specific electronic device may include more or fewer components than shown in the figure, or combine certain components, or have a different arrangement of components.

[0103] Those skilled in the art can understand that all or part of the processes in the above-mentioned embodiment methods can be completed by instructing the relevant hardware through a computer program, and the computer program can be stored in a non-volatile computer-readable storage medium. When the computer program is executed, it can include the processes of the embodiments of the above-mentioned methods. Among them, any reference to memory, storage, database or other media used in the embodiments provided in this application can include non-volatile and / or volatile memory. Non-volatile memory may include read-only memory (ROM), programmable ROM (PROM), electrically programmable ROM (EPROM), electrically erasable programmable ROM (EEPROM) or flash memory. Volatile memory may include random access memory (RAM) or external cache memory. As an illustration and not limitation, RAM is available in many forms, such as static RAM (SRAM), dynamic RAM (DRAM), synchronous DRAM (SDRAM), double data rate SDRAM (DDRSDRAM), enhanced SDRAM (ESDRAM), synchronous link (Synchlink) DRAM (SLDRAM), memory bus (Rambus) direct RAM (RDRAM), direct memory bus dynamic RAM (DRDRAM), and memory bus dynamic RAM (RDRAM).

[0104] Those skilled in the art should understand that the technical features of the above-described embodiments may be arbitrarily combined. To make the description concise, not all possible combinations of the technical features in the above-described embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this specification.

[0105] The above-mentioned embodiments only express several implementation methods of the present application, and the descriptions thereof are relatively specific and detailed, but they cannot be understood as limiting the scope of the invention patent. It should be pointed out that, for a person of ordinary skill in the art, several variations and improvements can be made without departing from the concept of the present application, and these all belong to the protection scope of the present application. Therefore, the protection scope of the patent of the present application shall be subject to the attached claims.

Claims

1. A communication link protection method, It is characterized in that Applied to a 5G network, the method comprises: The first 5G device is used to communicate with the client, and the second 5G device is used to communicate with the server; Based on the 5G network, the first 5G device and the second 5G device establish a primary link and a backup link, wherein the first 5G device includes a first virtual interface and a third virtual interface, and the second 5G device includes a second virtual interface and a fourth virtual interface; the client and the server are connected to the primary link through the first virtual interface and the second virtual interface respectively, and the client and the server are connected to the backup link through the third virtual interface and the fourth virtual interface respectively; When an abnormality is detected in the main link, the communication link between the first 5G device and the second 5G device is switched from the main link to the backup link, so that the client and the server can communicate through the backup link between the first 5G device and the second 5G device, wherein the backup link is a wired connection link connected between the first 5G device and the second 5G device.

2. The method according to claim 1, It is characterized in that The establishing of a primary link between the first 5G device and the second 5G device based on the 5G network includes: Establish a first VXLAN tunnel link through the first 5G device and the second 5G device; The first VXLAN tunnel link is used as the primary link, so that the client and the server communicate through the primary link between the first 5G device and the second 5G device, wherein the first VXLAN tunnel link is established by a communication connection between the first wireless port of the first 5G device and the first wireless port of the second 5G device.

3. The method according to claim 2, It is characterized in that After establishing a first VXLAN tunnel link through the first 5G device and the second 5G device, the method further includes: Bridging the second wired port of the first 5G device and the first virtual interface to generate a first bridge interface; Forming a first large Layer 2 link based on the second wired port of the first 5G device, the first virtual interface, and the first bridge interface; Bridging the second wired port of the first 5G device and the first virtual interface while bridging the second wired port of the second 5G device and the second virtual interface to generate a second bridge interface; A second large Layer 2 link is formed based on the second wired port of the second 5G device, the second virtual interface and the second bridge interface, so that the client and the server establish a communication connection based on the first large Layer 2 link and the second large Layer 2 link, wherein the first virtual interface is a virtual interface connected to the first wireless port of the first 5G device generated when the first VXLAN tunnel link is established, and the second virtual interface is a virtual interface connected to the first wireless port of the second 5G device generated when the first VXLAN tunnel link is established.

4. The method according to claim 3, It is characterized in that When the first VXLAN tunnel link is used as a primary link, the step of monitoring the working status of the primary link includes: Configure the first virtual interface and the second virtual interface with IP addresses of the same network segment respectively; Configure the kernel based on the ebtables tool to allow the ARP message to bypass the first bridge interface and the second bridge interface respectively, and confirm whether the first virtual interface and the second virtual interface are connected through the ping command. If so, the first VXLAN tunnel link works normally. If not, the first VXLAN tunnel works abnormally, wherein the ARP message is a message sent by the client based on the ARP protocol.

5. The method according to claim 1, It is characterized in that While enabling the first 5G device and the second 5G device to establish a primary link based on the 5G network, the method further includes: Establish a second VXLAN tunnel link through the first 5G device and the second 5G device; The second VXLAN tunnel link is used as a backup link, wherein the second VXLAN tunnel link is established by a communication connection between the first wired port of the first 5G device and the first wired port of the second 5G device.

6. The method according to claim 5, It is characterized in that When the monitoring of the primary link is abnormal, switching the communication link between the first 5G device and the second 5G device from the primary link to the backup link so that the client and the server communicate through the backup link includes: When an abnormality is detected in the primary link, the bridging between the second wired port of the first 5G device and the first virtual interface is canceled, and the bridging between the second wired port of the second 5G device and the second virtual interface is canceled, and then the second wired port of the first 5G device and the third virtual interface are bridged to generate a third bridge interface; Forming a third layer 2 link based on the second wired port of the first 5G device, the third virtual interface, and the third bridge interface; Bridging the second wired port of the first 5G device and the third virtual interface while bridging the second wired port of the second 5G device and the fourth virtual interface to generate a fourth bridge interface; A fourth largest Layer 2 link is formed based on the second wired port of the second 5G device, the fourth virtual interface and the fourth bridge interface, so that the client and the server establish a communication connection based on the third largest Layer 2 link and the fourth largest Layer 2 link, wherein the third virtual interface is a virtual interface connected to the first wired port of the first 5G device generated when the second VXLAN tunnel link is established, and the fourth virtual interface is a virtual interface connected to the first wired port of the second 5G device generated when the second VXLAN tunnel link is established.

7. The method according to claim 1, It is characterized in that When an abnormality is detected in the primary link, the communication link between the first 5G device and the second 5G device is switched from the primary link to the backup link so that the client and the server communicate through the backup link, and the method further includes: When it is monitored that the main link resumes normal communication, the communication link between the first 5G device and the second 5G device is switched from the backup link to the main link, so that the client and the server can communicate through the main link between the first 5G device and the second 5G device.

8. A communication link protection system, It is characterized in that include: A first connection module, configured to communicate with a client via a first 5G device; A second connection module is used to communicate with the server through a second 5G device; An establishment module is used to enable the first 5G device and the second 5G device to establish a primary link and a backup link based on a 5G network, wherein the first 5G device includes a first virtual interface and a third virtual interface, and the second 5G device includes a third virtual interface and a fourth virtual interface; the client and the server are connected to the primary link through the first virtual interface and the second virtual interface respectively, and the client and the server are connected to the backup link through the second virtual interface and the fourth virtual interface respectively; A switching module is used to switch the communication link between the first 5G device and the second 5G device from the main link to the backup link when an abnormality is detected in the main link, so that the client and the server can communicate through the backup link between the first 5G device and the second 5G device, wherein the backup link is a wired connection link connected between the first 5G device and the second 5G device.

9. An electronic device comprising a memory and a processor, It is characterized in that A computer program is stored in the memory, and the processor is configured to run the computer program to perform the method according to any one of claims 1 to 7.

10. A storage medium, It is characterized in that The storage medium stores a computer program, wherein the computer program is configured to execute the method according to any one of claims 1 to 7 when executed.