Fault diagnosis method and system, electronic equipment and storage medium
By using automated fault diagnosis methods and systems, the problems of low efficiency and high risk of manual operation in IoT tunnel fault diagnosis have been solved, achieving efficient and comprehensive fault detection and reducing labor costs.
Patent Information
- Application Number
- CN202511692820.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-11-18
- Publication Date
- 2025-12-23
AI Technical Summary
Existing IoT tunnel fault diagnosis methods rely on manual operation, which is inefficient and carries operational risks. They also fail to comprehensively obtain fault information, resulting in low diagnostic efficiency.
A fault diagnosis method and system are provided, which automatically performs online fault diagnosis by connecting to a business server through a tunnel established with a gateway, including the diagnosis of tunnel, gateway connection and connection between simulated terminal and business server, thereby reducing labor costs and improving diagnostic efficiency.
Without increasing operational risks, it improves the automation level of fault diagnosis, reduces labor costs, and enhances the efficiency and comprehensiveness of fault diagnosis.
Smart Images

Figure CN121194232A_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of communication technology, and in particular to a fault diagnosis method, system, electronic device and storage medium. Background Technology
[0002] In the field of IoT applications, a common networking method is to connect IoT terminals and IoT servers through cellular networks (such as 4G or 5G networks). Figure 1 This is a network structure diagram for an Internet of Things (IoT) application in related technologies, such as... Figure 1 As shown, core network devices such as User Plane Function (UPF) or Packet Data Network Gateway (PGW) can establish tunnels with the service integrator's enterprise gateway, such as Generic Routing Encapsulation (GRE) tunnels. IoT terminals send messages to access the cellular network through the air interface, and then forward them to the enterprise gateway through the tunnel, and finally they are processed by the service server.
[0003] Due to the numerous configuration parameters on the enterprise gateway side, the variety of enterprise-side network devices (such as routers, firewalls, Layer 3 switches, etc.), and the various networking methods including standard Internet leased line access, basic enterprise broadband access, and inter-carrier leased line access, private network access is further divided into SDH leased line access, MPLS-VPN leased line access, SRv6 leased line access, etc., tunnel failures are frequent during the commissioning of IoT services.
[0004] Current methods for locating tunnel faults are limited to packet capture and dialing on network devices, such as core network devices or firewalls. On the one hand, this requires manual dialing and dialing, followed by analysis and interpretation of the captured packets, which is costly and inefficient. On the other hand, packet capture on existing network devices also carries operational risks. For example, packet capture on data communication devices (such as firewalls) involves huge traffic volumes, and configuration errors may affect many users. Packet capture also consumes CPU resources, impacting service stability. Summary of the Invention
[0005] The purpose of one embodiment of this specification is to provide a fault diagnosis method, system, electronic device, and storage medium to improve the automation level of fault diagnosis, reduce labor costs, and improve fault diagnosis efficiency without increasing operational risks.
[0006] To solve the above-mentioned technical problems, one embodiment of this specification is implemented as follows: In one aspect, this specification provides a fault diagnosis method according to an embodiment, applied to a fault diagnosis system configured to connect to a service server via a tunnel established with a gateway, the method comprising: Upon receiving a user's fault diagnosis request, perform online fault diagnosis and determine the fault diagnosis result; Display the fault diagnosis results to the user; The online fault diagnosis includes at least one of the following: Diagnose the first connection of the tunnel; Diagnose the second connection established with the gateway; The simulated terminal establishes a third connection with the business server and performs diagnostics on the third connection.
[0007] Secondly, another embodiment of this specification provides a fault diagnosis system configured to connect to a service server via a tunnel established with a gateway, the system comprising: The diagnostic module is used to respond to a user's fault diagnosis request, perform online fault diagnosis, and determine the fault diagnosis result. The display module is used to show the fault diagnosis results to the user; The diagnostic module is used for at least one of the following: Diagnose the first connection of the tunnel; Diagnose the second connection established with the gateway; The simulated terminal establishes a third connection with the business server and performs diagnostics on the third connection.
[0008] Thirdly, in another embodiment of this specification, an electronic device is provided, characterized in that the electronic device includes a memory and a processor, the memory storing computer-executable instructions, which, when executed on the processor, are capable of implementing the steps of the fault diagnosis method described in the first aspect.
[0009] Fourthly, in another embodiment of this specification, a computer-readable storage medium is provided for storing computer-executable instructions that, when executed by a processor, can implement the steps of the fault diagnosis method described in the first aspect.
[0010] Fifthly, in another embodiment of this specification, a computer program product is provided, the computer program product including a processing program, the processing program being executed by a processor to implement the steps of the fault diagnosis method described in the first aspect above.
[0011] In response to a user's fault diagnosis request, this embodiment performs online fault diagnosis, determines the fault diagnosis result, and displays the fault diagnosis result to the user. The online fault diagnosis includes at least one of the following: diagnosing a first connection of the tunnel; diagnosing a second connection established with the gateway; and diagnosing a third connection established between a simulated terminal and a service server. This embodiment has the following advantages or beneficial effects: it can improve the automation level of fault diagnosis, reduce labor costs, and improve fault diagnosis efficiency without increasing operational risks.
[0012] It should be understood that the above general description and the following detailed description are exemplary and explanatory only, and are not intended to limit this disclosure.
[0013] Other features and advantages of this disclosure will be described in detail in the following detailed description section. Attached Figure Description
[0014] To more clearly illustrate the technical solutions in one or more embodiments of this specification, the accompanying drawings used in the description of the embodiments or prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments recorded in this specification. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0015] Figure 1 This is a network structure diagram for an Internet of Things (IoT) application in related technologies. Figure 2 A flowchart illustrating a fault diagnosis method provided in one embodiment of this specification; Figure 3 This specification provides a network structure diagram of a fault diagnosis system according to one embodiment. Figure 4 A flowchart illustrating another fault diagnosis method provided in one embodiment of this specification; Figure 5 A flowchart illustrating yet another fault diagnosis method provided in one embodiment of this specification; Figure 6 A flowchart illustrating yet another fault diagnosis method provided in one embodiment of this specification; Figure 7 A schematic diagram of a fault diagnosis system provided in one embodiment of this specification; Figure 8 A schematic diagram of another fault diagnosis system provided in one embodiment of this specification; Figure 9 This is a schematic diagram of the hardware structure of an electronic device provided in one embodiment of this specification. Detailed Implementation
[0016] To enable those skilled in the art to better understand the technical solutions in one or more embodiments of this specification, the technical solutions in one or more embodiments of this specification will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only a part of the embodiments of this specification, and not all of the embodiments. Based on one or more embodiments of this specification, all other embodiments obtained by those skilled in the art without creative effort should fall within the protection scope of this document.
[0017] The inventors of this application have noted that, in addition to high labor costs, low diagnostic efficiency, and potential operational risks to existing network equipment, existing fault diagnosis methods also suffer from limited diagnostic means and an inability to comprehensively diagnose faults. For example, packet capture through the core network typically only captures inner-layer packets of the GRE tunnel, not outer-layer packets, such as GRE keep-alive packets, which are crucial for determining the root cause of a fault. Furthermore, while ICMP (Internet Control Message Protocol) is a commonly used fault diagnosis method, due to the low security of the public network, critical business nodes often actively disable ICMP responses to avoid unnecessary attacks and prevent their sites from being scanned by hackers. This leads to inaccurate ICMP test results. The inability to obtain comprehensive fault diagnosis information further reduces the efficiency of fault diagnosis.
[0018] It should be noted that although the embodiments of this application use GRE tunnels as an example, they can also be adapted to other types of tunnels (such as L2TP tunnels). This application does not limit the specific type of tunnel.
[0019] This specification provides an embodiment of a fault diagnosis method, referring to... Figure 2 The diagram illustrates a flowchart of a fault diagnosis method provided in this embodiment. This method can be applied to a fault diagnosis system that can run on a core network device, such as a UPF or PGW, to directly test the tunnel established between the core network device and the gateway. Alternatively, the fault diagnosis system can run on a separate server. During testing, the outer address of the gateway's tunnel can be changed to the address of the server while keeping other configurations unchanged, thereby enabling alternative testing of the tunnel established between the core network device and the gateway. Figure 3 This specification provides a network structure diagram of a fault diagnosis system according to one embodiment, such as... Figure 3As shown, the fault diagnosis system can not only test the tunnel established between the core network equipment (such as UPF or PGW) and the gateway, but also simulate the terminal to establish a connection with the service server through the above tunnel, thereby performing dial-up tests on the upper-layer services, thus improving the comprehensiveness of fault detection. The fault diagnosis method provided in this embodiment specifically includes the following steps.
[0020] In step S101, in response to receiving a fault diagnosis request from a user, online fault diagnosis is performed, and the fault diagnosis result is determined.
[0021] Online fault diagnosis includes at least one of the following: Diagnose the first connection of the tunnel; Diagnose the second connection established with the gateway; The simulated terminal establishes a third connection with the business server and performs diagnostics on the third connection.
[0022] The fault diagnosis system may include a front-end system and a back-end system. The front-end system may be a web portal, including controls (such as buttons) for one-click diagnosis. Users can initiate the fault diagnosis request by logging into the web portal of the fault diagnosis system and clicking the controls (such as buttons) for one-click diagnosis.
[0023] In some embodiments, the fault diagnosis system can establish multiple different tunnels for different terminals, and the fault diagnosis request can include the tunnel identifier of at least one target tunnel, so that the fault diagnosis system can perform fault diagnosis on at least one target tunnel respectively.
[0024] In some embodiments, the tunnel is a GRE tunnel, the gateway address corresponding to the first connection is the outer GRE address of the gateway, and the gateway address corresponding to the second connection is the inner GRE address of the gateway.
[0025] For example, Table 1 shows the address parameters that need to be configured for GRE tunnels.
[0026]
[0027] In some possible implementations, the fault diagnosis system can establish a first connection with the gateway using the GRE outer layer addresses (numbers 1-4 in Table 1), a second connection using the GRE inner layer addresses (numbers 5-11 in Table 1), and a third connection using addresses from the terminal address pool (numbers 12-15 in Table 1) to simulate a terminal and establish a third connection with the service server. It should be noted that the second and third connections mentioned above can be virtual logical connections used for fault diagnosis.
[0028] In some embodiments, the fault diagnosis system can diagnose one or more of the first connection, the second connection, and the third connection.
[0029] In step S102, the fault diagnosis results are displayed to the user.
[0030] In some possible implementations, fault diagnosis results can be displayed to users in different forms such as charts, logs, and alarms.
[0031] By adopting the above technical solution, the automation level of fault diagnosis can be improved without increasing operational risks. It enables automatic fault diagnosis and automatic acquisition of fault diagnosis results, thereby reducing labor costs and improving fault diagnosis efficiency.
[0032] Figure 4 A flowchart of another fault diagnosis method provided in one embodiment of this specification is shown below. Figure 4 As shown, step S101 may include the following steps.
[0033] In step S1011, a first keep-alive message is sent to the gateway, and a first keep-alive response message is received from the gateway in response to the first keep-alive message.
[0034] For example, the first keepalive message could be a GRE keep-alive message. GRE Keepalive is a non-mandatory feature of the protocol; for Linux systems, Keepalive is not included in the system kernel. In some embodiments, the fault diagnosis system can implement the keep-alive mechanism at the underlying level. Specifically, it can use operating system sockets to construct Ethernet packets and build the IP header, which may include the source IP (the fault diagnosis system's IP), the destination IP (e.g., the gateway's GRE outer address), and the protocol type. The GRE header is defined, including the version number, checksum flag, and GRE message type (to indicate a GRE keep-alive message).
[0035] In some embodiments, the fault diagnosis system can simulate a core network device (e.g., UPF / PGW) periodically sending a first keep-alive message to the gateway and receiving a first keep-alive response message sent by the gateway in response to the first keep-alive message. It is understood that if the first connection is faulty, the fault diagnosis system may not receive the first keep-alive response message. In some possible implementations, a first timer can be started after sending the first keep-alive message. If the first keep-alive response message is not received after the first timer expires, it is determined that the first keep-alive response message has not been received.
[0036] In step S1012, in response to receiving the second keep-alive message sent by the gateway, a second keep-alive response message is sent to the gateway.
[0037] In some embodiments, the fault diagnosis system can simulate a core network device (e.g., UPF / PGW) sending a second keep-alive response message to the gateway upon receiving a second keep-alive message from the gateway. If the first connection fails, the fault diagnosis system may not receive the second keep-alive message or send a second keep-alive response message. In some possible implementations, the fault diagnosis system can start a second timer. If the second keep-alive message is not received after the first timer expires, the system determines that receiving the second keep-alive message from the gateway has failed, i.e., the second keep-alive message was not received. The duration of the second timer is longer than the length of a preset keep-alive message transmission period.
[0038] In step S1013, the fault diagnosis result of the first connection is determined based on the reception status of the first keep-alive response message and the second keep-alive message.
[0039] In some embodiments, upon receiving a first keep-alive response message, it is determined that the fault diagnosis result of the first connection is bidirectionally reachable from the underlying network.
[0040] Understandably, as long as the fault diagnosis system can receive the first keep-alive response message, it can be determined that the outer layer of the GRE tunnel is configured correctly, the gateway can respond to the keep-alive message normally, and the basic network is bidirectionally reachable.
[0041] If the first keep-alive response message is not received, but the second keep-alive message is received, the fault diagnosis result of the first connection is determined to be unidirectional reachability from the gateway to the fault diagnosis system.
[0042] It is understandable that if the first keepalive response message is not received, but the second keepalive message is received, it can be determined that the outer layer configuration of the GRE tunnel is abnormal. The gateway is unidirectionally reachable from the fault diagnosis system, but the fault diagnosis system is not reachable from the gateway. The configuration of the data communication equipment (such as the firewall) on the gateway side can be checked.
[0043] If neither the first keep-alive response message nor the second keep-alive message is received, the fault diagnosis result of the first connection is determined to be that the underlying network is unreachable.
[0044] It is understandable that if the first keepalive response message and the second keepalive message are not received, it can be determined that the outer layer configuration of the GRE tunnel is abnormal, and the basic network from the gateway to the fault diagnosis system and from the fault diagnosis system to the gateway is unreachable in both directions.
[0045] The embodiments disclosed herein have the following advantages or beneficial effects: they can improve the automation level of fault diagnosis, reduce labor costs, and improve fault diagnosis efficiency without increasing operational risks.
[0046] Figure 5A flowchart illustrating yet another fault diagnosis method provided in one embodiment of this specification is shown below. Figure 5 As shown, step S101 may include the following steps.
[0047] In step S1014, a first test message is sent to the gateway or service server, and a first test response message is sent by the gateway or service server in response to the first test message.
[0048] In some embodiments, the first dial-up test message can be an ICMP message, a TraceRT message, or a custom dial-up test message (e.g., dialing up a gateway or service server using a custom dial-up test message at the application layer). To avoid misdiagnosis of faults caused by the network device disabling ICMP responses (e.g., the actual configuration and connection are normal, but misjudgment is caused by the ICMP response being disabled), the first dial-up test message can also be any combination of multiple messages corresponding to the above messages. Upon receiving a first dial-up test response message corresponding to any first dial-up test message, it can be determined that the first dial-up test response message can be received correctly.
[0049] The destination address of the first test message can be the gateway's tunnel inner address, such as the GRE inner address. Alternatively, it can be the address of the service server. This means that by testing the service server's address, the connectivity between the fault diagnosis system and the gateway's tunnel inner address can be indirectly diagnosed.
[0050] It is understandable that if the second connection is faulty, the fault diagnosis system may not receive the first test response message. In some possible implementations, a third timer can be started after the first test message is sent. If the first test response message is not received after the third timer expires, it is determined that the first test response message has not been received.
[0051] In step S1015, the simulated terminal sends a second test message to the service server and receives a second test response message from the service server in response to the second test message.
[0052] In some embodiments, the fault diagnosis system can also simulate the terminal sending a second wave of test messages to the service server, wherein the source address of the second wave of test messages can be an address in the terminal address pool, and the destination address can be the address of the service server.
[0053] The second test message can be an ICMP message, a TraceRT message, a custom test message (e.g., a test message simulating a terminal to test a service server using a custom test message at the application layer), or a service simulation message for a specific service.
[0054] It is understandable that if the second connection is faulty, the fault diagnosis system may not receive the second test response message. In some possible implementations, a fourth timer can be started after the second test message is sent. If the second test response message is not received after the fourth timer expires, it is determined that the second test response message has not been received.
[0055] In step S1016, the fault diagnosis result is determined based on the reception of the first dial-up response message and the second dial-up response message.
[0056] In some embodiments, if a first test response message is received but a second test response message is not received, the fault diagnosis result is determined to be that the gateway's tunnel inner layer address is configured correctly, but the routing configuration is incorrect, for example, the gateway lacks a corresponding backhaul route.
[0057] If neither the first nor the second test response message is received, the fault diagnosis result is determined to be an error in the configuration of the gateway's inner tunnel address. Upon receiving the first and second test response messages, the fault diagnosis result is determined to be normal.
[0058] The embodiments disclosed herein have the following advantages or beneficial effects: they can improve the automation level of fault diagnosis, reduce labor costs, and improve fault diagnosis efficiency without increasing operational risks.
[0059] In online fault diagnosis, the first connection of the tunnel is diagnosed, the second connection established with the gateway is diagnosed, and the third connection established between the simulated terminal and the business server is diagnosed. The diagnosis of the third connection can be arbitrarily combined. For example, users can predefine diagnostic rules in the fault diagnosis system. These rules can include combinations of the above-mentioned diagnostic techniques and judgment logic. The fault diagnosis system's diagnostic engine can then parse and execute these rules to complete the online fault diagnosis.
[0060] For example, step S1015 above can be an optional step. The terminal can directly simulate sending a second dial-up test message to the service server and receive a second dial-up test response message sent by the service server in response to the second dial-up test message. If the second dial-up test response message is not received, step S1015 is then executed to dial-up test the inner tunnel address of the gateway.
[0061] For example, if the diagnostic rule definition first performs a diagnosis on the first connection of the tunnel, and then determines that the basic network of the fault diagnosis system and the gateway is bidirectionally reachable, then the above steps S1015 and S1016 can be executed to test the connectivity between the second connection between the tunnel inner layer address of the fault diagnosis system and the gateway, between the fault diagnosis system and the service server, and between the simulated terminal and the service server.
[0062] By adopting the above technical solution, online fault diagnosis can be performed through predefined diagnostic rules. This not only improves the automation level of fault diagnosis, reduces labor costs, and increases fault diagnosis efficiency, but also further enhances the adaptability of the technical solution to different scenarios.
[0063] Figure 6 A flowchart illustrating yet another fault diagnosis method provided in one embodiment of this specification is shown below. Figure 6 As shown, the method may also include the following steps.
[0064] In step S103, the messages during the fault diagnosis process are displayed to the user in the form of a timing diagram.
[0065] For example, after showing the fault diagnosis results to the user, the messages interacting during the diagnosis process can be displayed to the user in the form of a timing diagram. The message interaction process can also be displayed in real time during the fault diagnosis process. The content displayed in the timing diagram can specifically include message type, source address, destination address, and the time of receipt or transmission. When the user clicks on a message in the timing diagram, further detailed message parsing can be displayed.
[0066] By adopting the above technical solutions, the automation level of fault diagnosis is improved, labor costs are reduced, and fault diagnosis efficiency is increased. At the same time, the ease of use of fault diagnosis is further improved through a user-friendly visual interface, thereby further enhancing the user experience.
[0067] Figure 7 This is a schematic diagram of a fault diagnosis system provided in one embodiment of this specification, such as... Figure 7 As shown, the fault diagnosis system 100 is configured to connect to the service server via a tunnel established with the gateway. The fault diagnosis system 100 includes: Diagnostic module 110 is used to respond to a user's fault diagnosis request, perform online fault diagnosis, and determine the fault diagnosis result; Display module 120 is used to display fault diagnosis results to users; The diagnostic module 110 is used for at least one of the following: Diagnose the first connection of the tunnel; Diagnose the second connection established with the gateway; The simulated terminal establishes a third connection with the business server and performs diagnostics on the third connection.
[0068] Optionally, the diagnostic module 110 is used for: Send the first keep-alive message to the gateway and receive the first keep-alive response message sent by the gateway in response to the first keep-alive message; In response to receiving the second keep-alive message from the gateway, send a second keep-alive response message to the gateway; Determine the fault diagnosis results, including: The fault diagnosis result of the first connection is determined based on the reception of the first keep-alive response message and the second keep-alive message.
[0069] Optionally, the diagnostic module 110 is used for: Upon receiving the first keep-alive response message, it is determined that the fault diagnosis result of the first connection is bidirectionally reachable from the underlying network. If the first keep-alive response message is not received, but the second keep-alive message is received, the fault diagnosis result of the first connection is determined to be unidirectionally reachable from the gateway to the fault diagnosis system; If neither the first keep-alive response message nor the second keep-alive message is received, the fault diagnosis result of the first connection is determined to be that the underlying network is unreachable.
[0070] Optionally, the diagnostic module 110 is used for: Send the first test message to the gateway or service server, and receive the first test response message sent by the gateway or service server in response to the first test message. The simulated terminal sends a second test message to the service server and receives a second test response message from the service server in response to the second test message. The fault diagnosis result is determined based on the reception of the first and second test response messages.
[0071] Optionally, the diagnostic module 110 is used for: If the first test response message is received but the second test response message is not received, the fault diagnosis result is determined to be that the gateway's tunnel inner layer address configuration is correct, but the routing configuration is incorrect. If neither the first nor the second test response message is received, the fault diagnosis result is determined to be an error in the configuration of the gateway's inner tunnel address. Upon receiving the first and second test response messages, the fault diagnosis result is determined to be normal.
[0072] Optionally, the display module 120 is also used for: The messages during the fault diagnosis process are displayed to the user in the form of a timing diagram.
[0073] The fault diagnosis system provided in this application embodiment can execute the methods in the preceding method embodiments and achieve the functions and beneficial effects of the methods in the preceding method embodiments, which will not be repeated here.
[0074] Figure 8 This is a schematic diagram of another fault diagnosis system provided in one embodiment of this specification, such as... Figure 8 As shown, the fault diagnosis system can be divided into two parts: a front-end system and a back-end system.
[0075] The backend system includes the GRE tunneling engine, specifically comprising: The GRE keep-alive generation module is used to construct keep-alive messages and send them to the gateway to diagnose the first connection of the tunnel. Specifically, it includes: constructing Ethernet messages using operating system sockets; creating a complete GRE keep-alive message, including an IP header and a GRE header, setting the correct protocol type in the GRE header to indicate that the message is a keep-alive message; and setting a timer to periodically send GRE keep-alive messages.
[0076] The GRE keep-alive receiver module is used to receive keep-alive messages sent by the gateway, or keep-alive response messages sent by the gateway in response to keep-alive messages. Specifically, it includes: receiving Ethernet messages in a non-blocking manner using operating system sockets; monitoring and identifying keep-alive messages based on the GRE header protocol fields; and upon receiving a keep-alive message, unconditionally responding to the original address in real time (sending a keepalive message to the original address).
[0077] GRE tunnel encapsulation module: used to encapsulate messages sent from the upper layer (such as a dialing system) using GRE.
[0078] GRE tunnel unblocking: Unblocks GRE tunnels for packets received from the network.
[0079] The backend system also includes: ICMP daemon process: Responds to ICMP messages initiated by the peer, and records the received messages and response messages for diagnostics and interactive presentation.
[0080] The terminal simulation test module is used to simulate the establishment of a third connection between the terminal and the business server, and to diagnose the third connection.
[0081] The diagnostic rules module is used to store diagnostic rules.
[0082] The diagnostic engine is used to parse and execute diagnostic rules.
[0083] The historical message module is used to store historical messages for the diagnostic engine to access.
[0084] The front-end system specifically includes: The simulation tunnel parameter setting module is used to configure tunnel parameters according to a preset format.
[0085] The one-click diagnostic module is used to call the diagnostic engine of the backend system to perform online fault diagnosis.
[0086] The diagnostic report module is used to generate corresponding diagnostic reports and display the message records of related processes.
[0087] The historical review module is used to retrieve and analyze previous diagnostic records.
[0088] The fault diagnosis system provided in this application embodiment can execute the methods in the preceding method embodiments and achieve the functions and beneficial effects of the methods in the preceding method embodiments, which will not be repeated here.
[0089] Figure 9 This is a schematic diagram of the hardware structure of the electronic device provided in the embodiments of this disclosure, such as... Figure 9 As shown, at the hardware level, the electronic device includes at least one processor, and optionally, an internal bus, a network interface, and memory. The memory may include main memory, such as high-speed random-access memory (RAM), or it may also include non-volatile memory, such as at least one disk drive. Of course, the electronic device may also include other hardware required for other business operations.
[0090] The processor, network interface, and memory can be interconnected via an internal bus, which can be an Industry Standard Architecture (ISA) bus, a Peripheral Component Interconnect (PCI) bus, or an Extended Industry Standard Architecture (EISA) bus, etc. This bus can be categorized as an address bus, data bus, control bus, etc. For ease of illustration, only a single bidirectional arrow is used in this diagram, but this does not imply that there is only one bus or one type of bus.
[0091] Memory stores programs. Specifically, the program may include program code, which includes at least one computer operation instruction. Memory may include main memory and non-volatile memory, and provides instructions and data to the processor.
[0092] At least one processor reads a corresponding computer program from non-volatile memory into memory and then runs it, forming a device for locating a target user at the logical level. At least one processor executes the program stored in memory and specifically performs the method disclosed in the embodiments shown in the first aspect, achieving the functions and beneficial effects of the methods described in the foregoing method embodiments, which will not be repeated here.
[0093] The methods disclosed in the embodiments shown in the first aspect of this disclosure can be applied to at least one processor, or implemented by at least one processor. The processor may be an integrated circuit chip with signal processing capabilities. During implementation, each step of the above method can be completed by integrated logic circuits in the hardware or by instructions in the form of software within at least one processor. The processor may be a general-purpose processor, including a Central Processing Unit (CPU), a Network Processor (NP), etc.; it may also be a Digital Signal Processor (DSP), an Application Specific Integrated Circuit (ASIC), a Field-Programmable Gate Array (FPGA), or other programmable logic devices, discrete gate or transistor logic devices, or discrete hardware components. The methods, steps, and logic block diagrams disclosed in the embodiments of this disclosure can be implemented or executed. The general-purpose processor may be a microprocessor or any conventional processor. The steps of the methods disclosed in the embodiments of this disclosure can be directly embodied in the execution of a hardware decoding processor, or executed by a combination of hardware and software modules in the decoding processor. The software module can reside in a mature storage medium in the field, such as random access memory, flash memory, read-only memory, programmable read-only memory, electrically erasable programmable memory, or registers. This storage medium is located in memory, and the processor reads information from the memory and, in conjunction with its hardware, completes the steps of the above method.
[0094] The electronic device can also execute the methods described in the preceding method embodiments and achieve the functions and beneficial effects of the methods described in the preceding method embodiments, which will not be repeated here.
[0095] Of course, in addition to software implementation, the electronic device disclosed herein does not exclude other implementation methods, such as logic devices or a combination of hardware and software, etc. In other words, the execution subject of the following processing flow is not limited to each logic unit, but can also be hardware or logic devices.
[0096] This disclosure also proposes a computer-readable storage medium that stores one or more programs, which, when executed by at least one processor, implement the methods disclosed in the embodiments of the first aspect and achieve the functions and beneficial effects of the methods described in the foregoing method embodiments, which will not be repeated here.
[0097] The computer-readable storage medium mentioned above includes read-only memory (ROM), random access memory (RAM), magnetic disk, or optical disk, etc.
[0098] Furthermore, this disclosure also provides a computer program product, which includes a computer program stored on a non-transitory computer-readable storage medium. The computer program includes program instructions that, when executed by a computer, implement the following process: the method disclosed in the first aspect embodiment and the functions and beneficial effects of the methods described in the foregoing method embodiments are not repeated here.
[0099] In summary, the above description is merely a preferred embodiment of this disclosure and does not limit the scope of protection of this disclosure. Any modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of this disclosure should be included within the scope of protection of this disclosure.
[0100] The systems, modules, or units described in the above embodiments can be implemented by computer chips or entities, or by products with certain functions. A typical implementation device is a computer. Specifically, a computer can be, for example, a personal computer, laptop computer, cellular phone, camera phone, smartphone, personal digital assistant, media player, navigation device, email device, game console, tablet computer, wearable device, or any combination of these devices.
[0101] Computer-readable media includes both permanent and non-permanent, removable and non-removable media that can store information by any method or technology. Information can be computer-readable instructions, data structures, modules of programs, or other data. Examples of computer storage media include, but are not limited to, phase-change memory (PRAM), static random access memory (SRAM), dynamic random access memory (DRAM), other types of random access memory (RAM), read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), flash memory or other memory technologies, CD-ROM, digital versatile optical disc (DVD) or other optical storage, magnetic tape, magnetic magnetic disk storage or other magnetic storage devices, or any other non-transferable medium that can store information accessible by a computing device. As defined herein, computer-readable media does not include transient computer-readable media, such as modulated data signals and carrier waves.
[0102] It should also be noted that the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such a process, method, article, or apparatus. Without further limitation, an element defined by the phrase "comprising one..." does not exclude the presence of other identical elements in the process, method, article, or apparatus that includes said element.
[0103] The various embodiments in this specification are described in a progressive manner. Similar or identical parts between embodiments can be referred to interchangeably. Each embodiment focuses on describing the differences from other embodiments. In particular, the system embodiments are basically similar to the method embodiments, so the description is relatively simple; relevant parts can be referred to the descriptions in the method embodiments.
Claims
1. A fault diagnosis method, characterized in that, Applied to a fault diagnosis system configured to connect to a service server via a tunnel established with a gateway, the method includes: Upon receiving a user's fault diagnosis request, perform online fault diagnosis and determine the fault diagnosis result; Display the fault diagnosis results to the user; The online fault diagnosis includes at least one of the following: Diagnose the first connection of the tunnel; Diagnose the second connection established with the gateway; The simulated terminal establishes a third connection with the business server and performs diagnostics on the third connection.
2. The method according to claim 1, characterized in that, The diagnosis of the first connection of the tunnel includes: Send a first keep-alive message to the gateway and receive a first keep-alive response message sent by the gateway in response to the first keep-alive message; In response to receiving the second keep-alive message sent by the gateway, a second keep-alive response message is sent to the gateway; The determination of the fault diagnosis result includes: The fault diagnosis result of the first connection is determined based on the reception status of the first keep-alive response message and the second keep-alive message.
3. The method according to claim 2, characterized in that, Determining the fault diagnosis result of the first connection based on the reception status of the first keep-alive response message and the second keep-alive message includes: Upon receiving the first keep-alive response message, it is determined that the fault diagnosis result of the first connection is bidirectionally reachable from the underlying network. If the first keep-alive response message is not received, but the second keep-alive message is received, the fault diagnosis result of the first connection is determined to be unidirectionally reachable from the gateway to the fault diagnosis system; If neither the first keep-alive response message nor the second keep-alive message is received, the fault diagnosis result of the first connection is determined to be that the underlying network is unreachable.
4. The method according to claim 1, characterized in that, The diagnostics of the second connection established with the gateway include: Send a first test message to the gateway or the service server, and receive a first test response message sent by the gateway or the service server in response to the first test message; The diagnosis of the third connection includes: The simulated terminal sends a second test message to the service server and receives a second test response message from the service server in response to the second test message. The determination of the fault diagnosis result includes: The fault diagnosis result is determined based on the reception of the first and second dial-up response messages.
5. The method according to claim 4, characterized in that, Determining the fault diagnosis result based on the reception of the first and second test response messages includes: If the first dial-test response message is received but the second dial-test response message is not received, the fault diagnosis result is determined to be that the tunnel inner layer address configuration of the gateway is correct, but the routing configuration is incorrect. If neither the first test response message nor the second test response message is received, the fault diagnosis result is determined to be an error in the tunnel inner layer address configuration of the gateway. Upon receiving the first dial-up test response message and the second dial-up test response message, the fault diagnosis result is determined to be normal.
6. The method according to any one of claims 1 to 5, characterized in that, The method further includes: The messages during the fault diagnosis process are displayed to the user in the form of a timing diagram.
7. The method according to any one of claims 1 to 5, characterized in that, The tunnel is a GRE tunnel, the gateway address corresponding to the first connection is the outer GRE address of the gateway, and the gateway address corresponding to the second connection is the inner GRE address of the gateway.
8. A fault diagnosis system, characterized in that, The fault diagnosis system is configured to connect to the service server via a tunnel established with the gateway, and the system includes: The diagnostic module is used to respond to a user's fault diagnosis request, perform online fault diagnosis, and determine the fault diagnosis result. The display module is used to show the fault diagnosis results to the user; The diagnostic module is used for at least one of the following: Diagnose the first connection of the tunnel; Diagnose the second connection established with the gateway; The simulated terminal establishes a third connection with the business server and performs diagnostics on the third connection.
9. An electronic device, characterized in that, The electronic device includes a memory and a processor. The memory stores computer-executable instructions, which, when executed on the processor, are capable of implementing the steps of the fault diagnosis method according to any one of claims 1 to 7.
10. A computer-readable storage medium storing computer-executable instructions, characterized in that, When the computer-executable instructions are executed by the processor, they can implement the steps of the fault diagnosis method according to any one of claims 1 to 7.
11. A computer program product, characterized in that, The computer program product includes a computer program stored on a non-transitory computer-readable storage medium, the computer program including program instructions that, when executed by a computer, implement the steps of the fault diagnosis method according to any one of claims 1 to 7.