CN116166199A - Method and device for adaptively adjusting storage capacity of locomotive signal recorded data - Google Patents

Method and device for adaptively adjusting storage capacity of locomotive signal recorded data Download PDF

Info

Publication number
CN116166199A
CN116166199A CN202310266281.4A CN202310266281A CN116166199A CN 116166199 A CN116166199 A CN 116166199A CN 202310266281 A CN202310266281 A CN 202310266281A CN 116166199 A CN116166199 A CN 116166199A
Authority
CN
China
Prior art keywords
capacity
data
memory card
bti
btc
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Granted
Application number
CN202310266281.4A
Other languages
Chinese (zh)
Other versions
CN116166199B (en
Inventor
刘立臣
裴晓航
于洋
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Harbin Kejia General Mechanical and Electrical Co Ltd
Original Assignee
Harbin Kejia General Mechanical and Electrical Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Harbin Kejia General Mechanical and Electrical Co Ltd filed Critical Harbin Kejia General Mechanical and Electrical Co Ltd
Priority to CN202310266281.4A priority Critical patent/CN116166199B/en
Publication of CN116166199A publication Critical patent/CN116166199A/en
Application granted granted Critical
Publication of CN116166199B publication Critical patent/CN116166199B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F3/00Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
    • G06F3/06Digital input from, or digital output to, record carriers, e.g. RAID, emulated record carriers or networked record carriers
    • G06F3/0601Interfaces specially adapted for storage systems
    • G06F3/0602Interfaces specially adapted for storage systems specifically adapted to achieve a particular effect
    • G06F3/0608Saving storage space on storage systems
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F3/00Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
    • G06F3/06Digital input from, or digital output to, record carriers, e.g. RAID, emulated record carriers or networked record carriers
    • G06F3/0601Interfaces specially adapted for storage systems
    • G06F3/0628Interfaces specially adapted for storage systems making use of a particular technique
    • G06F3/0638Organizing or formatting or addressing of data
    • G06F3/0643Management of files
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F3/00Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
    • G06F3/06Digital input from, or digital output to, record carriers, e.g. RAID, emulated record carriers or networked record carriers
    • G06F3/0601Interfaces specially adapted for storage systems
    • G06F3/0628Interfaces specially adapted for storage systems making use of a particular technique
    • G06F3/0638Organizing or formatting or addressing of data
    • G06F3/0644Management of space entities, e.g. partitions, extents, pools
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F3/00Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
    • G06F3/06Digital input from, or digital output to, record carriers, e.g. RAID, emulated record carriers or networked record carriers
    • G06F3/0601Interfaces specially adapted for storage systems
    • G06F3/0668Interfaces specially adapted for storage systems adopting a particular infrastructure
    • G06F3/0671In-line storage system
    • G06F3/0683Plurality of storage devices
    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02DCLIMATE CHANGE MITIGATION TECHNOLOGIES IN INFORMATION AND COMMUNICATION TECHNOLOGIES [ICT], I.E. INFORMATION AND COMMUNICATION TECHNOLOGIES AIMING AT THE REDUCTION OF THEIR OWN ENERGY USE
    • Y02D10/00Energy efficient computing, e.g. low power processors, power management or thermal management

Abstract

A self-adaptive adjustment method and device for storage capacity of locomotive signal recorded data belong to the technical field of locomotive signal vehicle-mounted equipment. The method aims to solve the problems that the recording board is always in a fault state or storage resource is wasted due to the capacity of a storage card when the existing cab signal recording data are stored. The method comprises the steps of firstly calculating the usable capacity of a memory card, occupying the minimum recording time length of a state data file and a waveform data file, comparing the usable capacity of the memory card with the capacities of the state data file and the waveform data file which meet the minimum recording time length specified in a railway standard, automatically adjusting the capacities of the state data file, the waveform data file and an index data file which can be finally stored by the memory card, judging whether the file system and the file state of the current memory card are normal, and formatting the file system and creating the recording data file if the file system or the recording data file are abnormal.

Description

Method and device for adaptively adjusting storage capacity of locomotive signal recorded data
Technical Field
The invention belongs to the technical field of locomotive signal vehicle-mounted equipment, and particularly relates to a storage capacity self-adaptive adjustment method and equipment, a storage medium and equipment for locomotive signal recording data.
Background
At present, the locomotive signal vehicle-mounted equipment comprises a recording board which is used for carrying out real-time monitoring and recording on the running state of a locomotive signal system, wherein recorded contents comprise state data and waveform data, and index data are also arranged for facilitating quick positioning of the data. The minimum recording time length of the state data and the waveform data is specified in the railway standard, and the minimum recording time length of the state data is longer than the minimum recording time length of the waveform data, so that each recording board is provided with a large-capacity memory card which can be used for storing data and can be saved after power failure, such as a CF card, an SD card and the like.
Because of the differences of manufacturers, model specifications and the like, the capacities of the memory cards are not very same, along with the development of railway crossing, the speed of a train is continuously improved, the running and the crossing of locomotives are longer and longer, and on the basis of standard required recording time, the memory cards with different capacities are selected for the recording board because the longer data can be expected to be recorded.
The prior locomotive signal vehicle-mounted equipment recording board memory card is formatted by a file system through a computer before being inserted into the board card, and the recording board designates fixed state data quantity, waveform data quantity and index data quantity, and creates data files at corresponding positions in the memory card according to the capacity occupied by each data file. When the data amount corresponding to the recording duration exceeds the fixed capacity, the latest generated data covers the earliest recorded data. The method has a problem in that when the capacity of the memory card is smaller than a designated fixed capacity or the file system is abnormal, the recording board is always in a failure state and cannot perform recording. When the capacity of the memory card is larger than the designated fixed capacity, the recording board can only use the fixed capacity, and even if the memory card with larger capacity is replaced, more data can not be recorded by fully utilizing the capacity of the memory card, so that the resource waste is caused, and the requirement of a customer on longer accumulated recording duration can not be met.
In addition, when it is necessary to connect the memory card to other devices, such as a personal computer, there is a risk that viruses enter the CF card device by copying. Thus, if there is unallocated memory space in the memory card itself, the risk of virus intrusion may be greatly increased.
Disclosure of Invention
The invention aims to solve the problems that the recording board is always in a fault state or storage resource is wasted due to the capacity of a storage card in the existing locomotive signal storage.
The self-adaptive storage capacity regulating method for locomotive signal record data includes the following steps:
step 1, detecting the state of a memory card to obtain the maximum memory capacity nTS of the memory card;
step 2, according to the maximum storage capacity nTS of the memory card obtained in the step 1, the number of bytes of the memory card usable capacity bTC is calculated by combining the number of occupied sectors nFSS of the file system and the number of bytes bpS of each sector;
step 3, calculating the minimum capacity of each record file meeting the specified record duration in the railway standard:
the method comprises the steps that state data and waveform data recorded by a recording plate are recorded in 1 second as 1 data recording unit, and the number nSMRs of the state data and the number nWMRs of the waveform data are determined according to the minimum recording duration of the state data and the waveform data specified in a railway standard;
the minimum capacity bTS occupied by the state data file, the minimum capacity bTW occupied by the waveform data file and the minimum capacity bTI occupied by the index data file are calculated respectively by combining the byte number bp1S of 1 strip data and the byte number bp1W of 1 strip waveform data formulated in the record board record protocol;
the minimum capacity bMC specified in the railway standard is thus:
bMC=bTS+bTW+bTI
step 4, calculating the capacity of the index file, the state data file and the waveform data file which can be finally stored by the memory card according to the usable capacity of the memory card calculated in the step 2 and the minimum capacity of each record file which meets the specified record duration in the railway standard and is calculated in the step 3:
step 4.1, the memory card usable capacity bTC meets the minimum equal duration recording requirement of the state data and the waveform data, namely: bTC is greater than or equal to nSMRs (bp1S+bp1W) + bTI, according to the capacity of the memory card, calculating the final occupied capacity bTS1 of the state data file and the final occupied capacity bTW1 of the waveform data file according to rules of recording equal time length, thereby ensuring that the capacity of the memory card is fully utilized; the specific calculation method is as follows:
bTS1=[(bTC-bTI)/(bp1S+bp1W)]*bp1S(5)
bTW1=[(bTC-bTI)/(bp1S+bp1W)]*bp1W(6)
wherein "/" represents integer division, if (bTC-bTI)/(bp1S+bp1W) cannot be integer divided, each data file takes an integer part of occupied capacity, the remaining storage capacity bTC-bTI-bTS1-bTW is reserved, and step 5 is executed;
if bTC is not more than nSMRs (bp1S+bp1W) + bTI, executing the step 4.2;
step 4.2, if the memory card usage capacity bTC meets the minimum capacity bTS of the state data, but does not meet the minimum equal duration recording requirement of the state data and the waveform data, namely: bTS + bTI is less than or equal to bTC and less than nSMRs (bp1S+bp1W) + bTI), firstly, the minimum duration requirement of the state data is ensured, namely the final occupied capacity bTS1 of the state data file is equal to bTS, and the final occupied capacity bTW of the waveform data file is calculated by combining the occupied capacity bTI of the index data file, wherein the final occupied capacity bTW of the waveform data file is as follows:
bTW1=[(bTC-bTI–bTS1)/bp1W]*bp1W(7)
if (bTC-bTI-bTS 1)/bp 1W is not divisible, taking the whole occupied capacity of (bTC-bTI-bTS) 1W as bTW1 and the remaining storage capacity bTC-bTI-bTS1-bTW1 as reservation, and executing step 5;
if bTS + bTI is less than or equal to bTC and less than nSMRs (bp 1S+bp 1W) + bTI, executing the step 4.3;
step 4.3, if the memory card usable capacity bTC does not satisfy the status data minimum capacity bTS, namely: bTC < bTS + bTI, the record board records only the status data, and the status data file occupation capacity bTS1 is:
bTS1=[(bTC-bTI)/bp1S]*bp1S(8)
if (bTC-bTI)/bp 1S is not divided completely, taking the occupied capacity of the integer part of (bTC-bTI)/bp 1S as bTS1 and the remaining storage capacity bTC-bTI-bTS1 as reservation, and executing the step 5;
step 5, checking the file system and the recorded data used by the current memory card, and executing step 6 if the file system or the recorded data are abnormal;
step 6, creating a file system, namely formatting, according to the type of the file system required by the record board, the maximum capacity of the memory card obtained in the step 1 and the physical format of the memory card; and (3) creating the record data files according to the final occupied capacity of each record data file obtained by calculation in the step (4).
Further, the maximum storage capacity nTS of the memory card is obtained by reading the value of the corresponding register of the memory card.
Further, the memory card may use capacity bTC = (nTS-nFSS) × bpS.
Further, the minimum capacity bTS =nsrs×bp1s occupied by the status data file, bTS is an integer multiple of bpS.
Further, the waveform data file occupies a minimum volume bTW =nWMRs by 1W, bTW is an integer multiple of bpS.
Further, bTI is calculated using a custom fixed byte length, bTI is an integer multiple of bpS.
Further, the memory card file system or the recorded data abnormality includes the following cases:
(1) The current file system type is a file system which is not supported or not identified by the record board;
(2) The current file system is not created according to the maximum storage capacity of the memory card;
(3) Files already created in the current file system are not created according to the final capacity obtained by adaptively calculating each recorded data file;
(4) Record data in a file that has been created in the current file system is abnormal.
Further, step 1 is first performed after the cab signal recording board is powered on, that is, after the cab signal recording board is powered on, the status of the memory card is first detected.
A computer storage medium having stored therein at least one instruction that is loaded and executed by a processor to implement a method of adaptively adjusting storage capacity of cab signal recorded data.
A storage capacity adaptive adjustment device for cab signal record data includes a processor and a memory, wherein at least one instruction is stored in the memory, and the at least one instruction is loaded and executed by the processor to implement a storage capacity adaptive adjustment method for cab signal record data.
The beneficial effects are that:
1. the recording board can adapt to the capacity of the memory card, adjust the proportion of the recording state data and the waveform data and fully utilize the capacity of the memory card; when a client needs to record data for a longer time, the data can be realized by replacing a memory card with a larger capacity; and meanwhile, even if the capacity of the memory card is small and the file system or the file is abnormal, the normal record of the state data file can be met. Therefore, the invention not only can effectively solve the problem of storage resource waste, but also can effectively solve the problem that the recording board is always in a fault state due to the capacity of the memory card.
2. The recording board can adaptively occupy the storage space of the memory card, and the probability that viruses enter the memory card in a copying mode is reduced to a certain extent.
Drawings
FIG. 1 is a flow chart of adaptive adjustment of storage capacity of cab signal record data.
Detailed Description
It should be noted in particular that, without conflict, the various embodiments disclosed herein may be combined with each other.
The first embodiment is as follows: the present embodiment will be described with reference to figure 1,
the present embodiment is a method for adaptively adjusting storage capacity of recorded data of a cab signal, comprising the steps of:
step 1: obtaining the maximum storage capacity of the memory card:
after the cab signal recording board is powered up, the status of the memory card is first checked and then the maximum memory capacity (typically the total number of sectors that can be used) of the memory card is obtained.
The state detection comprises memory card hardware reset and detection of whether the memory card exists or not, wherein the memory card hardware reset is realized by setting the high and low levels of corresponding pins of the memory card, and the detection of whether the memory card exists or not is realized by reading the high and low levels of the corresponding pins of the memory card;
the maximum memory capacity ts of the memory card is obtained by reading the value of the corresponding register of the memory card.
Step 2, calculating usable capacity of the memory card:
according to the maximum storage capacity NTS of the memory card obtained in the step 1, the number of bytes of the usable capacity of the record file is calculated by combining the number of occupied sectors of the file system nFSS and the number of bytes bpS of each sector, and the bytes are recorded as the usable capacity bTC of the memory card:
bTC=(nTS-nFSS)*bpS(1)
the file system is a software mechanism in the operating system, which is responsible for managing and storing file information, is responsible for storing files and protecting and retrieving stored files, the common file system is FAT, NTFS, exFAT, the nFSS is different according to the number of sectors occupied by different file systems, and the nFSS is generally equal to the sum of the number of sectors occupied by all or part of MBR, hidden sectors, DBR, FAT1, FAT2 and DIR. bpS defaults to 512 bytes.
Step 3, calculating the minimum capacity of each record file meeting the specified record duration in the railway standard:
the status data and waveform data recorded by the recording board are recorded in 1 second as 1 data recording unit, and the number of recording bars of the status data nSMRs and the number of recording bars of the waveform data nWMRs can be determined according to the minimum recording time length of the status data and the waveform data specified in the railway standard.
The cab signal standard requires: the cumulative continuous recording time should not be less than 70h, and the cumulative recording time of the original waveform should not be less than 8h. The state data is continuously recorded, and the waveform data can be discontinuously recorded, so that nSMRs is greater than or equal to nWMRs, the index file can be a fixed number, and the index file can be consistent with the number of the state data, namely nSMRs is greater than or equal to nIMRs.
The minimum capacity bTS occupied by the state data file, the minimum capacity bTW occupied by the waveform data file and the minimum capacity bTI occupied by the index data file are calculated respectively by combining the byte number bp1S of 1 strip data and the byte number bp1W of 1 strip waveform data formulated in the record board record protocol:
bTS=nSMRs*bp1S(2)
bTW=nWMRs*bp1W(3)
bTI typically employs a fixed byte length custom-defined and is an integer multiple of bpS bytes per sector, as are bTS and bTW integers of bpS.
From this, the minimum capacity bMC specified in the railway standard can be found as:
bMC=bTS+bTW+bTI(4)
step 4, calculating the final occupied capacity of each record file:
and (3) calculating the capacity of the index file, the state data file and the waveform data file which can be finally stored by the memory card according to the calculated usable capacity of the memory card in the step (2) and the calculated minimum capacity of each record file meeting the specified record duration in the railway standard in the step (3).
Step 4.1, the memory card usable capacity bTC meets the minimum equal duration recording requirement of the state data and the waveform data, namely: bTC is greater than or equal to nSMRs (bp1S+bp1W) + bTI, the final occupied capacity bTS1 of the state data file and the final occupied capacity bTW1 of the waveform data file can be calculated according to the capacity of the memory card and the rules of recording equal time duration, so that the capacity of the memory card is ensured to be fully utilized. The specific calculation method is as follows:
bTS1=[(bTC-bTI)/(bp1S+bp1W)]*bp1S(5)
bTW1=[(bTC-bTI)/(bp1S+bp1W)]*bp1W(6)
wherein "/" in the above formula represents integer division, if (bTC-bTI)/(bp1S+bp1W) cannot be integer divided, each data file takes an integer part to occupy capacity, the remaining storage capacity bTC-bTI-bTS1-bTW1 is reserved, and step 5 is executed;
if bTC is not more than nSMRs (bp1S+bp1W) + bTI, executing step 4.2.
Step 4.2, if the memory card usable capacity bTC satisfies the state data minimum capacity bTS, but does not satisfy the state data and waveform data minimum equal duration recording requirements, namely: bTS + bTI is less than or equal to bTC and less than nSMRs (bp1S+bp1W) + bTI), the minimum duration requirement of the state data is ensured, namely the final occupied capacity bTS of the state data file is equal to bTS, and the final occupied capacity bTW of the waveform data file can be calculated by combining the occupied capacity bTI of the index data file, wherein the final occupied capacity bTW of the waveform data file is as follows:
bTW1=[(bTC-bTI–bTS1)/bp1W]*bp1W(7)
wherein "/" in the above formula represents integer division, if (bTC-bTI-bTS 1)/bp 1W cannot be integer divided, taking the whole occupied capacity of (bTC-bTI-bTS 1)/bp 1W as bTW1, taking the remaining storage capacity bTC-bTI-bTS1-bTW as reserved, and executing step 5;
if bTS + bTI is less than or equal to bTC and less than nSMRs (bp 1S+bp 1W) + bTI, executing the step 4.3;
step 4.3, if the memory card usable capacity bTC does not satisfy the status data minimum capacity bTS, namely: bTC < bTS + bTI, the record board records only the status data, and the status data file occupation capacity bTS1 is:
bTS1=[(bTC-bTI)/bp1S]*bp1S(8)
wherein "/" in the above formula represents integer division, if (bTC-bTI)/bp 1S is not integer division, taking the occupied capacity of the integer part of (bTC-bTI)/bp 1S as bTS1, and the remaining storage capacity bTC-bTI-bTS1 as reservation, and executing step 5.
Step 5, judging the current file system and file state of the memory card:
checking a file system and recorded data used by a current memory card according to the type of the file system required by the recording board, the maximum capacity of the memory card obtained in the step 1, the final capacity of each recorded data file obtained in the step 4 and the data content formulated in a recording protocol of the recording board, wherein the file system of the memory card or the abnormal scene of the recorded data is as follows:
(1) The current file system type is a file system which is not supported or not identified by the record board;
(2) The current file system is not created according to the maximum storage capacity of the memory card;
(3) Files already created in the current file system are not created according to the final capacity obtained by adaptively calculating each recorded data file;
(4) Recording data in a file which is already created in the current file system is abnormal;
if the file system or the recorded data is abnormal, step 6 is performed.
Step 6, formatting a file system and creating a recorded data file:
creating a file system, namely formatting, according to the type of the file system required by the record board, the maximum capacity of the memory card obtained in the step 1 and the physical format of the memory card; and (3) creating the record data files according to the final occupied capacity of each record data file obtained by calculation in the step (4).
The invention has the following characteristics:
1. the cab signal recording board can automatically recognize the capacity of the recording card and adaptively adjust the quantity of the storage state data and the waveform data according to the capacity of the storage card.
2. When the file system of the memory card or the file state is abnormal, the record board can reformat the file system or recreate the file automatically according to the fault condition.
3. When the capacity of the memory card is insufficient, the recording state data is ensured to meet the time length requirement, and the residual space is used for storing waveform data, so that normal recording can be realized.
4. When the capacity of the memory card is sufficient, the memory space can be fully utilized, and the requirement of longer recording duration can be realized.
The second embodiment is as follows:
the present embodiment is a computer storage medium having at least one instruction stored therein, the at least one instruction being loaded and executed by a processor to implement a method for adaptively adjusting a storage capacity of recorded cab signal data.
It should be understood that the instructions comprise a computer program product, software, or computerized method corresponding to any of the methods described herein; the instructions may be used to program a computer system, or other electronic device. Computer storage media may include readable media having instructions stored thereon and may include, but is not limited to, magnetic storage media, optical storage media; magneto-optical storage media include read-only memory ROM, random-access memory RAM, erasable programmable memory (e.g., EPROM and EEPROM), and flash memory layers, or other types of media suitable for storing electronic instructions.
And a third specific embodiment:
the present embodiment is a device for adaptively adjusting the storage capacity of recorded data of a cab signal, the device comprises a processor and a memory, it should be understood that the device comprising any of the devices comprising a processor and a memory described in the present invention may also comprise other units, modules for performing display, interaction, processing, control, etc. and other functions by signals or instructions;
at least one instruction is stored in the memory, and the at least one instruction is loaded and executed by the processor to implement a method for adaptively adjusting the storage capacity of the cab signal record data.
The above examples of the present invention are only for describing the calculation model and calculation flow of the present invention in detail, and are not limiting of the embodiments of the present invention. Other variations and modifications of the above description will be apparent to those of ordinary skill in the art, and it is not intended to be exhaustive of all embodiments, all of which are within the scope of the invention.

Claims (10)

1. The self-adaptive adjustment method for the storage capacity of the locomotive signal record data is characterized by comprising the following steps:
step 1, detecting the state of a memory card to obtain the maximum memory capacity nTS of the memory card;
step 2, according to the maximum storage capacity nTS of the memory card obtained in the step 1, the number of bytes of the memory card usable capacity bTC is calculated by combining the number of occupied sectors nFSS of the file system and the number of bytes bpS of each sector;
step 3, calculating the minimum capacity of each record file meeting the specified record duration in the railway standard:
the method comprises the steps that state data and waveform data recorded by a recording plate are recorded in 1 second as 1 data recording unit, and the number nSMRs of the state data and the number nWMRs of the waveform data are determined according to the minimum recording duration of the state data and the waveform data specified in a railway standard;
the minimum capacity bTS occupied by the state data file, the minimum capacity bTW occupied by the waveform data file and the minimum capacity bTI occupied by the index data file are calculated respectively by combining the byte number bp1S of 1 strip data and the byte number bp1W of 1 strip waveform data formulated in the record board record protocol;
the minimum capacity bMC specified in the railway standard is thus:
bMC=bTS+bTW+bTI
step 4, calculating the capacity of the index file, the state data file and the waveform data file which can be finally stored by the memory card according to the usable capacity of the memory card calculated in the step 2 and the minimum capacity of each record file which meets the specified record duration in the railway standard and is calculated in the step 3:
step 4.1, the memory card usable capacity bTC meets the minimum equal duration recording requirement of the state data and the waveform data, namely: bTC is greater than or equal to nSMRs (bp1S+bp1W) + bTI, according to the capacity of the memory card, calculating the final occupied capacity bTS1 of the state data file and the final occupied capacity bTW1 of the waveform data file according to rules of recording equal time length, thereby ensuring that the capacity of the memory card is fully utilized; the specific calculation method is as follows:
bTS1=[(bTC-bTI)/(bp1S+bp1W)]*bp1S(5)
bTW1=[(bTC-bTI)/(bp1S+bp1W)]*bp1W(6)
wherein "/" represents integer division, if (bTC-bTI)/(bp1S+bp1W) cannot be integer divided, each data file takes an integer part of occupied capacity, the remaining storage capacity bTC-bTI-bTS1-bTW is reserved, and step 5 is executed;
if bTC is not more than nSMRs (bp1S+bp1W) + bTI, executing the step 4.2;
step 4.2, if the memory card usage capacity bTC meets the minimum capacity bTS of the state data, but does not meet the minimum equal duration recording requirement of the state data and the waveform data, namely: bTS + bTI is less than or equal to bTC and less than nSMRs (bp1S+bp1W) + bTI), firstly, the minimum duration requirement of the state data is ensured, namely the final occupied capacity bTS1 of the state data file is equal to bTS, and the final occupied capacity bTW of the waveform data file is calculated by combining the occupied capacity bTI of the index data file, wherein the final occupied capacity bTW of the waveform data file is as follows:
bTW1=[(bTC-bTI–bTS1)/bp1W]*bp1W(7)
if (bTC-bTI-bTS 1)/bp 1W is not divisible, taking the whole occupied capacity of (bTC-bTI-bTS) 1W as bTW1 and the remaining storage capacity bTC-bTI-bTS1-bTW1 as reservation, and executing step 5;
if bTS + bTI is less than or equal to bTC and less than nSMRs (bp 1S+bp 1W) + bTI, executing the step 4.3;
step 4.3, if the memory card usable capacity bTC does not satisfy the status data minimum capacity bTS, namely: bTC < bTS + bTI, the record board records only the status data, and the status data file occupation capacity bTS1 is:
bTS1=[(bTC-bTI)/bp1S]*bp1S(8)
if (bTC-bTI)/bp 1S is not divided completely, taking the occupied capacity of the integer part of (bTC-bTI)/bp 1S as bTS1 and the remaining storage capacity bTC-bTI-bTS1 as reservation, and executing the step 5;
step 5, checking the file system and the recorded data used by the current memory card, and executing step 6 if the file system or the recorded data are abnormal;
step 6, creating a file system, namely formatting, according to the type of the file system required by the record board, the maximum capacity of the memory card obtained in the step 1 and the physical format of the memory card; and (3) creating the record data files according to the final occupied capacity of each record data file obtained by calculation in the step (4).
2. The method for adaptively adjusting the storage capacity of cab signal recorded data according to claim 1, wherein the maximum storage capacity ts of the memory card is obtained by reading the value of the corresponding register of the memory card.
3. The method for adaptively adjusting a storage capacity of recorded cab signal data according to claim 2, wherein the memory card can use a capacity bTC = (nTS-nFSS) bpS.
4. The method for adaptively adjusting a storage capacity of signal recording data according to claim 3, wherein a minimum capacity bTS =nsrs×bp1s occupied by the status data file is bTS is an integer multiple of bpS.
5. The method for adaptively adjusting a storage capacity of recorded cab signal data according to claim 4, wherein the waveform data file occupies a minimum capacity bTW =nWMRs by 1W, and bTW is an integer multiple of bpS.
6. The method of claim 5, wherein bTI is calculated using a custom fixed byte length, and bTI is an integer multiple of bpS.
7. The storage capacity adaptive adjustment method of cab signal recording data according to any one of claims 1 to 6, wherein the memory card file system or recording data abnormality includes:
(1) The current file system type is a file system which is not supported or not identified by the record board;
(2) The current file system is not created according to the maximum storage capacity of the memory card;
(3) Files already created in the current file system are not created according to the final capacity obtained by adaptively calculating each recorded data file;
(4) Record data in a file that has been created in the current file system is abnormal.
8. The method for adaptively adjusting a memory capacity of a cab signal recording data according to claim 7, wherein step 1 is performed first after the cab signal recording board is powered on, i.e., the memory card status is detected first after the cab signal recording board is powered on.
9. A computer storage medium having stored therein at least one instruction that is loaded and executed by a processor to implement the method of storage capacity adaptation of cab signal record data as claimed in any one of claims 1 to 8.
10. A storage capacity adaptive adjustment device for cab signal recording data, characterized in that the device comprises a processor and a memory, the memory having stored therein at least one instruction, the at least one instruction being loaded and executed by the processor to implement the storage capacity adaptive adjustment method for cab signal recording data as claimed in any one of claims 1 to 8.
CN202310266281.4A 2023-03-17 2023-03-17 Method and device for adaptively adjusting storage capacity of locomotive signal recorded data Active CN116166199B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202310266281.4A CN116166199B (en) 2023-03-17 2023-03-17 Method and device for adaptively adjusting storage capacity of locomotive signal recorded data

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202310266281.4A CN116166199B (en) 2023-03-17 2023-03-17 Method and device for adaptively adjusting storage capacity of locomotive signal recorded data

Publications (2)

Publication Number Publication Date
CN116166199A true CN116166199A (en) 2023-05-26
CN116166199B CN116166199B (en) 2023-08-08

Family

ID=86421974

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202310266281.4A Active CN116166199B (en) 2023-03-17 2023-03-17 Method and device for adaptively adjusting storage capacity of locomotive signal recorded data

Country Status (1)

Country Link
CN (1) CN116166199B (en)

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20120089805A1 (en) * 2010-10-08 2012-04-12 Phison Electronics Corp. Memory storage device, memory controller thereof, and method for automatically creating fill-file thereof
CN103605309A (en) * 2013-11-25 2014-02-26 北京航空航天大学 Four-channel high-capacity waveform storage system and construction method thereof
CN109215171A (en) * 2018-08-20 2019-01-15 深圳市长龙铁路电子工程有限公司 A kind of storage method of cab signaling equipment data record
WO2020171643A1 (en) * 2019-02-21 2020-08-27 주식회사 글로비즈 State monitoring-based device for railway vehicle maintenance platform

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20120089805A1 (en) * 2010-10-08 2012-04-12 Phison Electronics Corp. Memory storage device, memory controller thereof, and method for automatically creating fill-file thereof
CN103605309A (en) * 2013-11-25 2014-02-26 北京航空航天大学 Four-channel high-capacity waveform storage system and construction method thereof
CN109215171A (en) * 2018-08-20 2019-01-15 深圳市长龙铁路电子工程有限公司 A kind of storage method of cab signaling equipment data record
WO2020171643A1 (en) * 2019-02-21 2020-08-27 주식회사 글로비즈 State monitoring-based device for railway vehicle maintenance platform

Non-Patent Citations (2)

* Cited by examiner, † Cited by third party
Title
UROS MARKOVIC等: "Optimal Sizing and Tuning of Storage Capacity for Fast Frequency Control in Low-Inertia Systems", 《IEEE》 *
陈洪;乐毅;吴晓翠;朱波;胡晓;刘东;: "基于大数据平台的水电机组状态数据处理架构研究", 水电与新能源, no. 11 *

Also Published As

Publication number Publication date
CN116166199B (en) 2023-08-08

Similar Documents

Publication Publication Date Title
EP1805589B1 (en) Tape emulating disk based storage and method with automatically resized emulated tape capacity
US9864652B2 (en) System and method for archive verification according to policies
US20120084610A1 (en) Method and device for reading and writing a memory card
EP2000897A9 (en) Read device for processing a read error, system, its method, and program
CN111078515B (en) SSD layered log recording method, SSD layered log recording device, SSD layered log recording computer device and storage medium
US20100077138A1 (en) Write Protection Method and Device for At Least One Random Access Memory Device
CN110989938A (en) Fault disk identification method, device, equipment and computer readable storage medium
CN116166199B (en) Method and device for adaptively adjusting storage capacity of locomotive signal recorded data
CN110555006A (en) log recording method, battery management system, vehicle and electronic equipment
CN109215171A (en) A kind of storage method of cab signaling equipment data record
US20080195837A1 (en) Data access method, channel adapter, and data access control device
CN113590405A (en) Hard disk error detection method and device, storage medium and electronic device
JPH11249821A (en) Data storage device and interface condition setting method to be applied to the same
US20030131280A1 (en) Method and apparatus for facilitating validation of data retrieved from disk
US20040210712A1 (en) Disk array unit and its method for writing data
CN115033283A (en) Event recording method and electronic equipment
CN112286720B (en) Method for extracting deleted data after enabling TRIM command to solid state disk controlled by SM2246EN
CN115454703A (en) Slow disk isolation control method and device, equipment and storage medium
CN114489509A (en) Video storage method and device of automobile data recorder, electronic equipment and storage medium
CN111078159B (en) Writing method for avoiding DVR storage card writing damage
US11487430B2 (en) Reducing data using a plurality of compression operations in a virtual tape library
CN113125966B (en) Battery monitoring data storage method, battery management system and battery monitoring device
CN112612409B (en) Aging method and device for erasure matrix cache of distributed storage system
CN116627788A (en) Method and device for processing faults of hard disk, electronic equipment and medium
JP2576792B2 (en) Disk device and higher-level device using the same

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant