CN-121979725-A - File error repairing method and system for space radiation environment
Abstract
The invention discloses a file error repairing device for a space radiation environment, which comprises a main system mapping module, a standby system mapping module, a differential file processing module and a file uploading module, wherein the main system mapping module comprises a common file set and a first differential file set, the standby system mapping module comprises a common file set and a second differential file set, the differential file processing module is used for carrying out backup processing and check data storage on the first differential file set and the second differential file set, the file checking module is used for respectively calculating MD5 check values of key files according to a preset period and comparing the MD5 check values with pre-stored check records, the key files are necessary files for program starting and running and are distributed in the common file set, the first differential file set and the second differential file set, the file repairing module is used for carrying out replacement repairing through redundant copies corresponding to the files or extracting bit difference information of the two files to carry out arrangement and combination to carry out repairing files, and the uploading module is used for carrying out file overwriting on files with respect to the repairing failure files through on-track uploading.
Inventors
- HE HENGXIANG
- ZHANG XIRAN
- YE XI
- FENG SHUYI
- YUAN JIE
Assignees
- 上海航天测控通信研究所
Dates
- Publication Date
- 20260505
- Application Date
- 20260123
Claims (10)
- 1. A file error correction apparatus for use in a spatially radiative environment, comprising: the main system mapping module comprises a common file set and a first difference file set; the standby system image module comprises the common file set and a second difference file set; The scanning module is used for scanning the main system image module and the standby system image module to identify the common file set, the first difference file set and the second difference file set; the difference file processing module is used for carrying out backup processing and check data storage on the first difference file set and the second difference file set; The file verification module is used for respectively calculating MD5 verification values of key files according to a preset period and comparing the MD5 verification values with pre-stored verification records, wherein the key files are necessary files for starting operation of the main system mapping module and the standby system mapping module and comprise a common file set, a first difference file set and a second difference file set; The file repair module is used for carrying out replacement repair through redundant copies corresponding to the files when the verification of the key files fails, or extracting the bit difference information of the two files to carry out permutation and combination to repair the files; And the uploading module is used for uploading files which are failed to repair to the track to carry out file overwriting.
- 2. The file error repair device for a space radiation environment of claim 1, wherein the primary system image module and the backup system image module are stored in non-contiguous address areas of an on-board eMMC/UFS granule, respectively.
- 3. A method for file error repair for a spatially radiative environment, comprising: Initializing a check record of a common file set, a first difference file set and a second difference file set based on the main system image module and the standby system image module; the method comprises the steps of triggering a period of on-orbit operation to check whether key files are damaged or not, wherein the key files at least comprise a common file set, a first difference file set and a second difference file set, if so, replacing and repairing are carried out through redundant copies corresponding to the files, or potential difference information of the two files is extracted to carry out arrangement and combination to repair the files, and if not, updating of the files is achieved through on-orbit uploading.
- 4. A method of file error repair for a spatially-radiating environment as claimed in claim 3, wherein the step of initializing a verification record for the common set of files, the first set of difference files, and the second set of difference files further comprises: Traversing each file of the main system mapping module, and calculating through md5 to obtain a file check code set of the main system mapping module; Traversing each file of the standby system mapping module, and calculating and obtaining a file check code set of the standby system mapping module through md 5; According to the file check code set of the main system image module and the file check code set of the standby system image module, the common file set, the first difference file set and the second difference file set are identified in a item-by-item comparison mode; calculating and obtaining a common file check code set through md5 based on the common file set, and generating three identical first common check records, second common check records and third common check records based on the common file check code set; and storing corresponding backup files in the main system image module based on the first difference file set, and storing corresponding backup files in the standby system image module based on the second difference file set.
- 5. A method for file error repair in a spatially diverse environment as claimed in claim 3 wherein the step of checking whether the common file set is corrupted by an on-track run trigger period further comprises: acquiring a first check code, a second check code and a third check code of each file in the common file set in a first common check record, a second common check record and a third common check record; Updating the first check code, the second check code and the third check code by comparing according to bits and taking 2 from 3 based on the first check code, the second check code and the third check code; And respectively acquiring a first file check code and a second file check code of the file in the main system image module and a second file of the file in the standby system image module through md5 calculation, judging damage if any one data in the first file check code and the second file check code is inconsistent with the first check code, otherwise judging that the file is in a sound state.
- 6. A method for file error repair in a space radiation environment according to claim 3, wherein the step of performing replacement repair by a corresponding redundant copy of the file if damaged further comprises: If the file check code of one of the first file and the second file is consistent with the first check code, the other file check code is inconsistent with the first check code, the file consistent with the first check code is identified as a correct file, and the content of the file inconsistent with the first check code is updated as the correct file.
- 7. The method for repairing a file error in a space radiation environment according to claim 3, wherein the step of extracting the bit difference information of the two files to perform permutation and combination for repairing the file further comprises: If the first file check code corresponding to the first file in the files and the second file check code corresponding to the second file in the files are different from the first check code, the first file and the second file acquire the same data with inconsistent bit sets and consistent bit data of the two file bit data through exclusive or calculation; Acquiring bit set data through traversal based on the bit set; and obtaining data to be detected through merging each data in the bit set data with the same data, obtaining a check code to be detected through md5 calculation based on the data to be detected, and updating the data to be detected to the first file and the second file if the check code to be detected is the same as the first check code.
- 8. A method for file error repair in a space radiation environment as claimed in claim 3, wherein the step of implementing the file update by on-track annotating further comprises: Establishing an encrypted communication link with a ground station, and receiving a data packet comprising a repair file; And verifying the integrity of the data packet through a redundancy coding and cyclic verification mechanism based on the data packet, and if the data packet passes verification, performing overwriting operation on the damaged file through a writing interface.
- 9. The method for file error correction for a spatial radiation environment of claim 8, further comprising: Updating the file by an overwrite operation; obtaining an updated file check code through md5 calculation based on the file; Comparing the updated file check code with a check code prestored in the file, triggering a rollback mechanism to recover the file if the updated file check code is inconsistent with the check code prestored in the file, and reporting the operation information and the fault information through a telemetry channel.
- 10. An electronic device comprising a memory, a processor and a computer program stored on the memory and executable on the processor, characterized in that the computer program when executed by the processor implements the steps of the file error repair method for a spatially radiating environment as claimed in any of the claims 3-9.
Description
File error repairing method and system for space radiation environment Technical Field The invention belongs to the technical field of reliability maintenance of spacecraft electronic equipment, and particularly relates to a file error repairing method and system for a space radiation environment. Background With the continuous increase of the requirements of spacecraft tasks on autonomous computing capability, modern spacecraft often adopt a high-performance embedded hardware platform (for example, carrying NVIDIA Jetson AGX Xavier modules and the like) to run a Linux system so as to execute key tasks such as image processing, scientific operation, gesture control, communication and the like. However, spacecraft are subject to high energy particles in space (e.g., solar wind particles and cosmic ray particles) during in-orbit operation, which cause Single Event Upset (SEU) or Single Event Lock (SEL) effects in memory chips or memories, resulting in bit upset in memories, which cause corruption of operating system files or application files. In the existing fault tolerance technology, common methods include hardware level ECC error correction, triple Modular Redundancy (TMR), and software level checking algorithms (such as CRC, MD 5), etc. Some of these schemes guarantee data integrity by maintaining multiple copies of the file and verifying their consistency. For example, there are studies to store three redundant copies of a critical program file simultaneously in an embedded file system, with bitwise two-out-of-three operations performed to ensure integrity when loading an execution file. Such methods, while reliable, require a significant amount of on-board storage space and are not suitable for partially storage resource constrained spacecraft stand-alone systems. In addition, the spacecraft has limited performance, power consumption, heat dissipation and other resources, and an error correction mechanism for performing three-to-two operation on all files is difficult to implement due to excessive resource expenditure, so that practical application is greatly limited. Still further, the prior art generally focuses on error correction and redundancy of the runtime data, and lacks a targeted automatic detection and repair means for errors occurring at the file system level, which easily results in error accumulation. Therefore, a new file error detection and repair method is urgently needed, which can effectively detect and automatically repair file damage of a Linux system generated in a space radiation environment under the conditions of a main and standby double-system architecture and limited storage, so as to improve the reliability and the robustness of on-orbit operation of a spacecraft system. Disclosure of Invention In order to solve the problems, the invention provides a file error repairing method and a system for a space radiation environment, according to the method, on the premise of not adding third local file redundancy, the automatic detection and repair of Linux system file errors in a space radiation environment are realized by means of a double-system structure. The scheme obviously reduces the risk of simultaneously damaging two sets of system images caused by a single event, realizes backup redundancy by utilizing the shared files of the main and standby systems, corrects damaged files by combining MD5 verification and replacement or bit level repair algorithm, and introduces a safe and reliable on-orbit file overwriting mechanism when local repair is invalid. In conclusion, the reliability and the stability of the on-orbit operation of the embedded system of the spacecraft are obviously improved. A first aspect of the present invention provides a file error repair apparatus for a spatial radiation environment, comprising: the main system mapping module comprises a common file set and a first difference file set; the standby system image module comprises the common file set and a second difference file set; The scanning module is used for scanning the main system image module and the standby system image module to identify the common file set, the first difference file set and the second difference file set; the difference file processing module is used for carrying out backup processing and check data storage on the first difference file set and the second difference file set; The file verification module is used for respectively calculating MD5 verification values of key files according to a preset period and comparing the MD5 verification values with pre-stored verification records, wherein the key files are necessary files for starting operation of the main system mapping module and the standby system mapping module and comprise a common file set, a first difference file set and a second difference file set; The file repair module is used for carrying out replacement repair through redundant copies corresponding to the files when the verification of the key files fails, or extra