File management system and task scheduling method of underwater detection equipment
By adopting asynchronous buffering mode and dilute reading functions in the underwater detection system, combined with multiple transmission methods, the system operation burden and data storage problems are solved, efficient and reliable file management and transmission are achieved, and data security is ensured. Sex and flexibility.
Patent Information
- Application Number
- CN202411100092.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-08-12
- Publication Date
- 2024-11-29
AI Technical Summary
During the long-term data writing and frequent file storage, existing underwater detection systems will cause excessive system operation burden, affect the execution of other tasks, and may cause file system crashes and data corruption. Unreasonable data storage arrangements will waste resources. and increase the workload of the processing staff.
Use asynchronous buffering mode to store data, limit the number of file storage, close and reopen files regularly, use sparse reading function and multiple transmission methods, combine FTP file transfer protocol and TCP network communication to achieve efficient return of file data and manage.
It improves file transfer efficiency, reduces system operation overhead, enhances system reliability and flexibility, ensures data integrity and security, and meets user needs in different situations.
Smart Images

Figure CN119045733A_ABST
Abstract
Description
Technical Field
[0001] The invention belongs to the technical field of underwater detection data processing, and in particular relates to a file management system and a task scheduling method for underwater detection equipment. Background Art
[0002] Underwater detection systems can be used to detect, locate, identify and track underwater objects or environmental features, and are widely used in the fields of marine scientific research, marine engineering, search and rescue operations, etc. Underwater detection data refers to information collected through various underwater detection technologies. These data are extremely valuable in understanding the marine environment, detecting marine targets, supporting marine resource development, and ensuring marine safety.
[0003] With the development of underwater detection technology, a large amount of data generated by the system needs to be stored and managed. SD card has become a commonly used storage medium due to its portability, stability and large capacity. Fatfs is an ideal choice for file storage management in embedded systems due to its compatibility, portability, resource efficiency and high stability. At present, designing and implementing an efficient, reliable and flexible underwater detection system file management system to ensure the integrity and security of detection data is still the key to system development.
[0004] Through the above analysis, the problems and defects of the existing technology are as follows: writing data to the same file for a long time will cause the single storage to slow down, resulting in excessive burden on the system operation and affecting the execution of other tasks;
[0005] Frequently writing data to files for a long time will cause the file system to crash, resulting in damage to the detection data stored in the early stage;
[0006] Unreasonable data storage arrangements will waste data transmission resources and increase the workload of ground data processing personnel. Summary of the invention
[0007] In order to overcome the problems existing in the related art, the disclosed embodiments of the present invention provide a file management system and a task scheduling method for underwater detection equipment.
[0008] The technical solution is as follows: A task scheduling method for a file management system of an underwater detection device comprises:
[0009] S1: After the underwater detection equipment is reset and the file management system completes initialization and self-check, the file status management module creates a new file, and the file management system is initially in the P_STATE task state;
[0010] S2: The underwater detection equipment collects data, and the data storage task SD_Save_Task starts running, performing asynchronous buffer mode storage;
[0011] S3: In the P_STATE task state, the number of stored files is limited by the save_times value of 72000. When the number of stored data reaches the save_times value, the file status management module closes the current file, creates and opens a new file to continue storing, and the variable currentfile_order is updated by one;
[0012] S4: If the file status management module receives the status switching signal, the file management system closes the current file, switches to the S_STATE task state, creates a new file according to step S1, and starts saving data according to step S2;
[0013] S5: When the file status management module receives the data automatic return instruction, the file data return module starts to execute the automatic return function, creates a new Auto_Send_Task task, and executes it to return the current file in a sparse manner;
[0014] S6: When the short-range return conditions are met, the file data return module performs the short-range return function and can return all the SD card file data to the ground operating system;
[0015] S7: When the file status management module receives the data deletion instruction, the file processing module executes the SD card clearing task, and steps S2 to S6 will be suspended. After the end, the system creates a new file and continues to execute steps S2 to S6.
[0016] In step S1, the file name of the new file is retrieved one by one according to the file name array FILENAME to see if the file exists, until a non-existent file is retrieved and named after the file; the current file name index is recorded in the variable currentfile_order; the file name array FILENAME contains a total of 100 data storage file names. When the file names are used up, the file management system will automatically clear all files and create a new file from scratch.
[0017] In step S1, the file management system includes two task states: P_STATE task state and S_STATE task state; the file management system determines the current state by reading the signal variable job_type of the file status management module; when job_type=0, the file management system is in the P_STATE task state, and when job_type=1, the file management system is in the S_STATE task state; the switching of the job_type variable value is derived from the detection calculation result of the underwater detection equipment, and is monitored and transmitted by the file status management module.
[0018] In step S2, the underwater detection equipment performs data collection, including: monitoring the collected data cache to be full of 100 items, and performing a data saving operation once;
[0019] The number of collected data caches is recorded in the variable save_num, which has an initial value of 0. Each time a piece of data is collected and put into the cache array string_save, the variable save_num is increased by one until it reaches 100. The system executes the save, the variable save_num is cleared, the array string_save is cleared, and the counting and saving starts again; the file is not closed during the current file saving process.
[0020] In step S3, the value of the variable currentfile_order is the index number of the current data storage file name in the FILENAME array. When the current file is closed and a new file is created according to the FILENAME array, the value of the variable currentfile_order is updated plus one to indicate a new file.
[0021] Before the underwater detection equipment is launched into water, the ground operating system can reset the initial value of the variable save_times through network communication.
[0022] In step S4, the data is saved until the S_STATE task state ends, and then the task state is automatically switched to the P_ST ATE task state, the current file is closed, and a new file is created according to step S1, and data saving starts according to step S2.
[0023] In step S5, the dilution multiple dilution_multiple returned by the dilution is the value set by the ground operating system through network communication before the underwater detection equipment is launched into the water; when the data is automatically returned, the data reading pointer jumps according to the dilution multiple so that the data read each time is the n*dilution_multiple line of the file n=0,1,2,3...;
[0024] When data is automatically transmitted back, the remote transmission only transmits the current file, and when the Auto_Send_Task task is executed, the data saving task SD_Save_Task in step S2 is in an idle state until the task Auto_Send_Task is executed and automatically destroyed, and the task SD_Save_Task re-enters the working state.
[0025] In step S6, the short-range return combines the FTP file transfer protocol with the TCP network communication and links it with the Fatfs file system of the SD card, so that the ground operating system can directly communicate with the FTP server of the underwater detection equipment through the FTP client and download and read the files in the SD card of the underwater detection equipment;
[0026] When the short-range return function is executed, action_status_flag=2, and the data saving SD_Save_Task in step S2 is in an idle state until the short-range return is completed, and the task SD_Save_Task re-enters the working state;
[0027] In step S7, when the file processing module executes the SD card clearing task, file_remove_flag=1, and after the SD card clearing task is completed, file_remove_flag=0.
[0028] Another object of the present invention is to provide a file management system for underwater detection equipment, the system implements a task scheduling method of the file management system for underwater detection equipment, the system comprising:
[0029] The file processing module is used to create new files, store the data collected and sorted by the underwater detection equipment into the SD card, and read and delete data from the SD card;
[0030] The file status management module is used to parse external command signals and coordinate internal status variable signals to control the switching and operation of files;
[0031] The file data return module is used to transmit file data to the ground operating system in a variety of ways.
[0032] Furthermore, the file processing module uses a Fatfs file system module for SD card storage to implement management of creating, opening, closing, reading, writing and deleting data files;
[0033] The file status management module is also used to parse the external command signal from the TCP network communication. Before the underwater detection equipment is launched or after the detection task is completed, the ground operating system directly communicates with it in a short distance network above the water surface;
[0034] The file data transmission module includes two modes: long-distance transmission and short-distance transmission. Among them, the long-distance transmission is completed by satellite through serial port communication. The rarefaction multiple in the long-distance transmission is transmitted and analyzed by the file status management module. The short-distance transmission is realized through the FTP file transfer protocol. By combining the FTP file transfer protocol with the Fatfs file system, the file data in the SD card of the underwater detection equipment is transmitted to the ground operating system.
[0035] Combined with all the above technical solutions, the beneficial effects of the present invention are as follows: the file management system of an underwater detection system provided by the present invention uses a unified file name format and limits the number of files, which can improve the controllability of files. The present invention creates new saved files according to different task states, and adds a sparse reading file data function to improve the transmission efficiency of file data, while retaining data features. The time delayed by data transmission is reduced. The present invention uses an asynchronous buffer mode to write data to the SD card, separates the operation of receiving data from writing data, and reduces the frequency of data writing, which can reduce system operation overhead and improve system reliability. The present invention uses different transmission methods for long-distance transmission and short-distance transmission respectively, can flexibly read data in a variety of ways, and the software is scalable, reusable and portable, which can meet the needs of users in different situations. The technical solution of the present invention solves the problem that underwater detection equipment collects data, especially the characteristic data part, and cannot be efficiently and safely transmitted to shore processing through remote transmission. BRIEF DESCRIPTION OF THE DRAWINGS
[0036] The accompanying drawings herein are incorporated in and constitute a part of the specification, illustrate embodiments consistent with the present disclosure, and together with the description, serve to explain the principles of the present disclosure;
[0037] Figure 1 It is a schematic diagram of a file management system for underwater detection equipment provided by an embodiment of the present invention;
[0038] Figure 2 It is a flow chart of a task scheduling method of a file management system of an underwater detection device provided by an embodiment of the present invention;
[0039] Figure 3 It is a principle diagram of a task scheduling method of a file management system of an underwater detection device provided by an embodiment of the present invention;
[0040] In the figure: 1. File processing module; 2. File status management module; 3. File data return module. DETAILED DESCRIPTION
[0041] In order to make the above-mentioned objects, features and advantages of the present invention more obvious and easy to understand, the specific embodiments of the present invention are described in detail below in conjunction with the accompanying drawings. In the following description, many specific details are set forth to facilitate a full understanding of the present invention. However, the present invention can be implemented in many other ways different from those described herein, and those skilled in the art can make similar improvements without violating the connotation of the present invention, so the present invention is not limited by the specific implementation disclosed below.
[0042] The innovation of the present invention lies in: the file management system and task scheduling method for underwater detection equipment provided by the embodiment of the present invention are innovative in that the data file structure is optimized and a sparse reading and transmission function is added to address the problem of limited remote transmission speed, thereby improving data transmission efficiency while retaining data characteristics; in view of the problem of increased system resources occupied by real-time data storage, asynchronous buffer mode storage is adopted to improve system reliability; at the same time, multi-task scheduling methods are combined to realize multi-threaded synchronization and memory management, thereby ensuring the data file management function of the underwater detection equipment while making the system more modular, with higher readability and portability.
[0043] Embodiment 1, as Figure 1 As shown, an embodiment of the present invention provides a file management system for underwater detection equipment, the system includes a file processing module 1, a file status management module 2 and a file data return module 3, wherein:
[0044] The file processing module 1 is used to create new files, store the data collected and sorted by the underwater detection equipment into the SD card, and read and delete data from the SD card;
[0045] The file status management module 2 is used to parse external command signals and coordinate internal state variable signals to control the switching and operation of files;
[0046] The file data return module 3 can flexibly transmit the file data to the ground operating system in a variety of ways.
[0047] Exemplarily, the file processing module 1 has the functions of creating a new file, deleting a file, writing file data, and reading file data;
[0048] In the file processing module 1 of the embodiment of the present invention, the SD card is a 32G high-speed 300M / s memory card.
[0049] The file processing module 1 uses a Fatfs file system module, which is commonly used in small embedded systems. Fatfs provides a series of file system functions, including file opening, closing, reading, writing, searching, deleting and other operations. The present invention uses the Fatfs file system for SD card storage to achieve the management of creating, opening, closing, reading, writing and deleting data files.
[0050] Exemplarily, the file status management module 2 is responsible for coordinating the acquisition data cache and the coordination of various status variables to support the orderly and accurate implementation of the functions of the file processing module 1 and the file data return module 3;
[0051] The external command signal parsed by the file status management module 2 comes from TCP network communication. Before the underwater detection device is launched or after the detection task is completed, the ground operating system directly communicates with it in a short distance network above the water surface. See Table 1 for details.
[0052] The specific description of the external instruction signal parsed by the file status management module 2, the coordinated internal status variable signal and the data cache variable is shown in Table 1.
[0053] Table 1
[0054]
[0055] Exemplarily, the file data return module 3 has the functions of long-distance data transmission and short-distance data transmission, and transmits the data collected by the underwater detection equipment from the SD card to the ground operating system;
[0056] In the file data return module 3 of the embodiment of the present invention, the ground operating system is a system above the water surface that performs remote wireless communication with the underwater detection equipment.
[0057] The file return module 3 includes two modes: long-distance return and short-distance return. Among them, the long-distance return is completed by satellite through serial communication, which will not be described here. Due to the limited transmission speed, the long-distance return has a thinning return function, and the thinning multiple is transmitted and analyzed by the file status management module. The short-distance return function is realized by the FTP file transfer protocol. By combining the FTP file transfer protocol with the Fatfs file system, the file data in the SD card of the underwater detection equipment is returned to the ground operating system.
[0058] Embodiment 2, as Figure 2 As shown, an embodiment of the present invention provides a task scheduling method for a file management system of an underwater detection device, comprising:
[0059] S1: After the underwater detection equipment is reset and the file management system completes initialization and self-check, the file status management module 2 creates a new file. The file management system is initially in the P_STATE task state, and job_type=0.
[0060] In step S1, the file name of the newly created file is retrieved one by one according to the file name array FILENAME to see if there are any files, until a non-existent file is retrieved and named after the file. The current file name index is recorded in the variable currentfile_order. The file name array FILENAME contains a total of 100 data storage file names. When the file names are used up, the file management system will automatically clear all files and create a new file from scratch.
[0061] In step S1, P_STATE is a task state of the file management system. The file management system has two task states: P_STATE task state and S_STATE task state. The file management system determines the current state by reading the signal variable job_type of the file status management module. When job_type=0, the file management system is in the P_STATE task state, and when job_type=1, the file management system is in the S_STATE task state. The switching of the job_type variable value is derived from the detection calculation results of the underwater detection equipment, which will not be described in detail here, and is monitored and transmitted by the file status management module 2.
[0062] S2: The device starts to collect data, and the data storage task SD_Save_Task starts to run, and performs asynchronous buffer mode storage. When the collected data cache is full of 100 items, the data saving operation is performed once;
[0063] In step S2, the number of cached data is recorded in the variable save_num, which has an initial value of 0. Each time a piece of data is collected and put into the cache array string_save, the variable save_num is incremented by one until it reaches 100. The system executes the save operation, the variable save_num is cleared, and the array string_save is cleared to restart the counting and saving.
[0064] In step S2, each piece of collected data has a length of 201 bytes, and 100 pieces of data means collecting data for one minute.
[0065] In step S2, the file is not closed during the current file saving process, which can improve the data saving speed. Because if the file is closed after each saving, the next time it is saved, it needs to be reopened. During use, it is found that if the file is only opened for the first save, and the file is not closed, the subsequent storage is directly continued, which can greatly reduce the time spent on each storage and increase the operation efficiency of the device.
[0066] S3: In the P_STATE task state, the number of stored files is limited by the value of the variable save_times. When the number of stored data reaches this value, the file status management module 2 closes the current file, creates and opens a new file to continue storing, and the variable currentfile_order is updated by one.
[0067] In step S3, the value of the variable currentfile_order is the index number of the current data storage file name in the FILE NAME array. Therefore, when the current file is closed and a new file is created according to the FILENAME array, the value of the variable currentfile_order is updated plus one to indicate a new file.
[0068] In step S3, the variable save_times has an initial value, and the ground operating system can reset the value through network communication before the underwater detection equipment is launched into the water;
[0069] S4: If the file status management module receives a status switching signal, job_type=1, the file management system will immediately close the current file, switch to the S_STATE task state, create a new file according to step S1, and start saving data according to step S2.
[0070] In step S4, the file size is not limited in the S_STATE task state, and the data is saved until the S_STATE task state ends. When the S_STATE task state ends, the system will automatically switch to the P_ST ATE task state, close the current file, create a new file according to step S1, and start saving data according to step S2.
[0071] S5: When the file status management module 2 receives the automatic data transmission instruction, the file data transmission module 3 starts to execute the automatic transmission function, creates a new Auto_Send_Task task, and executes it to transmit the current file in a sparse manner.
[0072] In step S5, the dilution multiple dilution_multiple returned is the value set by the ground operating system through network communication before the underwater detection equipment is launched. When the data is automatically returned, the data reading pointer jumps according to the multiple to ensure that the data read each time is the n*dilution_multiple line of the file (n=0,1,2,3...).
[0073] In step S5, only remote transmission supports automatic transmission, and remote transmission only transmits the current file. When the Auto_Send_Task task is executed, the data saving task SD_Save_Task in step S2 is in an idle state until the task Auto_Send_Task is executed and automatically destroyed, and the task SD_Save_Task re-enters the working state.
[0074] S6: When the short-range return conditions are met, the file data return module 3 can execute the short-range return function and return all the SD card file data to the ground operating system.
[0075] In step S6, the short-range return function is implemented by the FTP file transfer protocol. FTP is a standard protocol for file transfer on the network. FTP is designed for bidirectional file and record transmission between hosts in a TCP / IP network. The short-range return of the present invention combines the FTP file transfer protocol with TCP network communication and links it with the Fatfs file system of the SD card, so that the ground operating system can directly communicate with the FTP server of the underwater detection equipment through the FTP client, and efficiently download and read the files in the SD card of the underwater detection equipment.
[0076] In step S6, when the short-range return function is executed, action_status_flag=2, and the data saving SD_Save_Task in step S2 is in an idle state until the short-range return is completed, and the task SD_Save_Task re-enters the working state.
[0077] Step S7: When the file status management module 2 receives the data deletion instruction, the file processing module executes the SD card clearing task, file_remove_flag=1, and steps S2-S6 will be paused. After the end, file_remove_flag=0, and the system creates a new file and continues to execute steps S2-S6.
[0078] Example 3, as another implementation of the present invention, a task scheduling method of a file management system of an underwater detection device includes:
[0079] After the underwater detection equipment is reset, the file management system is initialized and self-checked, the system directly executes the P_STATE_TASK task.
[0080] During the execution of the P_STATE_TASK task, the data saving task SD_Save_Task is performed synchronously. The SD_Save_Task executes data and writes it to the file once every 100 cached records are filled.
[0081] In the P_STATE_TASK task state, each file is closed when it is full of fixed data, and a new file is created to continue saving. When the total number of saved data reaches a certain value, the current file is closed, the SD_Save_Task and P_STATE_TASK tasks are suspended, and the new Auto_Send_Task task starts to execute.
[0082] Auto_Send_Task is a dynamic task, which is destroyed when the execution is completed and recreated and executed when the conditions are met.
[0083] The Auto_Send_Task task reads the current file data and transmits the data back to the ground operating system according to a thinning factor. This transmission process belongs to remote transmission.
[0084] After the Auto_Send_Task task is executed and destroyed, the SD_Save_Task and P_STATE_TASK tasks continue to execute.
[0085] FTP_TCP_Task starts to execute, the current file is closed, and the SD_Save_Task and P_STATE_TASK tasks are suspended. The user can use this task to transfer all files in the SD card back to the ground operating system. This transfer process belongs to short-range transmission.
[0086] After the FTP_TCP_Task task ends, the SD_Save_Task and P_STATE_TASK tasks continue to execute.
[0087] During the P_STATE_TASK task, if the file deletion instruction is executed, the current file is closed and SD_Save_Task is closed. After the file deletion instruction is completed, the system creates a new file and the SD_Save_Task task continues to execute data saving.
[0088] During the P_STATE_TASK task, if the state variable switches, the P_STATE_TASK task is directly preempted, the current file is closed, and the S_STATE_TASK task begins to execute.
[0089] When the P_STATE_TASK task starts executing, a new file is created, and the SD_Save_Task task is executed synchronously to write every 100 data records into the file.
[0090] During the P_STATE_TASK task, if FTP_TCP_Task starts to execute, the current file is closed, SD_Save_Task and S_STATE_TASK tasks are suspended, and the user can transfer all files in the SD card back to the ground operating system. After the FTP_TCP_Task task is completed, the file is reopened, and SD_Save_Task and S_STATE_TASK tasks continue to execute.
[0091] During the S_STATE_TASK task, if the file deletion instruction is executed, the current file is closed and the SD_Save_Task is closed. After the file deletion instruction is completed, the system creates a new file and the SD_Save_Task task continues to execute data saving.
[0092] The S_STATE_TASK task is completed, the file is closed, the SD_Save_Task task is suspended, and the Auto_Send_Task task is immediately created and executed, and the S_STATE_TASK task file is extracted and sent back to the ground operating system. After the Auto_Send_Task task is completed and destroyed, the system task is transferred back to the P_STATE_TASK task, a new file is created, and the SD_Save_Task task continues to execute.
[0093] The command signals, state variable transitions and data caches in all task processes are coordinated and provided by the file status management module.
[0094] This embodiment uses DSP chip as the operating platform to realize the underwater detection system control function. The program software design adopts SYSBIOS real-time operating system to realize multi-thread synchronization, multi-task scheduling and memory management, making the program more modular, readable and portable.
[0095] The above description is only a preferred specific implementation manner of the present invention, but the protection scope of the present invention is not limited thereto. Any modifications, equivalent substitutions and improvements made by any technician familiar with the technical field within the technical scope disclosed by the present invention and within the spirit and principles of the present invention should be covered within the protection scope of the present invention.
Claims
1. A task scheduling method for a file management system of an underwater detection device, characterized in that: The method includes: S1: After the underwater detection equipment is reset and the file management system completes initialization and self-check, the file status management module creates a new file, and the file management system is initially in the P_STATE task state; S2: The underwater detection equipment collects data, and the data storage task SD_Save_Task starts running, performing asynchronous buffer mode storage; S3: In the P_STATE task state, the number of stored files is limited by the save_times value of 72000. When the number of stored data reaches the save_times value, the file status management module closes the current file, creates and opens a new file to continue storing, and the variable currentfile_order is updated by one; S4: If the file status management module receives the status switching signal, the file management system closes the current file, switches to the S_STATE task state, creates a new file according to step S1, and starts saving data according to step S2; S5: When the file status management module receives the data automatic return instruction, the file data return module starts to execute the automatic return function, creates a new Auto_Send_Task task, and executes it to return the current file in a sparse manner; S6: When the short-range return conditions are met, the file data return module performs the short-range return function and can return all the SD card file data to the ground operating system; S7: When the file status management module receives the data deletion instruction, the file processing module executes the SD card clearing task, and steps S2 to S6 will be suspended. After the end, the system creates a new file and continues to execute steps S2 to S6.
2. The task scheduling method for the file management system of underwater detection equipment according to claim 1, characterized in that: In step S1, the file name of the new file is retrieved one by one according to the file name array FILENAME to see if the file exists, until a non-existent file is retrieved and named after the file; the current file name index is recorded in the variable currentfile_order; the file name array FILENAME contains a total of 100 data storage file names. When the file names are used up, the file management system will automatically clear all files and create a new file from scratch.
3. The task scheduling method for the file management system of underwater detection equipment according to claim 1 is characterized in that: In step S1, the file management system includes two task states: P_STATE task state and S_STATE task state; the file management system determines which state it is currently in by reading the signal variable job_type of the file status management module; when job_type=0, the file management system is in the P_STATE task state, and when job_type=1, the file management system is in the S_STATE task state; the switching of the job_type variable value is derived from the detection calculation result of the underwater detection equipment and is monitored and transmitted by the file status management module (2).
4. The task scheduling method for the file management system of underwater detection equipment according to claim 1, characterized in that: In step S2, the underwater detection equipment performs data collection, including: monitoring the collected data cache to be full of 100 items, and performing a data saving operation once; The number of collected data caches is recorded in the variable save_num, which has an initial value of 0. Each time a piece of data is collected and put into the cache array string_save, the variable save_num is increased by one until it reaches 100. The system executes the save, the variable save_num is cleared, the array string_save is cleared, and the counting and saving starts again; the file is not closed during the current file saving process.
5. The task scheduling method for the file management system of underwater detection equipment according to claim 1, characterized in that: In step S3, the value of the variable currentfile_order is the index number of the current data storage file name in the FILENAME array. When the current file is closed and a new file is created according to the FILENAME array, the value of the variable currentfile_order is updated plus one to indicate a new file. Before the underwater detection equipment is launched into water, the ground operating system can reset the initial value of the variable save_times through network communication.
6. The task scheduling method for the file management system of underwater detection equipment according to claim 1, characterized in that: In step S4, the data is saved until the S_STATE task state ends, and then the task state is automatically switched to the P_STATE task state, the current file is closed, and a new file is created according to step S1, and data saving starts according to step S2.
7. The task scheduling method for the file management system of underwater detection equipment according to claim 1, characterized in that: In step S5, the dilution multiple dilution_multiple returned by the dilution is the value set by the ground operating system through network communication before the underwater detection equipment is launched into the water; when the data is automatically returned, the data reading pointer jumps according to the dilution multiple so that the data read each time is the n*dilution_multiple line of the file n=0,1,2,3...; When data is automatically transmitted back, the remote transmission only transmits the current file, and when the Auto_Send_Task task is executed, the data saving task SD_Save_Task in step S2 is in an idle state until the task Auto_Send_Task is executed and automatically destroyed, and the task SD_Save_Task re-enters the working state.
8. The task scheduling method for the file management system of underwater detection equipment according to claim 1, characterized in that: In step S6, the short-range return combines the FTP file transfer protocol with the TCP network communication and links it with the Fatfs file system of the SD card, so that the ground operating system can directly communicate with the FTP server of the underwater detection equipment through the FTP client and download and read the files in the SD card of the underwater detection equipment; When the short-range return function is executed, action_status_flag=2, and the data saving SD_Save_Task in step S2 is in an idle state until the short-range return is completed, and the task SD_Save_Task re-enters the working state; In step S7, when the file processing module executes the SD card clearing task, file_remove_flag=1, and after the SD card clearing task is completed, file_remove_flag=0.
9. A file management system for underwater detection equipment, characterized in that: The system implements the task scheduling method of the file management system of the underwater detection equipment according to any one of claims 1 to 8, and the system comprises: The file processing module (1) is used to create new files, store data collected and sorted by the underwater detection equipment into the SD card, and read and delete data from the SD card; The file status management module (2) is used to parse external command signals and coordinate internal status variable signals to control the switching and operation of files; The file data return module (3) is used to enable the file data to be transmitted to the ground operating system in a variety of ways.
10. The file management system for underwater detection equipment according to claim 9, characterized in that: The file processing module (1) uses a Fatfs file system module for SD card storage to implement management of creating, opening, closing, reading, writing and deleting data files; The file status management module (2) is also used to parse the external command signal from the TCP network communication. Before the underwater detection equipment is launched or after the detection task is completed, the ground operating system directly conducts short-range network communication with it above the water surface; The file data return module (3) includes two modes: long-distance return and short-distance return. The long-distance return is completed by satellite through serial port communication. The rarefaction multiple in the long-distance return is transmitted and analyzed by the file status management module (2). The short-distance return is realized by the FTP file transfer protocol. By combining the FTP file transfer protocol with the Fatfs file system, the file data in the SD card of the underwater detection equipment is returned to the ground operating system.
