Probe device self-checking method and apparatus, electronic device, and storage medium
By automatically acquiring the network status and configuration information of the remote communication module, the abnormalities of the probe device are located and repaired, solving the problem of low efficiency in manual testing and achieving efficient automatic testing and repair.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- XI AN FIBOCOM WIRELESS INC
- Filing Date
- 2023-04-07
- Publication Date
- 2026-07-10
AI Technical Summary
In existing technologies, when probe equipment malfunctions, manual inspection and repair are required, which is inefficient.
By acquiring the network status of the remote communication module and the configuration information of the probe program, the system automatically locates and repairs anomalies, including determining IP address consistency, port status, and acceleration mode, thus achieving automatic anomaly detection and repair.
It improves the efficiency of anomaly detection of probe equipment, reduces labor costs, and realizes automatic detection and repair without human intervention.
Smart Images

Figure CN116527532B_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of communication technology, and more specifically, to a self-testing method, apparatus, electronic device, and storage medium for a probe device. Background Technology
[0002] The solution combining a remote communication module and a probe program offers a new approach to production monitoring and problem localization under the "Internet + Industrial Park" trend. The remote communication module initiates the probe program during the initialization phase. After the remote communication module connects to the network, the probe program establishes a connection with the probe server through application protocol services, enabling server-side monitoring of the entire industrial production process and problem localization.
[0003] When probe equipment malfunctions, related technologies typically rely on manual detection and repair, which is inefficient.
[0004] There are currently no effective solutions to the aforementioned problems in the relevant technologies. Summary of the Invention
[0005] This application provides a self-testing method, apparatus, electronic device, and storage medium for a probe device to solve the technical problem that manual testing and repair are inefficient in related technologies.
[0006] According to one aspect of the embodiments of this application, a self-testing method for a probe device is provided, comprising: acquiring network status of a remote communication module and configuration information of a probe program, wherein the probe program runs in the remote communication module; locating the anomaly type of the remote communication module based on the network status and the configuration information; and performing anomaly repair on the remote communication module according to the anomaly type.
[0007] Further, locating the anomaly type of the remote communication module based on the network status and the configuration information includes: determining whether the remote communication module is in a normal network connection state based on the network status; if the remote communication module is in a normal network connection state, obtaining the dial-up network card IP address of the remote communication module and reading the local IP address of the remote communication module from the configuration information; determining whether the dial-up network card IP address is consistent with the local IP address in the configuration information; if the dial-up network card IP address is inconsistent with the local IP address in the configuration information, then determining the anomaly type as a first probe program anomaly, wherein the first probe program anomaly is that the probe program has not updated the local IP address in the configuration information.
[0008] Furthermore, after determining whether the remote communication module is in a normal network connection state based on the network status, the method further includes: if the remote communication module is in a disconnected network state, determining whether the local IP address of the remote communication module exists in the configuration information; if the local IP address of the remote communication module exists in the configuration information, then determining the abnormality type as a network card abnormality of the remote communication module.
[0009] Further, locating the anomaly type of the remote communication module based on the network status and the configuration information includes: determining whether the remote communication module is in a normal network connection state based on the network status; if the remote communication module is in a normal network connection state, determining whether the local IP address of the remote communication module exists in the configuration information; if the local IP address of the remote communication module does not exist in the configuration information, then determining the anomaly type as a second probe program anomaly, wherein the second probe program anomaly is the probe program failing to obtain an IP address.
[0010] Furthermore, after obtaining the network status of the remote communication module and the configuration information of the probe program, the method further includes: querying the activation status of the target port of the probe program from the configuration information, wherein the target port is used for management between the probe program and the server; if the activation status of the target port is disabled, the exception type is determined to be management failure between the probe program and the server.
[0011] Furthermore, the method also includes: querying the on / off status of the software and hardware acceleration mode of the remote communication module, wherein, when the software and hardware acceleration mode is enabled, the data transmission between the remote communication module and the probe program is abnormal; if the acceleration function of the remote communication module is enabled, the abnormality type is determined to be a mode abnormality of the remote communication module, and the software and hardware acceleration mode of the remote communication module is disabled, and the remote communication module is restarted.
[0012] Furthermore, the abnormal repair of the remote communication module for the abnormal type includes: determining whether the abnormal type is a network card abnormality or a probe program abnormality of the remote communication module; if the abnormal type is a network card abnormality, then restarting the remote communication module; if the abnormal type is a probe program abnormality, then initializing the probe program and then rerunning the probe program.
[0013] According to another aspect of the embodiments of this application, a self-testing device for a probe device is also provided, comprising: an acquisition module for acquiring network status of a remote communication module and configuration information of a probe program, wherein the probe program runs in the remote communication module; a location module for locating the anomaly type of the remote communication module according to the network status and the configuration information; and a repair module for performing anomaly repair on the remote communication module for the anomaly type.
[0014] Furthermore, the positioning module includes a first positioning unit, used to determine whether the remote communication module is in a normal network connection state based on the network status; if the remote communication module is in a normal network connection state, it obtains the dial-up network card IP address of the remote communication module and reads the local IP address of the remote communication module from the configuration information; it determines whether the dial-up network card IP address is consistent with the local IP address in the configuration information; if the dial-up network card IP address is inconsistent with the local IP address in the configuration information, it determines that the abnormality type is a first probe program abnormality, and the first probe program abnormality is that the probe program has not updated the local IP address in the configuration information.
[0015] Furthermore, the positioning module includes a second positioning unit, used to determine whether the local IP address of the remote communication module exists in the configuration information if the remote communication module is in a network outage state; if the local IP address of the remote communication module exists in the configuration information, the abnormality type is determined to be a network card abnormality of the remote communication module.
[0016] Furthermore, the positioning module includes a third positioning unit, used to determine whether the remote communication module is in a normal network connection state based on the network status; if the remote communication module is in a normal network connection state, it determines whether the local IP address of the remote communication module exists in the configuration information; if the local IP address of the remote communication module does not exist in the configuration information, it determines that the abnormality type is a second probe program abnormality, and the second probe program abnormality is that the probe program failed to obtain the IP address.
[0017] Furthermore, the positioning module includes a fourth positioning unit, used to query the activation status of the target port of the probe program from the configuration information, wherein the target port is used for the management between the probe program and the server; if the activation status of the target port is disabled, the exception type is determined to be the failure of the management between the probe program and the server.
[0018] Furthermore, the positioning module includes a fifth positioning unit, used to query the on / off status of the software and hardware acceleration mode of the remote communication module. When the software and hardware acceleration mode is enabled, the data transmission between the remote communication module and the probe program is abnormal. If the acceleration function of the remote communication module is enabled, the abnormality type is determined to be a mode abnormality of the remote communication module, and the software and hardware acceleration mode of the remote communication module is disabled, and the remote communication module is restarted.
[0019] Furthermore, the repair module includes a first repair unit, used to determine whether the anomaly type is a network card anomaly of the remote communication module or a probe program anomaly; if the anomaly type is a network card anomaly, then the remote communication module is restarted; if the anomaly type is a probe program anomaly, then the probe program is initialized and then rerun.
[0020] According to another aspect of the embodiments of this application, a storage medium is also provided, the storage medium including a stored program that executes the above steps when the program is run.
[0021] According to another aspect of the embodiments of this application, an electronic device is also provided, including a processor, a communication interface, a memory, and a communication bus, wherein the processor, the communication interface, and the memory communicate with each other through the communication bus; wherein: the memory is used to store computer programs; and the processor is used to execute the steps in the above method by running the programs stored in the memory.
[0022] This application also provides a computer program product containing instructions that, when run on a computer, cause the computer to perform the steps in the above-described method.
[0023] This application obtains the network status of a remote communication module and the configuration information of a probe program. The probe program runs within the remote communication module, identifies the type of anomaly based on the network status and configuration information, and then repairs the anomaly accordingly. This method monitors and automatically repairs anomalies in the network services provided by the remote communication module and the data acquisition by the probe program, achieving automatic anomaly detection and repair of the remote communication module without manual intervention. This improves the anomaly detection efficiency of the probe equipment and reduces labor costs. Attached Figure Description
[0024] The accompanying drawings, which are included to provide a further understanding of this application and form part of this application, illustrate exemplary embodiments and are used to explain this application, but do not constitute an undue limitation of this application. In the drawings:
[0025] Figure 1 This is a hardware structure block diagram of a computer according to an embodiment of this application;
[0026] Figure 2 This is a flowchart of a self-testing method for a probe device according to an embodiment of this application;
[0027] Figure 3 This is a schematic diagram of the main process of the remote communication module of the probe device in an embodiment of this application;
[0028] Figure 4 This is a schematic diagram of the main process of the monitoring service in the remote communication module of this application embodiment;
[0029] Figure 5 This is a structural block diagram of a self-testing device for a probe according to an embodiment of this application. Detailed Implementation
[0030] To enable those skilled in the art to better understand the present application, the technical solutions in the embodiments of the present application 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 the present application, and not all of them. Based on the embodiments of the present application, all other embodiments obtained by those skilled in the art without creative effort should fall within the scope of protection of the present application. It should be noted that, unless otherwise specified, the embodiments and features in the embodiments of the present application can be combined with each other.
[0031] It should be noted that the terms "first," "second," etc., in the specification, claims, and accompanying drawings of this application are used to distinguish similar objects and are not necessarily used to describe a specific order or sequence. It should be understood that such data can be interchanged where appropriate so that the embodiments of this application described herein can be implemented in orders other than those illustrated or described herein. Furthermore, the terms "comprising" and "having," and any variations thereof, are intended to cover non-exclusive inclusion; for example, a process, method, product, or apparatus that comprises a series of steps or units is not necessarily limited to those steps or units explicitly listed, but may include other steps or units not explicitly listed or inherent to such processes, methods, products, or apparatus.
[0032] Example 1
[0033] The method embodiment provided in Embodiment 1 of this application can be executed on a mobile phone, computer, tablet, or similar computing device. Taking running on a computer as an example, Figure 1 This is a hardware structure block diagram of a computer according to an embodiment of this application. Figure 1 As shown, a computer may include one or more ( Figure 1Only one is shown in the diagram. A processor 102 (which may include, but is not limited to, a microprocessor MCU or a programmable logic device FPGA, etc.) and a memory 104 for storing data are also shown. Optionally, the computer may further include a transmission device 106 for communication functions and an input / output device 108. Those skilled in the art will understand that... Figure 1 The structure shown is for illustrative purposes only and does not limit the structure of the computer described above. For example, the computer may also include components that are larger than... Figure 1 The more or fewer components shown, or having the same Figure 1 The different configurations shown.
[0034] The memory 104 can be used to store computer programs, such as application software programs and modules, like the computer program corresponding to a self-testing method for a probe device in this embodiment. The processor 102 executes various functional applications and data processing by running the computer program stored in the memory 104, thus implementing the aforementioned method. The memory 104 may include high-speed random access memory and non-volatile memory, such as one or more magnetic storage devices, flash memory, or other non-volatile solid-state memory. In some instances, the memory 104 may further include memory remotely located relative to the processor 102, and these remote memories can be connected to the computer via a network. Examples of such networks include, but are not limited to, the Internet, corporate intranets, local area networks, mobile communication networks, and combinations thereof.
[0035] The transmission device 106 is used to receive or send data via a network. Specific examples of the network described above may include a wireless network provided by a computer's communication provider. In one example, the transmission device 106 includes a Network Interface Controller (NIC), which can connect to other network devices via a base station to communicate with the Internet. In another example, the transmission device 106 may be a Radio Frequency (RF) module used for wireless communication with the Internet.
[0036] This embodiment provides a self-testing method for a probe device. Figure 2 This is a flowchart of a self-testing method for a probe device according to an embodiment of this application, such as... Figure 2 As shown, the process includes the following steps:
[0037] Step S10: Obtain the network status of the remote communication module and the configuration information of the probe program, wherein the probe program runs in the remote communication module;
[0038] Step S20: Locate the anomaly type of the remote communication module based on the network status and the configuration information;
[0039] Step S30: Perform anomaly repair on the remote communication module according to the anomaly type.
[0040] In this embodiment, the remote communication module can be mounted on the main machine, providing communication functionality. After successful dialing, the remote communication module obtains the IP address of the dial-up network card assigned by the core network. The probe program runs within the remote communication module, collecting information such as the IP address of the remote communication module and the operating data of the main machine equipped with the remote communication module. This information is then sent to the server, enabling the server to monitor and locate problems throughout the entire industrial production process. Data interaction relies on the network communication function provided by the remote communication module. The configuration information of the probe program affects the data service interaction between the probe program and the server. Therefore, this embodiment detects the network status of the remote communication module and the configuration information of the probe program. Based on the network status and configuration information, various abnormal situations of the remote communication module can be located, and automatic repair can be performed on the remote communication module for each abnormal situation.
[0041] Through the above steps, the network status of the remote communication module and the configuration information of the probe program are obtained. The probe program runs within the remote communication module, locating the type of anomaly based on the network status and configuration information, and then repairing the anomaly accordingly. This method monitors the network services provided by the remote communication module and the data acquisition by the probe program, automatically repairing anomalies. This achieves automatic anomaly detection and repair of the remote communication module without manual intervention, improving the anomaly detection efficiency of the probe equipment and reducing labor costs.
[0042] In one embodiment of this example, locating the anomaly type of the remote communication module based on the network status and the configuration information includes:
[0043] S11, determine whether the remote communication module is in a normal network connection state based on the network status;
[0044] The network status of the remote communication module can be checked by querying whether the network card has a dial-up network card IP. If the network card itself has a dial-up network card IP, it means that the remote communication module is in a normal network connection state. Alternatively, the network status of the remote communication module can be checked by the ping (Packet InternetGroper, a network diagnostic tool) command, or by other methods, which are not limited here.
[0045] S12, if the remote communication module is in a normal network connection state, obtain the dial-up network card IP address of the remote communication module, and read the local IP address of the remote communication module from the configuration information;
[0046] S13, determine whether the dial-up network card IP address is consistent with the local IP address in the configuration information;
[0047] S14, if the dial-up network card IP address is inconsistent with the local IP address in the configuration information, the abnormality type is determined to be a first probe program abnormality, and the first probe program abnormality is that the probe program has not updated the local IP address in the configuration information.
[0048] Specifically, during the operation of the probe program, the dial-up network card IP of the remote communication module is first obtained from the remote communication module and stored in the probe program's configuration file. When the network of the remote communication module is normal, the local IP address in the configuration file is sent to the server so that the server can manage multiple terminals loaded with probe devices.
[0049] This implementation addresses a scenario where the remote communication module redials due to human error or abnormal module restarts. Existing probe programs acquire the module's dial-up network card IP address and write it to a configuration file, a one-time action. After the remote communication module redials, the network-assigned IP address changes, and the probe program cannot recognize the new IP address, leading to data service disruptions with the server and making it unmanageable. Therefore, this implementation detects the latest dial-up network card IP address of the remote communication module within a preset period, determining if it matches the local IP address in the configuration information. If the dial-up network card IP address does not match the local IP address in the configuration information, the cause of the anomaly is likely that the probe program did not update the local IP address in the configuration information after the remote communication module redials. In this case, the probe program is initialized and then rerun to update the IP address in the configuration information.
[0050] In another embodiment of this example, after determining whether the remote communication module is in a normal network connection state based on the network status, the method further includes:
[0051] S21, If the remote communication module is offline, determine whether the configuration information contains the local IP address of the remote communication module;
[0052] S22, if the configuration information contains the local IP address of the remote communication module, then the abnormality type is determined to be a network card abnormality of the remote communication module.
[0053] This implementation is used when the remote communication module experiences network anomalies, including network indicators falling below preset values or network outages. After determining the remote communication module is out of the network based on its network status, the system checks if its local IP address exists in the configuration information. If it does, it means the module has previously successfully connected to the internet and been managed. However, if ping detection shows an out-of-network status, the network card of the remote communication module is faulty. In this case, the module is restarted, and the dial-up process is re-initiated. After successful network access, the module will be re-managed by the server.
[0054] In another embodiment of this example, locating the anomaly type of the remote communication module based on the network status and the configuration information includes:
[0055] S31, determine whether the remote communication module is in a normal network connection state based on the network status;
[0056] S32, If the remote communication module is in a normal network connection state, determine whether the local IP address of the remote communication module exists in the configuration information;
[0057] S33, if the local IP address of the remote communication module is not found in the configuration information, the exception type is determined to be a second probe program exception, which is the failure of the probe program to obtain the IP address.
[0058] This implementation is used when the probe program cannot obtain the dial-up network card IP address of the remote communication module. Specifically, based on the network status, it is determined that the remote communication module is in a normal network connection state. The system then checks whether the local IP address of the remote communication module exists in the configuration information. If the local IP address of the remote communication module is not found in the configuration information, it means that the probe program has not obtained the dial-up network card IP address of the remote communication module while it is normally dialing up to the internet. Therefore, the probe program is considered abnormal, specifically, it fails to obtain the IP address. In this case, the probe program is initialized and then rerun to update the IP address in the configuration information.
[0059] In another embodiment of this example, after obtaining the network status of the remote communication module and the configuration information of the probe program, the method includes:
[0060] S41, query the activation status of the target port of the probe program from the configuration information, wherein the target port is used for management between the probe program and the server;
[0061] S42, if the target port is in an inactive state, the exception type is determined to be a failure to manage the probe program and the server.
[0062] In this embodiment, the exception type is when the port used by the probe program for management is not enabled. The activation status of the target port of the probe program is queried from the configuration information. If the activation status of the target port is not enabled, the exception type is determined to be management failure between the probe program and the server. In one example, the target port is port 9999. During the detection, it is found that ports such as 9999 used by the probe program are not enabled, so it can be determined that management has failed. At this time, the probe program is restarted to recover.
[0063] In another embodiment of this example, the method includes:
[0064] S51, query the on / off status of the software and hardware acceleration mode of the remote communication module, wherein, when the software and hardware acceleration mode is enabled, the data transmission between the remote communication module and the probe program is abnormal.
[0065] S52, if the acceleration function of the remote communication module is enabled, the exception type is determined to be a mode exception of the remote communication module, and the software and hardware acceleration modes of the remote communication module are disabled, and the remote communication module is restarted.
[0066] In this embodiment, the anomaly type is that the software and hardware acceleration mode of the remote communication module is not turned off. Since if the software and hardware acceleration mode is turned on when the probe program is running, the remote communication module will not be able to capture packets for the probe program, and the probe program will not be able to collect the dial-up network card IP address information of the remote communication module. Therefore, by querying the on / off status of the software and hardware acceleration mode of the remote communication module, if the software and hardware acceleration mode of the remote communication module is turned on, the software and hardware acceleration mode of the remote communication module is turned off and the remote communication module is restarted.
[0067] In another embodiment of this example, the abnormal repair of the remote communication module for the abnormal type includes: determining whether the abnormal type is a network card abnormality or a probe program abnormality of the remote communication module; if the abnormal type is a network card abnormality, then restarting the remote communication module; if the abnormal type is a probe program abnormality, then initializing the probe program and then rerunning the probe program.
[0068] Different repair methods are implemented for different types of anomalies. In the case of network card anomaly in the remote communication module, the remote communication module is restarted for repair. In the case of probe program anomaly, the probe program is initialized and then rerun for repair. This effectively prevents management failure and probe function abnormality caused by probe program anomaly; and effectively prevents probe function failure caused by network factors leading to remote communication module disconnection; thus achieving self-recovery of probe program and remote communication module anomalies without human intervention.
[0069] refer to Figure 3 A monitoring service has been added within the remote communication module. This service periodically monitors the operational status of the remote communication module and the probe program. In case of anomalies, it automatically recovers the remote communication module or probe program based on the monitoring results, targeting the specific problem area. The monitoring service is controlled by the probe program's on / off switch; it can be enabled or disabled as needed. The default setting is that it is disabled. The monitoring service's configuration file can be configured with a detection cycle, which takes effect upon restarting the service (default 5 minutes). The main process of the probe device's remote communication module is as follows: First, determine if the probe program switch is on. If the switch is on, continuously check if the remote communication module has successfully dialed. If the remote communication module has successfully dialed, start the probe program and enable its guardian, as well as start the monitoring service and enable its guardian.
[0070] refer to Figure 4 The main process of the monitoring service in the remote communication module includes the following steps:
[0071] Step 1: Initialize the monitoring service program and obtain the detection cycle from the monitoring service configuration file (config.ini);
[0072] Step 2: Enter the main process code of the monitoring service;
[0073] Step 3: Determine whether the remote communication module has disabled hardware and software acceleration. If it has been disabled, continue execution; if it has not been disabled, execute the command to disable hardware and software acceleration and restart the remote communication module.
[0074] Step 4: Start the periodic detection timer, enter the loop, and wait for the timer to expire;
[0075] Step 5: During the periodic test, if the local IP address (local_ip) in the probe program configuration file config.ini is not found to be obtained, exit the current test process and wait for the next test cycle. If local_ip fails to obtain the dial-up network card IP for two consecutive test cycles, restart the probe program to try to recover.
[0076] Step 6: During the periodic test, if the local_ip in the probe program's config.ini is found to be inconsistent with the dial-up network card's IP, restart the probe program to attempt to restore it.
[0077] Step 7: During the periodic detection, if the local_ip is found to exist in the probe program's config.ini, but the remote communication module cannot ping the server, try restarting the remote communication module to restore functionality.
[0078] Step 8: During the periodic check, the netstat -anp|grep port number command shows that ports such as 9999 used by the probe program are not in use, indicating that the probe program service is abnormal. Therefore, the probe program is restarted to try to recover.
[0079] This embodiment proposes a self-healing mechanism / service for probe programs and remote communication modules when they malfunction. It can self-identify and self-heal when the remote communication module provides network services, the network indicators are poor, the network is unavailable, the probe program obtains data abnormally, or the IP is unreachable, thus providing reliable network and service support for the probe server.
[0080] Through the above description of the embodiments, those skilled in the art can clearly understand that the methods according to the above embodiments can be implemented by means of software plus necessary general-purpose hardware platforms. Of course, they can also be implemented by hardware, but in many cases the former is a better implementation method. Based on this understanding, the technical solution of this application, in essence, or the part that contributes to the prior art, can be embodied in the form of a software product. This computer software product is stored in a storage medium (such as ROM / RAM, magnetic disk, optical disk) and includes several instructions to cause a terminal device (which may be a mobile phone, computer, server, or network device, etc.) to execute the methods described in the various embodiments of this application.
[0081] Example 2
[0082] This embodiment also provides a self-testing device for a probe device, used to implement the above embodiments and preferred embodiments; details already described will not be repeated. As used below, the term "module" can refer to a combination of software and / or hardware that performs a predetermined function. Although the device described in the following embodiments is preferably implemented in software, hardware implementation, or a combination of software and hardware, is also possible and contemplated.
[0083] Figure 5 This is a structural block diagram of a self-testing device for a probe apparatus according to an embodiment of this application, such as... Figure 5 As shown, the device includes: an acquisition module 60, a positioning module 62, and a repair module 64, wherein,
[0084] The acquisition module 60 is used to acquire the network status of the remote communication module and the configuration information of the probe program, wherein the probe program runs in the remote communication module;
[0085] The positioning module 62 is used to locate the abnormal type of the remote communication module based on the network status and the configuration information;
[0086] Repair module 64 is used to repair the remote communication module for the type of anomaly.
[0087] Optionally, the positioning module includes a first positioning unit, used to determine whether the remote communication module is in a normal network connection state based on the network status; if the remote communication module is in a normal network connection state, it obtains the dial-up network card IP address of the remote communication module and reads the local IP address of the remote communication module from the configuration information; it determines whether the dial-up network card IP address is consistent with the local IP address in the configuration information; if the dial-up network card IP address is inconsistent with the local IP address in the configuration information, it determines that the abnormality type is a first probe program abnormality, and the first probe program abnormality is that the probe program has not updated the local IP address in the configuration information.
[0088] Optionally, the positioning module includes a second positioning unit, used to determine whether the local IP address of the remote communication module exists in the configuration information if the remote communication module is in a network outage state; if the local IP address of the remote communication module exists in the configuration information, the abnormality type is determined to be a network card abnormality of the remote communication module.
[0089] Optionally, the positioning module includes a third positioning unit, used to determine whether the remote communication module is in a normal network connection state based on the network status; if the remote communication module is in a normal network connection state, it determines whether the local IP address of the remote communication module exists in the configuration information; if the local IP address of the remote communication module does not exist in the configuration information, it determines that the abnormality type is a second probe program abnormality, and the second probe program abnormality is that the probe program failed to obtain the IP address.
[0090] Optionally, the positioning module includes a fourth positioning unit, used to query the activation status of the target port of the probe program from the configuration information, wherein the target port is used for management between the probe program and the server; if the activation status of the target port is disabled, the exception type is determined to be management failure between the probe program and the server.
[0091] Optionally, the positioning module includes a fifth positioning unit, used to query the on / off status of the software and hardware acceleration mode of the remote communication module, wherein, when the software and hardware acceleration mode is enabled, the data transmission between the remote communication module and the probe program is abnormal; if the acceleration function of the remote communication module is enabled, the abnormality type is determined to be a mode abnormality of the remote communication module, and the software and hardware acceleration mode of the remote communication module is disabled, and the remote communication module is restarted.
[0092] Optionally, the repair module includes a first repair unit, used to determine whether the anomaly type is a network card anomaly of the remote communication module or a probe program anomaly; if the anomaly type is a network card anomaly, then restart the remote communication module; if the anomaly type is a probe program anomaly, then initialize the probe program and then rerun the probe program.
[0093] It should be noted that the above modules can be implemented by software or hardware. For the latter, they can be implemented in the following ways, but are not limited to: all the above modules are located in the same processor; or, the above modules are located in different processors in any combination.
[0094] Example 3
[0095] Embodiments of this application also provide a storage medium storing a computer program, wherein the computer program is configured to execute the steps in any of the above method embodiments when running.
[0096] Optionally, in this embodiment, the storage medium may be configured to store a computer program for performing the following steps:
[0097] S1, Obtain the network status of the remote communication module and the configuration information of the probe program, wherein the probe program runs in the remote communication module;
[0098] S2, determine the anomaly type of the remote communication module based on the network status and the configuration information;
[0099] S3, perform anomaly repair on the remote communication module according to the anomaly type.
[0100] Optionally, in this embodiment, the storage medium may include, but is not limited to, various media capable of storing computer programs, such as USB flash drives, read-only memory (ROM), random access memory (RAM), portable hard drives, magnetic disks, or optical disks.
[0101] Embodiments of this application also provide an electronic device, including a memory and a processor, wherein the memory stores a computer program and the processor is configured to run the computer program to perform the steps in any of the above method embodiments.
[0102] Optionally, the electronic device may further include a transmission device and an input / output device, wherein the transmission device is connected to the processor and the input / output device is connected to the processor.
[0103] Optionally, in this embodiment, the processor can be configured to perform the following steps via a computer program:
[0104] S1, Obtain the network status of the remote communication module and the configuration information of the probe program, wherein the probe program runs in the remote communication module;
[0105] S2, determine the anomaly type of the remote communication module based on the network status and the configuration information;
[0106] S3, perform anomaly repair on the remote communication module according to the anomaly type.
[0107] Optionally, specific examples in this embodiment can refer to the examples described in the above embodiments and optional implementations, and will not be repeated here.
[0108] The sequence numbers of the embodiments in this application are for descriptive purposes only and do not represent the superiority or inferiority of the embodiments.
[0109] In the above embodiments of this application, the descriptions of each embodiment have different focuses. For parts not described in detail in a certain embodiment, please refer to the relevant descriptions of other embodiments.
[0110] In the several embodiments provided in this application, it should be understood that the disclosed technical content can be implemented in other ways. The device embodiments described above are merely illustrative; for example, the division of units is only a logical functional division, and in actual implementation, there may be other division methods. For example, multiple units or components may be combined or integrated into another system, or some features may be ignored or not executed. Furthermore, the displayed or discussed mutual coupling, direct coupling, or communication connection may be through some interfaces; the indirect coupling or communication connection between units or modules may be electrical or other forms.
[0111] The units described as separate components may or may not be physically separate. The components shown as units may or may not be physical units; that is, they may be located in one place or distributed across multiple network units. Some or all of the units can be selected to achieve the purpose of this embodiment according to actual needs.
[0112] Furthermore, the functional units in the various embodiments of this application can be integrated into one processing unit, or each unit can exist physically separately, or two or more units can be integrated into one unit. The integrated unit can be implemented in hardware or as a software functional unit.
[0113] If the integrated unit is implemented as 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 this application, in essence, or the part that contributes to the prior art, or all or part of the technical solution, can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) to execute all or part of the steps of the methods described in the various embodiments of this application. The aforementioned storage medium includes various media capable of storing program code, such as USB flash drives, read-only memory (ROM), random access memory (RAM), portable hard drives, magnetic disks, or optical disks.
[0114] The above description is only a preferred embodiment of this application. It should be noted that for those skilled in the art, several improvements and modifications can be made without departing from the principle of this application, and these improvements and modifications should also be considered within the scope of protection of this application.
Claims
1. A self-testing method for a probe device, characterized in that, The method includes: Obtain the network status of the remote communication module and the configuration information of the probe program, wherein the probe program runs in the remote communication module; The anomaly type of the remote communication module is determined based on the network status and the configuration information; Perform anomaly repair on the remote communication module according to the aforementioned anomaly type; The method of locating the anomaly type of the remote communication module based on the network status and the configuration information includes: determining whether the remote communication module is in a normal network connection state based on the network status; if the remote communication module is in a normal network connection state, obtaining the dial-up network card IP address of the remote communication module and reading the local IP address of the remote communication module from the configuration information; determining whether the dial-up network card IP address is consistent with the local IP address in the configuration information; if the dial-up network card IP address is inconsistent with the local IP address in the configuration information, then determining the anomaly type as a first probe program anomaly, wherein the first probe program anomaly is that the probe program has not updated the local IP address in the configuration information.
2. The method according to claim 1, characterized in that, After determining whether the remote communication module is in a normal network connection state based on the network status, the method further includes: If the remote communication module is offline, determine whether the configuration information contains the local IP address of the remote communication module; If the configuration information contains the local IP address of the remote communication module, then the anomaly type is determined to be a network card anomaly of the remote communication module.
3. The method according to claim 1, characterized in that, The anomaly types of the remote communication module can be identified based on the network status and configuration information, including: Based on the network status, determine whether the remote communication module is in a normal network connection state; If the remote communication module is in a normal network connection state, determine whether the local IP address of the remote communication module exists in the configuration information; If the local IP address of the remote communication module is not found in the configuration information, the exception type is determined to be a second probe program exception, which is the failure of the probe program to obtain an IP address.
4. The method according to claim 1, characterized in that, After obtaining the network status of the remote communication module and the configuration information of the probe program, the method further includes: The activation status of the target port of the probe program is queried from the configuration information, wherein the target port is used for management between the probe program and the server. If the target port is in an inactive state, the exception type is determined to be a failure to manage the probe program and the server.
5. The method according to claim 1, characterized in that, The method further includes: Query the enabled / disabled status of the software and hardware acceleration mode of the remote communication module. When the software and hardware acceleration mode is enabled, the data transmission between the remote communication module and the probe program is abnormal. If the acceleration function of the remote communication module is enabled, the exception type is determined to be a mode exception of the remote communication module, and the software and hardware acceleration modes of the remote communication module are disabled, and the remote communication module is restarted.
6. The method according to claim 1, characterized in that, The fault repair for the remote communication module based on the aforementioned fault type includes: The anomaly type is determined to be either a network card anomaly of the remote communication module or a probe program anomaly. If the exception type is a network card exception, then restart the remote communication module; if the exception type is a probe program exception, then initialize the probe program and then rerun the probe program.
7. A self-testing device for a probe equipment, characterized in that, include: An acquisition module is used to acquire the network status of the remote communication module and the configuration information of the probe program, wherein the probe program runs in the remote communication module; The positioning module is used to locate the anomaly type of the remote communication module based on the network status and the configuration information; A repair module is used to repair the remote communication module for the type of anomaly. The positioning module includes a first positioning unit, used to determine whether the remote communication module is in a normal network connection state based on the network status; if the remote communication module is in a normal network connection state, it obtains the dial-up network card IP address of the remote communication module and reads the local IP address of the remote communication module from the configuration information; it determines whether the dial-up network card IP address is consistent with the local IP address in the configuration information; if the dial-up network card IP address is inconsistent with the local IP address in the configuration information, it determines that the abnormality type is a first probe program abnormality, and the first probe program abnormality is that the probe program has not updated the local IP address in the configuration information.
8. An electronic device, characterized in that, It includes a processor, a communication interface, a memory, and a communication bus, wherein the processor, communication interface, and memory communicate with each other through the communication bus; wherein: Memory, used to store computer programs; A processor for executing the method steps of any one of claims 1 to 6 by running a program stored in memory.
9. A storage medium, characterized in that, The storage medium includes a stored program, wherein the program, when executed, performs the method steps of any one of claims 1 to 6.