Monitoring method and device of controller test system, electronic equipment and storage medium

By starting the monitoring thread in the server-side controller test system and sending the SSH heartbeat packet, the problem of real-time monitoring of the connection status of the server, client and controller in the vehicle controller test system is solved, and the stability of the system is improved.

CN119536196APending Publication Date: 2025-02-28BEIJING CO WHEELS TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202311099544.3
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2023-08-29
Publication Date
2025-02-28

AI Technical Summary

Technical Problem

The prior art is difficult to realize real-time monitoring and maintenance of the connection status between the server, client and controller in the vehicle controller test system, resulting in cumbersome diagnosis process.

Method used

By starting the controller connection status monitoring thread on the server, sending an SSH heartbeat packet to the target controller, capturing the connection abnormality between the server and the target controller, and determining whether the connection between the server and the client is abnormal based on the time interval of the probe heartbeat packet sent by the client.

Benefits of technology

It realizes timely monitoring and management of the connection status between the server, client and controller, and improves the stability of the controller test system.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119536196A_ABST
    Figure CN119536196A_ABST
Patent Text Reader

Abstract

The invention provides a controller test system monitoring method and device, electronic equipment and a storage medium, and the method comprises the steps: receiving a connection request of a client, and determining whether to connect with the client, different clients being used for forwarding data information of different controllers; after it is determined that connection with the client side is allowed, a controller connection state monitoring thread is started, an SSH heartbeat packet is sent to a target controller, whether connection between the server side and the target controller is abnormal or not is captured, and the target controller is a controller for receiving data information forwarded by the client side; and determining whether the connection between the server and the client is abnormal or not based on the time interval when the heartbeat detection packet sent by the client is received. Compared with the prior art, according to the embodiment of the invention, the connection state between the server and the client and the connection state between the server and the controller are monitored, so that the connection state between the server and the client and the connection state between the server and the controller can be obtained in time; the connection state is managed, and the stability of the controller test system is improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present disclosure relates to the field of communication technology, and in particular to a monitoring method and device, electronic equipment and storage medium for a controller test system. Background Art

[0002] At present, vehicle controllers are usually diagnosed using external diagnostic devices or computers connected to controllers. However, the existing testing methods have problems such as cumbersome diagnostic processes and inability to monitor the controller in real time. Therefore, TCP communication can be performed with the server through the client bound to the controller in the host computer; and then remote real-time monitoring of the controller can be achieved through the diagnostic service in the server. However, the connection status between the server and the client and the controller affects the normal operation of the diagnostic service. Therefore, how to monitor and maintain the connection status between the server and the client and the controller in the controller test system has become an urgent problem to be solved. Summary of the invention

[0003] The present disclosure provides a monitoring method and device, electronic equipment and storage medium for a controller test system, the main purpose of which is to monitor and maintain the connection status of a server, a client and a controller in the controller test system.

[0004] According to a first aspect of the present disclosure, a monitoring method for a controller test system is provided, which is applied to a server and includes:

[0005] Receive a connection request from a client and determine whether to connect to the client, where different clients are used to forward data information from different controllers;

[0006] After determining that the connection with the client is allowed, starting the controller connection status monitoring thread, sending an SSH heartbeat packet to the target controller, and capturing whether the connection between the server and the target controller is abnormal, wherein the target controller is the controller that receives the data information forwarded by the client;

[0007] Based on the time interval of receiving the liveness detection heartbeat packet sent by the client, it is determined whether the connection between the server and the client is abnormal.

[0008] Optionally, the method further includes:

[0009] If the connection between the client and the server is abnormal, the connection with the client is disconnected.

[0010] If the connection between the client and the server is normal, the client continues to receive the liveness detection heartbeat packet.

[0011] Optionally, starting a controller connection status monitoring thread, sending an SSH heartbeat packet to a target controller, and capturing whether the connection between the server and the target controller is abnormal, includes:

[0012] Based on the monitoring thread, calling a remote connection service to send the SSH heartbeat packet to the target controller;

[0013] Based on the SSH heartbeat packet, determining whether the connection between the server and the target controller is abnormal;

[0014] If there is no connection abnormality, continue to send the SSH heartbeat packet;

[0015] If there is a connection abnormality, control the server to reconnect with the target controller through SSH.

[0016] Optionally, receiving a connection request from a client and determining whether to connect with the client includes:

[0017] Determining whether the connection request of the client is a connection request of a connected client;

[0018] If it is a connection request from a connected client, prohibiting the client from connecting;

[0019] If it is not a connection request from a connected client, a connection is made with the client.

[0020] Optionally, after determining that the connection with the client is allowed, the method further includes:

[0021] Calling a preset diagnostic service based on the monitoring thread to obtain initial information of the target controller;

[0022] After controlling the server to reconnect with the target controller through SSH, the method further includes:

[0023] Based on the preset diagnostic service, reacquiring initial information of the target controller;

[0024] Comparing the initial information of the target controller obtained after reconnection with the initial information obtained before reconnection;

[0025] In case of inconsistency in the comparison, the initial information is updated and an alarm is triggered.

[0026] Optionally, determining whether the connection between the server and the client is abnormal based on a time interval for receiving an active heartbeat packet sent by the client includes:

[0027] After receiving the detection heartbeat packet sent by the client, reply with a confirmation message;

[0028] Determining whether the duration for the client to receive the confirmation message exceeds the time interval;

[0029] If the time interval is exceeded, it is determined that the connection between the server and the client is abnormal;

[0030] If the time interval is not exceeded, it is determined that the server is connected to the client normally.

[0031] Optionally, after disconnecting the connection with the client, the method further includes:

[0032] A thread termination signal is sent to the monitoring thread, and the monitoring thread corresponding to the client is closed.

[0033] According to a second aspect of the present disclosure, a monitoring method for a controller test system is provided, which is applied to a client and includes:

[0034] Send a connection request to the server;

[0035] After confirming the connection with the server, sending a live heartbeat packet to the server;

[0036] A confirmation message sent by the server is received, and it is determined whether the connection between the server and the client is abnormal.

[0037] Optionally, the method further includes:

[0038] If there is an abnormality in the connection between the server and the client, a reconnection request is sent to the server.

[0039] Optionally, the receiving a confirmation message sent by the server and determining whether the connection between the server and the client is abnormal includes:

[0040] If the reception of the confirmation message times out and / or the connection with the client times out, it is determined that there is an abnormality in the connection;

[0041] If the reception of the confirmation message has not timed out and the connection with the client has not timed out, it is determined that there is no abnormality in the connection.

[0042] According to a third aspect of the present disclosure, a monitoring device of a controller test system is provided, which is applied to a server, and includes:

[0043] A first determining unit, configured to receive a connection request from a client and determine whether to connect to the client, wherein different clients are used to forward data information of different controllers, wherein the target controller is a controller that receives the data information forwarded by the client;

[0044] A capture unit, configured to start a controller connection status monitoring thread after determining that the connection with the client is allowed, send an SSH heartbeat packet to the target controller, and capture whether the connection between the server and the target controller is abnormal;

[0045] The second determining unit is used to determine whether the connection between the server and the client is abnormal based on the time interval of receiving the live heartbeat packet sent by the client.

[0046] Optionally, the device further comprises:

[0047] A disconnection unit is used to disconnect the client if the connection between the client and the server is abnormal.

[0048] The first receiving unit is configured to continue receiving the liveness detection heartbeat packet if the connection between the client and the server is normal.

[0049] Optionally, the capture unit includes:

[0050] A first sending module, configured to call a remote connection service based on the monitoring thread to send the SSH heartbeat packet to the target controller;

[0051] A first determination module, configured to determine whether a connection between the server and the target controller is abnormal based on the SSH heartbeat packet;

[0052] A second sending module, configured to continue sending the SSH heartbeat packet if there is no connection abnormality;

[0053] The reconnection module is used to control the server to reconnect with the target controller through SSH if there is a connection abnormality.

[0054] Optionally, the first determining unit includes:

[0055] A judging module, used to judge whether the connection request of the client is a connection request of a connected client;

[0056] A first connection module, configured to prohibit the client from connecting if the client is already connected to the connection request;

[0057] The second connection module is used to connect with the client if the connection request is not a connection request from a connected client.

[0058] Optionally, the device further comprises:

[0059] The first acquisition unit is used to call a preset diagnostic service based on the monitoring thread to acquire initial information of the target controller after determining that the connection with the client is allowed.

[0060] A second acquisition unit, configured to reacquire initial information of the target controller based on the preset diagnostic service after controlling the server to reconnect with the target controller through SSH;

[0061] A comparing unit, configured to compare the initial information of the target controller obtained after reconnection with the initial information obtained before reconnection;

[0062] The updating unit is used to update the initial information and trigger an alarm when the comparison is inconsistent.

[0063] Optionally, the second determining unit includes:

[0064] A reply module, used for replying a confirmation message after receiving the detection heartbeat packet sent by the client;

[0065] A second determination module is used to determine whether the duration for the client to receive the confirmation message exceeds the time interval;

[0066] A third determination module, configured to determine that the connection between the server and the client is abnormal if the time interval is exceeded;

[0067] The fourth determination module is used to determine that the connection between the server and the client is normal if the time interval has not been exceeded.

[0068] Optionally, the device further comprises:

[0069] The closing unit is used to send a thread termination signal to the monitoring thread and close the monitoring thread corresponding to the client after disconnecting the connection with the client.

[0070] According to a fourth aspect of the present disclosure, a monitoring device of a controller test system is provided, which is applied to a client and includes:

[0071] A first sending unit, used to send a connection request to the server;

[0072] A second sending unit, configured to send an active heartbeat packet to the server after determining that the server is connected;

[0073] The second receiving unit is used to receive a confirmation message sent by the server and determine whether the connection between the server and the client is abnormal.

[0074] Optionally, the device further comprises:

[0075] The third sending unit is used to send a reconnection request to the server if there is an abnormality in the connection between the server and the client.

[0076] Optionally, the second receiving unit includes:

[0077] a fifth determination module, configured to determine that a connection abnormality exists if receiving the confirmation message times out and / or connecting to the client times out;

[0078] The sixth determination module is used to determine that there is no abnormality in the connection if the reception of the confirmation message has not timed out and the connection with the client has not timed out.

[0079] According to a fifth aspect of the present disclosure, there is provided an electronic device, including:

[0080] at least one processor; and

[0081] a memory communicatively connected to the at least one processor; wherein,

[0082] The memory stores instructions that can be executed by the at least one processor, and the instructions are executed by the at least one processor to enable the at least one processor to perform the method described in the first aspect and / or the second aspect.

[0083] According to a sixth aspect of the present disclosure, a non-transitory computer-readable storage medium storing computer instructions is provided, wherein the computer instructions are used to enable the computer to execute the method described in the first aspect and / or the second aspect.

[0084] According to a seventh aspect of the present disclosure, a computer program product is provided, comprising a computer program, wherein when the computer program is executed by a processor, the computer program implements the method as described in the first aspect and / or the second aspect.

[0085] The present disclosure provides a monitoring method and device, electronic device and storage medium for a controller test system, which receives a connection request from a client and determines whether to connect to the client, wherein different clients are used to forward data information of different controllers; after determining that the connection with the client is allowed, the controller connection status monitoring thread is started, and an SSH heartbeat packet is sent to the target controller to capture whether the connection between the server and the target controller is abnormal, wherein the target controller is a controller that receives the data information forwarded by the client; based on the time interval of receiving the detection heartbeat packet sent by the client, it is determined whether the connection between the server and the client is abnormal. Compared with the related art, the embodiment of the present disclosure can timely obtain the connection status between the server and the client and the controller respectively by monitoring the connection status between the server and the client and the controller respectively; it realizes the management of the connection status and improves the stability of the controller test system.

[0086] It should be understood that the content described in this section is not intended to identify the key or important features of the embodiments of the present application, nor is it intended to limit the scope of the present application. Other features of the present application will become easily understood through the following description. BRIEF DESCRIPTION OF THE DRAWINGS

[0087] The accompanying drawings are used to better understand the present solution and do not constitute a limitation of the present disclosure.

[0088] Figure 1 A flow chart of a monitoring method of a controller test system provided by an embodiment of the present disclosure;

[0089] Figure 2 A monitoring framework diagram of a controller test system provided by an embodiment of the present disclosure;

[0090] Figure 3 A flowchart of another monitoring method of a controller test system provided by an embodiment of the present disclosure;

[0091] Figure 4 A schematic diagram of interaction between a server and a client provided in an embodiment of the present disclosure;

[0092] Figure 5 A flowchart of another monitoring method of a controller test system provided by an embodiment of the present disclosure;

[0093] Figure 6 A schematic diagram of the structure of a monitoring device for a controller test system provided in an embodiment of the present disclosure;

[0094] Figure 7 A schematic diagram of the structure of another monitoring device for a controller test system provided by an embodiment of the present disclosure;

[0095] Figure 8 A schematic diagram of the structure of another monitoring device for a controller test system provided by an embodiment of the present disclosure;

[0096] Fig. 9 A schematic diagram of the structure of another monitoring device for a controller test system provided by an embodiment of the present disclosure;

[0097] Fig.10 A schematic block diagram of an exemplary electronic device 600 provided for an embodiment of the present disclosure. DETAILED DESCRIPTION

[0098] The following is a description of exemplary embodiments of the present disclosure in conjunction with the accompanying drawings, including various details of the embodiments of the present disclosure to facilitate understanding, which should be considered as merely exemplary. Therefore, it should be recognized by those of ordinary skill in the art that various changes and modifications may be made to the embodiments described herein without departing from the scope and spirit of the present disclosure. Similarly, for the sake of clarity and conciseness, descriptions of well-known functions and structures are omitted in the following description.

[0099] The following describes a monitoring method and apparatus for a controller test system, an electronic device, and a storage medium according to an embodiment of the present disclosure with reference to the accompanying drawings.

[0100] Figure 1 A flowchart of a monitoring method for a controller testing system provided in an embodiment of the present disclosure.

[0101] like Figure 1 As shown, the method comprises the following steps:

[0102] Step 101, receiving a connection request from a client, and determining whether to connect with the client, where different clients are used to forward data information of different controllers.

[0103] In the embodiments of the present disclosure, Figure 2 As shown, the client is a program deployed in the host computer for establishing a connection with the server in the monitoring host; it can be understood that the client and the server can be, for example, a connection established according to the Transmission Control Protocol (TCP), which is not limited in the embodiments of the present disclosure. The controller is connected to the host computer, and the service address and port of the controller are mapped to the local (host computer) by using the port forwarding program in the host computer. Figure 2 The Extended Domain Control Unit (XCU) is used as an example for introduction, but this does not constitute a limitation of the present disclosure. The client forwards the data information of the controller to the server; the data information may include but is not limited to the service address and port of the controller.

[0104] After receiving the connection request from the client, it is necessary to determine whether to allow the client to connect; the client connection can be managed, thereby ensuring the stability of the connection between the server and the client.

[0105] Step 102, after determining that the connection with the client is allowed, start the controller connection status monitoring thread, send an SSH heartbeat packet to the target controller, and capture whether the connection between the server and the target controller is abnormal, wherein the target controller is the controller that receives the data information forwarded by the client.

[0106] In an embodiment of the present disclosure, after determining that the client connection is allowed, the port forwarding program can provide external access to the controller to achieve remote direct access to the target controller. After establishing a connection with the target controller, a corresponding monitoring thread needs to be started to monitor the connection of the target controller bound to the client. Exemplarily, after the client A is connected to the server, a monitoring thread A needs to be started to monitor the connection between the target controller A and the server.

[0107] The monitoring thread sends a secure shell protocol (SSH) heartbeat packet to the target controller at a predetermined interval. It should be noted that the predetermined interval needs to be set comprehensively according to factors such as hardware and task requirements, and the disclosed embodiment does not limit this. Based on the sent SSH heartbeat packet, it is used to capture whether there is an abnormality in the connection between the server and the target controller.

[0108] Step 103: determining whether the connection between the server and the client is abnormal based on the time interval of receiving the live heartbeat packet sent by the client.

[0109] In an embodiment of the present disclosure, in order to monitor the connection between the client and the server, the client will send a liveness detection heartbeat packet to the server for detection; to determine whether the connection between the two parties is abnormal. After receiving the liveness detection heartbeat packet sent by the client, the server replies with a confirmation message to the client. The client will determine whether the connection is abnormal based on the confirmation message and the sent liveness detection heartbeat packet; at the same time, the server will capture whether there is an abnormality in its connection with the client.

[0110] The present disclosure provides a monitoring method for a controller test system, which receives a connection request from a client and determines whether to connect to the client, wherein different clients are used to forward data information of different controllers; after determining that the connection with the client is allowed, the controller connection status monitoring thread is started, and an SSH heartbeat packet is sent to the target controller to capture whether the connection between the server and the target controller is abnormal, wherein the target controller is a controller that receives the data information forwarded by the client; based on the time interval of receiving the detection heartbeat packet sent by the client, it is determined whether the connection between the server and the client is abnormal. Compared with the related art, the embodiment of the present disclosure can timely obtain the connection status between the server and the client and the controller respectively by monitoring the connection status between the server and the client and the controller respectively; it realizes the management of the connection status and improves the stability of the controller test system.

[0111] In order to clearly illustrate the embodiment of the present disclosure, the embodiment of the present disclosure provides a flowchart of another monitoring method of a controller test system.

[0112] like Figure 3As shown, the method comprises the following steps:

[0113] Step 201, receiving a connection request from a client, and determining whether to connect with the client, where different clients are used to forward data information of different controllers.

[0114] As a refinement of an embodiment of the present disclosure, the receiving of a connection request from a client and determining whether to connect to the client includes: determining whether the connection request from the client is a connection request from a connected client; if it is a connection request from a connected client, prohibiting the client from connecting; if it is not a connection request from a connected client, connecting to the client.

[0115] Specifically, in the embodiment of the present disclosure, when the server is started, the service address (IP) and port of the client are bound. After receiving the connection request from the client, it is necessary to determine whether to allow the client to connect. Figure 4 As shown, when the client sends repeated connection requests, the server determines whether it is a connected client based on the client's IP. If it is a connected client, the server prohibits requests from clients with the same IP as the connected client.

[0116] Step 202: after receiving the liveness detection heartbeat packet sent by the client, a confirmation message is sent to the client to determine whether the connection between the server and the client is abnormal.

[0117] Specifically, in the disclosed embodiment, after connecting with the client, the client will send a liveness detection heartbeat packet to the server to detect whether there is an abnormality in the connection between the client and the server. After receiving the liveness detection heartbeat packet sent by the client, the server replies with a confirmation message to the client. The client will determine whether the connection is abnormal based on the confirmation message and the sent liveness detection heartbeat packet; at the same time, the server will capture whether there is an abnormality in its connection with the client.

[0118] Step 203: If the connection between the client and the server is abnormal, disconnect the connection with the client.

[0119] Step 204: Send a thread termination signal to the monitoring thread, and close the monitoring thread corresponding to the client.

[0120] Specifically, in the embodiment of the present disclosure, when the server detects that the connection with the client is abnormal, it will close the corresponding client IP and the monitoring thread corresponding to the client. Figure 4 After determining to close the connection with the client, send an end signal to the monitoring thread.

[0121] In some embodiments of the present disclosure, Figure 4As shown, if the connection between the client and the server is normal, the live detection heartbeat packet continues to be received.

[0122] Step 205 , after determining that the connection with the client is allowed, start the controller connection status monitoring thread, send an SSH heartbeat packet to the target controller, and capture whether the connection between the server and the target controller is abnormal.

[0123] As a refinement of an embodiment of the present disclosure, the controller connection status monitoring thread is started, an SSH heartbeat packet is sent to a target controller, and whether the connection between the server and the target controller is abnormal is captured, including: based on the monitoring thread, calling a remote connection service to send the SSH heartbeat packet to the target controller; based on the SSH heartbeat packet, determining whether the connection between the server and the target controller is abnormal.

[0124] Specifically in the disclosed embodiment, the remote connection service is an SSH remote connection service. After the monitoring thread is started, the server establishes an SSH remote connection with the target controller. The server determines whether the connection between the server and the target controller is abnormal by sending an SSH heartbeat packet to the target controller.

[0125] In some embodiments of the present disclosure, if there is no connection abnormality, the SSH heartbeat packet continues to be sent.

[0126] Step 206: If there is a connection abnormality, control the server to reconnect to the target controller via SSH.

[0127] Specifically, in the embodiment of the present disclosure, after the server sends an SSH heartbeat packet to the target controller, if no abnormal connection between the server and the target controller is captured, the server continues to send SSH heartbeat packets to the target controller. If an abnormal connection between the server and the target controller is captured, the server reconnects to the target controller through SSH to ensure that the server and the target controller remain connected.

[0128] Step 207: Call a preset diagnostic service based on the monitoring thread to obtain initial information of the target controller.

[0129] Specifically in the embodiment of the present disclosure, the preset diagnostic service is a DoIP diagnostic service, and the initial information is information pre-stored in the target controller, such as a vehicle identification code, a vehicle configuration word, etc., which is not limited in the present disclosure. The monitoring thread obtains the initial information of the target controller through the DoIP diagnostic service.

[0130] Step 208: reacquire initial information of the target controller based on the preset diagnostic service.

[0131] Step 209: compare the initial information of the controller obtained after reconnection with the initial information obtained before reconnection.

[0132] Specifically, in the disclosed embodiment, after the server reconnects to the target controller through SSH, the DoIP diagnostic service is used to obtain the initial information after the reconnection, and the initial information obtained after the reconnection is compared with the initial information before the reconnection. If the comparison is consistent, then continue to send SSH heartbeat packets and maintain the SSH connection with the target controller.

[0133] Step 210: if the comparison is inconsistent, the initial information is updated and an alarm is triggered.

[0134] Specifically in the disclosed embodiment, if the initial information obtained after reconnection is inconsistent with the initial information before reconnection, an alarm message is generated and the initial information of the target controller is updated (reassigned) so that a comparison can be performed after the next reconnection.

[0135] Furthermore, as an implementable method of the embodiment of the present disclosure, in order to monitor the connection relationship between the server and the client; the liveness detection is performed by maintaining a liveness detection heartbeat between the client and the server. The method of determining whether the connection between the server and the client is abnormal based on the time interval of receiving the liveness detection heartbeat packet sent by the client includes: replying a confirmation message after receiving the liveness detection heartbeat packet sent by the client; determining whether the time length for the client to receive the confirmation message exceeds the time interval; if it exceeds the time interval, determining that the connection between the server and the client is abnormal; if it does not exceed the time interval, determining that the connection between the server and the client is normal.

[0136] Specifically, in the disclosed embodiment, in order to monitor the connection between the client and the server, the client will send a liveness detection heartbeat packet to the server to detect whether there is an abnormality in the connection between the two parties. After receiving the liveness detection heartbeat packet sent by the client, the server replies with a confirmation message to the client. The client will determine whether the connection is abnormal based on the confirmation message and the sent liveness detection heartbeat packet; at the same time, the server will capture whether there is an abnormality in the connection between it and the client.

[0137] In summary, the monitoring method provided by the present disclosure can monitor the connection status between the server and the client, and between the server and the target controller. The present disclosure also realizes the maintenance of the connection status when an abnormality occurs in the connection between the server and the target controller, realizes the management of the connection status between the server and the client, and between the server and the target controller, and can improve the stability of the controller test system.

[0138] Figure 5 A flowchart of a monitoring method for a controller testing system provided in an embodiment of the present disclosure.

[0139] like Figure 5 As shown, the method comprises the following steps:

[0140] Step 301: Send a connection request to the server.

[0141] Step 302: after confirming the connection with the server, sending a liveness detection heartbeat packet to the server.

[0142] In the embodiment of the present disclosure, the client will connect to the designated IP and port of the server after startup. In order to monitor the connection between the client and the server, the client will send a live heartbeat packet to the server to detect whether there is any abnormality in the connection between the two parties.

[0143] Step 303: Receive a confirmation message sent by the server and determine whether the connection between the server and the client is abnormal.

[0144] As a refinement of an embodiment of the present disclosure, the receiving of a confirmation message sent by the server and determining whether the connection between the server and the client is abnormal includes: if the reception of the confirmation message times out and / or the connection with the client times out, determining that there is an abnormality in the connection; if the reception of the confirmation message does not time out and the connection with the client does not time out, determining that there is no abnormality in the connection.

[0145] In the embodiments of the present disclosure, please continue to refer to Figure 4 After receiving the heartbeat packet sent by the client, the server replies with a confirmation message to the client. The client determines whether the connection is abnormal based on the confirmation message and the sent heartbeat packet. If the confirmation message reception times out and / or the server-client connection times out, it is determined that there is an abnormality in the connection. If the confirmation message reception does not time out and the server-client connection does not time out, it is determined that there is no abnormality in the connection.

[0146] Step 304: If there is an abnormality in the connection between the server and the client, a reconnection request is sent to the server.

[0147] In an embodiment of the present disclosure, when it is determined that there is an abnormality in the connection between the server and the client, the client sends a reconnection request to the server to reconnect.

[0148] In some embodiments of the present disclosure, if there is no connection abnormality, a liveness detection heartbeat packet is sent to the server at a preset time interval to determine whether there is a connection abnormality.

[0149] It should be noted that the embodiments of the present disclosure may include multiple steps. For the convenience of description, these steps are numbered, but these numbers do not limit the execution time slots or execution order between the steps; these steps can be implemented in any order, and the embodiments of the present disclosure do not limit this.

[0150] Corresponding to the above-mentioned monitoring method of the controller test system, the present invention also provides a monitoring device for the controller test system. Since the device embodiment of the present invention corresponds to the above-mentioned method embodiment, the details not disclosed in the device embodiment can be referred to the above-mentioned method embodiment, and will not be repeated in the present invention.

[0151] Figure 6 A schematic diagram of a monitoring device for a controller test system provided by an embodiment of the present disclosure is shown in FIG. Figure 6 As shown, including:

[0152] A first determining unit 41 is used to receive a connection request from a client and determine whether to connect to the client, and different clients are used to forward data information of different controllers;

[0153] A capture unit 42 is used to start a controller connection status monitoring thread after determining that the connection with the client is allowed, send an SSH heartbeat packet to the target controller, and capture whether the connection between the server and the target controller is abnormal;

[0154] The second determining unit 43 is configured to determine whether the connection between the server and the client is abnormal based on a time interval for receiving an active heartbeat packet sent by the client.

[0155] The present disclosure provides a monitoring device for a controller test system, which receives a connection request from a client and determines whether to connect to the client, wherein different clients are used to forward data information of different controllers; after determining that the connection with the client is allowed, the controller connection status monitoring thread is started, and an SSH heartbeat packet is sent to the target controller to capture whether the connection between the server and the target controller is abnormal, wherein the target controller is a controller that receives the data information forwarded by the client; based on the time interval of receiving the detection heartbeat packet sent by the client, it is determined whether the connection between the server and the client is abnormal. Compared with the related art, the embodiment of the present disclosure can timely obtain the connection status between the server and the client and the controller respectively by monitoring the connection status between the server and the client and the controller respectively; it realizes the management of the connection status and improves the stability of the controller test system.

[0156] Furthermore, in a possible implementation of this embodiment, as Figure 7 As shown, the device also includes:

[0157] The disconnection unit 44 is configured to disconnect the client if the connection between the client and the server is abnormal.

[0158] The first receiving unit 45 is configured to continue receiving the liveness detection heartbeat packet if the connection between the client and the server is normal.

[0159] Furthermore, in a possible implementation of this embodiment, as Figure 7 As shown, the capture unit 42 includes:

[0160] A first sending module 421 is used to call a remote connection service to send the SSH heartbeat packet to the target controller based on the monitoring thread;

[0161] A first determination module 422, configured to determine whether the connection between the server and the target controller is abnormal based on the SSH heartbeat packet;

[0162] The second sending module 423 is used to continue sending the SSH heartbeat packet if there is no connection abnormality;

[0163] The reconnection module 424 is used to control the server to perform SSH reconnection with the target controller if there is a connection abnormality.

[0164] Furthermore, in a possible implementation of this embodiment, as Figure 7 As shown, the first determining unit 41 includes:

[0165] A determination module 411 is used to determine whether the connection request of the client comes from a connection request of a connected client;

[0166] A first connection module 412, configured to prohibit the client from connecting if the connection request is from a connected client;

[0167] The second connection module 413 is configured to connect to the client if the connection request is not from a connected client.

[0168] Furthermore, in a possible implementation of this embodiment, as Figure 7 As shown, the device also includes:

[0169] The first acquisition unit 46 is configured to, after determining that the connection with the client is allowed, enable the monitoring thread to call a preset diagnostic service to acquire initial information of the target controller.

[0170] The second acquisition unit 47 is configured to reacquire the initial information of the target controller based on the preset diagnostic service after controlling the server to reconnect with the target controller via SSH.

[0171] A comparing unit 48, configured to compare the initial information of the controller obtained after reconnection with the initial information obtained before reconnection;

[0172] The updating unit 49 is used to update the initial information and trigger an alarm when the comparison is inconsistent.

[0173] Furthermore, in a possible implementation of this embodiment, as Figure 7 As shown, the second determining unit 43 includes:

[0174] The reply module 431 is used to reply a confirmation message after receiving the detection heartbeat packet sent by the client;

[0175] A second determination module 432 is used to determine whether the duration for the client to receive the confirmation message exceeds the time interval;

[0176] A third determination module 433 is used to determine that the connection between the server and the client is abnormal if the time interval is exceeded;

[0177] The fourth determination module 434 is used to determine that the connection between the server and the client is normal if the time interval has not exceeded.

[0178] Furthermore, in a possible implementation of this embodiment, as Figure 7 As shown, the device also includes:

[0179] The closing unit 410 is used to send a thread termination signal to the monitoring thread and close the monitoring thread corresponding to the client after disconnecting the connection with the client.

[0180] Figure 8 A schematic diagram of a monitoring device for a controller test system provided by an embodiment of the present disclosure is shown in FIG. Figure 8 As shown, including:

[0181] A first sending unit 51, used to send a connection request to the server;

[0182] A second sending unit 52 is used to send a live heartbeat packet to the server after determining that the server is connected;

[0183] The second receiving unit 53 is configured to receive a confirmation message sent by the server and determine whether the connection between the server and the client is abnormal.

[0184] Furthermore, in a possible implementation of this embodiment, as Fig. 9 As shown, the device also includes:

[0185] The third sending unit 54 is configured to send a reconnection request to the server if there is an abnormality in the connection between the server and the client.

[0186] Furthermore, in a possible implementation of this embodiment, as Fig. 9 As shown, the second receiving unit 53 includes:

[0187] A fifth determining module 531, configured to determine that a connection abnormality exists if receiving the confirmation message times out and / or connecting to the client times out;

[0188] The sixth determination module 532 is configured to determine that there is no abnormality in the connection if the reception of the confirmation message has not timed out and the connection with the client has not timed out.

[0189] It should be noted that the above explanation of the method embodiment is also applicable to the device of this embodiment, and the principle is the same, which is not limited in this embodiment.

[0190] According to an embodiment of the present disclosure, the present disclosure also provides an electronic device, a readable storage medium and a computer program product.

[0191] Fig.10 A schematic block diagram of an example electronic device 600 that can be used to implement an embodiment of the present disclosure is shown. The electronic device is intended to represent various forms of digital computers, such as laptop computers, desktop computers, workstations, personal digital assistants, servers, blade servers, mainframe computers, and other suitable computers. The electronic device can also represent various forms of mobile devices, such as personal digital processing, cellular phones, smart phones, wearable devices, and other similar computing devices. The components shown herein, their connections and relationships, and their functions are merely examples and are not intended to limit the implementation of the present disclosure described and / or required herein.

[0192] like Fig.10 As shown, the device 600 includes a computing unit 601, which can perform various appropriate actions and processes according to a computer program stored in a ROM (Read-Only Memory) 602 or a computer program loaded from a storage unit 608 to a RAM (Random Access Memory) 603. In the RAM 603, various programs and data required for the operation of the device 600 can also be stored. The computing unit 601, the ROM 602, and the RAM 603 are connected to each other via a bus 604. An I / O (Input / Output) interface 605 is also connected to the bus 604.

[0193] A number of components in the device 600 are connected to the I / O interface 605, including: an input unit 606, such as a keyboard, a mouse, etc.; an output unit 607, such as various types of displays, speakers, etc.; a storage unit 608, such as a disk, an optical disk, etc.; and a communication unit 609, such as a network card, a modem, a wireless communication transceiver, etc. The communication unit 609 allows the device 600 to exchange information / data with other devices through a computer network such as the Internet and / or various telecommunication networks.

[0194] The computing unit 601 may be a variety of general and / or special processing components with processing and computing capabilities. Some examples of the computing unit 601 include, but are not limited to, a CPU (Central Processing Unit), a GPU (Graphic Processing Units), various dedicated AI (Artificial Intelligence) computing chips, various computing units running machine learning model algorithms, a DSP (Digital Signal Processor), and any appropriate processor, controller, microcontroller, etc. The computing unit 601 performs the various methods and processes described above, such as a monitoring method for a controller test system. For example, in some embodiments, the monitoring method for a controller test system may be implemented as a computer software program, which is tangibly contained in a machine-readable medium, such as a storage unit 608. In some embodiments, part or all of the computer program may be loaded and / or installed on the device 600 via the ROM 602 and / or the communication unit 609. When the computer program is loaded into the RAM 603 and executed by the computing unit 601, one or more steps of the method described above may be performed. Alternatively, in other embodiments, the computing unit 601 may be configured to execute the aforementioned monitoring method of the controller test system in any other appropriate manner (for example, by means of firmware).

[0195] Various embodiments of the systems and techniques described above herein may be implemented in digital electronic circuit systems, integrated circuit systems, FPGAs (Field Programmable Gate Arrays), ASICs (Application-Specific Integrated Circuits), ASSPs (Application Specific Standard Products), SOCs (System On Chips), CPLDs (Complex Programmable Logic Devices), computer hardware, firmware, software, and / or combinations thereof. These various embodiments may include: being implemented in one or more computer programs that may be executed and / or interpreted on a programmable system including at least one programmable processor that may be a dedicated or general-purpose programmable processor that may receive data and instructions from a storage system, at least one input device, and at least one output device, and transmit data and instructions to the storage system, the at least one input device, and the at least one output device.

[0196] The program code for implementing the method of the present disclosure may be written in any combination of one or more programming languages. These program codes may be provided to a processor or controller of a general-purpose computer, a special-purpose computer, or other programmable data processing device, so that the program code, when executed by the processor or controller, enables the functions / operations specified in the flow chart and / or block diagram to be implemented. The program code may be executed entirely on the machine, partially on the machine, partially on the machine and partially on a remote machine as a stand-alone software package, or entirely on a remote machine or server.

[0197] In the context of the present disclosure, a machine-readable medium may be a tangible medium that may contain or store a program for use by or in conjunction with an instruction execution system, device, or equipment. A machine-readable medium may be a machine-readable signal medium or a machine-readable storage medium. A machine-readable medium may include, but is not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, device, or device, or any suitable combination of the foregoing. More specific examples of machine-readable storage media may include an electrical connection based on one or more lines, a portable computer disk, a hard disk, a RAM, a ROM, an EPROM (Electrically Programmable Read-Only-Memory) or a flash memory, an optical fiber, a CD-ROM (Compact Dis sc Read-Only Memory), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing.

[0198] To provide interaction with a user, the systems and techniques described herein can be implemented on a computer having: a display device (e.g., a CRT (Cathode-Ray Tube) or LCD (Liquid Crystal Display) monitor) for displaying information to the user; and a keyboard and pointing device (e.g., a mouse or trackball) through which the user can provide input to the computer. Other types of devices can also be used to provide interaction with the user; for example, the feedback provided to the user can be any form of sensory feedback (e.g., visual feedback, auditory feedback, or tactile feedback); and input from the user can be received in any form (including acoustic input, voice input, or tactile input).

[0199] The systems and techniques described herein may be implemented in a computing system that includes backend components (e.g., as a data server), or a computing system that includes middleware components (e.g., an application server), or a computing system that includes frontend components (e.g., a user computer with a graphical user interface or a web browser through which a user can interact with implementations of the systems and techniques described herein), or a computing system that includes any combination of such backend components, middleware components, or frontend components. The components of the system may be interconnected by any form or medium of digital data communication (e.g., a communication network). Examples of communication networks include: LAN (Local Area Network), WAN (Wide Area Network), the Internet, and blockchain networks.

[0200] A computer system may include a client and a server. The client and the server are generally remote from each other and usually interact through a communication network. The relationship between the client and the server is generated by computer programs running on the corresponding computers and having a client-server relationship with each other. The server may be a cloud server, also known as a cloud computing server or cloud host, which is a host product in the cloud computing service system to solve the defects of difficult management and weak business scalability in traditional physical hosts and VPS services ("Virtual Private Server", or "VPS" for short). The server may also be a server of a distributed system, or a server combined with a blockchain.

[0201] It should be noted that artificial intelligence is a discipline that studies how computers can simulate certain human thought processes and intelligent behaviors (such as learning, reasoning, thinking, planning, etc.), and includes both hardware-level and software-level technologies. Artificial intelligence hardware technologies generally include technologies such as sensors, dedicated artificial intelligence chips, cloud computing, distributed storage, and big data processing; artificial intelligence software technologies mainly include computer vision technology, speech recognition technology, natural language processing technology, as well as machine learning / deep learning, big data processing technology, knowledge graph technology, and other major directions.

[0202] The various numerical numbers such as first and second involved in the present disclosure are only for the convenience of description and are not used to limit the scope of the embodiments of the present disclosure, but also indicate the order of precedence.

[0203] At least one in the present disclosure may also be described as one or more, and a plurality may be two, three, four or more, which is not limited in the present disclosure. In the embodiments of the present disclosure, for a technical feature, the technical features in the technical feature are distinguished by "first", "second", "third", "A", "B", "C" and "D", etc., and there is no order of precedence or size between the technical features described by the "first", "second", "third", "A", "B", "C" and "D".

[0204] It should be understood that the various forms of processes shown above can be used to reorder, add or delete steps. For example, the steps recorded in this disclosure can be executed in parallel, sequentially or in different orders, as long as the desired results of the technical solutions disclosed in this disclosure can be achieved, and this document does not limit this.

[0205] The above specific implementations do not constitute a limitation on the protection scope of the present disclosure. It should be understood by those skilled in the art that various modifications, combinations, sub-combinations and substitutions can be made according to design requirements and other factors. Any modification, equivalent substitution and improvement made within the spirit and principle of the present disclosure shall be included in the protection scope of the present disclosure.

Claims

1. A monitoring method for a controller test system, characterized in that: include: Receive a connection request from a client and determine whether to connect to the client, where different clients are used to forward data information from different controllers; After determining that the connection with the client is allowed, starting a monitoring thread for monitoring the connection status of the controller, sending an SSH heartbeat packet to the target controller, and capturing whether the connection between the server and the target controller is abnormal, wherein the target controller is a controller that receives the data information forwarded by the client; Based on the time interval of receiving the liveness detection heartbeat packet sent by the client, it is determined whether the connection between the server and the client is abnormal.

2. The method according to claim 1, characterized in that The starting controller connection status monitoring thread, sending an SSH heartbeat packet to the target controller, and capturing whether the connection between the server and the target controller is abnormal, includes: Based on the monitoring thread, calling a remote connection service to send the SSH heartbeat packet to the target controller; Based on the SSH heartbeat packet, determining whether the connection between the server and the target controller is abnormal; If there is no connection abnormality, continue to send the SSH heartbeat packet; If there is a connection abnormality, control the server to reconnect with the target controller through SSH.

3. The method according to claim 1, characterized in that The receiving a connection request from a client and determining whether to connect with the client comprises: Determining whether the connection request of the client is a connection request of a connected client; If it is a connection request from a connected client, prohibiting the client from connecting; If it is not a connection request from a connected client, a connection is made with the client.

4. The method according to claim 2, characterized in that: After determining that the connection with the client is allowed, the method further includes: Calling a preset diagnostic service based on the monitoring thread to obtain initial information of the target controller; After controlling the server to reconnect with the target controller through SSH, the method further includes: Based on the preset diagnostic service, reacquiring initial information of the target controller; Comparing the initial information of the target controller obtained after reconnection with the initial information obtained before reconnection; In case of inconsistency in the comparison, the initial information is updated and an alarm is triggered.

5. The method according to claim 1, characterized in that The determining whether the connection between the server and the client is abnormal based on the time interval of receiving the live heartbeat packet sent by the client includes: After receiving the detection heartbeat packet sent by the client, reply with a confirmation message; Determining whether the duration for the client to receive the confirmation message exceeds the time interval; If the time interval is exceeded, it is determined that the connection between the server and the client is abnormal; If the time interval is not exceeded, it is determined that the server is connected to the client normally.

6. The method according to any one of claims 1 to 4, characterized in that After disconnecting from the client, the method further includes: A thread termination signal is sent to the monitoring thread, and the monitoring thread corresponding to the client is closed.

7. A monitoring device for a controller test system, characterized in that: Applied to the server, including: A first determining unit, configured to receive a connection request from a client and determine whether to connect to the client, wherein different clients are used to forward data information of different controllers; A capture unit is used to start a controller connection status monitoring thread after determining that the connection with the client is allowed, send an SSH heartbeat packet to a target controller, and capture whether the connection between the server and the target controller is abnormal, wherein the target controller is a controller that receives data information forwarded by the client; The first determining unit is used to determine whether the connection between the server and the client is abnormal based on the time interval of receiving the live heartbeat packet sent by the client.

8. An electronic device, characterized in that: include: at least one processor; as well as a memory communicatively connected to the at least one processor; wherein, The memory stores instructions that can be executed by the at least one processor, and the instructions are executed by the at least one processor to enable the at least one processor to perform the method according to any one of claims 1 to 6.

9. A non-transitory computer-readable storage medium storing computer instructions, characterized in that: The computer instructions are used to cause the computer to execute the method according to any one of claims 1-6.

10. A computer program product, characterized in that The invention comprises a computer program which, when executed by a processor, implements the method according to any one of claims 1 to 6.