A UUV log management method, device, equipment and storage medium
By setting a distributed cluster and a heartbeat connection mechanism in UUV, the problem that UUV cannot return the log in extreme cases in extreme cases, realize the logging and analysis of log information under the fault, enhance the reliability and security of the system Essence
Patent Information
- Application Number
- CN202411562461.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-11-05
- Publication Date
- 2025-01-24
- Estimated Expiration
- 2044-11-05
AI Technical Summary
In extreme cases, UUV cannot return the cached logs to the server, resulting in the inability to analyze the problems encountered by the master device and take evasion measures.
By setting up a distributed cluster in UUV, including a first master device and multiple slave devices, the controller establishes a heartbeat connection with the first master device to determine whether the controller fails. If there is a failure, the first master device transmits log information to the server and instructs the slave device to transmit log information to the server.
When UUV encounters an extreme situation, through the distributed cluster log management method, log information can still be sent back to the server to analyze the problem and take evasive measures, avoiding the inability to transmit logs due to the loss of connection between the main control device and the traditional solution. problem.
Smart Images

Figure CN119094327B_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of computer technology, and in particular to a log management method, device, equipment and storage medium for a UUV. Background Art
[0002] An unmanned underwater vehicle (UUV) is an underwater vehicle that does not require human piloting and performs navigation tasks underwater through autonomous or remote control. The application scenarios of UUV can include underwater environment detection, life-saving and rescue, and military missions.
[0003] During underwater navigation, UUV faces special needs for log collection, log storage and log reporting when sailing underwater for a long time. Under normal circumstances, UUV can record relevant logs and send them back to the server. However, in extreme cases, for example, if the UUV controller is damaged, UUV cannot send the locally cached logs back to the server. Summary of the invention
[0004] The present application provides a UUV log management method, apparatus, device and storage medium, which can transmit cached logs back to a server in extreme cases.
[0005] In order to achieve the above purpose, this application adopts the following technical solutions:
[0006] In a first aspect, the present application provides a log management method for a UUV, which is applied to the UUV, wherein the UUV includes a controller and a distributed cluster, wherein the distributed cluster includes a first master device and multiple slave devices, and the controller establishes a first heartbeat connection with the first master device, and the method includes:
[0007] The first master device receives log information transmitted by the controller;
[0008] The first master device sends the log information to each slave device, so that each slave device caches the log information;
[0009] The first master device obtains a connection status of the first heartbeat connection, and determines whether the controller fails according to the connection status of the first heartbeat connection to obtain a first determination result;
[0010] If the first judgment result indicates that the controller fails, the first master device transmits the log information to the server and sends first indication information to each slave device, where the first indication information is used to instruct the slave device to transmit the log information to the server.
[0011] In some possible implementations, after the first host device transmits the log information to the server, the method further includes:
[0012] The first master device deletes the cached log information.
[0013] In some possible implementations, judging whether the controller fails according to the connection state of the first heartbeat connection to obtain a first judgment result includes:
[0014] If the heartbeat message sent by the controller to the first master device is not received for more than a preset time, the connection state of the first heartbeat connection is determined to be a lost state; if the heartbeat message sent by the controller to the first master device is received within a preset time, the connection state of the first heartbeat connection is determined to be a maintained state;
[0015] If the connection state of the first heartbeat connection is a lost state, a first judgment result is obtained that the controller has a fault; if the connection state of the first heartbeat connection is a maintained state, a first judgment result is obtained that the controller has not a fault.
[0016] In some possible implementations, the method further includes:
[0017] The first master device receives second indication information sent by the controller;
[0018] The first master device transmits the log information to the server according to the second indication information, and exits the distributed cluster.
[0019] In some possible implementations, the equipment in the distributed cluster includes at least one of a float, a torpedo, a mine, and a sub-UUV.
[0020] In a second aspect, the present application provides a log management method of a UUV, which is applied to the UUV, wherein the UUV includes a controller and a distributed cluster, wherein the distributed cluster includes a first master device and a plurality of slave devices, wherein the controller establishes a first heartbeat connection with the first master device, and each slave device establishes a second heartbeat connection with the first master device, wherein the method includes:
[0021] Each slave device obtains the connection status of the second heartbeat connection established with the first master device, and determines whether the first master device exits the distributed cluster according to the connection status of the second heartbeat connection, to obtain a second determination result;
[0022] If the second judgment result indicates that the first master device exits the distributed cluster, each slave device sends a request message to the controller, where the request message is used to request to become a second master device of the distributed cluster;
[0023] Each slave device receives a response message to the request message, wherein the response message is used to indicate that a target slave device among the multiple slave devices is the second master device;
[0024] The target slave device establishes a third heartbeat connection with the controller;
[0025] The other slave devices except the target slave device establish a fourth heartbeat connection with the target slave device.
[0026] In a third aspect, the present application provides a log management method of a UUV, which is applied to the UUV, wherein the UUV includes a controller and a distributed cluster, wherein the distributed cluster includes a first master device and multiple slave devices, wherein the controller establishes a first heartbeat connection with the first master device, and each slave device establishes a second heartbeat connection with the first master device, wherein the method includes:
[0027] The controller receives a request message sent by each slave device, where the request message is used to request to become a second master device of the distributed cluster;
[0028] After the controller receives the request message, the master device obtains the connection status of the first heartbeat connection, and determines whether the first master device exits the distributed cluster according to the connection status of the first heartbeat connection, to obtain a third determination result;
[0029] If the third judgment result indicates that the first master device exits the distributed cluster, the controller determines the target slave device corresponding to the first received request message as the second master device, establishes a third heartbeat connection with the target slave device, and sends a response message to each slave device, wherein the response message is used to indicate that the target slave device among multiple slave devices is the second master device.
[0030] In a fourth aspect, the present application provides a log management device for a UUV, wherein the device establishes a first heartbeat connection with a controller, and the device includes:
[0031] A receiving module, used for receiving log information transmitted by the controller;
[0032] A sending module, used for sending the log information to each slave device in the distributed cluster, so that each slave device caches the log information;
[0033] An acquisition module, used for acquiring a connection state of a first heartbeat connection, and judging whether a fault occurs in the controller according to the connection state of the first heartbeat connection, to obtain a first judgment result;
[0034] A management module is used to transmit the log information to a server and send first indication information to each slave device if the first judgment result indicates that the controller fails, wherein the first indication information is used to instruct the slave device to transmit the log information to the server.
[0035] In a fifth aspect, the present application provides a computing device, including a memory and a processor;
[0036] One or more computer programs are stored in the memory, and the one or more computer programs include instructions; when the instructions are executed by the processor, the computing device executes the method as described in any one of the first to third aspects.
[0037] In a sixth aspect, the present application provides a computer-readable storage medium, wherein the computer-readable storage medium is used to store a computer program, and the computer program is used to execute the method as described in any one of the first to third aspects.
[0038] It can be seen from the above technical solution that the present application has at least the following beneficial effects:
[0039] In the present application, the UUV includes a controller and a distributed cluster, the distributed cluster includes a first master device and multiple slave devices, the first master device is used to receive log information transmitted by the controller, and then send the log information transmitted by the controller to the first master device to each slave device, each slave device caches the log information, the controller establishes a heartbeat connection with the first master device to determine whether the controller fails, if the controller fails, the heartbeat connection with the first master device will be disconnected, the first master device will transmit log information to the server, and send an instruction to each slave device to transmit log information to the server, wherein, after leaving the distributed cluster, the slave device will actively try to send log information to the server, the slave device leaving the distributed cluster can be active or passive, such as the distributed cluster is disbanded due to damage to the controller or the first master device leaves the distributed cluster, and the distributed cluster cannot be rebuilt. In the traditional solution, log information is only stored in the main control device, and the management form and communication reporting channel are single. When the main control device encounters an emergency, such as the main control device is decomposed or damaged, the main control device will lose communication with the outside world and cannot transmit log information to the server. Since the server does not receive the log information, it cannot analyze the problem encountered by the main control device and cannot avoid it. It can be seen that in this application, the log information is stored in multiple devices through a distributed cluster, and in extreme cases, the log information can still be transmitted back to the server.
[0040] It should be understood that the description of technical features, technical solutions, beneficial effects or similar language in this application does not imply that all features and advantages can be realized in any single embodiment. On the contrary, it is understood that the description of features or beneficial effects means that specific technical features, technical solutions or beneficial effects are included in at least one embodiment. Therefore, the description of technical features, technical solutions or beneficial effects in this specification does not necessarily refer to the same embodiment. Furthermore, the technical features, technical solutions and beneficial effects described in the present embodiment can also be combined in any appropriate manner. Those skilled in the art will understand that the embodiment can be realized without one or more specific technical features, technical solutions or beneficial effects of a specific embodiment. In other embodiments, additional technical features and beneficial effects can also be identified in a specific embodiment that does not embody all embodiments. BRIEF DESCRIPTION OF THE DRAWINGS
[0041] Figure 1 A flow chart of a log management method for a UUV provided in an embodiment of the present application;
[0042] Figure 2 A flow chart of a second UUV log management method provided in an embodiment of the present application;
[0043] Figure 3 A schematic diagram of a UUV log management system provided in an embodiment of the present application;
[0044] Figure 4 A schematic diagram of a log management device for a UUV provided in an embodiment of the present application;
[0045] Figure 5 A schematic diagram of a computing device provided in an embodiment of the present application. DETAILED DESCRIPTION
[0046] The terms "first", "second", "third", etc. in the specification of this application and the accompanying drawings are used to distinguish different objects rather than to limit a specific order.
[0047] In the embodiments of the present application, words such as "exemplary" or "for example" are used to indicate examples, illustrations or descriptions. Any embodiment or design described as "exemplary" or "for example" in the embodiments of the present application should not be interpreted as being more preferred or more advantageous than other embodiments or designs. Specifically, the use of words such as "exemplary" or "for example" is intended to present related concepts in a specific way.
[0048] At present, in the traditional solution, log information is only stored in the main control device, and the management form and communication reporting channel are single. When the main control device encounters an emergency, such as the main control device is disassembled or damaged, the main control device will lose communication with the outside world and cannot transmit log information to the server. Since the server does not receive the log information, it cannot analyze the problems encountered by the main control device and cannot avoid them.
[0049] In view of this, an embodiment of the present application provides a log management method for a UUV, in which the UUV includes a controller and a distributed cluster, the distributed cluster includes a first master device and multiple slave devices, the first master device is used to receive the log information transmitted by the controller, and then send the log information transmitted by the controller to the first master device to each slave device, each slave device caches the log information, the controller establishes a heartbeat connection with the first master device to determine whether the controller fails, if the controller fails, it will disconnect the heartbeat connection with the first master device, the first master device will transmit the log information to the server, and send an instruction to each slave device that the slave device transmits the log information to the server, wherein, after the slave device leaves the distributed cluster, it will actively try to send the log information to the server, and the slave device can leave the distributed cluster actively or passively, such as the distributed cluster disbanded due to the damage of the controller or the first master device leaves the distributed cluster, and the distributed cluster cannot be rebuilt. It can be seen that in the present application, the log information is stored in multiple devices through the distributed cluster, and in extreme cases, the log information can still be transmitted back to the server.
[0050] In order to make the technical solution of the present application clearer and easier to understand, a log management method for a UUV provided in an embodiment of the present application is introduced. Figure 1 As shown, the figure is a flow chart of a log management method of a UUV provided in an embodiment of the present application, which is applied to the UUV, the UUV includes a controller and a distributed cluster, the distributed cluster includes a first master device and multiple slave devices, the controller establishes a first heartbeat connection with the first master device, and the method includes:
[0051] S101. A first master device receives log information transmitted by a controller.
[0052] The controller is an important part of the UUV and is the main storage location for log information. The controller establishes a communication relationship with the first master device and transmits the log information to the first master device, which receives the log information.
[0053] The first main device is used to receive log information transmitted by the controller, including at least one of a float, a torpedo, a mine and a sub-UUV, wherein the sub-UUV is a smaller UUV than the UUV, and the small UUV can be carried or mounted on the UUV.
[0054] Log information is information automatically recorded by the system or application during the operation of software or hardware in the UUV. This information is used to track and record the status, errors, warnings, and debugging information of the UUV runtime, so that developers, system administrators, or end users can understand the behavior of the UUV and diagnose problems or perform performance analysis based on the behavior. Log information usually contains timestamps, log levels, message content, and context information.
[0055] Among them, the timestamp is used to record the exact time when the log information is generated, which helps to understand the chronological order of events; log levels such as error, warning, information and debug are used to distinguish the importance of log information and help users quickly locate key information; log source is used to indicate the program or system component that generates the log information, which helps to locate the specific location where the problem occurs; message content: specific log information, describing what event or situation occurred, which may be the result of program execution, exception information, user operation, etc.; context information such as user ID, session ID and request parameters is used to provide more background information about the occurrence of the event to help analyze the problem.
[0056] S102: The first master device sends log information to each slave device.
[0057] After the first master device receives the log information transmitted by the controller, it stores the log information and then sends the log information to each slave device so that each slave device caches the log information. The purpose of each slave device caching the log information is to increase protection. If there is a problem with the controller, the first master device or the slave device can upload the cached log information to the server.
[0058] S103: The first master device obtains the connection status of the first heartbeat connection.
[0059] The first master device obtains the connection status of the heartbeat connection from the controller to confirm whether the operation of the controller is normal.
[0060] Among them, the heartbeat connection is a mechanism that detects and maintains the state of TCP long connections by sending and receiving heartbeat packets at regular intervals. The heartbeat connection can improve the reliability and stability of network communications and prevent the connection from being accidentally disconnected or failures from being discovered and handled in a timely manner. In actual applications, the parameters of the heartbeat mechanism need to be set according to specific needs and network environment to achieve the best effect.
[0061] S104: The first master device determines whether a controller fails according to the connection status of the first heartbeat connection.
[0062] If a first judgment result that the controller fails is obtained, S105 is executed;
[0063] If the first judgment result is obtained that the controller is not faulty, the process returns to continue the judgment.
[0064] The first master device may determine whether a controller failure occurs in the following manner.
[0065] The first master device sends a heartbeat message to the controller. If the first master device does not receive the heartbeat message sent by the controller to the first master device within a preset time, it is determined that the controller has failed, and the connection state of the first heartbeat connection is a lost state, and a first judgment result that the controller has failed is obtained; if the first master device receives the heartbeat message sent by the controller to the first master device within a preset time, it is determined that the controller has not failed, and the connection state of the first heartbeat connection is a maintained state, and a first judgment result that the controller has not failed is obtained.
[0066] S105: If the first judgment result indicates that the controller fails, the first master device transmits log information to the server and sends first indication information to each slave device.
[0067] If the controller fails and cannot transmit log information to the server, the first master device establishes a communication relationship with the server and transmits the log information previously transmitted by the controller to the server. After transmitting the log information to the server, the first master device deletes the cached log information and sends a first indication message to each slave device. The first indication message is used to instruct the slave device to transmit log information to the server. After receiving the first indication message, the slave device transmits the log information to the server and then deletes the cached log information. In addition, after the slave device exits the distributed cluster, it will actively send information to the server. The purpose of deleting the log information from the slave device is to prevent being captured and ensure the security of the log information.
[0068] The present application embodiment provides a second method for UUV log management, such as Figure 2 As shown, the figure is a flow chart of a second UUV log management method provided in an embodiment of the present application, the first master device exits the distributed cluster, and the target slave device becomes the second master device, and the method includes:
[0069] S201: If the controller does not fail, the first master device receives second indication information sent by the controller.
[0070] When the first master device needs to leave the distributed cluster to collect external information, the controller sends a second indication message to the first master device. The first master device transmits log information to the server according to the second indication message, deletes the log information and exits the distributed cluster. The controller will no longer send log information to the first master device. If the first master device encounters an emergency, the log information will not be leaked.
[0071] S202: Each slave device obtains the connection status of the second heartbeat connection established with the first master device.
[0072] S203: Each slave device determines whether the first master device exits the distributed cluster according to the connection status of the second heartbeat connection.
[0073] If a second determination result is obtained that the first master device has exited the distributed cluster, executing S204;
[0074] If the second judgment result is obtained that the first master device has not exited the distributed cluster, the process returns to continue the judgment.
[0075] Whether the first master device exits the distributed cluster can be determined in the following manner.
[0076] Each slave device sends a heartbeat message to the first master device. If the slave device does not receive the heartbeat message sent by the slave device to the first master device within a preset time period, it is determined that the first master device has exited the distributed cluster, and the connection state of the second heartbeat connection is a lost state, and a second judgment result that the first master device has exited the distributed cluster is obtained; if the slave device receives the heartbeat message sent by the slave device to the first master device within the preset time period, it is determined that the first master device has not exited the distributed cluster, and the connection state of the second heartbeat connection is a maintained state, and a second judgment result that the first master device has not exited the distributed cluster is obtained.
[0077] S204: If the second judgment result indicates that the first master device has exited the distributed cluster, each slave device sends a request message to the controller.
[0078] The request message is used by the slave device to request to become the second master device of the distributed cluster.
[0079] S205: The controller determines that the target slave device is the second master device.
[0080] After receiving the request message, the controller determines the target slave device corresponding to the first received request message as the second master device, and establishes a connection state of a third heartbeat connection with the second master device. The controller sends a response message to each slave device, and the response message is used to indicate that the target slave device among multiple slave devices is the second master device.
[0081] S206. The second master device obtains the connection status of the third heartbeat connection with the controller.
[0082] S207. The other slave devices except the second master device obtain the connection status of the fourth heartbeat connection with the second master device.
[0083] Combination of the above Figure 1 and Figure 2A UUV log management method provided in an embodiment of the present application is introduced in detail. The following will introduce the device, system and equipment provided in the embodiment of the present application in conjunction with the accompanying drawings.
[0084] The embodiment of the present application provides a UUV log management system, which includes a server, a controller, a first master device and other slave devices. Figure 3 As shown, this figure is a schematic diagram of a UUV log management system provided in an embodiment of the present application.
[0085] In the figure, the controller 301 is used to store log information, establish a communication relationship with the first host device, and transmit the log information to the first host device;
[0086] The first master device 302 is used to establish a communication relationship with the controller and other slave devices, obtain the connection status of the first heartbeat connection with the controller, receive log information from the controller, and then transmit the log information to other slave devices. It can also determine whether the controller fails according to the connection status of the heartbeat connection;
[0087] The first slave device 303, the second slave device 304 and the third slave device 305 are used to receive and store log information transmitted from the first master device;
[0088] The server 306 is used to receive log information transmitted by the controller, the first master device or other slave devices.
[0089] like Figure 4 As shown, this figure is a schematic diagram of a log management device for a UUV provided in an embodiment of the present application, and the device includes:
[0090] Receiving module 401, used to receive log information transmitted by the controller;
[0091] A sending module 402 is used to send log information to each slave device in the distributed cluster so that each slave device caches the log information;
[0092] The acquisition module 403 is used to acquire the connection state of the first heartbeat connection, and determine whether the controller fails according to the connection state of the first heartbeat connection to obtain a first determination result;
[0093] The management module 404 is used to transmit log information to the server and send first indication information to each slave device if the first judgment result indicates that the controller fails, wherein the first indication information is used to instruct the slave device to transmit log information to the server.
[0094] Optionally, after the first master device transmits the log information to the server, the method further includes:
[0095] The first master device deletes the cached log information.
[0096] Optionally, judging whether the controller fails according to the connection state of the first heartbeat connection to obtain a first judgment result includes:
[0097] If the heartbeat message sent by the controller to the first master device is not received for more than a preset time, the connection state of the first heartbeat connection is determined to be a lost state; if the heartbeat message sent by the controller to the first master device is received within a preset time, the connection state of the first heartbeat connection is determined to be a maintained state;
[0098] If the connection state of the first heartbeat connection is a lost state, a first judgment result is obtained that the controller has a fault; if the connection state of the first heartbeat connection is a maintained state, a first judgment result is obtained that the controller has not a fault.
[0099] Optionally, the method further includes:
[0100] The first master device receives second indication information sent by the controller;
[0101] The first master device transmits the log information to the server according to the second indication information, and exits the distributed cluster.
[0102] Optionally, the equipment in the distributed cluster includes at least one of a float, a torpedo, a mine and a sub-UUV.
[0103] According to an embodiment of the present application, a log management device of a UUV may correspond to the method described in the embodiment of the present application, and the above-mentioned other operations and / or functions of each module / unit of the log management device of a UUV are respectively to realize Figure 1 , Figure 2 For the sake of brevity, the corresponding processes of each method in the illustrated embodiment are not described in detail here.
[0104] The present application also provides a computing device. Figure 5 As shown, the figure is a schematic diagram of a computing device provided in an embodiment of the present application, and the computing device 500 includes a bus 701, a processor 702, a communication interface 703 and a memory 704. The processor 702, the memory 704 and the communication interface 703 communicate with each other through the bus 701.
[0105] The bus 701 may be a peripheral component interconnect (PCI) bus or an extended industry standard architecture (EISA) bus. The bus may be divided into an address bus, a data bus, a control bus, etc. For ease of representation, Figure 5 Only one thick line is used in the diagram, but this does not mean that there is only one bus or only one type of bus.
[0106] The processor 702 may be any one or more of a central processing unit (CPU), a graphics processing unit (GPU), a microprocessor (MP), or a digital signal processor (DSP).
[0107] The communication interface 703 is used for communicating with the outside.
[0108] The memory 704 may include a volatile memory, such as a random access memory (RAM). The memory 704 may also include a non-volatile memory, such as a read-only memory (ROM), a flash memory, a hard disk drive (HDD), or a solid state drive (SSD).
[0109] The memory 704 stores executable codes, and the processor 702 executes the executable codes to perform a log management method for a UUV.
[0110] Specifically, in implementing Figure 4 In the case of the embodiment shown, and Figure 4 When each module or unit of the log management device of a UUV described in the embodiment is implemented by software, the execution Figure 4 The software or program code required for the functions of each module / unit in the system may be partially or completely stored in the memory 704. The processor 702 executes the program code corresponding to each unit stored in the memory 704 to perform a log management method for a UUV.
[0111] The embodiment of the present application also provides a computer-readable storage medium. The computer-readable storage medium can be any available medium that can be stored by a computing device or a data storage device such as a data center containing one or more available media. The available medium can be a magnetic medium (such as a floppy disk, a hard disk, a tape), an optical medium (such as a DVD), or a semiconductor medium (such as a solid-state hard disk). The computer-readable storage medium includes instructions that instruct the computing device to execute a log management method for a UUV.
[0112] The embodiment of the present application further provides a computer program product, which includes one or more computer instructions. When the computer instructions are loaded and executed on a computing device, the process or function described in the embodiment of the present application is generated in whole or in part.
[0113] The computer instructions may be stored in a computer-readable storage medium, or transmitted from one computer-readable storage medium to another computer-readable storage medium. For example, the computer instructions may be transmitted from one website, computer or data center to another website, computer or data center via wired (e.g., coaxial cable, optical fiber) or wireless (e.g., infrared, wireless, microwave, etc.) means.
[0114] When the computer program product is executed by a computer, the computer executes any method of a UUV log management method. The computer program product may be a software installation package, and when any method of a UUV log management method is required, the computer program product may be downloaded and executed on a computer.
[0115] The descriptions of the processes or structures corresponding to the above-mentioned figures have different emphases. For parts that are not described in detail in a certain process or structure, please refer to the relevant descriptions of other processes or structures.
[0116] The above description is only a specific implementation of the present application, but the protection scope of the present application is not limited thereto. Any changes or substitutions within the technical scope disclosed in the present application should be included in the protection scope of the present application.
Claims
1. A UUV log management method, characterized in that: Applied to a UUV, the UUV includes a controller and a distributed cluster, the distributed cluster includes a first master device and multiple slave devices, the controller establishes a first heartbeat connection with the first master device, and the method includes: The first master device receives log information transmitted by the controller; The first master device sends the log information to each slave device, so that each slave device caches the log information; The first master device obtains a connection status of the first heartbeat connection, and determines whether the controller fails according to the connection status of the first heartbeat connection to obtain a first determination result; If the first judgment result indicates that the controller fails, the first master device transmits the log information to the server and sends first indication information to each slave device, where the first indication information is used to instruct the slave device to transmit the log information to the server.
2. The method according to claim 1, characterized in that After the first master device transmits the log information to the server, the method further includes: The first master device deletes the cached log information.
3. The method according to claim 1, characterized in that The determining, according to the connection state of the first heartbeat connection, whether the controller fails to obtain a first determination result includes: If the heartbeat message sent by the controller to the first master device is not received for more than a preset time, the connection state of the first heartbeat connection is determined to be a lost state; if the heartbeat message sent by the controller to the first master device is received within a preset time, the connection state of the first heartbeat connection is determined to be a maintained state; If the connection state of the first heartbeat connection is a lost state, a first judgment result is obtained that the controller has a fault; if the connection state of the first heartbeat connection is a maintained state, a first judgment result is obtained that the controller has not a fault.
4. The method according to claim 1, characterized in that The method further comprises: The first master device receives second indication information sent by the controller; The first master device transmits the log information to the server according to the second indication information, and exits the distributed cluster.
5. According to the method according to any one of claims 1-4, the equipment in the distributed cluster includes at least one of a float, a torpedo, a mine and a sub-UUV.
6. A log management device for a UUV, characterized in that: The device establishes a first heartbeat connection with the controller, and the device comprises: A receiving module, used for receiving log information transmitted by the controller; A sending module, used for sending the log information to each slave device in the distributed cluster, so that each slave device caches the log information; An acquisition module, used for acquiring a connection state of a first heartbeat connection, and judging whether a fault occurs in the controller according to the connection state of the first heartbeat connection, to obtain a first judgment result; A management module is used to transmit the log information to a server and send first indication information to each slave device if the first judgment result indicates that the controller fails, wherein the first indication information is used to instruct the slave device to transmit the log information to the server.
7. A computing device, characterized in that including memory and processor; One or more computer programs are stored in the memory, and the one or more computer programs include instructions; when the instructions are executed by the processor, the computing device executes the method as claimed in any one of claims 1 to 5.
8. A computer-readable storage medium, characterized in that: The computer-readable storage medium is used to store a computer program, and the computer program is used to execute the method according to any one of claims 1 to 5.
Citation Information
Patent Citations
Fault log storage method, device and system
CN117707818A
Real-time consistency method of cluster robot under unreliable network condition
CN118200340A