Equipment maintenance method, system and electronic equipment
By using gateway devices and servers in IoT devices for remote troubleshooting and program repair, the problem of difficult maintenance of robots and other devices in harsh environments is solved, and fast and efficient remote maintenance is achieved.
Patent Information
- Application Number
- CN202111144508.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Priority Date
- 2021-09-13
- Filing Date
- 2021-09-28
- Publication Date
- 2024-11-26
- Estimated Expiration
- 2041-09-28
AI Technical Summary
In the prior art, when an abnormal situation occurs during operation of the Internet of Things equipment, operators are required to go to the site to debug the equipment, but the working environment of robots and other equipment is harsh and is not suitable for on-site debugging, resulting in low maintenance efficiency.
Send fault diagnosis instructions to terminal devices through gateway devices, upload log files to determine the cause of the failure, and perform program repairs through the server to realize remote maintenance and shorten maintenance cycles.
It realizes remote and rapid fault location and repair of terminal equipment, reduces the demand for on-site debugging, improves maintenance efficiency, and is suitable for equipment maintenance in harsh environments.
Smart Images

Figure CN113783739B_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of Internet technology, and more specifically, to a device maintenance method, system and electronic device. Background Art
[0002] In the prior art, IoT devices may encounter abnormal situations during operation, and operators are required to debug the devices on site. However, in the robotics industry, the working environment of robots is sometimes harsh, so it is not suitable for on-site debugging. Summary of the invention
[0003] The embodiment of the present application provides a device maintenance method to achieve remote maintenance of equipment and shorten the maintenance cycle.
[0004] A first aspect of an embodiment of the present application provides a device maintenance method, including:
[0005] Sending a device fault diagnosis instruction to the terminal device through the gateway device; sending the device fault diagnosis instruction triggers the terminal device to upload a log file through the gateway device according to the device fault diagnosis instruction;
[0006] Determine the cause of the terminal device failure based on the log file; wherein the log file includes the operation information and error record of the terminal device;
[0007] According to the cause of the fault, the running program of the terminal device stored locally is repaired, and after the repair is completed, a program upgrade instruction is sent to the terminal device through the gateway device.
[0008] In one embodiment, sending a device fault diagnosis instruction to a terminal device through a gateway device includes:
[0009] The device fault diagnosis instruction is stored in the first message queue, so that the gateway device obtains the device fault diagnosis instruction from the first message queue and forwards the device fault diagnosis instruction to the terminal device.
[0010] In one embodiment, the device maintenance method further includes:
[0011] If the log file does not include the operation information or error record of the terminal device, a first preset debugging instruction is sent to the terminal device through the gateway device, and the terminal device generates a second log file according to the first preset debugging instruction;
[0012] Determine the cause of the failure of the terminal device based on the second log file uploaded by the gateway device.
[0013] In one embodiment, after sending a program upgrade instruction to the terminal device through the gateway device to trigger the terminal device to obtain the repaired running program through the gateway device, the device maintenance method further includes:
[0014] Sending a second preset debugging instruction to the terminal device through the gateway device, triggering the terminal device to generate a third log file according to the second preset debugging instruction;
[0015] According to the third log file forwarded by the gateway device, it is determined whether the terminal device failure has been eliminated.
[0016] A second aspect of the embodiment of the present application provides a device maintenance method, including:
[0017] Receive device fault diagnosis instructions forwarded by the gateway device;
[0018] Based on the device fault diagnosis instructions, the log file is uploaded to the server through the gateway device, and the server repairs the program according to the log file and returns the program upgrade instructions; the log file includes the operation information and error records of the terminal device;
[0019] Based on the program upgrade instruction forwarded by the gateway device, the repaired running program of the terminal device is obtained through the gateway device, and the locally stored running program is replaced with the repaired running program.
[0020] In one embodiment, based on the device fault diagnosis instruction, uploading the log file to the server through the gateway device includes:
[0021] The log file is uploaded to the gateway device, triggering the gateway device to store the log file in the second message queue, so that the server obtains the log file from the second message queue.
[0022] In one embodiment, the device maintenance method further includes:
[0023] If the log file does not include the operation information or error record of the terminal device, receiving a first preset debugging instruction forwarded by the gateway device;
[0024] A second log file is generated according to the first preset debugging instruction, and the second log file is uploaded to the server through the gateway device, triggering the server to determine the cause of the failure of the terminal device according to the second log file.
[0025] In one embodiment, based on the program upgrade instruction forwarded by the gateway device, after obtaining the repaired running program of the terminal device through the gateway device and replacing the locally stored running program with the repaired running program, the device maintenance method further includes:
[0026] receiving a second preset debugging instruction forwarded by the gateway device, and generating a third log file according to the second preset debugging instruction;
[0027] The third log file is uploaded to the server through the gateway device, triggering the server to determine whether the terminal device fault is eliminated based on the third log file.
[0028] A third aspect of the embodiments of the present application provides an equipment maintenance system, including:
[0029] Gateway device;
[0030] The server side, a network connection gateway device, is used to send device fault diagnosis instructions to the terminal device through the gateway device;
[0031] Terminal device, network connection gateway device, used to upload log files to the server through the gateway device based on device fault diagnosis instructions;
[0032] The server is also used to determine the cause of the failure of the terminal device according to the log file, repair the running program of the terminal device stored locally according to the cause of the failure, and send a program upgrade instruction to the terminal device through the gateway device; wherein the log file includes the running information and error record of the terminal device;
[0033] The terminal device is also used to obtain the repaired running program of the terminal device through the gateway device based on the program upgrade instruction, and replace the locally stored running program with the repaired running program.
[0034] A fourth aspect of the embodiments of the present application provides an electronic device, including:
[0035] processor;
[0036] a memory for storing processor-executable instructions;
[0037] The processor is configured to execute the above-mentioned device maintenance method.
[0038] The technical solution provided by the above-mentioned embodiments of the present application can remotely send diagnostic operation instructions to the terminal device, quickly locate the fault problem of the terminal device, realize remote maintenance of the terminal device, and shorten the maintenance cycle. BRIEF DESCRIPTION OF THE DRAWINGS
[0039] In order to more clearly illustrate the technical solutions of the implementation methods of the present application, the drawings required for use in the implementation methods of the present application will be briefly introduced below. It should be understood that the following drawings only show certain implementation methods of the present application and therefore should not be regarded as limiting the scope. For ordinary technicians in this field, other related drawings can be obtained based on these drawings without paying creative work.
[0040] Figure 1 A network architecture diagram of the equipment maintenance system provided in the embodiment of the present application;
[0041] Figure 2 A schematic diagram of the structure of an electronic device provided in an embodiment of the present application;
[0042] Figure 3 A schematic diagram of the workflow of the equipment maintenance method provided in the embodiment of the present application;
[0043] Figure 4 A schematic diagram of a process flow of a device maintenance method provided in an embodiment of the present application;
[0044] Figure 5 A schematic diagram of a process flow of a device maintenance method provided in an embodiment of the present application;
[0045] Figure 6 A schematic diagram of a process flow of a device maintenance method provided in an embodiment of the present application;
[0046] Figure 7 A flowchart of a device maintenance method provided in an embodiment of the present application. DETAILED DESCRIPTION
[0047] The technical solutions in the embodiments of the present application will be described below in conjunction with the accompanying drawings in the embodiments of the present application.
[0048] Similar reference numerals and letters represent similar items in the following drawings, so once an item is defined in one drawing, it does not need to be further defined and explained in subsequent drawings. At the same time, in the description of this application, the terms "first", "second", etc. are only used to distinguish the description and cannot be understood as indicating or implying relative importance.
[0049] Figure 1 This is a network architecture diagram of the equipment maintenance system provided in the embodiment of the present application. Figure 1 As shown, the equipment maintenance system includes a server 10, a gateway device 20 and a terminal device 30. The gateway device 20 is connected to the server 10 via a network, and the terminal device 30 is connected to the gateway device 20 via a network. The server 10 can be a server, a server cluster, a desktop computer, etc.; the terminal device 30 can be a robot, an intelligent transport vehicle, etc.
[0050] The server 10 is used to send a device fault diagnosis instruction to the terminal device 30 through the gateway device 20; the terminal device 30 is used to upload a log file to the server 10 through the gateway device 20 based on the device fault diagnosis instruction; the server 10 is also used to determine the cause of the fault of the terminal device 30 according to the log file, and according to the cause of the fault, repair the locally stored running program of the terminal device 30, and send a program upgrade instruction to the terminal device 30 through the gateway device 20; the terminal device 30 is also used to obtain the repaired running program of the terminal device 30 through the gateway device 20 based on the program upgrade instruction, and replace the locally stored running program with the repaired running program.
[0051] Figure 2 This is a schematic diagram of the structure of an electronic device provided in an embodiment of the present application. Figure 2 As shown, the electronic device 40 includes: at least one processor 43 and a memory, Figure 2 Taking one as an example, the memory 41 and the processor 43 are connected via a bus. The memory 41 stores instructions that can be executed by the processor 43, and the instructions are executed by the processor 43 so that the electronic device 40 can execute all or part of the processes in the following embodiments. In one embodiment, the electronic device 40 can be the above-mentioned server 10, which is used to execute the device maintenance method applied to the server 10. In one embodiment, the electronic device 40 can be the above-mentioned terminal device, which is used to execute the device maintenance method applied to the terminal device 30.
[0052] The processor 202 may be a device including a central processing unit (CPU), a graphics processing unit (GPU), or other forms of processing units having data processing capabilities and / or instruction execution capabilities, and may process data of other components in the electronic device 200, and may also control other components in the electronic device 200 to perform desired functions.
[0053] The memory 204 may include one or more computer program products, and the computer program product may include various forms of computer-readable storage media, such as volatile memory and / or non-volatile memory. The volatile memory may include, for example, random access memory (RAM) and / or cache memory (cache), etc. The non-volatile memory may include, for example, read-only memory (ROM), hard disk, flash memory, etc. One or more computer program instructions may be stored on the computer-readable storage medium, and the processor 202 may run the program instructions to implement the device maintenance method described below. Various applications and various data, such as various data used and / or generated by the application, may also be stored in the computer-readable storage medium.
[0054] Figure 3 A schematic diagram of the workflow of the device maintenance method provided in the embodiment of the present application. In the prior art, taking the terminal device 30 as a robot, when the robot fails in operation, the operator needs to go to the site to debug the robot, but sometimes the working environment of the robot is relatively harsh, so it is not suitable for on-site debugging, so a method for remotely debugging the terminal device is provided in the present application. The specific method is: when the terminal device 30 fails, the service end 10 remotely sends a fault diagnosis instruction to the terminal device 30, obtains the relevant log file carrying the terminal device operation information from the terminal device 30; and determines the cause of the failure of the terminal device according to the relevant log file, and repairs the operating program of the terminal device according to the cause of the failure, so as to realize remote maintenance of the device.
[0055] In one embodiment, the device maintenance method provided in this application can be applied to different network situations. When the terminal device is located in its private local area network and the server is located in the external network, the server can remotely maintain the terminal device by using a gateway device; when the terminal device and the server are in the same network situation, the server can directly perform device maintenance on the terminal device.
[0056] First embodiment
[0057] Figure 4 The flowchart of the device maintenance method provided in the embodiment of the present application is applied to the server. Figure 4 As shown, when the terminal device is located in its private local area network and the server is located in the external network, the device maintenance method includes the following steps S201-S203.
[0058] Step S201: the server sends a device fault diagnosis instruction to the terminal device through the gateway device. The sending of the device fault diagnosis instruction triggers the terminal device to upload a log file through the gateway device according to the device fault diagnosis instruction.
[0059] Taking the robot as an example, the robot controller is usually installed with an operating system to facilitate programming and control of the robot. The robot can execute corresponding functional instructions according to the preset running program. However, during the operation of the robot, there will be problems such as program errors and damaged accessories. Therefore, in order to make the robot work normally, it is necessary to repair the fault in time.
[0060] When a terminal device fails, the server can send a device fault diagnosis instruction to the terminal device through the gateway device. The device fault diagnosis instruction is used to instruct the terminal device that the server starts to handle its device fault problem. After receiving the device fault diagnosis instruction sent by the server, the terminal device will upload its log file to the server through the gateway device, so that the server can accurately determine the cause of the terminal device failure.
[0061] In one embodiment, the specific method for the terminal device to upload the log file to the server is: a proxy service software is installed in the terminal device; the gateway device can read the log file in the terminal device through the corresponding HTTP address according to the instruction of the server, and upload the log file to the server after reading, which is conducive to remote device maintenance.
[0062] In one embodiment, in order to prevent the terminal device from executing malicious instructions, the terminal device will first perform a security check when receiving a device fault diagnosis instruction, and upload a log file to the server through the gateway device after confirming that the above instruction is legal.
[0063] In one embodiment, the proxy service software is NGINX.
[0064] Step S202: The server determines the cause of the failure of the terminal device according to the log file; wherein the log file includes the operation information and error record of the terminal device.
[0065] The log file includes the operation information and error records of the terminal device. The operation information includes the operation trajectory, posture data and corresponding sensor values of the terminal device. Therefore, the server can locate the cause of the terminal device failure by analyzing the log file.
[0066] Step S203: The server repairs the running program of the terminal device stored locally according to the cause of the failure, and sends a program upgrade instruction to the terminal device through the gateway device after the repair is completed.
[0067] The server stores the running program of the terminal device. Therefore, when the terminal device fails due to an error in the running program, the server eliminates the running failure of the terminal device by repairing the running program of the terminal device stored locally.
[0068] When the terminal device running program is repaired, the server will send a program upgrade instruction to the terminal device through the gateway device, instructing the terminal device to download the repaired new version of the terminal device running program according to the relevant information in the program upgrade instruction.
[0069] In one embodiment, the program upgrade instruction carries the download address of the new version of the terminal device running program. The terminal device can obtain the new version of the running program through the gateway device according to the above address information, and use the new version of the running program to replace the locally stored running program. The terminal device resumes operation and continues to execute the corresponding functional instructions according to the new version of the running program.
[0070] In one embodiment, when the failure problem of the terminal device is a hardware problem, the server can also remotely locate the cause of the failure of the terminal device by analyzing the log file, so that maintenance personnel can replace worn parts in time without having to debug the terminal device on site to determine the cause of the equipment failure, thereby saving maintenance time.
[0071] Figure 5 The flowchart of the device maintenance method provided in the embodiment of the present application is applied to the terminal device. When the terminal device is located in its private local area network and the server is located in the external network, such as Figure 5 As shown, the equipment maintenance method includes the following steps S301-S303.
[0072] Step S301: The terminal device receives a device fault diagnosis instruction forwarded by a gateway device.
[0073] When a terminal device fails, the server will send a device fault diagnosis instruction to the terminal device through the gateway device. The device fault diagnosis instruction is used to instruct the terminal device and the server starts to handle its device fault problem.
[0074] Step S302: Based on the device fault diagnosis instruction, the terminal device uploads the log file to the server through the gateway device, and the server repairs the program according to the log file and returns the program upgrade instruction; wherein the log file includes the operation information and error record of the terminal device.
[0075] After receiving the device fault diagnosis instruction sent by the server, the terminal device will upload its log file to the server through the gateway device. The log file includes the operation information and error records of the terminal device, so the server can determine the cause of the terminal device failure based on the log file. After determining the cause of the failure, the server will repair the terminal device's operating program stored locally to eliminate the terminal device's operating failure.
[0076] Step S303: Based on the program upgrade instruction forwarded by the gateway device, the terminal device obtains the repaired running program of the terminal device through the gateway device, and replaces the locally stored running program with the repaired running program.
[0077] When the terminal device running program is repaired, the server will send a program upgrade instruction to the terminal device through the gateway device. The program upgrade instruction instructs the terminal device to download the repaired new version of the running program, and use the new version of the running program to replace the locally stored running program, so that the terminal device continues to execute the corresponding function instructions according to the new version of the running program.
[0078] In one embodiment, when the running program of the terminal device needs to be updated, such as adding a function instruction, the server can send a program update instruction to the terminal device through the gateway device, so that the terminal device obtains the updated running program through the gateway device and executes a new operation process according to the updated running program.
[0079] This embodiment provides a device maintenance method, which is convenient for operators to remotely perform device maintenance on terminal devices, so that operators do not need to debug terminal devices on site, thereby improving maintenance conditions and shortening maintenance cycles.
[0080] In one embodiment, when the terminal device and the server are in the same network condition, the server side maintains the terminal device in the following manner: the terminal device receives the device fault diagnosis instruction issued by the server side, and uploads the log file to the server side according to the device fault diagnosis instruction. The server side determines the fault problem of the terminal device according to the log file, and repairs the running program of the terminal device stored locally according to the fault problem. After the repair is completed, the program upgrade instruction is returned to the terminal device, and the terminal device obtains the repaired running program according to the program upgrade instruction.
[0081] Second embodiment
[0082] Figure 6The flowchart of the device maintenance method provided in the embodiment of the present application is applied to the server. When the terminal device is located in its private local area network and the server is located in the external network, such as Figure 6 As shown, the equipment maintenance method includes the following steps S401-S405.
[0083] Step S401: The server stores the device fault diagnosis instruction in the first message queue, enables the gateway device to obtain the device fault diagnosis instruction from the first message queue, and forwards the device fault diagnosis instruction to the terminal device. The sending of the device fault diagnosis instruction triggers the terminal device to upload the log file through the gateway device according to the device fault diagnosis instruction.
[0084] When a terminal device fails, the server sends a device fault diagnosis instruction to the terminal device through the gateway device. The specific sending method is: the server stores the device fault diagnosis instruction in the first message queue; the gateway device obtains the device fault diagnosis instruction from the first message queue and forwards the device fault diagnosis instruction to the terminal device. Storing the device fault diagnosis instruction in the message queue can avoid interference with network communication during maintenance, avoid message loss, and increase maintenance time.
[0085] The device fault diagnosis instruction is used to instruct the terminal device and the server to start processing its device fault problem. After receiving the device fault diagnosis instruction sent by the server, the terminal device will upload its log file to the server through the gateway device, so that the server can accurately determine the cause of the robot's failure.
[0086] In one embodiment, the specific method for the terminal device to upload the log file to the server is: a proxy service software is installed in the terminal device; the gateway device can read the log file in the terminal device through the corresponding HTTP address according to the instructions of the server, and upload the log file to the server after reading. This method is conducive to remote device maintenance.
[0087] In one embodiment, the gateway device communicates with the server through a message queue Sub / Pub mechanism.
[0088] In one embodiment, in order to prevent the terminal device from executing malicious instructions, the terminal device will first perform a security check when receiving a device fault diagnosis instruction, and upload a log file to the server through the gateway device after confirming that the above instruction is legal.
[0089] Step S402: If the log file does not include the operation information or error record of the terminal device, the server sends a first preset debugging instruction to the terminal device through the gateway device, and the terminal device generates a second log file according to the first preset debugging instruction.
[0090] The log file includes the operation information and error records of the terminal device. The operation information includes the operation trajectory, posture data and corresponding sensor values of the terminal device. Therefore, the server can determine the cause of the terminal device failure by analyzing the log file; but because the internal storage space of the terminal device is limited, the operation information or error records in the log file will be cleaned up regularly.
[0091] Therefore, when the log file obtained by the terminal device does not include operation information or error records, the server will send a first preset debugging instruction to the terminal device through the gateway device. The first preset debugging instruction instructs the terminal device to execute the preset instruction action to regenerate the second log file; wherein the second log file is a log file regenerated by the terminal device according to the first preset instruction.
[0092] Step S403: The server determines the cause of the failure of the terminal device according to the second log file uploaded by the gateway device.
[0093] After the terminal device generates the second log file, it will upload the log file to the server through the gateway device. The server determines the cause of the terminal device failure based on the second log file.
[0094] The second log file includes the operation information and error records of the terminal device. The operation information includes the operation trajectory, posture data and corresponding sensor values of the terminal device. Therefore, the server can locate the cause of the terminal device failure by analyzing the second log file.
[0095] Step S404: the server repairs the running program of the terminal device stored locally according to the cause of the failure, and sends a program upgrade instruction to the terminal device through the gateway device after the repair is completed.
[0096] The server stores the running program of the terminal device. Therefore, when the terminal device fails due to an error in the running program, the server eliminates the running failure of the terminal device by repairing the running program of the terminal device stored locally.
[0097] When the terminal device running program is repaired, the server will send a program upgrade instruction to the terminal device through the gateway device, instructing the terminal device to download the repaired new version of the terminal device running program according to the relevant information in the program upgrade instruction.
[0098] In one embodiment, the program upgrade instruction carries the download address of the new version of the terminal device running program. The terminal device can obtain the new version of the running program through the gateway device according to the above address information, and use the new version of the running program to replace the locally stored running program. The terminal device resumes operation and continues to execute the corresponding functional instructions according to the new version of the running program.
[0099] In one embodiment, when the failure problem of the terminal device is a hardware problem, the server can also remotely locate the cause of the failure of the terminal device by analyzing the second log file, so that maintenance personnel can replace damaged parts in time without having to debug the terminal device on site to determine the cause of the equipment failure, thereby saving maintenance time.
[0100] Step S405: the server sends a second preset debugging instruction to the terminal device through the gateway device, triggering the terminal device to generate a third log file according to the second preset debugging instruction; the server determines whether the terminal device fault is eliminated according to the third log file forwarded by the gateway device.
[0101] When the terminal device obtains the new version of the operating program, it will resume operation and continue to execute the corresponding functional instructions. At this time, the remote maintenance personnel can determine whether the equipment fault has been eliminated in the following way: use the server to send a second preset debugging instruction to the terminal device, and the second preset debugging instruction is forwarded to the terminal device by the gateway device to instruct the terminal device to generate operating information according to the preset operating instruction, and the operating information is stored in the third log file. The third log file will be forwarded to the server through the gateway device, and the server can determine whether the terminal device fault has been eliminated based on the operating information and error records in the third log file.
[0102] Figure 7 The flowchart of the device maintenance method provided in the embodiment of the present application is applied to the terminal device. When the terminal device is located in its private local area network and the server is located in the external network, such as Figure 7 As shown, the equipment maintenance method includes the following steps S501-S505:
[0103] Step S501: The terminal device receives a device fault diagnosis instruction forwarded by a gateway device.
[0104] When a terminal device fails, the server will send a device fault diagnosis instruction to the terminal device through the gateway device. The device fault diagnosis instruction is used to instruct the terminal device and the server starts to handle its device fault problem.
[0105] Step S502: the terminal device uploads the log file to the gateway device, triggering the gateway device to store the log file in the second message queue, so that the server obtains the log file from the second message queue.
[0106] After receiving the device fault diagnosis instruction issued by the server, the terminal device will upload the log file to the server. The specific method is as follows: the terminal device uploads the log file to the gateway device, triggering the gateway device to store the log file in the second message queue, so that the server obtains the log file from the second message queue. Storing the log file in the message queue can avoid interference with network communication during maintenance, avoid file loss, and increase maintenance time.
[0107] In one embodiment, the gateway device communicates with the server through a message queue Sub / Pub mechanism.
[0108] Step S503: If the log file does not include the operation information or error record of the terminal device, the terminal device receives a first preset debugging instruction forwarded by the gateway device.
[0109] When the log file acquired by the terminal device does not include operation information or error records, the server sends a first preset debugging instruction to the terminal device through the gateway device.
[0110] Step S504: The terminal device generates a second log file according to the first preset debugging instruction, and uploads the second log file to the server through the gateway device, triggering the server to determine the cause of the terminal device failure according to the second log file, and the server performs program repair according to the cause of the failure and returns a program upgrade instruction.
[0111] The first preset debugging instruction instructs the terminal device to execute the preset instruction action to regenerate the second log file; wherein the second log file is a log file regenerated by the terminal device according to the first preset instruction. After the second log file is generated, the terminal device uploads the second log file to the server through the gateway device. The server determines the cause of the failure of the terminal device based on the second log file, and performs program repair according to the cause of the failure to eliminate the device failure of the terminal device.
[0112] Step S505: the terminal device receives the second preset debugging instruction forwarded by the gateway device, generates a third log file according to the second preset debugging instruction, uploads the third log file to the server through the gateway device, and triggers the server to determine whether the terminal device fault is eliminated according to the third log file.
[0113] When the terminal device obtains the new version of the operating program, it will resume operation and continue to execute the corresponding functional instructions. At this time, the remote maintenance personnel can determine whether the equipment fault has been eliminated in the following way: use the server to send a second preset debugging instruction to the terminal device, and the second preset debugging instruction is forwarded to the terminal device by the gateway device to instruct the terminal device to generate operating information according to the preset operating instruction, and the operating information is stored in the third log file. The third log file will be forwarded to the server through the gateway device, and the server can determine whether the terminal device fault has been eliminated based on the operating information and error records in the third log file.
[0114] In one embodiment, when the terminal device is in a local area network and any terminal device cannot access the network, the server can remotely log in to the terminal device through the preset port of the proxy terminal device to facilitate remote maintenance of the device. The specific proxy method is that the server remotely logs in to the proxy service software installed in the terminal device, and remotely logs in to the preset port of the terminal device through the proxy service software to achieve remote maintenance of the terminal device.
[0115] In one embodiment, when the terminal device and the server are in the same network condition, the server's maintenance method for the terminal device is: the server stores the device fault diagnosis instruction in a first message queue, the terminal device obtains the device fault diagnosis instruction from the first message queue, the terminal device uploads the log file to the second message queue according to the device fault diagnosis instruction, and the server obtains the log file from the second message queue. The server determines the fault problem of the terminal device based on the log file, and repairs the locally stored running program of the terminal device according to the fault problem. After the repair is completed, the program upgrade instruction is returned to the terminal device, and the terminal device obtains the repaired running program according to the program upgrade instruction.
[0116] This embodiment provides a device maintenance method, which is convenient for operators to remotely perform device maintenance on terminal devices, so that operators do not need to debug terminal devices on site, thereby improving maintenance conditions and shortening maintenance cycles.
[0117] In several embodiments provided in the present application, the disclosed device and method can also be implemented in other ways. The device implementation described above is only schematic. For example, the flowchart and block diagram in the accompanying drawings show the possible architecture, functions and operations of the device, method and computer program product according to multiple embodiments of the present application. In this regard, each box in the flowchart or block diagram can represent a module, a program segment or a part of the code, and a part of the module, program segment or code contains one or more executable instructions for implementing the specified logical function. In some alternative implementations, the functions marked in the box can also occur in a different order from the order marked in the accompanying drawings. For example, two consecutive boxes can actually be executed substantially in parallel, and they can sometimes be executed in the opposite order, depending on the functions involved. It should also be noted that each box in the block diagram and / or flowchart, and the combination of boxes in the block diagram and / or flowchart can be implemented with a dedicated hardware-based system that performs a specified function or action, or can be implemented with a combination of dedicated hardware and computer instructions.
[0118] In addition, the functional modules in each embodiment of the present application may be integrated together to form an independent part, or each module may exist separately, or two or more modules may be integrated to form an independent part.
[0119] If the function is implemented in the form of a software function module 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 application can be essentially or partly embodied in the form of a software product that contributes to the prior art. The computer software product is stored in a storage medium and includes 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 each implementation method of the present application. 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 and other media that can store program codes.
Claims
1. A method for equipment maintenance, characterized in that: The method comprises: Sending a device fault diagnosis instruction to a terminal device through a gateway device; sending the device fault diagnosis instruction triggers the terminal device to upload a log file through the gateway device according to the device fault diagnosis instruction; Determine the cause of the failure of the terminal device according to the log file; wherein the log file includes the operation information and error record of the terminal device; According to the cause of the fault, repair the running program of the terminal device stored locally, and after the repair is completed, send a program upgrade instruction to the terminal device through the gateway device; If the log file does not include the operation information or error record of the terminal device, sending a first preset debugging instruction to the terminal device through the gateway device, and the terminal device generates a second log file according to the first preset debugging instruction; Determining the cause of the failure of the terminal device according to the second log file uploaded by the gateway device; After repairing the locally stored running program of the terminal device according to the fault cause, and sending a program upgrade instruction to the terminal device through the gateway device after the repair is completed, the method further includes: Sending a second preset debugging instruction to the terminal device through the gateway device, triggering the terminal device to generate a third log file according to the second preset debugging instruction; Determining whether the terminal device fault is eliminated according to the third log file forwarded by the gateway device; Wherein, the terminal device performs a safety check after receiving the device fault diagnosis instruction.
2. The equipment maintenance method according to claim 1, characterized in that: The sending of a device fault diagnosis instruction to a terminal device through a gateway device includes: The device fault diagnosis instruction is stored in a first message queue, so that the gateway device obtains the device fault diagnosis instruction from the first message queue, and forwards the device fault diagnosis instruction to the terminal device.
3. A method for equipment maintenance, characterized in that: The method comprises: Receive device fault diagnosis instructions forwarded by the gateway device; Based on the device fault diagnosis instruction, the log file is uploaded to the server through the gateway device, and the server performs program repair according to the log file and returns a program upgrade instruction; wherein the log file includes the operation information and error record of the terminal device; Based on the program upgrade instruction forwarded by the gateway device, the repaired running program of the terminal device is obtained through the gateway device, and the locally stored running program is replaced with the repaired running program; The method further comprises: If the log file does not include the operation information or error record of the terminal device, receiving a first preset debugging instruction forwarded by the gateway device; Generate a second log file according to the first preset debugging instruction, and upload the second log file to the server through the gateway device, triggering the server to determine the cause of the failure of the terminal device according to the second log file; After obtaining the repaired running program of the terminal device through the gateway device based on the program upgrade instruction forwarded by the gateway device and replacing the locally stored running program with the repaired running program, the method further includes: receiving a second preset debugging instruction forwarded by the gateway device, and generating a third log file according to the second preset debugging instruction; Uploading the third log file to the server through the gateway device, triggering the server to determine whether the terminal device fault is eliminated according to the third log file; Wherein, a safety check is performed after receiving the equipment fault diagnosis instruction.
4. The equipment maintenance method according to claim 3, characterized in that: The uploading of the log file to the server through the gateway device based on the device fault diagnosis instruction includes: The log file is uploaded to the gateway device, triggering the gateway device to store the log file in a second message queue, so that the server obtains the log file from the second message queue.
5. An equipment maintenance system, characterized in that: The system comprises: Gateway device; The server is connected to the gateway device through a network and is used to send a device fault diagnosis instruction to the terminal device through the gateway device; A terminal device, connected to the gateway device through a network, for uploading a log file to the server through the gateway device based on the device fault diagnosis instruction; The server is further configured to determine the cause of the failure of the terminal device according to the log file, repair the running program of the terminal device stored locally according to the cause of the failure, and send a program upgrade instruction to the terminal device through the gateway device; wherein the log file includes the running information and error record of the terminal device; The terminal device is further configured to obtain, through the gateway device, a repaired running program of the terminal device based on the program upgrade instruction, and replace the locally stored running program with the repaired running program; The server is further configured to send a first preset debugging instruction to the terminal device through the gateway device if the log file does not include the operation information or error record of the terminal device, and the terminal device generates a second log file according to the first preset debugging instruction; Determining the cause of the failure of the terminal device according to the second log file uploaded by the gateway device; The server is further configured to send a second preset debugging instruction to the terminal device through the gateway device, triggering the terminal device to generate a third log file according to the second preset debugging instruction; Determining whether the terminal device fault is eliminated according to the third log file forwarded by the gateway device; Wherein, the terminal device performs a safety check after receiving the device fault diagnosis instruction.
6. An electronic device, characterized in that: The electronic device comprises: processor; a memory for storing processor-executable instructions; Wherein, the processor is configured to execute the equipment maintenance method described in any one of claims 1-4.
