Log transmission method, device and equipment of UUV (Unmanned Underwater Vehicle) and storage medium
By escaping and compressing source code files in UUV, the problem of log files occupying a large amount of storage space in UUV is solved, and saving storage space and improving the security of log information is achieved.
Patent Information
- Application Number
- CN202510422848.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-04-07
- Publication Date
- 2025-05-06
- Estimated Expiration
- Not applicable · inactive patent
AI Technical Summary
In the working and operation environment of underwater unmanned vehicles (UUVs), storage resources are limited and communication conditions are strict, which have higher requirements for the storage and reporting of logs. As the equipment or system run time accumulates, log file information gradually increases, occupying a large amount of storage space.
Before the source code file is compiled into a log file, the source code file is escaped through the first mapping relationship to generate the corresponding second source code file to reduce the amount of data in the source code file; then the first log file is generated based on the second source code file, and the first log file is compressed to obtain the second log file, and finally sent it to the target device.
Through this method, the amount of data in the source code file can be reduced before generating the log file, the storage space can be consumed, and the storage space can be further saved through compression, while improving the security of the log file and reducing the risk of content being leaked.
Smart Images

Figure CN119938388A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of computer technology, and in particular to a log transmission method, device, equipment and storage medium of a UUV. Background Art
[0002] A log system is a set of tools and processes used to record, store, and analyze events and operations that occur in software applications, operating systems, network devices, or other systems. Log systems are critical for monitoring system status, debugging problems, auditing, and compliance checks. Log systems not only improve the operational efficiency and safety of equipment, but also provide an important data foundation for decision support, compliance, and maintenance management.
[0003] However, in the working environment of underwater unmanned vehicles (UUVs), storage resources are limited and communication conditions are harsh, which places higher requirements on the storage and reporting of logs. In addition, as the equipment or system runs for a long time, the log file information will gradually increase, occupying a large amount of storage space. Summary of the invention
[0004] The present application provides a UUV log transmission method, apparatus, device and storage medium, which can further compress log information before compiling source code files into log files, reduce storage space requirements, and improve the security of log information.
[0005] In order to achieve the above objectives, this application adopts the following technical solutions: In a first aspect, the present application provides a UUV log transmission method, the method comprising: Obtaining a first source code file; Translating the first source code file through a first mapping relationship to obtain a second source code file corresponding to the first source code file; Based on the second source code file, generate a first log file; Compressing the first log file to obtain a second log file; The second log file is sent to the target device.
[0006] In some possible implementations, the first mapping relationship is used to shorten the character length of the first source code file to a first character length threshold, wherein the first character length threshold is smaller than the character length of the first source code file.
[0007] In some possible implementations, sending the second log file to the target device includes: The second log file is encrypted and sent to the target device, wherein the encryption algorithm is an Advanced Encryption Standard algorithm.
[0008] In some possible implementations, the method further includes: Determine whether the generated encrypted second log file needs to be reported in real time according to the system configuration, and obtain a first determination result; If the first judgment result indicates that the generated encrypted second log file needs to be reported in real time, the encrypted second log file is sent to the target device.
[0009] In some possible implementations, compressing the first log file to obtain the second log file includes: If the first judgment result indicates that the generated encrypted second log file does not need to be reported in real time, the second log file is not sent to the target device.
[0010] In some possible implementations, compressing the first log file to obtain the second log file includes: Huffman coding is used to construct a Huffman tree, the first log file is compressed, and the data in the first log file is compressed into a string in a hexadecimal format to obtain a second log file.
[0011] In some possible implementations, the method further includes: The target device uses a Huffman decompression algorithm on the second log file to obtain a first log file, and escapes the first log file according to the first mapping relationship to obtain a target log file, thereby realizing transmission of the log file.
[0012] In a second aspect, the present application provides a log transmission device for a UUV, the device comprising: An acquisition module, used for acquiring a first source code file; an escape module, configured to escape the first source code file through a first mapping relationship to obtain a second source code file corresponding to the first source code file; and generate a first log file based on the second source code file; A compression module, used for compressing the first log file to obtain a second log file; The sending module is used to send the second log file to the target device.
[0013] In a third aspect, the present application provides a computing device, including a memory and a 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 described in any one of the first aspects.
[0014] In a fourth 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 aspects.
[0015] In a fifth aspect, the present application provides a computer program product, wherein the computer program product comprises one or more computer instructions, and when the computer instructions are executed by a computer, the computer executes the method as described in any one of the first aspects.
[0016] It can be seen from the above technical solution that the present application has at least the following beneficial effects: In the present application, firstly, a first source code file is obtained, and the first source code file is escaped through a first mapping relationship to obtain a second source code file corresponding to the first source code file. This step can reduce the data path of the source code file before generating a log file from the source code file, thereby reducing the storage space occupied. After obtaining the second source code file, a first log file is generated based on the second source code file. Since the data volume of the second source code file is reduced, the storage space occupied by the obtained first log file is also reduced. After obtaining the first log file, the first log file is compressed to obtain a second log file. By compressing the first log file, the data volume of the final log file is further reduced, saving storage space. At the same time, by performing the aforementioned escape and compression steps, the security of the log file is further improved, and the risk of the content of the log file being leaked is reduced. Finally, the second log file is sent to the target device according to the system configuration. It can be seen that this method can reduce the requirements for storage space and improve the security of log information.
[0017] 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
[0018] Figure 1 A flow chart of a UUV log transmission method provided in an embodiment of the present application; Figure 2 A schematic diagram of an application scenario of a UUV log transmission method provided in an embodiment of the present application; Figure 3 A schematic diagram of a log transmission device of a UUV provided in an embodiment of the present application; Figure 4 A schematic diagram of a computing device provided in an embodiment of the present application. DETAILED DESCRIPTION
[0019] 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.
[0020] 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.
[0021] In order to make the description of the following embodiments clear and concise, a brief introduction to the related technology is first given: UUV is an advanced device that can autonomously navigate underwater and perform various tasks. It can complete underwater operations autonomously or remotely. UUV does not require direct human control, but works based on preset programs or remote commands. It can be applied to complex and changeable underwater environments and perform efficient and accurate detection, survey, operation and rescue tasks.
[0022] At present, the storage resources of the UUV operating environment are limited, the communication conditions are strict, and higher requirements are placed on the storage and reporting of logs. However, as the equipment or system runs for a long time, the log files will gradually increase. Even if the log files are compressed, they will still occupy a large amount of storage space. Moreover, current technological development often focuses on optimizing compression algorithms, hoping to improve compression efficiency through algorithm refinement. However, in the specific application scenario of real-time log storage and extraction, existing compression technology can theoretically achieve a high compression ratio and compression speed, but when faced with log collection tasks with extremely high real-time requirements and harsh communication conditions, the problem of low compression efficiency becomes prominent. In addition, in real-time log systems, data is generated very quickly and needs to be quickly transmitted to a remote end for storage and analysis. Therefore, for the collection and display of real-time logs, the compression efficiency is low and cannot meet the efficient collection under harsh communication conditions.
[0023] In view of this, the embodiment of the present application provides a log transmission method of UUV, which is applied to a processing device. In the method, firstly, a first source code file is obtained, and the first source code file is escaped through a first mapping relationship to obtain a second source code file corresponding to the first source code file. This step can reduce the data path of the source code file before generating a log file from the source code file, thereby reducing the occupation of storage space. After obtaining the second source code file, a first log file is generated based on the second source code file. Since the data volume of the second source code file is reduced, the storage space occupied by the obtained first log file is also reduced. After obtaining the first log file, the first log file is compressed to obtain a second log file. By compressing the first log file, the data volume of the final log file is further reduced, and storage space is saved. At the same time, by the aforementioned escape and compression steps, the security of the log file is further improved, and the risk of the content of the log file being leaked is reduced. Finally, the second log file is sent to the target device according to the system configuration. It can be seen that the method can reduce the requirements for storage space and improve the security of log information.
[0024] In order to make the technical solution of the present application clearer and easier to understand, the following describes a UUV log transmission method provided by an embodiment of the present application in conjunction with the accompanying drawings. Figure 1 As shown, this figure is a flow chart of a UUV log transmission method provided in an embodiment of the present application. The UUV log transmission method includes: S101: A processing device obtains a first source code file.
[0025] The first source code file is a collection of data information collected by the UUV during underwater navigation in strict accordance with the mission requirements. The acquisition process follows a systematic process. When the UUV receives a specific mission instruction, it will start the corresponding sensor equipment according to the mission type. For example, if the mission is marine environment monitoring, the UUV will activate equipment such as temperature, salinity, depth, and water quality analyzer. These devices will collect data on parameters such as water temperature, salinity, pH, and dissolved oxygen at a certain sampling frequency, and generate the first source code file based on the collected data.
[0026] In an embodiment of the present application, a piece of data information in the first source code file is selected as an example: Log(INFO, "This is an informational message. (id=%d, text=%s)", id, text); the method provided by the present application will be described in detail based on this example.
[0027] S102: The processing device translates the first source code file through a first mapping relationship to obtain a second source code file corresponding to the first source code file.
[0028] The first mapping relationship is used to shorten the character length of the first source code file to a first character length threshold, wherein the first character length threshold is smaller than the character length of the first source code file.
[0029] The first mapping relationship is stored as a first log template.
[0030] This step can identify and remove those redundant comments, unused variable declarations, and repeated code snippets in the first source code file. Through such operations, the data volume of the source code file can be effectively reduced. When the data volume of the source code file is reduced, the space occupied by the source code file on the storage medium will also be reduced accordingly. This not only helps to improve the utilization efficiency of storage resources and avoid unnecessary waste of storage space, but also can improve the speed and performance of data processing to a certain extent, laying a good foundation for the subsequent generation of log files and other related operations.
[0031] In an embodiment of the present application, the processing device escapes the first source code file, and the obtained second source code file is: Log(INFO, "abcdefff (%d,%s)", id, text); and the first mapping relationship used in the escape process is stored as a first log template, and the first log template is: key: abcdefff; value: "helloworld.cpp INFO This is an informational message. (id=%d, text=%s)".
[0032] S103: The processing device generates a first log file based on the second source code file.
[0033] The processing device compiles the second source code file to generate an executable program, which is specially designed to generate a first log file. During the program running process, it will record the running status and key information of the program according to the preset log recording rules. For example, when the program starts, the startup timestamp is recorded; when the function is called, the function name, the passed parameters and the return value are recorded; when the program encounters an abnormal situation, the type of exception and the location where the exception occurs are recorded. The executable program will organize these recorded information according to a specific log format, such as the format of fields such as timestamp, event type, detailed description, etc., and then store it in the file system to finally form the first log file. Among them, the format of the first log file is: timestamp + key value + parameter, where the parameter is separated from the key value by special characters, such as ",".
[0034] Before compiling the first source code file, the present application first performs escape processing on the first source code file, and escapes the log information into data information with a smaller character length, which greatly reduces the log length. Not only does it greatly reduce the storage space requirements, but it also reduces the bandwidth requirements for real-time transmission, greatly improving the standardization of log output; at the same time, because the log readability is not good, the escape and extraction occur on the monitoring side, and the security is also greatly improved. The first source code file exists in the development process, and the second source code file is obtained by escaping before compilation. By compiling the second source code file, an executable program is generated. The executable program runs on the UUV, and the first log file is generated during the operation.
[0035] In an embodiment of the present application, the first log file generated by the executable program is: 6757e2f3abcdefff12345,example.
[0036] S104: The processing device compresses the first log file to obtain a second log file.
[0037] Huffman coding is a variable-length coding scheme based on the frequency of character occurrence. Its basic idea is to assign shorter codes to characters with high frequency of occurrence and longer codes to characters with low frequency of occurrence, so as to achieve the purpose of compressing data. This coding method can ensure the shortest average code length, thus achieving efficient compression effect. The following is a detailed introduction to the calculation process of Huffman coding.
[0038] Huffman coding is adaptive. It can dynamically build a Huffman tree based on the actual frequency of occurrence of characters in different log files to generate the optimal coding scheme. This means that no matter how the content of the log file changes, Huffman coding can provide good compression effects. For example, log files generated by different types of applications have different character distribution characteristics. Huffman coding can adaptively encode according to the characteristics of each log file to ensure efficient compression in all situations. The construction process of the Huffman tree is as follows: Counting character frequencies: First, you need to count the frequency of occurrence of each character in the data to be compressed.
[0039] Create nodes: Create a node for each character based on the statistical frequency of the characters. The weight of the node is the frequency of the character.
[0040] Build a minimum heap: Sort all nodes by weight from small to large, and build a minimum heap (or priority queue) to quickly find the node with the smallest weight.
[0041] Merge nodes: Take the two nodes with the smallest weights from the minimum heap and merge them into a new node whose weight is the sum of the weights of its two child nodes. Then, reinsert the new node into the minimum heap.
[0042] Repeat merging: Repeat the above merging process until there is only one node left in the heap. This node is the root node of the Huffman tree.
[0043] Huffman coding: After constructing the Huffman tree, you need to start from the root node and encode each edge (usually using 0 and 1 to represent the left subtree and the right subtree). Then, trace back from the leaf node to the root node, concatenate the codes of the edges along the way, and you will get the Huffman code of each character.
[0044] Compress data: Use the generated Huffman coding table to replace each character in the data to be compressed with its corresponding Huffman code. Since the codes of high-frequency characters are shorter and the codes of low-frequency characters are longer, the coding length of the overall data will be greatly shortened, thus achieving a compression effect.
[0045] Storage coding: The compressed coded data and the Huffman coding table are stored together. When decoding, the Huffman coding table is needed to restore the original data.
[0046] The processing device constructs a Huffman tree, performs compression processing on the first log file through the above steps, compresses the data in the first log file into a string in hexadecimal format, and obtains a second log file.
[0047] Using Huffman coding to compress the first log file can not only realize the processing of real-time logs, but also significantly reduce the size of log files. When transferring log files from one node to another (such as from a server to a log management center), the required network bandwidth is also reduced accordingly. This is particularly important in environments with limited network bandwidth. It can not only reduce transmission time, but also reduce network usage costs. Moreover, the log file compressed by Huffman coding is presented in an unreadable information format. This is because Huffman coding converts the original character sequence into a binary code consisting of 0 and 1. There is no corresponding Huffman tree, and it is difficult to restore it to the original log content. This feature plays a role in information encryption to a certain extent. Even if the log file is illegally intercepted during transmission, it is difficult for attackers to directly obtain sensitive information therein, thereby improving the security of log transmission. There is another key reason for using Huffman coding. Due to the uniqueness of Huffman coding, tampering with the compressed log file will cause errors in the decoded content. Therefore, when the target device is decoding, it is possible to determine whether the log file has been tampered with during transmission by checking the correctness of the decoding result. This mechanism effectively prevents the log data from being maliciously modified during transmission and ensures the integrity and reliability of the log data.
[0048] S105: The processing device sends the second log file to the target device.
[0049] After the processing device obtains the second log file, it uses the Advanced Encryption Standard algorithm to encrypt the second log file. After the UUV docks, according to the system configuration, it is determined whether to transmit the encrypted second log file to the target device, and the following operations are performed.
[0050] Determine whether the generated encrypted second log file needs to be reported in real time according to the system configuration, and obtain a first determination result; If the first judgment result indicates that the generated encrypted second log file needs to be reported in real time, sending the encrypted second log file to the target device; If the first judgment result indicates that the generated encrypted second log file does not need to be reported in real time, the encrypted second log file is not sent to the target device, and the second log file is stored locally in the UUV.
[0051] After receiving the second log file, the target device uses a Huffman decompression algorithm on the second log file to obtain the first log file, and escapes the first log file according to the first log template to obtain the target log file, thereby realizing the transmission of the log file.
[0052] In order to make the technical solution of the present application clearer and easier to understand, the following is a more detailed introduction to a UUV log transmission method provided by the embodiment of the present application in combination with the accompanying drawings and application scenarios. Figure 2 As shown, the figure is a schematic diagram of an application scenario of a UUV log transmission method provided in an embodiment of the present application.
[0053] In the figure, the log processor 201 processes the processing steps corresponding to S102, which is used to escape the first source code file to obtain the second source code file. This step can identify and remove those redundant comments, unused variable declarations and repeated code fragments in the first source code file. Through such operations, the data volume of the source code file can be effectively reduced. When the data volume of the source code file is reduced, the space occupied by it on the storage medium will also be reduced accordingly; the log dictionary memory 203 is used to store the first log template, and send the first log template to the log extractor 205 in the target device according to the actual situation, which is used to decode and escape the first log file to obtain the target log file; The compiler 202 processes the processing steps corresponding to S103, and is used to compile the second source code file, and escape the log information into data information with a smaller character length, which greatly reduces the log length, not only greatly reduces the requirement for storage space, but also reduces the bandwidth requirement for real-time transmission, and greatly improves the standardization of log output; the Huffman encoder 204 processes the processing steps corresponding to S104, and is used to compress the first log file to generate a second log file; the target device 205 is used to receive the second log file, decompress the second log file to obtain the first log file, and escape the first log file according to the first log template to obtain the target log file.
[0054] Based on the above content, before the second source code file is compiled into the first log file, the first source code file is escaped so that the string length of the first source code file is shortened, which can reduce the requirement for storage space, and the first log file is compressed again to further reduce the requirement for storage space. At the same time, the compressed log information is presented in a form that is difficult to directly interpret, which greatly improves its security during transmission and effectively prevents information from being illegally obtained during transmission.
[0055] The present application also provides a log transmission device for a UUV, such as Figure 3As shown, the figure is a schematic diagram of a UUV log transmission device provided in an embodiment of the present application, and the device includes: an acquisition module 301, an escape module 302, a compression module 303 and a sending module 304; An acquisition module 301 is used to acquire a first source code file; The translation module 302 is used to translate the first source code file through a first mapping relationship to obtain a second source code file corresponding to the first source code file; and generate a first log file based on the second source code file; A compression module 303, used to compress the first log file to obtain a second log file; The sending module 304 is used to send the second log file to the target device.
[0056] In some possible implementations, the first mapping relationship is used to shorten the character length of the first source code file to a first character length threshold, wherein the first character length threshold is smaller than the character length of the first source code file.
[0057] In some possible implementations, the sending module 304 is specifically configured to send the second log file to the target device, including: The second log file is encrypted and sent to the target device, wherein the encryption algorithm is an Advanced Encryption Standard algorithm.
[0058] In some possible implementations, the sending module 304 is specifically used to determine whether the generated encrypted second log file needs to be reported in real time according to the system configuration, and obtain a first determination result; If the first judgment result indicates that the generated encrypted second log file needs to be reported in real time, the encrypted second log file is sent to the target device.
[0059] In some possible implementations, the sending module 304 is specifically configured to not send the second log file to the target device if the first judgment result indicates that the generated encrypted second log file does not need to be reported in real time.
[0060] In some possible implementations, the compression module 303 is specifically configured to compress the first log file to obtain a second log file, including: Huffman coding is used to construct a Huffman tree, the first log file is compressed, and the data in the first log file is compressed into a string in a hexadecimal format to obtain a second log file.
[0061] In some possible implementations, the device further includes: The reading module is used to apply the Huffman decompression algorithm to the second log file to obtain the first log file, and to escape the first log file according to the first mapping relationship to obtain the target log file, so as to realize the transmission of the log file.
[0062] The present application also provides a computing device. Figure 4 As shown, this figure is a schematic diagram of a computing device provided in an embodiment of the present application, and the computing device 400 includes a bus 401, a processor 402, a communication interface 403 and a memory 404. The processor 402, the memory 404 and the communication interface 403 communicate with each other through the bus 401.
[0063] The bus 401 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 4 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.
[0064] The processor 402 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).
[0065] The communication interface 403 is used for communicating with the outside.
[0066] The memory 404 may include a volatile memory, such as a random access memory (RAM). The memory 404 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).
[0067] The memory 404 stores executable codes, and the processor 402 executes the executable codes to perform the aforementioned UUV log transmission method.
[0068] 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 the above-mentioned UUV log transmission method.
[0069] 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.
[0070] 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.
[0071] When the computer program product is executed by a computer, the computer executes any of the aforementioned UUV log transmission methods. The computer program product may be a software installation package, and when any of the aforementioned UUV log transmission methods is required, the computer program product may be downloaded and executed on a computer.
[0072] 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.
[0073] 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 transmission method, characterized in that: Applied to a processing device, the method comprises: Obtaining a first source code file; Translating the first source code file through a first mapping relationship to obtain a second source code file corresponding to the first source code file; Based on the second source code file, generate a first log file; Compressing the first log file to obtain a second log file; The second log file is sent to the target device.
2. The method according to claim 1, characterized in that The first mapping relationship is used to shorten the character length of the first source code file to a first character length threshold, wherein the first character length threshold is smaller than the character length of the first source code file.
3. The method according to claim 1, characterized in that The sending the second log file to the target device includes: The second log file is encrypted and sent to the target device, wherein the encryption algorithm is an Advanced Encryption Standard algorithm.
4. The method according to claim 3, characterized in that The method further comprises: Determine whether the generated encrypted second log file needs to be reported in real time according to the system configuration, and obtain a first determination result; If the first judgment result indicates that the generated encrypted second log file needs to be reported in real time, the encrypted second log file is sent to the target device.
5. The method according to claim 4, characterized in that The method further comprises: If the first judgment result indicates that the generated encrypted second log file does not need to be reported in real time, the second log file is not sent to the target device.
6. The method according to claim 1, characterized in that The compressing the first log file to obtain the second log file includes: Huffman coding is used to construct a Huffman tree, the first log file is compressed, and the data in the first log file is compressed into a string in a hexadecimal format to obtain a second log file.
7. The method according to claim 1, characterized in that The method further comprises: The target device uses a Huffman decompression algorithm on the second log file to obtain a first log file, and escapes the first log file according to the first mapping relationship to obtain a target log file, thereby realizing transmission of the log file.
8. A log transmission device for a UUV, characterized in that: The device comprises: An acquisition module, used for acquiring a first source code file; an escape module, configured to escape the first source code file through a first mapping relationship to obtain a second source code file corresponding to the first source code file; and generate a first log file based on the second source code file; A compression module, used for compressing the first log file to obtain a second log file; The sending module is used to send the second log file to the target device.
9. 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 7.
10. 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 7.
Citation Information
Patent Citations
Log compression method and device, log decompression method and device and storage medium
CN110851409A
Log compression and encryption method and device, equipment and storage medium
CN113179265A
Multi-service module log recording method and system, electronic equipment and storage medium
CN115757049A
Chip design code processing method and device and computer equipment
CN118153491A
Log file generation method and device, equipment and medium
CN118820196A