Network equipment detection method and device, equipment, storage medium and program product
By analyzing the execution results of network devices in the remote login client, extracting and displaying key information and their associated information, the problem of insufficient echo information in network device troubleshooting is solved, and the troubleshooting efficiency is improved.
Patent Information
- Application Number
- CN202411708096.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-11-26
- Publication Date
- 2025-02-18
- Estimated Expiration
- 2044-11-26
AI Technical Summary
During the troubleshooting process of network equipment, the echo information is not rich enough, resulting in low troubleshooting efficiency.
By implementing the rich echo information function in the remote login client, sending detection commands to the network device, receiving and parsing execution results, extracting key information and obtaining their associated information, displaying execution results and associated information, to provide richer echo information.
Improve the efficiency of network equipment troubleshooting, and help users locate and solve problems more quickly by providing more relevant information.
Smart Images

Figure CN119484372A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of computer technology, and in particular to a network device detection method, apparatus, device, storage medium and program product. Background Art
[0002] Remote login refers to the process of accessing and using computer resources or services located in another geographical location from one geographical location (local computer or terminal) through a network connection. This technology allows users to remotely operate another computer just like operating a local computer, including executing commands, accessing files, running programs, etc.
[0003] The user logs in to the network device through remote login technology. The user inputs commands on the remote login client. The network device receives the detection commands generated based on the user's command input operations and executes these commands on the operating system of the network device. This may involve configuration changes, status queries, or other operations. After executing the command, the network device will echo the results to the user. However, the current echo information is not rich enough. Summary of the invention
[0004] The embodiments of the present application provide a network device detection method, apparatus, device, storage medium and program product, which are used to provide rich echo information and improve the efficiency of troubleshooting during the troubleshooting of the network device.
[0005] In a first aspect, an embodiment of the present application provides a network device detection method, which is applied to a remote login client, comprising:
[0006] Sending a detection command generated based on a command input operation performed by a user on a remote login client to a network device;
[0007] Receiving an execution result generated based on the detection command and returned by the network device;
[0008] When the echo information enrichment function is enabled, extract key information from the execution result and obtain related information of the key information;
[0009] The execution result and the associated information are displayed.
[0010] In a possible implementation manner, extracting key information from the execution result includes:
[0011] Query a first configuration table, wherein the first configuration table stores a plurality of regular expressions;
[0012] The execution result is parsed using the several regular expressions to extract key information from the execution result, wherein the key information is content in the execution result that matches a target regular expression in the several regular expressions; the target regular expression is a regular expression that is successfully matched in the several regular expressions.
[0013] In a possible implementation manner, the first configuration table stores a mapping relationship between regular expressions and query interfaces, and stores a mapping relationship between query interfaces and query fields, and the acquiring of the associated information of the key information includes:
[0014] Querying the mapping relationship between the regular expression and the query interface, and determining the target query interface corresponding to the target regular expression;
[0015] Querying the mapping relationship between the query interface and the query field, and determining the target query field corresponding to the target query interface;
[0016] Based on the target query interface and the target query field, associated information of the key information is acquired.
[0017] In a possible implementation, the acquiring, based on the target query interface and the target query field, the associated information of the key information includes:
[0018] If the key information includes an Internet Protocol address, determining that the target query interface includes a first interface and the target query field includes a first field;
[0019] From the second configuration table to which the first interface is mapped, the field content corresponding to the first field is queried to obtain application or service information associated with the Internet Protocol address in the key information, and the second configuration table stores relevant information of multiple Internet Protocol addresses.
[0020] In a possible implementation, the acquiring, based on the target query interface and the target query field, the associated information of the key information includes:
[0021] If the key information includes a network interface, determining that the target query interface includes a second interface and the target query field includes a second field;
[0022] From the third configuration table to which the second interface is mapped, the field content corresponding to the second field is queried to obtain the opening and closing time information of the network interface in the key information, and the third configuration table stores relevant information of multiple network interfaces.
[0023] In a possible implementation manner, the displaying the execution result and the associated information includes:
[0024] Determining a display position of the associated information based on a position of the extracted key information in the execution result;
[0025] The execution result is displayed, and the associated information is displayed at the display position.
[0026] In a possible implementation, the method further includes:
[0027] When the echo information enrichment function is turned off, the execution result is directly displayed.
[0028] In a second aspect, an embodiment of the present application provides a network device detection device, including:
[0029] A sending module, used for sending a detection command generated based on a command input operation performed by a user on a remote login client to a network device;
[0030] A receiving module, used for receiving an execution result generated based on the detection command and returned by the network device;
[0031] An extraction module, used to extract key information from the execution result and obtain related information of the key information when the echo information enrichment function is turned on;
[0032] The display module is used to display the execution result and the associated information.
[0033] In a possible implementation, the extraction module is specifically used to:
[0034] Query a first configuration table, wherein the first configuration table stores a plurality of regular expressions;
[0035] The execution result is parsed using the several regular expressions to extract key information from the execution result, wherein the key information is content in the execution result that matches a target regular expression in the several regular expressions; the target regular expression is a regular expression that is successfully matched in the several regular expressions.
[0036] In a possible implementation manner, the first configuration table stores a mapping relationship between regular expressions and query interfaces, and stores a mapping relationship between query interfaces and query fields, and the extraction module is specifically used to:
[0037] Querying the mapping relationship between the regular expression and the query interface, and determining the target query interface corresponding to the target regular expression;
[0038] Querying the mapping relationship between the query interface and the query field, and determining the target query field corresponding to the target query interface;
[0039] Based on the target query interface and the target query field, associated information of the key information is acquired.
[0040] In a possible implementation, the extraction module is specifically used to:
[0041] If the key information includes an Internet Protocol address, determining that the target query interface includes a first interface and the target query field includes a first field;
[0042] From the second configuration table to which the first interface is mapped, the field content corresponding to the first field is queried to obtain application or service information associated with the Internet Protocol address in the key information, and the second configuration table stores relevant information of multiple Internet Protocol addresses.
[0043] In a possible implementation, the extraction module is specifically used to:
[0044] If the key information includes a network interface, determining that the target query interface includes a second interface and the target query field includes a second field;
[0045] From the third configuration table to which the second interface is mapped, the field content corresponding to the second field is queried to obtain the opening and closing time information of the network interface in the key information, and the third configuration table stores relevant information of multiple network interfaces.
[0046] In a possible implementation manner, the display module is specifically used for:
[0047] Determining a display position of the associated information based on a position of the extracted key information in the execution result;
[0048] The execution result is displayed, and the associated information is displayed at the display position.
[0049] In a possible implementation manner, the device is further specifically used for:
[0050] When the echo information enrichment function is turned off, the execution result is directly displayed.
[0051] In a third aspect, an embodiment of the present application provides a network device detection device, including: a memory, a processor;
[0052] The memory stores computer-executable instructions;
[0053] The processor executes the computer-executable instructions stored in the memory, so that the processor executes the above first aspect and / or various possible implementations of the first aspect.
[0054] In a fourth aspect, an embodiment of the present application provides a computer-readable storage medium, in which computer-executable instructions are stored. When the computer-executable instructions are executed by a processor, they are used to implement the first aspect above and / or various possible implementations of the first aspect.
[0055] In a fifth aspect, an embodiment of the present application provides a computer program product, including a computer program, which, when executed by a processor, implements the above first aspect and / or various possible implementation methods of the first aspect.
[0056] The network device detection method, apparatus, device, storage medium and program product provided by the embodiments of the present application can be used by a remote login client to send a detection command to a network device, wherein the detection command is generated based on a command input operation performed by a user on the remote login client. After receiving the detection command, the network device executes the detection command on the operating system of the network device and transmits the execution result back to the remote login client. The remote login client receives the execution result and can extract key information from the execution result and obtain related information of the key information when it is detected that the echo information enrichment function is turned on. The related information is displayed while the execution result is displayed. By obtaining the related information display of the key information in the execution result when the echo information enrichment function is turned on, it is achieved that during the troubleshooting process of the network device, rich echo information is provided to improve the troubleshooting efficiency. BRIEF DESCRIPTION OF THE DRAWINGS
[0057] The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the present application and, together with the description, serve to explain the principles of the present application.
[0058] Figure 1 A schematic diagram of the return information of executing a detection command for a network device;
[0059] Figure 2 A schematic diagram of a scenario of the network device detection method provided in this application;
[0060] Figure 3 Schematic diagram of the network device detection method provided in this application Figure 1 ;
[0061] Figure 4 Schematic diagram of the network device detection method provided in this application Figure 2 ;
[0062] Figure 5A schematic diagram of a first configuration table provided for this application;
[0063] Figure 6 A schematic diagram showing associated information provided for this application;
[0064] Figure 7 A schematic diagram of the execution process of the network device detection method provided in this application;
[0065] Figure 8 A schematic diagram of the structure of the network device detection device provided by this application;
[0066] Fig. 9 A schematic diagram of the structure of the network device detection device provided in this application.
[0067] The above drawings have shown clear embodiments of the present application, which will be described in more detail later. These drawings and text descriptions are not intended to limit the scope of the present application in any way, but to illustrate the concept of the present application to those skilled in the art by referring to specific embodiments. DETAILED DESCRIPTION
[0068] Exemplary embodiments will be described in detail herein, examples of which are shown in the accompanying drawings. When the following description refers to the drawings, the same numbers in different drawings represent the same or similar elements unless otherwise indicated. The implementations described in the following exemplary embodiments do not represent all implementations consistent with the present application. Instead, they are merely examples of devices and methods consistent with some aspects of the present application as detailed in the appended claims.
[0069] The user logs in to the network device through the remote login technology. The user enters commands on the remote login client. The network device receives the detection commands generated based on the user's command input operations and executes these commands on the network device's operating system. After executing the command, the network device returns the execution result to the remote login client. For example, the user enters the command dis arp, and the network device returns information such as Figure 1 shown.
[0070] The command dis arp is used to display the ARP (Address Resolution Protocol) table of the device. The ARP table is a table used by network devices to map IP addresses to MAC addresses. Figure 1 As shown in the figure, the device returns the detailed information of the ARP table, including IP address, MAC address, expiration time (EXP), type / VLAN, and interface and VPN instance. The following is an explanation of the returned information:
[0071] ARP Entry Types: Lists the types of ARP entries (i.e., a record in the ARP table), including dynamic (D), static (S), interface (I), OpenFlow (O), and redirect (RD).
[0072] IP ADDRESS: Displays the IP address in the ARP entry.
[0073] MAC ADDRESS: Displays the MAC address associated with the IP address.
[0074] EXP(M): indicates the expiration time of the ARP entry (in minutes).
[0075] TYPE / VLAN: Displays the type of ARP entry (dynamic, static, interface, etc.) and the VLAN to which it belongs.
[0076] INTERFACE: Displays the interface associated with the ARP entry.
[0077] VPN-INSTANCE: Displays the VPN instance associated with the ARP entry.
[0078] Users cannot obtain more detailed information from the echo of network devices. For example, for the IP address 10.36.129.106, users cannot know the applications or services associated with or supported by the IP address, nor can they know when the IP address was assigned to the current user or device, which makes data analysis, troubleshooting and emergency response difficult. At the same time, since the operating system of network devices mainly focuses on core switching functions and lacks secondary development capabilities, this problem cannot be solved by modifying the operating system.
[0079] The network device detection method provided by the present application is that the remote login client can send a detection command to the network device, wherein the detection command is generated based on the command input operation performed by the user on the remote login client. After the network device receives the detection command, it executes the detection command on the operating system of the network device and transmits the execution result back to the remote login client. The remote login client receives the execution result and, when it is detected that the echo information enrichment function is turned on, it can extract key information from the execution result and obtain the associated information of the key information, and display the associated information while displaying the execution result. By obtaining the associated information display of the key information in the execution result when the echo information enrichment function is turned on, the technical problem of low troubleshooting efficiency of the network device caused by insufficient echo information in the current detection method is solved.
[0080] Figure 2 A schematic diagram of a scenario of a network device detection method provided in this application, such as Figure 2As shown, the application scenario of the present application is specifically a scenario in which a user remotely logs into a network device 202 through a remote login client 201 to perform troubleshooting.
[0081] The technical solution of the present application and how the technical solution of the present application solves the above-mentioned technical problems are described in detail below with specific embodiments. The following specific embodiments can be combined with each other, and the same or similar concepts or processes may not be repeated in some embodiments. The embodiments of the present application will be described below in conjunction with the accompanying drawings.
[0082] Figure 3 Schematic diagram of the network device detection method provided in this application Figure 1 ,like Figure 3 As shown, the method can be applied to a remote login client, and the method includes:
[0083] S301: Send a detection command generated based on a command input operation performed by a user on a remote login client to a network device.
[0084] The user can perform command input operations on the remote login client, and the remote login client generates a corresponding detection command and sends the detection command to the network device.
[0085] S302: Receive an execution result generated based on the detection command and returned by the network device.
[0086] The network device receives the detection command, and after executing the detection command, the network device may send the execution result back to the remote login client.
[0087] S303: When the echo information enrichment function is enabled, extract key information from the execution result and obtain related information of the key information.
[0088] The remote login client detects whether the echo information enrichment function is currently enabled. If the echo information enrichment function is enabled, the execution result can be extracted to extract key information. Once the key information is extracted, the associated information of the key information can be further obtained. For example, the key information can be an Internet Protocol address. All Internet Protocol addresses in the execution result can be extracted, and the associated information related to these Internet Protocol addresses can be further obtained. This information may include but is not limited to application programs, service names, allocation time, etc.
[0089] S304: Display execution results and related information.
[0090] In the embodiment of the present application, associated information is displayed while displaying the execution result.
[0091] In the network device detection method provided by the embodiment of the present application, a remote login client can send a detection command to a network device, wherein the detection command is generated based on a command input operation performed by a user on the remote login client. After receiving the detection command, the network device executes the detection command on the operating system of the network device and transmits the execution result back to the remote login client. The remote login client receives the execution result and, when it is detected that the echo information enrichment function is turned on, key information can be extracted from the execution result and associated information of the key information can be obtained. The associated information is displayed while the execution result is displayed. By obtaining the associated information display of the key information in the execution result when the echo information enrichment function is turned on, it is achieved that during the troubleshooting process of the network device, rich echo information is provided to improve the troubleshooting efficiency.
[0092] Figure 4 Schematic diagram of the network device detection method provided in this application Figure 2 ,like Figure 4 As shown, in this embodiment Figure 3 Based on the embodiment, a network device detection method is described in detail. The method can be applied to a remote login client. The method includes:
[0093] S401: Send a detection command generated based on a command input operation performed by a user on a remote login client to a network device.
[0094] S402: Receive an execution result generated based on the detection command and returned by the network device.
[0095] S403: When the echo information enrichment function is enabled, query a first configuration table, in which a plurality of regular expressions are stored.
[0096] In an embodiment of the present application, a switch may be provided in the remote login client to control whether to enable the echo information enrichment function. This switch may be presented in the user interface in the form of a check box, a button, or a command line parameter.
[0097] When the echo information enrichment function is enabled, the remote login client can automatically extract key information from the execution results returned by the network device.
[0098] S404. parse the execution result using several regular expressions to extract key information from the execution result, where the key information is content in the execution result that matches a target regular expression in the several regular expressions; the target regular expression is a regular expression that is successfully matched in the several regular expressions.
[0099] Several regular expressions are stored in the first configuration table. Each regular expression is used to identify and extract specific patterns or information in the execution results. After the execution results are returned, the execution results are parsed using the regular expressions in the first configuration table. Each regular expression is applied to the execution results in turn to find matching content. The target regular expression refers to those regular expressions that successfully match the execution results among several regular expressions. The content that matches the target regular expression is extracted from the execution results. This content is the key information, which may include error codes, Internet Protocol addresses, network interfaces, date and time stamps, resource usage, etc.
[0100] S405: Obtain related information of key information.
[0101] In a possible implementation, the first configuration table stores a mapping relationship between regular expressions and query interfaces, and stores a mapping relationship between query interfaces and query fields. Acquiring the associated information of key information may specifically include:
[0102] Query the mapping relationship between the regular expression and the query interface, and determine the target query interface corresponding to the target regular expression;
[0103] Query the mapping relationship between the query interface and the query field, and determine the target query field corresponding to the target query interface;
[0104] Based on the target query interface and target query field, obtain the associated information of key information.
[0105] The first configuration table stores mappings between regular expressions and corresponding query interfaces. Each regular expression is used to identify a specific type of key information and points to a query interface to obtain more information. The first configuration table also stores mappings between query interfaces and their corresponding query fields. These fields define the types of information that can be accessed or retrieved by the query interface.
[0106] When a regular expression successfully matches the execution result, the target query interface corresponding to the regular expression is determined by searching the first configuration table. This step ensures that you know which interface should be used to obtain the associated information. Next, continue to query the first configuration table to determine the target query fields corresponding to the target query interface. These fields indicate the specific type of information that needs to be retrieved.
[0107] In a possible implementation, based on the target query interface and the target query field, acquiring the associated information of the key information may specifically include:
[0108] If the key information includes an Internet Protocol address, determining that the target query interface includes a first interface and the target query field includes a first field;
[0109] The field content corresponding to the first field is queried from the second configuration table mapped to the first interface to obtain application or service information associated with the Internet Protocol address in the key information, and the second configuration table stores relevant information of multiple Internet Protocol addresses.
[0110] In this embodiment, if the extracted key information includes an Internet Protocol address, it can be determined that the target query interface includes a first interface, and the first interface is dedicated to processing queries related to the Internet Protocol address. At the same time, it can be determined that the target query field includes a first field, and the first field is used to store application or service information related to the Internet Protocol address. Figure 5 As shown, it is a schematic diagram of the first configuration table provided by the present application, and the first field is the application / service field in the figure.
[0111] The remote login client accesses the second configuration table through the first interface, and the second configuration table stores multiple Internet protocol addresses and related information. The second configuration table may be a configuration table in a configuration management database. In the second configuration table, by querying the field content corresponding to the first field, the application or service information associated with the Internet protocol address in the key information is obtained.
[0112] In a possible implementation, based on the target query interface and the target query field, acquiring the associated information of the key information may specifically include:
[0113] If the key information includes a network interface, determining that the target query interface includes the second interface and the target query field includes the second field;
[0114] From the third configuration table to which the second interface is mapped, the field content corresponding to the second field is queried to obtain the opening and closing time information of the network interface in the key information, and the third configuration table stores relevant information of multiple network interfaces.
[0115] The opening and closing time of a network interface refers to the function of configuring a network device to automatically open or close the interface within a specified time period.
[0116] In this embodiment, if the extracted key information includes a network interface, it can be determined that the target query interface includes a second interface, and the second interface is dedicated to queries related to the network interface. At the same time, it can be determined that the target query field includes a second field, and the second field is used to store the opening and closing time information of the network interface. Figure 5 As shown, the second field is the opening and closing time field in the figure.
[0117] The remote login client accesses the third configuration table through the second interface, and the third configuration table stores multiple network interfaces and related information. The third configuration table can also be a configuration table in the configuration management database. In the third configuration table, the opening and closing time information of the network interface in the key information is obtained by querying the field content corresponding to the second field.
[0118] S406: Display execution results and related information.
[0119] In a possible implementation, displaying the execution result and associated information may specifically include:
[0120] Determine the display position of the associated information based on the position of the extracted key information in the execution result;
[0121] Displays the execution results and displays related information at the display location.
[0122] In this embodiment, the display position of the associated information is determined based on the position of the extracted key information in the execution result. This means that the associated information will be inserted or attached to the context related to the key information, such as inserting the associated information after the key information, or displaying it in the form of an annotation near the key information. Figure 6 As shown, it is a schematic diagram of displaying associated information provided by the present application, in which associated information is inserted after key information.
[0123] Furthermore, the detection command, the execution result corresponding to the detection command, and the associated information corresponding to the execution result may be associated and stored in a result record table.
[0124] In a possible implementation manner, the network device detection method in the embodiment of the present application may further include:
[0125] When the rich information echo function is disabled, the execution result is displayed directly.
[0126] When the echo information enrichment function is disabled, the above steps of extracting key information and obtaining related information of the key information are not performed, and the returned execution result is directly displayed.
[0127] Reference Figure 7 As shown, it is a schematic diagram of the execution process of the network device detection method provided by the present application. The network device detection method of the present application interacts with other systems (such as databases, monitoring systems, log management systems) through a query interface to obtain additional information related to the extracted key information, and integrates the retrieved external information with the original echo information to form richer echo content, so as to help users better understand the device status and execution results and improve the efficiency of fault analysis and emergency processing.
[0128] The technical solution of the present application can flexibly enrich the echo information according to actual needs without modifying the firmware of the network device.
[0129] In the network device detection method provided by the embodiment of the present application, a remote login client can send a detection command to a network device, wherein the detection command is generated based on a command input operation performed by a user on the remote login client. After receiving the detection command, the network device executes the detection command on the operating system of the network device and transmits the execution result back to the remote login client. The remote login client receives the execution result and, when it is detected that the echo information enrichment function is turned on, key information can be extracted from the execution result and associated information of the key information can be obtained. The associated information is displayed while the execution result is displayed. By obtaining the associated information display of the key information in the execution result when the echo information enrichment function is turned on, it is achieved that during the troubleshooting process of the network device, rich echo information is provided to improve the troubleshooting efficiency.
[0130] Figure 8 A schematic diagram of the structure of the network device detection device provided in this application, such as Figure 8 As shown, the network device detection device 80 provided in this embodiment includes:
[0131] A sending module 801 is used to send a detection command generated based on a command input operation performed by a user on a remote login client to a network device;
[0132] The receiving module 802 is used to receive the execution result generated based on the detection command returned by the network device;
[0133] The extraction module 803 is used to extract key information from the execution result and obtain related information of the key information when the echo information enrichment function is turned on;
[0134] The display module 804 is used to display the execution results and related information.
[0135] In a possible implementation, the extraction module is specifically used for:
[0136] Query a first configuration table, where a plurality of regular expressions are stored;
[0137] The execution result is parsed using several regular expressions to extract key information from the execution result, where the key information is content in the execution result that matches a target regular expression in the several regular expressions; the target regular expression is a regular expression that is successfully matched in the several regular expressions.
[0138] In a possible implementation, the first configuration table stores a mapping relationship between a regular expression and a query interface, and stores a mapping relationship between a query interface and a query field, and the extraction module is specifically used to:
[0139] Query the mapping relationship between the regular expression and the query interface, and determine the target query interface corresponding to the target regular expression;
[0140] Query the mapping relationship between the query interface and the query field, and determine the target query field corresponding to the target query interface;
[0141] Based on the target query interface and target query field, obtain the associated information of key information.
[0142] In a possible implementation, the extraction module is specifically used for:
[0143] If the key information includes an Internet Protocol address, determining that the target query interface includes a first interface and the target query field includes a first field;
[0144] The field content corresponding to the first field is queried from the second configuration table mapped to the first interface to obtain application or service information associated with the Internet Protocol address in the key information, and the second configuration table stores relevant information of multiple Internet Protocol addresses.
[0145] In a possible implementation, the extraction module is specifically used for:
[0146] If the key information includes a network interface, determining that the target query interface includes the second interface and the target query field includes the second field;
[0147] From the third configuration table to which the second interface is mapped, the field content corresponding to the second field is queried to obtain the opening and closing time information of the network interface in the key information, and the third configuration table stores relevant information of multiple network interfaces.
[0148] In a possible implementation, the display module is specifically used for:
[0149] Determine the display position of the associated information based on the position of the extracted key information in the execution result;
[0150] Displays the execution results and displays related information at the display location.
[0151] In a possible implementation manner, the device is further specifically used for:
[0152] When the rich information echo function is disabled, the execution result is displayed directly.
[0153] The network device detection apparatus provided in this embodiment can execute the method provided in the above method embodiment. Its implementation principle and technical effect are similar, and this embodiment will not be described in detail here.
[0154] Fig. 9 This is a schematic diagram of the structure of the network device detection device provided in this application. Fig. 9 As shown, the network device detection device 90 provided in this embodiment includes: at least one processor 901 and a memory 902. Optionally, the device 90 further includes a communication component 903. The processor 901, the memory 902 and the communication component 903 are connected via a bus.
[0155] In a specific implementation process, at least one processor 901 executes the computer execution instructions stored in the memory 902, so that at least one processor 901 executes the above method.
[0156] The specific implementation process of the processor 901 can be found in the above method embodiment, and its implementation principle and technical effect are similar, so this embodiment will not be repeated here.
[0157] In the above embodiments, it should be understood that the processor may be a central processing unit (CPU), or other general-purpose processors, digital signal processors (DSP), application-specific integrated circuits (ASIC), etc. A general-purpose processor may be a microprocessor or any conventional processor. The steps of the method disclosed in the invention may be directly implemented as being executed by a hardware processor, or may be executed by a combination of hardware and software modules in the processor.
[0158] The memory may include a high-speed memory (Random Access Memory, RAM), and may also include a non-volatile memory (Non-volatile Memory, NVM), such as at least one disk storage.
[0159] The bus may be an Industry Standard Architecture (ISA) bus, a Peripheral Component Interconnect (PCI) bus, or an Extended Industry Standard Architecture (EISA) bus, etc. The bus may be divided into an address bus, a data bus, a control bus, etc. For ease of representation, the bus in the drawings of the present application is not limited to only one bus or one type of bus.
[0160] The present application also provides a computer program product, including a computer program, which implements the above method when executed by a processor.
[0161] The present application also provides a computer-readable storage medium, in which computer-executable instructions are stored. When a processor executes the computer-executable instructions, the above method is implemented.
[0162] The above-mentioned readable storage medium can be implemented by any type of volatile or non-volatile storage device or a combination thereof, such as static random access memory (SRAM), electrically erasable programmable read-only memory (EEPROM), erasable programmable read-only memory (EPROM), programmable read-only memory (PROM), read-only memory (ROM), magnetic memory, flash memory, magnetic disk or optical disk. The readable storage medium can be any available medium that can be accessed by a general or special-purpose computer.
[0163] An exemplary readable storage medium is coupled to a processor so that the processor can read information from the readable storage medium and write information to the readable storage medium. Of course, the readable storage medium can also be a component of the processor. The processor and the readable storage medium can be located in an application specific integrated circuit (Application Specific Integrated Circuits, referred to as: ASIC). Of course, the processor and the readable storage medium can also exist in the device as discrete components.
[0164] The division of units is only a logical function division, and there may be other divisions in actual implementation, such as multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be an indirect coupling or communication connection through some interface, device or unit, which can be electrical, mechanical or other forms.
[0165] The units described as separate components may or may not be physically separated, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed on multiple network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution of this embodiment.
[0166] In addition, each functional unit in each embodiment of the present invention may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit.
[0167] If the function is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present invention, or the part that contributes to the prior art, or the part of the technical solution, can be embodied in the form of a software product. The computer software product is stored in a storage medium, including several instructions for a computer device (which can be a personal computer, server, or network device, etc.) to perform all or part of the steps of the methods of each embodiment of the present invention. The aforementioned storage medium includes: U disk, mobile hard disk, read-only memory (ROM, Read-Only Memory), random access memory (RAM, Random Access Memory), disk or optical disk, etc. Various media that can store program codes.
[0168] Those skilled in the art can understand that all or part of the steps of implementing the above-mentioned method embodiments can be completed by hardware related to program instructions. The aforementioned program can be stored in a computer-readable storage medium. When the program is executed, the steps of the above-mentioned method embodiments are executed; and the aforementioned storage medium includes: ROM, RAM, disk or optical disk and other media that can store program codes.
[0169] Finally, it should be noted that those skilled in the art will readily conceive of other embodiments of the present invention after considering the specification and practicing the invention disclosed herein. The present invention is intended to cover any variations, uses or adaptations of the present invention, which follow the general principles of the present invention and include common knowledge or customary technical means in the art not disclosed by the present invention, are not limited to the precise structure described above and shown in the drawings, and may be modified and changed in various ways without departing from the scope thereof. The scope of the present invention is limited only by the appended claims.
Claims
1. A network device detection method, characterized in that: Applied to a remote login client, the method includes: Sending a detection command generated based on a command input operation performed by a user on a remote login client to a network device; Receiving an execution result generated based on the detection command and returned by the network device; When the echo information enrichment function is enabled, extract key information from the execution result and obtain related information of the key information; The execution result and the associated information are displayed.
2. The method according to claim 1, characterized in that The extracting key information from the execution result includes: Query a first configuration table, wherein the first configuration table stores a plurality of regular expressions; The execution result is parsed using the several regular expressions to extract key information from the execution result, wherein the key information is content in the execution result that matches a target regular expression in the several regular expressions; the target regular expression is a regular expression that is successfully matched in the several regular expressions.
3. The method according to claim 2, characterized in that The first configuration table stores a mapping relationship between a regular expression and a query interface, and stores a mapping relationship between a query interface and a query field. The acquiring of the associated information of the key information includes: Querying the mapping relationship between the regular expression and the query interface, and determining the target query interface corresponding to the target regular expression; Querying the mapping relationship between the query interface and the query field, and determining the target query field corresponding to the target query interface; Based on the target query interface and the target query field, associated information of the key information is acquired.
4. The method according to claim 3, characterized in that The acquiring, based on the target query interface and the target query field, the associated information of the key information includes: If the key information includes an Internet Protocol address, determining that the target query interface includes a first interface and the target query field includes a first field; From the second configuration table to which the first interface is mapped, the field content corresponding to the first field is queried to obtain application or service information associated with the Internet Protocol address in the key information, and the second configuration table stores relevant information of multiple Internet Protocol addresses.
5. The method according to claim 3, characterized in that: The acquiring, based on the target query interface and the target query field, the associated information of the key information includes: If the key information includes a network interface, determining that the target query interface includes a second interface and the target query field includes a second field; From the third configuration table to which the second interface is mapped, the field content corresponding to the second field is queried to obtain the opening and closing time information of the network interface in the key information, and the third configuration table stores relevant information of multiple network interfaces.
6. The method according to any one of claims 1 to 5, characterized in that: The displaying of the execution result and the associated information includes: Determining a display position of the associated information based on a position of the extracted key information in the execution result; The execution result is displayed, and the associated information is displayed at the display position.
7. The method according to any one of claims 1 to 5, characterized in that: The method further comprises: When the echo information enrichment function is turned off, the execution result is directly displayed.
8. A network equipment detection device, characterized in that: The device comprises: A sending module, used for sending a detection command generated based on a command input operation performed by a user on a remote login client to a network device; A receiving module, used for receiving an execution result generated based on the detection command and returned by the network device; An extraction module, used to extract key information from the execution result and obtain related information of the key information when the echo information enrichment function is turned on; The display module is used to display the execution result and the associated information.
9. A network device detection device, characterized in that: include: Memory, processor; The memory stores computer-executable instructions; The processor executes the computer-executable instructions stored in the memory, so that the processor performs the method according to any one of claims 1 to 7.
10. A computer-readable storage medium / computer program product, characterized in that: The computer-readable storage medium stores computer-executable instructions, which are used to implement the method according to any one of claims 1 to 7 when executed by a processor; and / or, The computer program product comprises a computer program, which implements the method according to any one of claims 1 to 7 when executed by a processor.
Citation Information
Patent Citations
Method and equipment for determining and presenting network information
CN103475509A
Monitoring system alarming method, monitoring system and monitoring device
CN108306749A
Monitoring method and device of network equipment, computing equipment and medium
CN111884857A
Network quality detection method, device, computer equipment and computer readable medium
CN112866042A
List data processing method and device, electronic equipment and computer readable medium
CN117331929A