Upper computer self-checking method and system, electronic equipment and storage medium

The upper computer performs self-test steps and automatically detects faults, solving the problem of long-term manual detection and improving production efficiency.

CN120178840APending Publication Date: 2025-06-20BATTEROTECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202510318784.0
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-03-18
Publication Date
2025-06-20

AI Technical Summary

Technical Problem

In the prior art, upper-level computer fault detection requires manual inspection, which takes a long time and affects production efficiency.

Method used

The self-test steps are performed through the host computer, including obtaining its own IP address, establishing a connection with the MES, obtaining firewall status information, and detecting the IP address of the torque gun. Fault detection is performed based on the self-test results, without manual participation.

Benefits of technology

Saves the duration of fault detection, improves production efficiency, and realizes an automated fault detection process.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120178840A_ABST
    Figure CN120178840A_ABST
Patent Text Reader

Abstract

The embodiment provides an upper computer self-checking method and system, electronic equipment and a storage medium, and the upper computer executes at least one of the following self-checking steps: obtaining a first IP address of the upper computer, and establishing connection with at least one MES to determine whether each MES is connected abnormally; according to the method, the state information of the firewall is acquired to determine whether the firewall is opened, the second IP address of the torque gun connected to the upper computer is detected, fault detection is performed on the upper computer based on the self-inspection result of the at least one self-inspection step, and the whole process does not need manual participation, so that the time of fault detection is saved, and the production efficiency is improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of electronic technology, and particularly to a method and system for self-checking of a host computer, an electronic device, and a storage medium. Background Art

[0002] During the battery production process, the host computer is communicatively connected to a factory-level Manufacturing Execution System (MES), a line-level MES, and a torque gun. The host computer is used to control the operation of the torque gun and process the feedback data from the factory-level MES and the line-level MES. The host computer, the factory-level MES, the line-level MES, and the torque gun cooperate with each other to ensure the efficiency and quality of the production process. If a fault occurs in the host computer, it is necessary to perform a fault detection on the host computer to determine the cause of the fault.

[0003] In the prior art, the various functions of the host computer are usually manually checked to perform a fault detection on the host computer. However, the existing manual checking method takes a long time and affects the production efficiency. Summary of the Invention

[0004] This application provides a method and system for self-checking of a host computer, an electronic device, and a storage medium. At least one self-check step is executed by the host computer, and a fault detection is performed on the host computer based on the self-check results of at least one self-check step. The entire process does not require manual participation, thereby saving the time for fault detection and improving the production efficiency.

[0005] In a first aspect, this application provides a method for self-checking of a host computer. The host computer is respectively connected to at least one MES and a torque gun. The method includes:

[0006] The host computer executes at least one of the following self-check steps:

[0007] Obtain a first Internet Protocol (IP) address of the host computer;

[0008] Establish a connection with the at least one MES and determine whether each MES has an abnormal connection;

[0009] Obtain the status information of the firewall and determine whether the firewall is enabled;

[0010] Detect a second IP address of the torque gun connected to the host computer;

[0011] The host computer performs a fault detection on the host computer based on the self-check results of the at least one self-check step.

[0012] In some embodiments, the obtaining of the first IP address of the host computer includes:

[0013] Establish a connection with a preset virtual server based on the User Datagram Protocol (UDP);

[0014] After the connection is successfully established, receive the first IP address sent by the virtual server.

[0015] In some embodiments, establishing a connection with the at least one MES and determining whether each MES has an abnormal connection includes:

[0016] For each MES, send a connection establishment request to the MES based on the Transmission Control Protocol (TCP) and the third IP address of the MES;

[0017] If a response message sent by the MES is received within a preset time, it is determined that there is no abnormal connection between the host computer and the MES;

[0018] If a response message sent by the MES is not received within a preset time, it is determined that there is an abnormal connection between the host computer and the MES.

[0019] In some embodiments, obtaining the status information of the firewall and determining whether the firewall is enabled includes:

[0020] Obtain the status information of the firewall through the command-line tool of the windows system;

[0021] Determine whether the firewall is enabled based on the status information of the firewall.

[0022] In some embodiments, determining whether the firewall is enabled based on the status information of the firewall includes:

[0023] Determine whether there is indication information that the firewall is enabled in the status information of the firewall;

[0024] If there is, determine that the firewall is enabled;

[0025] If not, determine that the firewall is not enabled.

[0026] In some embodiments, detecting the second IP address of the torque wrench connected to the host computer includes:

[0027] Allocate a cache area;

[0028] Obtain a plurality of fourth IP addresses through a preset function; wherein, the plurality of fourth IP addresses include the second IP addresses of all torque wrenches;

[0029] Determine the second IP address from all the fourth IP addresses;

[0030] Store the second IP address in the cache area.

[0031] In a second aspect, the present application provides a fault detection system, including: a host computer, at least one execution manufacturing execution system (MES) and a torque gun; the host computer is respectively connected to the at least one MES and the torque gun, and the host computer is configured to execute the method described in the first aspect and any one of the embodiments of the first aspect.

[0032] In a third aspect, the present application provides a host computer self-checking device, including a module for executing the method described in the first aspect and any one of the embodiments of the first aspect.

[0033] In a fourth aspect, the present application provides an electronic device, including a memory and a processor, the memory stores a computer program that can run on the processor, and when the processor executes the program, it implements the method described in the first aspect and any one of the embodiments of the first aspect.

[0034] In a fifth aspect, the present application provides a computer-readable storage medium, on which a computer program is stored, and the computer program is executed by the processor to implement the method described in the first aspect and any one of the embodiments of the first aspect.

[0035] This embodiment provides a host computer self-checking method, system, electronic device and storage medium. Among them, the host computer executes the following at least one self-checking step: obtaining the first IP address of the host computer, establishing a connection with at least one MES to determine whether each MES is abnormally connected; obtaining the status information of the firewall to determine whether the firewall is turned on, detecting the second IP address of the torque gun connected to the host computer, and performing fault detection on the host computer based on the self-checking results of at least one self-checking step. The whole process does not require manual participation, thereby saving the time for fault detection and improving production efficiency. BRIEF DESCRIPTION OF THE DRAWINGS

[0036] Figure 1 It is a flowchart of the implementation of the host computer self-checking method provided by the embodiment of the present application;

[0037] Figure 2 It is a flowchart of the implementation of the host computer self-checking method provided by the embodiment of the present application;

[0038] Figure 3 It is a flowchart of the implementation of the host computer self-checking method provided by the embodiment of the present application;

[0039] Figure 4 It is a flowchart of the implementation of the host computer self-checking method provided by the embodiment of the present application;

[0040] Figure 5 It is a flowchart of the implementation of the host computer self-checking method provided by the embodiment of the present application;

[0041] Figure 6 It is a schematic structural diagram of the fault detection system provided by the embodiment of the present application;

[0042] Figure 7 It is a schematic structural diagram of the host computer self-checking device provided by the embodiment of the present application;

[0043] Figure 8 It is a schematic structural diagram of the electronic device provided by the embodiment of the present application. Specific implementation manners

[0044] During the battery production process, the torque wrench, the factory-level MES, and the line-level MES are respectively connected to the host computer. The host computer, the factory-level MES, the line-level MES, and the torque wrench cooperate with each other to ensure the efficiency and quality of battery production.

[0045] First, the functions of the host computer, the factory-level MES, the line-level MES, and the torque wrench are described.

[0046] The torque wrench is used to receive the task parameters issued by the host computer, perform assembly operations such as tightening the bolts of the battery based on the task parameters issued by the host computer, and feed back the detailed data of each operation to the host computer.

[0047] The line-level MES is used for the management and monitoring of one or several production lines. The line-level MES is connected to the equipment on the production line, collects the production data of the equipment in real time, and sends the production data to the factory-level MES.

[0048] The factory-level MES is the management core of battery manufacturing production and is responsible for analyzing and managing the data of all line-level MESs.

[0049] During the battery production process, the host computer may malfunction. When the host computer malfunctions, the inspection personnel need to check item by item whether the IP of the host computer is correct, whether the communication connections between the line-level MES, the factory-level MES and the host computer are normal, whether the firewall is turned on, and the IP address of the torque wrench. Each step of the above inspection operations requires manual operation by the inspection personnel, which takes a long time and affects the production efficiency.

[0050] Based on this, the present application provides a host computer self-checking method, in which the host computer executes at least one self-checking step without manual participation, thereby saving the time for fault detection and improving the production efficiency.

[0051] Figure 1 It is a flowchart for implementing the host computer self-checking method provided by the present application, as Figure 1 shown, the method includes:

[0052] S101. The host computer executes at least one self-checking step.

[0053] In some embodiments, the host computer can perform at least one self-check step when the host computer reports an error. Among them, the host computer reports an error in the event of a failure.

[0054] In other embodiments, the host computer can also perform at least one self-check step when the product model is switched on the production line.

[0055] Among them, the number of self-check steps is 4, which are respectively:

[0056] Self-check step 1: The host computer obtains its own first IP address.

[0057] Self-check step 2: The host computer establishes a connection with at least one MES and determines whether each MES is abnormally connected.

[0058] Among them, at least one MES includes a factory-level MES and a line-level MES.

[0059] Self-check step 3: The host computer obtains the status information of the firewall and determines whether the firewall is turned on.

[0060] Self-check step 4: The host computer detects the second IP address of the torque gun connected to the host computer.

[0061] In some embodiments, the number of torque guns is greater than or equal to 1. In self-check step 4, the host computer detects the second IP address of each torque gun connected to the host computer.

[0062] The embodiments of the present application do not limit the order of the above 4 self-check steps.

[0063] S102. Based on the self-check results of at least one self-check step, the host computer performs a fault detection on the host computer.

[0064] Specifically, for self-check step 1, after the host computer obtains the first IP address, it determines whether the first IP address is correct. Then the self-check result is whether the first IP address is correct.

[0065] If the self-check result of self-check step 1 is that the first IP address is incorrect, the reasons for the host computer to report an error include that the first IP address of the host computer is incorrect.

[0066] For self-check step 2, the self-check result includes the self-check sub-results corresponding to each MES. For each MES, the self-check sub-result is that the MES is abnormally connected to the host computer or the MES is normally connected to the host computer.

[0067] If the self-check result of self-check step 2 includes that any MES is abnormally connected to the host computer, the reasons for the host computer to report an error include that the MES is abnormally connected to the host computer.

[0068] For self-check step 3, the self-check result is: the firewall is on, or the firewall is off.

[0069] If the self-check result of self-check step 3 is: the firewall is off, the reasons for the host computer to report an error include: the firewall is off.

[0070] For self-check step 4, after the host computer detects the second IP address of the torque wrench connected to the host computer, it determines whether the second IP address is correct, and the self-check result is: whether the second IP address of the torque wrench is correct.

[0071] If the self-check result of self-check step 4 includes that the second IP address of any torque wrench is incorrect, the reasons for the host computer to report an error include: this second IP address is incorrect.

[0072] This embodiment provides a method for self-checking a host computer. Among them, the host computer executes the self-check results of obtaining its own address, determining whether the factory-level MES and line-level MES are abnormally connected, determining whether the firewall is on, and detecting the second IP address of the torque wrench, and performs fault detection on the host computer based on the obtained self-check results of the self-check steps, without manual participation, thereby saving the time for fault detection and improving production efficiency.

[0073] As described above, in the self-check step of the host computer, the host computer needs to detect the first IP address of the host computer. Next, through Figure 2 The embodiment illustrates how to obtain the first IP address of the host computer.

[0074] Figure 2 This is the implementation flowchart of the host computer self-check method provided by the embodiment of the present application. As Figure 2 shown, obtaining the first IP address of the host computer can be achieved through the following steps:

[0075] S201. The host computer establishes a connection with a preset virtual server based on the User Datagram Protocol (UDP).

[0076] Specifically, the host computer sends a local address request message to the virtual server based on UDP.

[0077] Among them, the virtual server is a server predefined for providing the first IP address of the host computer.

[0078] S202. The virtual server sends the first IP address to the host computer.

[0079] Correspondingly, the host computer receives the first IP address sent by the virtual server.

[0080] After the host computer establishes a connection with the virtual server based on UDP, the host computer calls the getsockname function to enable the virtual server to send the first IP address to the host computer.

[0081] In some embodiments, the type of the first IP address of the host computer is an IPV4 address.

[0082] Specifically, the method for the host computer to obtain the first IP address can be implemented by the following Python code:

[0083] import socket

[0084] s = socket.socket(socket.AF_INET, socket.SOCK_DGRAM)

[0085] try:

[0086] s.connect(('1.1.1.1', 80))

[0087] ip = s.getsockname()[0] finally

[0088] print("The local IP address is:", ip)

[0089] In the above code, the socket library is introduced to create a UDP socket. The function s.socket(('1.1.1.1', 80)) is used to create a temporary connection to the virtual server, enabling the host computer to obtain the first IP address of the local machine through the getsocketname function.

[0090] Among them, the virtual server can be a Domain Name Server (DSN). The address of the virtual server is: 1.1.1.1; the port number of the virtual server is: 80.

[0091] In this embodiment, the host computer can complete the operation of obtaining the first IP address of the local machine by executing the python code. Specifically, after the host computer establishes a connection with the virtual server, by executing the getsocketname function, the virtual server will send the first IP address to the host computer.

[0092] As described above, in the self-check step of the host computer, the host computer needs to determine the communication connection status of each MES in the factory-level MES and the line-level MES. Next, through Figure 3 The embodiment exemplarily illustrates how the host computer determines the communication connection status of each MES. Figure 3 This is the implementation flowchart of the host computer self-check method provided by the embodiment of the present application. AsFigure 3 As shown in Figure 3 , for each MES, the following steps can be used to determine whether the connection of the MES is abnormal.

[0093] S301. The host computer sends a connection establishment request to the MES based on TCP and the third IP address of the MES.

[0094] In some embodiments, the host computer sends a connection establishment request to the MES based on the third IP address and the port number of the MES to test the communication status between the host computer and the MES.

[0095] S302. The host computer determines whether the communication connection between the host computer and the MES is abnormal based on whether a response message sent by the MES is received within a preset time.

[0096] The response message is a message sent by the MES based on the connection establishment request, and the response message indicates that the communication connection between the host computer and the MES is normal.

[0097] Specifically, if the host computer receives the response message sent by the MES within the preset time, the host computer determines that the communication connection between the host computer and the MES is normal; if the host computer does not receive the response message sent by the MES within the preset time, the host computer determines that the communication connection between the host computer and the MES is abnormal.

[0098] In some embodiments, the method for the host computer to determine whether the communication connection between the host computer and the MES is abnormal can be implemented by the following Python code:

[0099] import socket

[0100] def test_connection(host, port):

[0101] try:

[0102] s = socket.socket(socket.AF_INET, socket.SOCK_STREAM)

[0103] s.connect((host, port))

[0104] print(f"Communication with the server {host}:{port} is normal.")

[0105] s.close()

[0106] except socket.error as e:

[0107] print(f"Failed to establish a connection with the server {host}:{port}: {e}")

[0108] test_connection('10.16.1.***',*****)

[0109] In the above code, the function test_connection(host, port) is defined to test whether there is an abnormality in the communication connection between the host computer and MES. Among them, host is the third IP address of MES, and port is the port number of MES.

[0110] It should be noted that for different MESs, the third IP address and port number are different.

[0111] Among them, the function test_connection is used to create a TCP socket (SOCK_STREAM), enabling the host computer to send a connection establishment request to the third IP address and port number of MES.

[0112] After determining whether there is an abnormality in the communication connection between the host computer and MES, the test_connection function is called to test the specified remote MES service.

[0113] In this embodiment, for each MES, the corresponding test_connection function of MES can be used to send a connection establishment request to MES, thereby determining whether there is an abnormality in the communication connection between the host computer and MES.

[0114] As described above, in the self-check step of the host computer, the host computer needs to determine the opening status of the firewall, and then through Figure 4 The embodiment exemplarily illustrates how the host computer determines the opening status of the firewall.

[0115] Figure 4 This is the implementation flowchart of the self-check method of the host computer provided by the embodiment of the present application. As Figure 4 shown, it can be described how the host computer determines the opening status of the firewall through the following steps.

[0116] S401. The host computer obtains the status information of the firewall through the command line tool of the windows system.

[0117] In some embodiments, the host computer can start the command line tool through the subprocess module in python to obtain the status information of the firewall.

[0118] S402. The host computer determines whether the firewall is open based on the status information of the firewall.

[0119] Specifically, the host computer determines whether there is an indication message for the firewall to be enabled in the status information of the firewall. If the status information of the firewall includes the indication message for the firewall to be enabled, the host computer determines that the firewall is enabled; if the status information of the firewall does not include the indication message for the firewall to be enabled, the host computer determines that the firewall is not enabled.

[0120] In some embodiments, the host computer can determine whether the firewall is enabled through the following Python code:

[0121] import subprocess

[0122] def is_firewall_enabled():

[0123] result = subprocess.run(['netsh', 'advfirewall','show', 'allprofiles'], stdout = subprocess.PIPE, text = True)

[0124] output = result.stdout

[0125] return "ON" in output.upper()

[0126] print("Whether the firewall is on:", is_firewall_enabled())

[0127] Among them, the subprocess module is used to execute command-line instructions. In the defined function is_firewall_enabled, the function subprocess.run is used to run the Windows network setting command netsh advfirewall show allprofiles to obtain the status information of the firewall.

[0128] If the status information of the firewall contains "ON", it is determined that the firewall is enabled. Among them, "ON" is the indication message for the firewall to be enabled. If the firewall is enabled, the self-check result returns True, and if it is not enabled, the self-check result returns False.

[0129] In this embodiment, the host computer obtains the status information of the firewall through the Windows command-line tool to determine whether the firewall is enabled based on the status information of the firewall.

[0130] As described above, in the self-check step of the host computer, the host computer needs to detect the second IP address of the torque wrench connected to the host computer, and then through Figure 5The embodiments exemplarily illustrate how the host computer detects the second IP address.

[0131] Figure 5 The flowchart of the implementation of the self-checking method of the host computer provided by the embodiments of the present application is shown as Figure 5 shown, and how the host computer detects the second IP address can be described through the following steps.

[0132] S501. The host computer allocates a cache area.

[0133] Among them, the cache area is used to store the second IP address.

[0134] S502. The host computer obtains multiple fourth IP addresses through a preset function.

[0135] Among them, the multiple fourth IP addresses include the second IP addresses of all torque guns.

[0136] In some embodiments, the preset function can be get_local_ip_addresses. Through this function, the fourth IP addresses of all network interfaces of the host computer can be obtained. The fourth IP addresses include the IP addresses of the devices connected to the host computer and the first IP address (local address) of the host computer. Among them, the devices connected to the host computer are at least one torque machine.

[0137] S503. The host computer determines the second IP address from all the fourth IP addresses.

[0138] Specifically, for each fourth IP address, the host computer determines whether the fourth IP address is the local address or an IP address of a non-first type; if the fourth IP address is not the local address and is an IP address of the first type, the fourth IP address is determined as the second IP address. If the fourth IP address is the local address or an IP address of a non-first type, it is determined that the fourth IP address is not the second IP address.

[0139] Among them, the first type of address is the IPv4 address.

[0140] S504. The host computer stores the second IP address in the cache area.

[0141] As described above, after each second IP address is determined, the second IP address is stored in the cache area.

[0142] In some embodiments, the host computer can detect the second IP address through the following python code (where the content after " / / " is the explanation of this line of code):

[0143]

[0144] In the above code, the fourth IP address of all network interfaces of the host computer is obtained through the psutil library. Among them, the function get_local_ip_addresses is used to traverse all network interfaces on the machine to obtain the fourth IP address of all network interfaces of the host computer. Moreover, a judgment is made on the fourth IP address. When the fourth IP address is the second IP address, the fourth IP address is stored in the cache area.

[0145] It should be noted that although the steps of the method in this application are described in a specific order in the accompanying drawings, this does not require or imply that these steps must be executed in this specific order, or that all the steps shown must be executed to achieve the desired result. Additionally or alternatively, some steps may be omitted, multiple steps may be combined into one step for execution, and / or one step may be decomposed into multiple steps for execution, etc.; or, the steps in different embodiments may be combined into a new technical solution.

[0146] Based on the foregoing embodiments, an embodiment of this application provides a fault detection system. Figure 6 It is a schematic structural diagram of the fault detection system provided by an embodiment of this application; as Figure 6 shown, the fault detection system 60 includes a host computer 61, at least one MES 62, and a torque wrench 63; the host computer 61 is respectively connected to at least one MES 62 and the torque wrench 63, and the host computer is used to execute the host computer self-checking method provided by an embodiment of this application.

[0147] Based on the foregoing embodiments, this application provides a host computer self-checking device. The device includes each module included and each unit included in each module, and can be implemented by a processor; of course, it can also be implemented by specific logic circuits; during the implementation process, the processor can be a central processing unit (CPU), a microprocessor (MPU), a digital signal processor (DSP), or a field programmable gate array (FPGA), etc.

[0148] Figure 7 It is a schematic structural diagram of the host computer self-checking device provided by an embodiment of this application, as Figure 7 shown, the host computer self-checking device 70 includes an execution module 71 and a fault detection module 72, where:

[0149] The execution module 71 is used to execute at least one of the following self-checking steps: obtaining the first Internet protocol (IP) address of the host computer; establishing a connection with the at least one MES to determine whether each MES is abnormally connected; obtaining the status information of the firewall to determine whether the firewall is enabled; detecting the second IP address of the torque wrench connected to the host computer.

[0150] The fault detection module 72 is configured to perform fault detection on the host computer based on the self - inspection results of the at least one self - inspection step.

[0151] In some embodiments, the execution module 71 is configured to establish a connection with a preset virtual server based on the User Datagram Protocol (UDP); after the connection is successfully established, receive the first IP address sent by the virtual server.

[0152] In some embodiments, the execution module 71 is configured to send a connection establishment request to each MES based on the Transmission Control Protocol (TCP) and the third IP address of the MES; if a response message sent by the MES is received within a preset time, it is determined that there is no abnormality in the connection between the host computer and the MES; if a response message sent by the MES is not received within the preset time, it is determined that there is an abnormality in the connection between the host computer and the MES.

[0153] In some embodiments, the execution module 71 is configured to obtain the status information of the firewall through the command - line tool of the Windows system; determine whether the firewall is enabled based on the status information of the firewall.

[0154] In some embodiments, the execution module 71 is configured to determine whether there is indication information indicating that the firewall is enabled in the status information of the firewall; if there is, it is determined that the firewall is enabled; if not, it is determined that the firewall is not enabled.

[0155] In some embodiments, the execution module 71 is configured to allocate a cache area; obtain a plurality of fourth IP addresses through a preset function; where the plurality of fourth IP addresses include the second IP addresses of all torque guns; determine the second IP addresses from all the fourth IP addresses; and store the second IP addresses in the cache area.

[0156] In some embodiments, the execution module 71 is configured to determine, for each fourth IP address, whether the fourth IP address is a local address or an IP address of a non - first type; where the first type is the Internet Protocol Version 4 (IPv4) type; if the fourth IP address is not a local address and the fourth IP address is of the first type, the fourth IP address is determined as the second IP address; otherwise, it is determined that the fourth IP address is not the second IP address.

[0157] The description of the above device embodiments is similar to the description of the above method embodiments and has similar beneficial effects to the method embodiments. For the technical details not disclosed in the device embodiments of the present application, please refer to the description of the method embodiments of the present application for understanding.

[0158] It should be noted that in the embodiments of the present application Figure 7The division of the host computer self-checking device shown above for modules is illustrative, merely a logical function division, and there may be other division methods in actual implementation. In addition, in each embodiment of the present application, each functional unit may be integrated in a processing unit, may exist physically alone, or two or more units may be integrated in one unit. The above integrated unit may be implemented in the form of hardware, or may be implemented in the form of a software functional unit. It may also be implemented in the form of a combination of software and hardware.

[0159] It should be noted that in the embodiments of the present application, if the above method is implemented in the form of a software functional module and sold or used as an independent product, it may also be stored in a computer-readable storage medium. Based on such an understanding, the technical solution of the embodiments of the present application, in essence or the part that contributes to the related technology, may be embodied in the form of a software product. This computer software product is stored in a storage medium and includes several instructions to enable an electronic device to execute all or part of the methods described in the embodiments of the present application. The aforementioned storage medium includes: various media such as USB flash drives, mobile hard disks, read-only memories (ROMs), magnetic disks, or optical discs that can store program codes. In this way, the embodiments of the present application are not limited to any specific combination of hardware and software.

[0160] The embodiments of the present application provide a chip, including an interface circuit and a logic circuit. The interface circuit is used to receive signals from other chips outside the chip and transmit them to the logic circuit, or send signals from the logic circuit to other chips outside the chip. The logic circuit is used to implement the methods described in the embodiments of the present application.

[0161] The embodiments of the present application provide an electronic device, Figure 8 which is a schematic structural diagram of the electronic device of the embodiments of the present application. As Figure 8 shown, the electronic device 80 includes a memory 801 and a processor 802. The memory 801 stores a computer program that can run on the processor 802. When the processor 802 executes the program, it implements the steps in the host computer self-checking method provided in the above embodiments.

[0162] It should be noted that the memory 801 is configured to store instructions and applications executable by the processor 802, and can also cache data to be processed or already processed in the processor 802 and each module of the electronic device 80 (for example, image data, audio data, voice communication data, and video communication data), and can be implemented by flash memory (FLASH) or random access memory 801 (RAM).

[0163] An embodiment of the present application provides a computer-readable storage medium, on which a computer program is stored. When the computer program is executed by a processor, the steps in the host computer self-checking method provided in the above embodiment are implemented.

[0164] An embodiment of the present application provides a computer program product containing instructions. When it runs on a computer, it causes the computer to execute the steps in the host computer self-checking method provided in the above method embodiment.

[0165] It should be noted here that the descriptions of the above storage medium and device embodiments are similar to the descriptions of the above method embodiments and have beneficial effects similar to those of the method embodiments. For the technical details not disclosed in the storage medium, storage medium and device embodiments of the present application, please refer to the descriptions of the method embodiments of the present application for understanding.

[0166] It should be understood that the term "one embodiment" or "an embodiment" or "some embodiments" mentioned throughout the specification means that specific features, structures or characteristics related to the embodiment are included in at least one embodiment of the present application. Therefore, the appearances of "in one embodiment" or "in an embodiment" or "in some embodiments" throughout the specification do not necessarily refer to the same embodiment. In addition, these specific features, structures or characteristics can be combined in one or more embodiments in any suitable manner. It should be understood that in various embodiments of the present application, the magnitudes of the serial numbers of the above processes do not mean the order of execution, and the execution order of each process should be determined by its function and internal logic, and should not constitute any limitation to the implementation process of the embodiments of the present application. The serial numbers of the embodiments of the present application above are only for description and do not represent the advantages and disadvantages of the embodiments. The above descriptions of each embodiment tend to emphasize the differences between the embodiments, and the same or similar parts can be referred to each other. For the sake of brevity, they will not be repeated herein.

[0167] The term "and / or" in this article is only a description of the association relationship of associated objects, indicating that there can be three relationships. For example, object A and / or object B can represent: object A exists alone, object A and object B exist simultaneously, and object B exists alone.

[0168] It should be noted that in this article, the term "comprise", "include" or any other variant thereof is intended to cover non-exclusive inclusion, so that a process, method, article or device including a series of elements not only includes those elements, but also includes other elements not expressly listed, or further includes elements inherent to such process, method, article or device. Without further limitation, an element defined by the statement "comprising one..." does not exclude the existence of additional identical elements in the process, method, article or device including the element.

[0169] In several embodiments provided by the present application, it should be understood that the disclosed devices and methods can be implemented in other ways. The embodiments described above are merely illustrative. For example, the division of the modules is only a logical function division, and there can be other division methods in actual implementation. For example, multiple modules or components can be combined, or can be integrated into another system, or some features can be ignored or not executed. In addition, the coupling, direct coupling, or communication connection between the components shown or discussed with each other can be through some interfaces, and the indirect coupling or communication connection of devices or modules can be electrical, mechanical, or other forms.

[0170] The modules described above as separate components may or may not be physically separated, and the components shown as modules may or may not be physical modules; they can be located in one place or distributed to multiple system units; some or all of the modules can be selected according to actual needs to achieve the purpose of the solution of this embodiment.

[0171] In addition, each functional module in the embodiments of the present application can be all integrated in a processing unit, or each module can be separately used as a unit, or two or more modules can be integrated in a unit; the above-mentioned integrated modules can be implemented in the form of hardware or in the form of a combination of hardware and software functional units.

[0172] Those of ordinary skill in the art can understand that all or part of the steps of implementing the above method embodiments can be completed by hardware related to program instructions. The foregoing program can be stored in a computer-readable storage medium. When the program is executed, it executes the steps including the above method embodiments; and the foregoing storage medium includes: removable storage devices, read-only memory (ROM), magnetic disks, or optical disks and other various media that can store program codes.

[0173] Alternatively, if the above-mentioned integrated unit of the present application is implemented in the form of a software functional module and sold or used as an independent product, it can also be stored in a computer-readable storage medium. Based on such an understanding, the technical solution of the embodiments of the present application essentially or the part that contributes to the related technology can be embodied in the form of a software product. The computer software product is stored in a storage medium and includes several instructions for causing an electronic device to execute all or part of the methods described in the embodiments of the present application. And the foregoing storage medium includes: removable storage devices, ROM, magnetic disks, or optical disks and other various media that can store program codes.

[0174] The methods disclosed in several method embodiments provided by the present application can be arbitrarily combined without conflict to obtain new method embodiments.

[0175] As described above, it is only the implementation mode of this application, but the protection scope of this application is not limited thereto. Any person skilled in the art within the technical scope disclosed by this application can easily think of changes or substitutions, which should all be covered within the protection scope of this application. Therefore, the protection scope of this application shall be subject to the protection scope of the claims.

Claims

1. A host computer self-checking method, characterized in that: The host computer is respectively connected to at least one manufacturing execution system MES and a torque gun, and the method includes: The host computer performs at least one of the following self-test steps: Obtaining a first Internet Protocol IP address of the host computer; Establishing a connection with the at least one MES and determining whether each MES has a connection abnormality; Obtaining status information of a firewall to determine whether the firewall is turned on; Detecting a second IP address of the torque gun connected to the host computer; The host computer performs fault detection on the host computer based on the self-check result of the at least one self-check step.

2. The method according to claim 1, characterized in that The obtaining of the first IP address of the host computer includes: Establish a connection with the preset virtual server based on the User Datagram Protocol UDP; After the connection is successfully established, the first IP address sent by the virtual server is received.

3. The method according to claim 1, characterized in that The establishing a connection with the at least one MES and determining whether each MES has a connection abnormality includes: For each MES, sending a connection establishment request to the MES based on a transmission control protocol TCP and a third IP address of the MES; If a response message sent by the MES is received within a preset time, it is determined that there is no abnormality in the connection between the host computer and the MES; If no response message sent by the MES is received within a preset time, it is determined that the connection between the host computer and the MES is abnormal.

4. The method according to claim 1, characterized in that The obtaining of the status information of the firewall and determining whether the firewall is turned on includes: Obtaining the status information of the firewall through a command line tool of the Windows system; Determine whether the firewall is turned on based on the status information of the firewall.

5. The method according to claim 4, characterized in that The determining whether the firewall is turned on based on the status information of the firewall includes: Determining whether there is indication information indicating that the firewall is turned on in the status information of the firewall; If yes, make sure the firewall is turned on; If not, make sure the firewall is not enabled.

6. The method according to claim 1, characterized in that The detecting the second IP address of the torque gun connected to the host computer includes: Allocate cache area; Acquire multiple fourth IP addresses through a preset function; wherein the multiple fourth IP addresses include the second IP addresses of all torque guns; Determine the second IP address from all fourth IP addresses; The second IP address is stored in the cache area.

7. The method according to claim 4, characterized in that The determining the second IP address from all fourth IP addresses comprises: For each fourth IP address, determining whether the fourth IP address is a local address or an IP address of a non-first type; wherein the first type is an Internet Protocol version 4 (IPV4) type; If the fourth IP address is not a local address and the fourth IP address is an IP address of the first type, determining the fourth IP address as the second IP address; Otherwise, it is determined that the fourth IP address is not the second IP address.

8. A fault detection system, characterized in that: It comprises a host computer, at least one manufacturing execution system MES and a torque gun; the host computer is respectively connected to the at least one MES and the torque gun, and the host computer is used to execute the method described in any one of claims 1 to 7.

9. An electronic device, characterized in that: The method comprises a memory and a processor, wherein the memory stores a computer program that can be run on the processor, and when the processor executes the program, the method according to any one of claims 1 to 7 is implemented.

10. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the method according to any one of claims 1 to 7 is implemented.