WO2022252419A1 - 一种数据存储方法和装置 - Google Patents

一种数据存储方法和装置 Download PDF

Info

Publication number
WO2022252419A1
WO2022252419A1 PCT/CN2021/116058 CN2021116058W WO2022252419A1 WO 2022252419 A1 WO2022252419 A1 WO 2022252419A1 CN 2021116058 W CN2021116058 W CN 2021116058W WO 2022252419 A1 WO2022252419 A1 WO 2022252419A1
Authority
WO
WIPO (PCT)
Prior art keywords
data
data storage
list
read
target
Prior art date
Application number
PCT/CN2021/116058
Other languages
English (en)
French (fr)
Inventor
赵德力
谢东武
Original Assignee
广东汇天航空航天科技有限公司
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 广东汇天航空航天科技有限公司 filed Critical 广东汇天航空航天科技有限公司
Publication of WO2022252419A1 publication Critical patent/WO2022252419A1/zh

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/0628Interfaces specially adapted for storage systems making use of a particular technique
    • G06F3/0655Vertical data movement, i.e. input-output transfer; data movement between one or more hosts and one or more storage devices
    • 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/0614Improving the reliability of storage systems
    • G06F3/0616Improving the reliability of storage systems in relation to life time, e.g. increasing Mean Time Between Failures [MTBF]
    • 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

Definitions

  • the invention relates to the technical field of data processing, in particular to a data storage method and a data storage device.
  • the monitoring center can monitor the data during the driving of the car or the flight of the aircraft based on the reported driving data or flight data.
  • the driving status or flight status of the vehicle can be analyzed and monitored, and the maintenance center can perform targeted maintenance on the failed car or aircraft according to the recorded car driving data or flight data, saving time for inspection and maintenance.
  • the data record information during data storage usually includes three pieces of information: data storage start location information, data read location information, and data number. These three types of data record information are usually stored together in one area of the disk. However, every time new data is generated or read, old data needs to be erased before new information can be written to the disk. Since the number of times the disk can be erased has an upper limit, once the upper limit of erasing is reached, the disk will not be able to be erased again. use.
  • embodiments of the present invention are proposed to provide a data storage method and a corresponding data storage device that overcome the above problems or at least partially solve the above problems.
  • the embodiment of the present invention discloses a data storage method, which is applied to airborne equipment, the airborne equipment has a data storage space, and the method includes:
  • the data storage list sets the first pointer position instantaneously based on the change from low level to high level in the rising edge principle , and the data storage list is a list with a high level flag after the disk sector is erased;
  • the data storage space includes a plurality of data units
  • the determining the target storage unit located in the data storage space according to the first pointer position according to the data storage list includes:
  • the target storage location has a first identifier
  • the instantaneous movement of the first pointer position in the data storage list according to the rising edge principle changes from low level to high level, including:
  • the first pointer position in the data storage list is moved by preset bytes in a preset direction.
  • the method also includes:
  • the position of the second pointer in the data read list is moved instantaneously according to the change from low level to high level in the principle of rising edge.
  • the data storage space includes a plurality of data units
  • the determining the target read unit located in the data storage space according to the second pointer position of the data read list includes:
  • the target reading position has a second mark
  • the second pointer position in the data reading list is moved instantaneously according to the change from low level to high level according to the principle of rising edge, including:
  • the second pointer position in the data reading list is moved by a preset byte in a preset direction.
  • the data storage space is located in a disk sector, and the method further includes:
  • the disk sector is erased.
  • the embodiment of the present invention also discloses a data storage device, which is applied to airborne equipment, the airborne equipment has a data storage space, and the device includes:
  • the data storage list obtaining module is used to obtain the first pointer position in the data storage list recording the storage information of the data storage space, wherein the data storage list is based on the change from low level to high level in the principle of rising edge Setting the position of the first pointer instantaneously, and the data storage list is a list with a high level flag after the disk sector is erased;
  • a storage request detection module configured to detect a storage request for data to be stored when the data level for the data storage list in the data storage space becomes a low level
  • a target storage unit determination module configured to determine a target storage unit located in the data storage space according to the first pointer position of the data storage list
  • a data storage module configured to store the data to be stored in the target storage unit
  • the first position moving module is used for instantaneously moving the position of the first pointer in the data storage list according to the change from low level to high level in the principle of rising edge.
  • the data storage space includes a plurality of data units
  • the target storage unit determination module includes:
  • a first position information determining submodule configured to determine the position information at the position of the first pointer in the data storage list
  • the target storage location determining submodule is configured to determine the target storage location in the data storage list according to the location information of the first pointer position; the multiple storage locations of the data storage list and the multiple of the data storage space data units have a corresponding relationship;
  • the target storage unit determination sub-module is configured to determine a target storage unit corresponding to the target storage location from the plurality of data units in the data storage space.
  • the target storage location has a first identifier
  • the first location moving module includes:
  • the first identifier modifying submodule is configured to modify the first identifier of the target storage location in the data storage list to a preset identifier after storing the generated data;
  • the first position moving sub-module is configured to move the position of the first pointer in the data storage list by preset bytes in a preset direction based on the preset identifier of the target storage location.
  • the device also includes:
  • the data read list acquisition module is used to obtain the second pointer position in the data read list recording the read information of the data storage space, wherein the data read list is based on the principle of rising edge from low level to high The change in level momentarily sets the position of the second pointer;
  • a read request detection module configured to detect a storage request for data to be stored when the data level for the data storage list in the data storage space becomes a low level
  • a target reading unit determining module configured to determine a target reading unit located in the data storage space according to the second pointer position of the data reading list;
  • a data reading module configured to read from the target reading unit Get the data to be read;
  • the second position moving module is used for instantaneously moving the position of the second pointer in the data read list according to the change from low level to high level in the principle of rising edge.
  • the data storage space includes a plurality of data units
  • the target read unit determination module includes:
  • a second position information determining submodule configured to determine the position information at the position of the second pointer in the data read list
  • the target reading position determination submodule is used to determine the target reading position in the data reading list according to the position information of the second pointer position; the multiple reading positions of the data reading list are related to the data Multiple data units in the storage space have a corresponding relationship;
  • the target reading unit determination submodule is configured to determine a target reading unit corresponding to the target reading position information from the plurality of data units in the data storage space.
  • the target reading position has a second identification
  • the second position moving module includes:
  • the second identifier modifying submodule is used to modify the second identifier of the target reading position in the data storage list to a preset identifier after reading the read data;
  • the second position moving sub-module is configured to move the position of the second pointer in the data reading list by preset bytes in a preset direction based on the preset identifier of the target reading position.
  • the data storage space is located in a disk sector, and the device further includes:
  • the disk sector erasing module is configured to perform an erasing operation on the disk sector when the data storage list and/or the data read list are all preset flags.
  • the embodiment of the present invention also discloses an electronic device, including: the data storage device, a processor, a memory, and a computer program stored on the memory and capable of running on the processor, and the computer program is controlled by the The steps for implementing any one of the data storage methods when the processor executes.
  • the embodiment of the invention also discloses a vehicle or aircraft, including: the electronic device.
  • the embodiment of the present invention also discloses a computer-readable storage medium, where a computer program is stored on the computer-readable storage medium, and when the computer program is executed by a processor, the steps of any one of the storage methods are implemented.
  • the airborne device can acquire the first pointer position in the data storage list that records the storage information of the data storage space, and the acquired data storage list can be based on the principle of rising edge from low level to high level.
  • the level change instantly sets the first pointer position.
  • a pointer position determines the target storage unit in the data storage space, stores the data to be stored in the target storage unit, and moves the first pointer position in the data storage list instantaneously according to the change from low level to high level in the principle of rising edge and, when the data level of the data read list in the data storage space becomes a low level, a read request for the data to be read is detected, at this time, the read data storage space based on the acquired record data can be read Get the second pointer position in the data read list of the information, determine the target reading unit located in the data storage space, and read the data to be read from the determined target reading unit, according to the rising edge principle, the low level A change to high momentarily moves the second pointer position in the data read list.
  • the sector By using a dedicated sector to store the location where data is written and the location where data is read, the sector needs to be erased only when each storage unit in the data storage space is used up or Qin bytes or Qout bytes are used up. Disk data, the data storage capacity is large, and the disk does not need to be erased frequently, thereby improving the service life of the disk.
  • FIG. 1 is a schematic diagram of storage of disk data in the related art
  • Fig. 2 is a flow chart of the steps of the data storage method provided by the embodiment of the present invention.
  • Fig. 3 is a schematic diagram of the corresponding relationship between the data storage list, the data reading list and the data storage space provided by the embodiment of the present invention
  • Fig. 4 is a flow chart of the steps of the data reading method provided by the embodiment of the present invention.
  • Fig. 5 is a flow chart of the steps of the data access method provided by the embodiment of the present invention.
  • FIG. 6 is a schematic diagram of a data access process provided by an embodiment of the present invention.
  • Fig. 7 is a structural block diagram of a data storage device provided by an embodiment of the present invention.
  • the data record information can generally include the following three pieces of information: data storage start position information, data read The location information and data number information, and these three kinds of information can be stored together in one area of the disk. Every time new data is generated or read, at least two of these three pieces of information will change, and once changed, since the three are stored in one disk space, the old data needs to be erased before the new one can be written to the disk. information.
  • the data content can be recorded in the Record disk area, and there is data storage starting position information Qin for recording data storage, and data reading position information Qout and the number of data pieces information Qcnt, wherein, when data is stored on the disk or read from the disk, a certain byte in the above-mentioned Qin, Qout and Qcnt may change, and when storing or reading, the above-mentioned Qin , the change sent by a certain byte in Qout and Qcnt can be realized based on high and low level signals, and can only change "1" (ie high level) to "0" (ie low level) or keep “1" No change, if you need to change the byte recorded in the Record disk area from "0" to "1", it can only be realized by erasing the disk, that is, erasing and rewriting the disk area.
  • one of the core ideas of the embodiment of the present invention is to use the idea of rising edge and the way of queue storage to jointly solve the storage of flight data/driving data.
  • the area stores the location where the data is written and the location where the data is read. Only when each storage unit of the data storage space is used up or the Qin byte or the Qout byte is used up, the disk data of the sector needs to be erased.
  • the data storage Large amount, and does not need to wipe the disk frequently, thereby increasing the service life of the disk.
  • FIG. 2 shows a flow chart of the steps of the data storage method provided by the embodiment of the present invention, which is applied to airborne equipment, and may specifically include the following steps:
  • Step 201 obtaining the first pointer position in the data storage list of the storage information of the recorded data storage space
  • the airborne device may have a data storage space for data storage, the data storage space may be provided by a sector of a magnetic disk, and when storing data, it may have data storage start position information for recording data storage,
  • the data storage start location information may be realized by a data storage list, that is, the data storage location recorded in the data storage list may be the storage start location of data in the data storage space.
  • a storage request for data to be stored is detected, and the storage request may be embodied as a write operation on the data.
  • the data level of the data storage list in the data storage space changes to a low level, it can indicate that a storage request for the data to be stored is detected, and then the write operation can be expressed as that the mark in the data storage list changes from "1 " becomes "0", that is, when a low-level signal is detected, it means that there is new data to be stored.
  • the data storage list used to record the storage location of the data in the data storage space can be obtained.
  • the flags of the data storage list are all "1" (i.e. high level), wherein the data storage list can include multiple storage locations, that is, multiple storage locations
  • the flag it has is "1"
  • there is no flag "0" (ie low level) in the data storage list at this time then when the data is ready to be stored at the beginning, the data storage list can be initialized, that is, the data storage
  • the initial identification of the position used to store data in the list changes from "1" to "0”, so that the data storage list can have the first rising edge, that is, the data storage list can be based on the rising edge principle from low level to high level
  • the change of the moment sets the first pointer position (corresponding to the pointer position of the first rising edge).
  • the rising edge in the digital circuit represents the moment (or moment) when the data level changes from low level (digital "0") to high level (digital "1").
  • the first rising edge in the data storage list can be used to indicate the first pointer position, and the first pointer position can point to the storage start position of the data in the data storage list, so as to inform the current data storage position.
  • Step 202 determine the target storage unit located in the data storage space according to the first pointer position of the data storage list
  • the storage request for the data to be stored acquires the data storage list with the first pointer position set, it can be determined based on the first pointer position of the acquired data storage list that the data is located The target storage unit for the storage space.
  • the data storage space may include multiple data units, each data unit may have 256 bytes, and each data unit may have a fixed data structure, and these data units may be used to record data, and the data unit recorded
  • the data can include all business data that needs to be recorded at the same time.
  • a data unit when a data unit is used to store the flight data of the aircraft during the flight, a data unit may store various types of flight data at a certain moment, which may include flight altitude data, flight latitude and longitude data, flight internal temperature, flight speed, remaining power, etc., and another data unit can store various types of flight data at another time; as another example, when the data unit is used to store the driving data of the car during driving When, one data unit may store various types of driving data at a certain moment, such as total mileage data, driving speed, driving time, positioning data, and remaining power, etc., while another data unit may be stored at another time. Various types of driving data.
  • the data unit to record all the business data that needs to be recorded at the same time in a specific implementation, it can be realized based on the data unit with a fixed data structure, wherein the 256 bytes of each data unit can be stored in corresponding Different types of flight data/driving data that need to be recorded at the same time, for example, the xth byte to the yth byte can correspond to the storage of flight height data, and the yth byte to the zth byte can correspond to the storage of flight data Latitude and longitude data, and so on, which are not limited in this embodiment of the present invention.
  • the determination may specifically be based on the position of the first pointer at the first rising edge. Firstly, the position information at the first pointer position of the data storage list can be determined, and then the target storage position in the data storage list can be determined according to the position information of the first pointer position, and the data storage list can include multiple storage positions, which can be respectively associated with Multiple data units in the data storage space have a corresponding relationship, at this time, a target storage unit that has a corresponding relationship with the target storage location can be determined from the multiple data units in the data storage space, so as to store the data to be stored in the determined target storage unit .
  • the corresponding relationship between multiple storage locations of the data storage list and multiple data units in the data storage space may be established in advance.
  • FIG. 3 it shows a schematic diagram of the corresponding relationship between the data storage list, the data read list, and the data storage space provided by the embodiment of the present invention.
  • the data storage list Qin can be used to indicate the starting position of data storage, and the business
  • the data enters the data storage space according to the storage method of the queue, and when it is written to a certain address, the corresponding Qin can be set to 0 accordingly, as shown in Figure 3, if there are 5 data units in the data storage space that store data, then this When Qin is based on the initial 0, the first 5 bits (that is, a total of 6 bits) can be set to 0.
  • the target storage unit in the process of determining the target storage unit according to the position information of the first pointer position, based on the position of the first pointer position in the data storage list, it is determined that a bit behind it is detected as the current data writing
  • the storage position of the data during the operation (that is, the storage request) is changed from 1 to 0.
  • it can also be determined that the data storage unit where the current data is stored is located in the corresponding position of the data storage space based on the first pointer position.
  • the following data unit is the storage address of the current data.
  • Step 203 storing the data to be stored in the target storage unit, and moving the position of the first pointer in the data storage list according to the rising edge principle.
  • the data to be stored can be stored in the data storage space in a queue storage manner, and written to a storage address
  • the storage address can be the target storage unit determined in step 202
  • the first pointer position corresponding to the first rising edge in the data storage list can be moved, specifically, it can be expressed according to the principle of rising edge
  • the first pointer position in the data storage list is moved, so that the first pointer position after shifting and the byte corresponding to the first pointer position record the relevant information for the data storage list. store information.
  • the airborne device can obtain the first pointer position in the data storage list that records the storage information of the data storage space, and the obtained data storage list and the location in the data storage list can be based on the rising edge principle.
  • the change from the level to the high level sets the first pointer position instantly, and when the data level for the data storage list in the data storage space becomes a low level, the storage request of the data to be stored can be detected.
  • the first pointer position of the data storage list determines the target storage unit located in the data storage space, and stores the data to be stored in the target storage unit, and moves instantaneously in the data storage list according to the change from low level to high level in the principle of rising edge The first pointer position of .
  • the sector By using a dedicated sector to store the location where data is written and the location where data is read, the sector needs to be erased only when each storage unit in the data storage space is used up or Qin bytes or Qout bytes are used up. Disk data, the data storage capacity is large, and the disk does not need to be erased frequently, thereby improving the service life of the disk.
  • FIG. 4 shows a flow chart of the steps of the data reading method provided by the embodiment of the present invention, which is applied to airborne equipment, and may specifically include the following steps:
  • Step 401 obtaining the second pointer position in the data read list of the read information of the recorded data storage space
  • the airborne device may have a data storage space for data storage, the data storage space may be provided by a sector of the magnetic disk, and when the data is read, it may have location information for recording the data read, in
  • the position information of data reading can be realized through the data reading list, that is, the data reading position recorded in the data reading list can be the reading position of the data in the data storage space.
  • a read request for data to be read is detected, and the read request may be embodied as a read operation on the data.
  • the read request may be embodied as a read operation on the data.
  • the data level of the data read list in the data storage space becomes a low level, it may indicate that a read request for the data to be read is detected, and the read operation may be shown as being in the data read list
  • the flag in changes from "1" to "0", that is, when a low-level signal is detected, it means that there is a need to read data from the data storage space. Data read list.
  • the data read list flags are all "1" (i.e. high level), wherein the data read list can include multiple read positions, that is, multiple The identification of the reading position is "1", at this time, the data reading list does not have the identification "0" (ie low level), while the data storage list is initialized, the data reading list can also be read Perform an initialization operation, that is, change the identification of the initial position for reading data in the data reading list from "1" to "0", so that the data reading list can have a second rising edge, and the second rising edge can be used for Indicates the second pointer position, the second pointer position can point to the read position of the data in the data read list, which is used to inform the storage position of the current data, that is, the data read list can be based on the principle of rising edge from low level to high The level change momentarily sets the second pointer position (the pointer position corresponding to the second rising edge).
  • Step 402 determine the target reading unit located in the data storage space according to the second pointer position of the data reading list
  • the second pointer of the list can be read based on the acquired data.
  • the location determines the target read unit located in the data storage space.
  • the determination may be based on the second pointer position of the second rising edge.
  • the position information at the second pointer position of the data read list can be determined, and then the target read position can be determined in the data read list according to the position information of the second pointer position, and the data read list can include multiple read location, which may respectively have a corresponding relationship with a plurality of data units in the data storage space, and at this time, a target reading unit corresponding to a target reading position may be determined from the plurality of data units, so as to read from the determined target The unit reads the data to be read.
  • the data read list Qout may be used to indicate the position of data read, and at this time, the rising edge of Qout may be at the position of the arrow shown in FIG. 3 .
  • the current slave data storage space can also be determined based on the second pointer position at the corresponding position of the data storage space.
  • the data reading unit for space reading data is the data unit behind it, which is the reading address of the current data.
  • Step 403 read the data to be read from the target reading unit, and move the position of the second pointer in the data read list according to the rising edge principle.
  • the data to be read can be read from the corresponding read address of the data storage space in a queue storage manner
  • the The read address can be the target read unit determined in step 402
  • the second pointer position corresponding to the second rising edge in the data read list can be moved.
  • the second pointer position in the data read list is moved, so that the shifted second pointer position and the byte record corresponding to the second pointer position are used for data read Fetch related read information of the list.
  • the airborne device may detect a read request for the data to be read when the data level of the data read list in the data storage space becomes low level, and at this time may be based on the Obtaining the second pointer position in the data reading list of the read information of the recorded data storage space, determining the target reading unit located in the data storage space, and reading the data to be read from the determined target reading unit, The position of the second pointer in the data read list is moved instantaneously according to the change from low level to high level in the principle of rising edge.
  • the sector By using a dedicated sector to store the location where data is written and the location where data is read, the sector needs to be erased only when each storage unit in the data storage space is used up or Qin bytes or Qout bytes are used up. Disk data, the data storage capacity is large, and the disk does not need to be erased frequently, thereby improving the service life of the disk.
  • FIG. 5 shows a flow chart of the steps of the data access method provided by the embodiment of the present invention, which is applied to an airborne device, and the airborne device has a data storage space, and may specifically include the following steps:
  • Step 501 after storing the generated data, move the first pointer position corresponding to the first rising edge in the data storage list;
  • the data storage list when the data is first prepared for storage, the data storage list may be initialized, that is, the identifier of the position initially used to store data in the data storage list is changed from "1" to "0";
  • the first identification of the target storage location in the data storage list can be modified to a preset identification, and the corresponding target storage unit in the data storage list
  • the identification of the corresponding storage location can be modified to a preset identification, which can be a low-level signal when a write operation is detected, that is, the identification in the data storage list can be changed from a high level "1" to Low level "0".
  • the first rising edge corresponding to the first rising edge will be located in the data storage list.
  • the pointer position moves preset bytes according to a preset direction, so that relevant storage information for the data storage list is recorded through the shifted first pointer position and the byte corresponding to the first pointer position.
  • the position of the first pointer corresponding to the first rising edge in the data storage list can also move the preset byte according to the preset direction.
  • the preset direction can be based on the current storage
  • the position moves to the next storage position, and the service data enters the data storage space according to the storage method of the queue, so the preset byte can be 1 bit, that is, the first pointer position can be moved to the position of the next bit.
  • the data unit it points to in the data storage space also moves correspondingly.
  • Step 502 after reading the read data, move the second pointer position corresponding to the second rising edge in the data read list;
  • the data read list when the data is first prepared to be stored, the data read list can be initialized, that is, the identifier of the initial position for reading data in the data storage list is changed from "1" to "0". ”; after the business data is entered into the data storage space according to the reading method of the queue, and after the data is read from the target reading unit, the second identification of the target reading position in the data reading list can be modified to a preset identification.
  • the identifier of the read position corresponding to the corresponding target read unit in the read list can change from high level to low level, that is, from 1 to 0.
  • the data reading list corresponding to the second rising edge After modifying the logo to the preset logo, based on the preset logo of the target reading position, according to the rising edge principle in the moment of change from low level to high level, the data reading list corresponding to the second rising edge will be
  • the second pointer position moves preset bytes according to a preset direction, so that relevant read information for the data read list is recorded through the shifted second pointer position and the byte corresponding to the second pointer position.
  • the position of the first pointer corresponding to the second rising edge in the data read list can also move the preset byte according to the preset direction.
  • the preset direction can be based on the currently read The direction in which the position moves to the next read position, and the service data is read from the data storage space according to the read mode of the queue, then the preset byte can be 1 bit, that is, the second pointer position can be moved to the next bit During the movement of the second pointer position in the data read list, the data unit pointed to by it in the data storage space also moves correspondingly.
  • FIG. 6 shows a schematic diagram of the data access process provided by the embodiment of the present invention.
  • the second bit of Qout can be set to 0, which means The position of the second pointer at the second rising edge of Qout can be moved from the arrow position shown in FIG. 3 to the arrow position shown in FIG. 6 .
  • the position corresponding to Qin can be set to 0, and each time a piece of data is read from the data storage space, the pointer position corresponding to the rising edge of Qout is moved backward Bit advancement, the corresponding bit can also change from 1 to 0, and so on.
  • the data storage space when using the data storage space to store data, in addition to the data storage start position information for recording data storage and the position information for data reading, there may also be data number information Qcnt , Qcnt can calculate how many pieces of data are stored in the data storage space.
  • the data record information when accessing data, it can be implemented in the manner of queue storage and/or queue reading in the disk area/sector, and the data record information is stored according to the identified data storage list Qin and/or
  • the data read list Qout is implemented, wherein the data storage list includes storage units for storing data corresponding to the disk queue, and the data read list includes read units for reading data corresponding to the disk queue, Each storage unit and reading unit are independent of each other, so the bytes of the data storage list Qin, data reading list Qout, and data number information Qcnt contained in the record information are independent of each other, and the data record information will not appear A phenomenon in which old data in the disk area needs to be erased due to a change in a certain byte in Qin, Qout, and Qcnt.
  • Step 503 when the data storage list and/or the data read list are all preset flags, perform an erase operation on the disk sector.
  • the data storage space may be located in a disk sector.
  • the data storage list and/or the data read list are both preset flags, that is, when they are both low level "0"
  • the following may occur Three situations: 1) the data storage lists are all preset identifiers; 2) the data read lists are all preset identifiers; 3) the data storage lists are all preset identifiers, and the data read lists are all preset identifiers.
  • the disk sector can be erased to avoid the need to modify the disk due to changes in the location information of the data storage starting point, the location information of the data read, and a certain byte in the data storage.
  • the data is erased and rewritten, resulting in frequent disk erasures and shortening the life of the disk.
  • the identification of the corresponding position of Qin can be set to "0", and when reading a piece of data from the data storage space, the corresponding bit can also be changed to "1". becomes “0", and the disk can only change "1” to "0” or keep “1” unchanged when storing data. If you need to change the logo from "0” to "1", you can only If the disk is erased, the disk data of the sector needs to be erased only when each storage unit in the data storage space is used or the Qin byte or the Qout byte is used.
  • the idea of using the rising edge and the queue storage method proposed by the embodiment of the present invention jointly solve the storage method of flight data/driving data, which uses queue storage and each storage in the data storage space
  • Data erasing when the units are all in use can not only meet the storage requirements of flight data/driving data that need to be independently written to the disk, but also reduce the erasure of the disk by ensuring that the disk does not need to be erased frequently The number of times, thereby increasing the service life of the disk.
  • the data storage method proposed by the embodiment of the present invention can be applied to any scene where flight data or driving data is stored and uploaded, based on the data storage capacity requirements it can meet and the number of disk erasures it can guarantee, especially It can be applied to special scenarios of data storage and uploading when there is no network or the network quality is poor.
  • FIG. 7 shows a structural block diagram of an embodiment of a data storage device provided by the present invention, which is applied to airborne equipment, and the airborne equipment has a data storage space, and may specifically include the following modules:
  • the data storage list acquisition module 701 is configured to acquire the first pointer position in the data storage list that records the storage information of the data storage space, wherein the data storage list is based on the rising edge principle from low level to high level The position of the first pointer is set at the moment of change, and the data storage list is a list with a high level flag after the disk sector is erased;
  • a storage request detection module 702 configured to detect a storage request for data to be stored when the data level for the data storage list in the data storage space becomes a low level;
  • a target storage unit determination module 703, configured to determine a target storage unit located in the data storage space according to the first pointer position of the data storage list;
  • the first position moving module 705 is configured to instantaneously move the position of the first pointer in the data storage list according to the change from low level to high level in the rising edge principle.
  • the data storage space includes multiple data units
  • the target storage unit determination module 703 may include the following submodules:
  • a first position information determining submodule configured to determine the position information at the position of the first pointer in the data storage list
  • a target storage location determining submodule configured to determine a target storage location in the data storage list according to the location information of the first pointer position; the multiple storage locations of the data storage list and the multiple storage locations of the data storage space The data units have a corresponding relationship;
  • the target storage unit determination sub-module is configured to determine a target storage unit corresponding to the target storage location from the plurality of data units in the data storage space.
  • the target storage location has a first identifier
  • the first location moving module 705 may include the following submodules:
  • the first identifier modifying submodule is configured to modify the first identifier of the target storage location in the data storage list to a preset identifier after storing the generated data;
  • the first position moving sub-module is configured to move the position of the first pointer in the data storage list by preset bytes in a preset direction based on the preset identifier of the target storage location.
  • the device may also include the following modules:
  • the data read list acquisition module is used to obtain the second pointer position in the data read list recording the read information of the data storage space, wherein the data read list is based on the principle of rising edge from low level to high The change in level momentarily sets the position of the second pointer;
  • a read request detection module configured to detect a storage request for data to be stored when the data level for the data storage list in the data storage space becomes a low level
  • a target reading unit determining module configured to determine a target reading unit located in the data storage space according to the second pointer position of the data reading list
  • the data reading module is used to read the data to be read from the target reading unit; the second position moving module is used to instantly move the position located at the The second pointer position in the data read list.
  • the data storage space includes a plurality of data units
  • the target read unit determination module may include the following submodules:
  • a second position information determining submodule configured to determine the position information at the position of the second pointer in the data read list
  • the target reading position determination submodule is used to determine the target reading position in the data reading list according to the position information of the second pointer position; the multiple reading positions of the data reading list are related to the data Multiple data units in the storage space have a corresponding relationship;
  • the target reading unit determination sub-module is configured to determine a target reading unit corresponding to the target reading position from the plurality of data units in the data storage space.
  • the target reading position has a second identification
  • the second position moving module may include the following submodules:
  • the second identifier modifying submodule is used to modify the second identifier of the target reading position in the data storage list to a preset identifier after reading the read data;
  • the second position moving sub-module is configured to move the position of the second pointer located in the data reading list by preset bytes in a preset direction based on the preset identification of the target reading position.
  • the data storage space is located in a disk sector, and the device may also include the following modules:
  • the disk sector erasing module is configured to perform an erasing operation on the disk sector when the data storage list and/or the data read list are all preset flags.
  • the description is relatively simple, and for related parts, please refer to the part of the description of the method embodiment.
  • the embodiment of the present invention also provides an electronic device, including:
  • the embodiment of the present invention also discloses a vehicle or an aircraft, including: the above-mentioned electronic equipment.
  • the embodiment of the present invention also provides a computer-readable storage medium, on which a computer program is stored.
  • a computer program is stored.
  • the computer program is executed by a processor, each process of the above-mentioned data storage method embodiment is realized, and the same technical effect can be achieved. , to avoid repetition, it will not be repeated here.
  • embodiments of the present invention may be provided as methods, devices, or computer program products. Accordingly, embodiments of the invention may take the form of an entirely hardware embodiment, an entirely software embodiment, or an embodiment combining software and hardware aspects. Furthermore, embodiments of the invention may take the form of a computer program product embodied on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) having computer-usable program code embodied therein.
  • computer-usable storage media including but not limited to disk storage, CD-ROM, optical storage, etc.
  • Embodiments of the present invention are described with reference to flowcharts and/or block diagrams of methods, terminal devices (systems), and computer program products according to embodiments of the present invention. It should be understood that each procedure and/or block in the flowchart and/or block diagram, and a combination of procedures and/or blocks in the flowchart and/or block diagram can be realized by computer program instructions. These computer program instructions may be provided to a general purpose computer, special purpose computer, embedded processor or processor of other programmable data processing terminal equipment to produce a machine such that instructions executed by the computer or processor of other programmable data processing terminal equipment Produce means for realizing the functions specified in one or more procedures of the flowchart and/or one or more blocks of the block diagram.
  • These computer program instructions may also be stored in a computer-readable memory capable of directing a computer or other programmable data processing terminal to operate in a specific manner, such that the instructions stored in the computer-readable memory produce an article of manufacture comprising instruction means, the The instruction means implements the functions specified in one or more procedures of the flowchart and/or one or more blocks of the block diagram.

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Human Computer Interaction (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)

Abstract

一种数据存储方法和装置,应用于机载设备,所述机载设备具有数据存储空间,所述方法包括:获取数据存储空间的存储信息的数据存储列表中的第一指针位置(201);在所述数据存储空间中针对所述数据存储列表的数据电平变为低电平时,检测到待存储数据的存储请求;根据数据存储列表的第一指针位置确定位于数据存储空间的目标存储单元(202),向目标存储单元中存储所述待存储数据;按照上升沿原理中低电平到高电平的变化瞬间移动位于数据存储列表中的第一指针位置(203)。通过使用专门的扇区存储数据写入的位置和数据读取的位置,只有当数据存储空间每个存储单元都使用完或者Qin字节或者Qout字节都使用完才需要擦除该扇区的磁盘数据,不需要频繁擦除磁盘。

Description

一种数据存储方法和装置
本申请要求在2021年06月04日提交中国专利局、申请号202110621657.X、发明名称为“一种数据存储方法和装置”的中国专利申请的优先权,其全部内容通过引用结合在本申请中。
技术领域
本发明涉及数据处理技术领域,特别是涉及一种数据存储方法和一种数据存储装置。
背景技术
在汽车或者飞行器领域,在汽车行驶或者飞行器飞行的过程中需要对汽车行车数据或者飞行数据监测、存储以及上报,以便监控中心能够基于所上报的行车数据或者飞行数据对汽车行驶或者飞行器飞行过程中的行驶状态或者飞行状态进行分析与监测,以及,维修中心可以按照所记录的汽车行车数据或者飞行数据对出现故障的汽车或者飞行器进行针对性维修处理,节省检测与维修时间。
在对汽车行车数据或者飞行数据进行存储时,数据内容和数据记录信息需要存储在机载设备的存储空间中。其中,数据存储时数据记录信息通常可以包括三个信息:数据存储起点位置信息,数据的读取的位置信息和数据条数,这三种数据记录信息通常会一起存储在磁盘的一个区域。然而,在每次生成新数据或者读取数据时,需要擦除掉旧数据才能往磁盘写入新信息,由于磁盘的可擦除次数是有上限的,一旦达到擦除上限,磁盘将无法再次使用。
发明内容
鉴于上述问题,提出了本发明实施例以便提供一种克服上述问题或者至少部分地解决上述问题的一种数据存储方法和相应的一种数据存储装置。
本发明实施例公开了一种数据存储方法,应用于机载设备,所述机载设备具有数据存储空间,所述方法包括:
获取记录所述数据存储空间的存储信息的数据存储列表中的第一指针 位置,其中,所述数据存储列表基于上升沿原理中低电平到高电平的变化瞬间设置所述第一指针位置,且在对磁盘扇区进行擦除后所述数据存储列表为具有高电平标识的列表;
在所述数据存储空间中针对所述数据存储列表的数据电平变为低电平时,检测到待存储数据的存储请求;
根据所述数据存储列表的第一指针位置确定位于所述数据存储空间的目标存储单元,并向所述目标存储单元中存储所述待存储数据;
按照上升沿原理中低电平到高电平的变化瞬间移动位于所述数据存储列表中的第一指针位置。可选地,所述数据存储空间包括多个数据单元,所述根据所述根据所述数据存储列表的第一指针位置确定位于所述数据存储空间的目标存储单元,包括:
确定位于所述数据存储列表中所述第一指针位置的位置信息;
根据所述第一指针位置的位置信息确定在所述数据存储列表中的目标存储位置;所述数据存储列表的多个存储位置与所述数据存储空间的多个数据单元具有对应关系;
从所述数据存储空间的多个数据单元中确定与所述目标存储位置具有对应关系的目标存储单元。
可选地,所述目标存储位置具有第一标识,所述按照上升沿原理中低电平到高电平的变化瞬间移动位于所述数据存储列表中的第一指针位置,包括:
在存储所生成的数据之后,将所述数据存储列表中目标存储位置的第一标识修改为预设标识;
基于所述目标存储位置的预设标识,将位于所述数据存储列表中的第一指针位置按照预设方向移动预设字节。
可选地,所述方法还包括:
获取记录所述数据存储空间的读取信息的数据读取列表中的第二指针位置,其中,所述数据读取列表基于上升沿原理中低电平到高电平的变化瞬间设置所述第二指针位置;
在所述数据存储空间中针对所述数据读取列表的数据电平变为低电平时,检测到待读取数据的读取请求;
根据所述数据读取列表的第二指针位置确定位于所述数据存储空间的目标读取单元,并从所述目标读取单元中读取所述待读取数据;
按照上升沿原理中低电平到高电平的变化瞬间移动位于所述数据读取列表中的第二指针位置。
可选地,所述数据存储空间包括多个数据单元,所述根据所述数据读取列表的第二指针位置确定位于所述数据存储空间的目标读取单元,包括:
确定位于所述数据读取列表中所述第二针位置的位置信息;
根据所述第二针位置的位置信息确定在所述数据读取列表中的目标读取位置;所述数据读取列表的多个读取位置与所述数据存储空间的多个数据单元具有对应关系;
从所述数据存储空间的多个数据单元中确定与所述目标读取位置具有对应关系的目标读取单元。
可选地,所述目标读取位置具有第二标识,所述按照上升沿原理中低电平到高电平的变化瞬间移动位于所述数据读取列表中的第二指针位置,包括:
在读取所读取的数据之后,将所述数据存储列表中目标读取位置的第二标识修改为预设标识;
基于所述目标读取位置的预设标识,将位于所述数据读取列表中的第二指针位置按照预设方向移动预设字节。
可选地,所述数据存储空间位于磁盘扇区,所述方法还包括:
当所述数据存储列表和/或所述数据读取列表均为预设标识时,对所述磁盘扇区进行擦除操作。
本发明实施例还公开了一种数据存储装置,应用于机载设备,所述机载设备具有数据存储空间,所述装置包括:
数据存储列表获取模块,用于获取记录所述数据存储空间的存储信息的 数据存储列表中的第一指针位置,其中,所述数据存储列表基于上升沿原理中低电平到高电平的变化瞬间设置所述第一指针位置,且在对磁盘扇区进行擦除后所述数据存储列表为具有高电平标识的列表;
存储请求检测模块,用于在所述数据存储空间中针对所述数据存储列表的数据电平变为低电平时,检测到待存储数据的存储请求;
目标存储单元确定模块,用于根据所述数据存储列表的第一指针位置确定位于所述数据存储空间的目标存储单元;
数据存储模块,用于向所述目标存储单元中存储所述待存储数据;
第一位置移动模块,用于按照上升沿原理中低电平到高电平的变化瞬间移动位于所述数据存储列表中的第一指针位置。
可选地,所述数据存储空间包括多个数据单元,所述目标存储单元确定模块包括:
第一位置信息确定子模块,用于确定位于所述数据存储列表中所述第一指针位置的位置信息;
目标存储位置确定子模块,用于根据所述第一指针位置的位置信息确定在所述数据存储列表中的目标存储位置;所述数据存储列表的多个存储位置与所述数据存储空间的多个数据单元具有对应关系;
目标存储单元确定子模块,用于从所述数据存储空间的多个数据单元中确定与所述目标存储位置具有对应关系的目标存储单元。
可选地,所述目标存储位置具有第一标识,所述第一位置移动模块包括:
第一标识修改子模块,用于在存储所生成的数据之后,将所述数据存储列表中目标存储位置的第一标识修改为预设标识;
第一位置移动子模块,用于基于所述目标存储位置的预设标识,将位于所述数据存储列表中的第一指针位置按照预设方向移动预设字节。
可选地,所述装置还包括:
数据读取列表获取模块,用于获取记录所述数据存储空间的读取信息的数据读取列表中的第二指针位置,其中,所述数据读取列表基于上升沿原理中低电平到高电平的变化瞬间设置所述第二指针位置;
读取请求检测模块,用于在所述数据存储空间中针对所述数据存储列表的数据电平变为低电平时,检测到待存储数据的存储请求;
目标读取单元确定模块,用于根据所述数据读取列表的第二指针位置确定位于所述数据存储空间的目标读取单元;数据读取模块,用于从所述目标读取单元中读取所述待读取数据;
第二位置移动模块,用于按照上升沿原理中低电平到高电平的变化瞬间移动位于所述数据读取列表中的第二指针位置。
可选地,所述数据存储空间包括多个数据单元,所述目标读取单元确定模块包括:
第二位置信息确定子模块,用于确定位于所述数据读取列表中所述第二指针位置的位置信息;
目标读取位置确定子模块,用于根据所述第二指针位置的位置信息确定在所述数据读取列表的目标读取位置;所述数据读取列表的多个读取位置与所述数据存储空间的多个数据单元具有对应关系;
目标读取单元确定子模块,用于从数据存储空间的所述多个数据单元中确定与所述目标读取位置信息具有对应关系的目标读取单元。
可选地,所述目标读取位置具有第二标识,所述第二位置移动模块包括:
第二标识修改子模块,用于在读取所读取的数据之后,将所述数据存储列表中目标读取位置的第二标识修改为预设标识;
第二位置移动子模块,用于基于所述目标读取位置的预设标识,将位于所述数据读取列表中的第二指针位置按照预设方向移动预设字节。
可选地,所述数据存储空间位于磁盘扇区,所述装置还包括:
磁盘扇区擦除模块,用于当所述数据存储列表和/或所述数据读取列表均为预设标识时,对所述磁盘扇区进行擦除操作。
本发明实施例还公开了一种电子设备,包括:所述数据存储装置、处理器、存储器及存储在所述存储器上并能够在所述处理器上运行的计算机程序,所述计算机程序被所述处理器执行时实现任一项所述数据存储方法的步 骤。
本发明实施例还公开了一种车辆或者飞行器,包括:所述的电子设备。
本发明实施例还公开了一种计算机可读存储介质,所述计算机可读存储介质上存储计算机程序,所述计算机程序被处理器执行时实现任一项所述存储方法的步骤。
本发明实施例包括以下优点:
在本发明实施例中,机载设备可以获取记录所述数据存储空间的存储信息的数据存储列表中的第一指针位置,所获取的数据存储列表可以基于上升沿原理中低电平到高电平的变化瞬间设置第一指针位置,在数据存储空间中针对所述数据存储列表的数据电平变为低电平时,能够检测到待存储数据的存储请求,此时可以根据数据存储列表的第一指针位置确定位于数据存储空间的目标存储单元,并将待存储数据存储至目标存储单元,按照上升沿原理中低电平到高电平的变化瞬间移动位于数据存储列表中的第一指针位置;以及,在数据存储空间中针对所述数据读取列表的数据电平变为低电平时,检测到针对待读取数据的读取请求,此时可以基于所获取的记录数据存储空间的读取信息的数据读取列表中的第二指针位置,确定位于数据存储空间的目标读取单元,并从所确定的目标读取单元读取待读取的数据,按照上升沿原理中低电平到高电平的变化瞬间移动位于数据读取列表中的第二指针位置。通过使用专门的扇区存储数据写入的位置和数据读取的位置,只有当数据存储空间每个存储单元都使用完或者Qin字节或者Qout字节都使用完才需要擦除该扇区的磁盘数据,数据存储量大,且不需要频繁擦除磁盘,进而提高磁盘的使用寿命。
附图说明
图1是相关技术中磁盘数据的存储示意图;
图2是本发明实施例所提供的数据存储方法的步骤流程图;
图3是本发明实施例所提供的数据存储列表、数据读取列表与数据存储空间的对应关系示意图;
图4是本发明实施例所提供的数据读取方法的步骤流程图;
图5是本发明实施例所提供的数据存取方法的步骤流程图;
图6是本发明实施例所提供的数据存取的过程示意图;
图7是本发明实施例所提供的数据存储装置的结构框图。
具体实施方式
为使本发明的上述目的、特征和优点能够更加明显易懂,下面结合附图和具体实施方式对本发明作进一步详细的说明。
在机载设备数据存储的相关技术中,参照图1,示出了相关技术中磁盘数据的存储示意图,数据存储时数据记录信息通常可以包括如下三个信息:数据存储起点位置信息,数据读取的位置信息和数据条数信息,且这三种信息可以一起存储在磁盘的一个区域。当每次生成新数据或者读取数据时,这三个信息至少有2个信息会发生改变,而一旦改变,由于三者存储在一个磁盘空间,需要擦除掉旧数据才能往磁盘写入新信息。
作为一种示例,如图1所示,在对数据进行存储的过程中,数据内容可以记录在Record磁盘区域,且具有用于记录数据存储的数据存储起点位置信息Qin,数据读取的位置信息Qout以及数据条数信息Qcnt,其中,在对磁盘进行数据存储或者从磁盘读取数据时,上述Qin,Qout与Qcnt中的某个字节可能发生改变,在进行存储或者读取时,上述Qin,Qout与Qcnt中的某个字节所发送的改变可以基于高低电平信号实现,只能将“1”(即高电平)变为“0”(即低电平)或者保持“1”不变,若需要将Record磁盘区域所记录的字节由“0”变成“1”,只能通过对磁盘进行擦除实现,即对磁盘区域进行擦除重写的操作。
但是,磁盘的可擦除次数是具有上限的,一旦达到磁盘擦除的上限,该磁盘将无法再被使用。而在汽车领域或者飞行器领域中,这些数据又是经常变化,经常要独写进入磁盘,导致磁盘擦除次数很容易到达上限,一旦到达上限就需要更换磁盘,造成磁盘硬件的消耗。
为了在保证数据独立存储的情况下降低磁盘硬件的消耗,本发明实施例的核心思想之一是采用上升沿的思路和队列存储的方式共同解决飞行数据/行车数据的存储,通过使用专门的扇区存储数据写入的位置和数据读取的位 置,只有当数据存储空间每个存储单元都使用完或者Qin字节或者Qout字节都使用完才需要擦除该扇区的磁盘数据,数据存储量大,且不需要频繁擦除磁盘,进而提高磁盘的使用寿命。
参照图2,示出了本发明实施例所提供的数据存储方法的步骤流程图,应用于机载设备,具体可以包括如下步骤:
步骤201,获取记录数据存储空间的存储信息的数据存储列表中的第一指针位置;
机载设备可以具有用于进行数据存储的数据存储空间,该数据的存储空间可以由磁盘的扇区提供,且在对数据进行存储时,可以具有用于记录数据存储的数据存储起点位置信息,在本发明实施例中,数据存储起点位置信息可以通过数据存储列表实现,即数据存储列表所记录的数据存储位置可以是数据在数据存储空间中的存储起点位置。
在本发明的一种实施例中,检测到对待存储数据的存储请求,该存储请求可以体现为对数据的写入操作。具体的,在数据存储空间中针对数据存储列表的数据电平变为低电平时,可以表示检测到待存储数据的存储请求,那么写入操作可以表现为在数据存储列表中的标识由“1”变为“0”,即检测到低电平信号时,表示具有新的数据需要存储,此时可以获取用于记录数据在数据存储空间中存储位置的数据存储列表。
在实际应用中,若在对磁盘扇区进行擦除之后,数据存储列表的标识都为“1”(即高电平),其中,数据存储列表可以包括多个存储位置,即多个存储位置所具有的标识为“1”,此时数据存储列表中不具有标识“0”(即低电平),那么在最开始数据准备进行存储时,可以对数据存储列表进行初始化操作,即将数据存储列表中最开始用于存储数据的位置的标识由“1”变为“0”,使得数据存储列表可以具有第一上升沿,即数据存储列表可以基于上升沿原理中低电平到高电平的变化瞬间设置第一指针位置(相当于第一上升沿的指针位置)。
其中,上升沿在数字电路中,表示数据电平由低电平(数字“0”)变 为高电平(数字“1”)的那一瞬间(或者时刻),在本发明实施例中,位于数据存储列表中的第一上升沿可以用于表示第一指针位置,第一指针位置可以指向数据在数据存储列表中的存储起始位置,以用于告知当前数据存储的位置。
步骤202,根据数据存储列表的第一指针位置确定位于数据存储空间的目标存储单元;
在本发明的一种实施例中,在检测到对待存储数据的存储请求获取设置有第一指针位置的数据存储列表后,此时可以基于所获取的数据存储列表的第一指针位置确定位于数据存储空间的目标存储单元。
其中,数据存储空间可以包括多个数据单元,每个数据单元可以具有256个字节,而每个数据单元可以具有固定的数据结构,这些数据单元可以用于对数据进行记录,数据单元所记录的数据可以包括在同一时刻所有需要记录的业务数据。
作为一种示例,当采用数据单元对飞行器在飞行过程中的飞行数据进行存储时,一个数据单元可能存储了在某个时刻各种类型的飞行数据,可以包括飞行高度数据、飞行经纬度数据、飞行内部温度、飞行速度以及剩余电量等,而另一数据单元可以存储在另一时刻的各种类型的飞行数据;作为另一种示例,当采用数据单元对汽车在行驶过程中的行车数据进行存储时,一个数据单元可能存储了在某个时刻各种类型的行车数据,例如行驶总里程数据、行驶速度、行驶时间、定位数据以及剩余电量等,而另一数据单元可以存储在另一时刻的各种类型的行车数据。
对于数据单元对同一时刻所有需要记录的业务数据进行记录,在具体实现中,可以基于具有固定的数据结构的数据单元实现,其中,每个数据单元所具有的256个字节可以分别对应存储在同一时刻所需要记录的不同类型的飞行数据/行车数据,例如,第x个字节至第y个字节可以对应存储飞行高度数据,第y个字节至第z个字节可以对应存储飞行经纬度数据,依次类推,对此,本发明实施例不加以限制。
在实际应用中,在确定位于数据存储空间的目标存储单元时,具体可以 基于第一上升沿的第一指针位置进行确定。首先可以确定位于数据存储列表的第一指针位置的位置信息,然后可以根据第一指针位置的位置信息确定在数据存储列表的目标存储位置,数据存储列表可以包括多个存储位置,其可以分别与数据存储空间中的多个数据单元具有对应关系,此时可以从数据存储空间的多个数据单元中确定与目标存储位置具有对应关系的目标存储单元,以向确定的目标存储单元存储待存储数据。
其中,可以预先建立数据存储列表的多个存储位置与数据存储空间所具有的多个数据单元的对应关系。
具体的,参照图3,示出了本发明实施例所提供的数据存储列表、数据读取列表与数据存储空间的对应关系示意图,数据存储列表Qin可以用于表示数据存入的起点位置,业务数据在按照队列的存储方式进入数据存储空间,写入某个地址,则对应的Qin可以相应设置为0,如图3所示,若数据存储空间中具有5个数据单元存储有数据,那么此时Qin在基于初始化的0后,前5个比特位(即总共6位比特位)可以设置为0。
那么,在根据第一指针位置的位置信息确定目标存储单元的过程中,可以基于第一指针位置位于数据存储列表中的位置,确定位于其后面的一个比特位为在检测到当前的数据写入操作(即存储请求)时数据的存入位置,将其由1变为0,此时同样可以基于第一指针位置位于数据存储空间的相应位置,确定当前数据存入的数据存储单元为位于其后面的一个数据单元,即为当前数据的存储地址。
步骤203,向目标存储单元中存储待存储数据,按照上升沿原理移动位于数据存储列表中的第一指针位置。
在本发明的一种实施例中,在基于第一上升沿的第一指针位置确定目标存储单元之后,可以将待存储数据按照队列存储的方式存入数据存储空间,并写入某个存储地址,该存储地址可以为步骤202所确定的目标存储单元,并在对数据进行存储后,可以移动位于数据存储列表中第一上升沿对应的第一指针位置,具体可以表现为按照上升沿原理中低电平到高电平的变化瞬间,移动位于数据存储列表中的第一指针位置,以使得通过移位后的第一指 针位置以及第一指针位置对应的字节记录针对数据存储列表的相关存储信息。
在本发明实施例中,机载设备可以获取记录所述数据存储空间的存储信息的数据存储列表中的第一指针位置,所获取的数据存储列表与位于数据存储列表可以基于上升沿原理中低电平到高电平的变化瞬间设置第一指针位置,在数据存储空间中针对所述数据存储列表的数据电平变为低电平时,能够检测到待存储数据的存储请求,此时可以根据数据存储列表的第一指针位置确定位于数据存储空间的目标存储单元,并将待存储数据存储至目标存储单元,按照上升沿原理中低电平到高电平的变化瞬间移动位于数据存储列表中的第一指针位置。通过使用专门的扇区存储数据写入的位置和数据读取的位置,只有当数据存储空间每个存储单元都使用完或者Qin字节或者Qout字节都使用完才需要擦除该扇区的磁盘数据,数据存储量大,且不需要频繁擦除磁盘,进而提高磁盘的使用寿命。
参照图4,示出了本发明实施例所提供的数据读取方法的步骤流程图,应用于机载设备,具体可以包括如下步骤:
步骤401,获取记录数据存储空间的读取信息的数据读取列表中的第二指针位置;
机载设备可以具有用于进行数据存储的数据存储空间,该数据的存储空间可以由磁盘的扇区提供,且在对数据进行读取时,可以具有用于记录数据读取的位置信息,在本发明实施例中,数据读取的位置信息可以通过数据读取列表实现,即数据读取列表所记录的数据读取位置可以是数据在数据存储空间中的读取位置。
在本发明的一种实施例中,检测到对待读取数据的读取请求,该读取请求可以体现为对数据的读取操作。具体的,在数据存储空间中针对所述数据读取列表的数据电平变为低电平时,可以表示检测到待读取数据的读取请求,那么读取操作可以表现为在数据读取列表中的标识由“1”变为“0”,即检测到低电平信号时,表示具有需要从数据存储空间读取数据,此时可以 获取用于记录数据在数据存储空间中读取位置的数据读取列表。
在实际应用中,若对磁盘扇区进行擦除之后,数据读取列表的标识都为“1”(即高电平),其中,数据读取列表可以包括多个读取位置,即多个读取位置所具有的标识为“1”,此时数据读取列表中不具有标识“0”(即低电平),在对数据存储列表进行初始化操作的同时,同样可以对数据读取列表进行初始化操作,即将数据读取列表中最开始用于读取数据的位置的标识由“1”变为“0”,使得数据读取列表可以具有第二上升沿,第二上升沿可以用于表示第二指针位置,第二指针位置可以指向数据在数据读取列表中的读取位置,以用于告知当前数据的存储位置,即数据读取列表可以基于上升沿原理中低电平到高电平的变化瞬间设置第二指针位置(相当于第二上升沿的指针位置)。
步骤402,根据数据读取列表的第二指针位置确定位于数据存储空间的目标读取单元;
在本发明的一种实施例中,在检测到对待读取数据的读取请求获取设置有第二指针位置的数据读取列表后,此时可以基于所获取的数据读取列表的第二指针位置确定位于数据存储空间的目标读取单元。
在实际应用中,在确定位于数据存储空间的目标读取单元时,具体可以基于第二上升沿的第二指针位置进行确定。具体的,可以确定位于数据读取列表的第二指针位置的位置信息,然后可以根据第二指针位置的位置信息在数据读取列表确定目标读取位置,数据读取列表可以包括多个读取位置,其可以分别与数据存储空间中的多个数据单元具有对应关系,此时可以从多个数据单元中确定与目标读取位置具有对应关系的目标读取单元,以从确定的目标读取单元读取待读取数据。
具体的,如图3所示,数据读取列表Qout可以用于表示数据读取的位置,此时Qout的上升沿可以在图3所示的箭头位置。
那么,在根据第二指针位置的位置信息确定目标读取单元的过程中,可以基于第二指针位置位于数据读取列表中的位置,确定位于其后面的一个比特位为在检测到当前的数据读取操作(即读取请求)时数据的读取位置,将 其由“1”变为“0”,此时同样可以基于第二指针位置位于数据存储空间的相应位置,确定当前从数据存储空间读取数据的数据读取单元为位于其后面的一个数据单元,即为当前数据的读取地址。
步骤403,从目标读取单元中读取待读取数据,按照上升沿原理移动位于数据读取列表中的第二指针位置。
在本发明的一种实施例中,在基于第二上升沿的第二指针位置确定目标存储单元之后,可以按照队列存储的方式从数据存储空间相应的读取地址读取待读取数据,该读取地址可以为步骤402所确定的目标读取单元,并在对数据进行读取后,可以移动位于数据读取列表中第二上升沿对应的第二指针位置,具体可以表现为按照上升沿原理中低电平到高电平的变化瞬间,移动位于数据读取列表中的第二指针位置,以使得通过移位后的第二指针位置以及第二指针位置对应的字节记录针对数据读取列表的相关读取信息。
在本发明实施例中,机载设备可以在数据存储空间中针对所述数据读取列表的数据电平变为低电平时,检测到针对待读取数据的读取请求,此时可以基于所获取的记录数据存储空间的读取信息的数据读取列表中的第二指针位置,确定位于数据存储空间的目标读取单元,并从所确定的目标读取单元读取待读取的数据,按照上升沿原理中低电平到高电平的变化瞬间移动位于数据读取列表中的第二指针位置。通过使用专门的扇区存储数据写入的位置和数据读取的位置,只有当数据存储空间每个存储单元都使用完或者Qin字节或者Qout字节都使用完才需要擦除该扇区的磁盘数据,数据存储量大,且不需要频繁擦除磁盘,进而提高磁盘的使用寿命。
参照图5,示出了本发明实施例所提供的数据存取方法的步骤流程图,应用于机载设备,所述机载设备具有数据存储空间,具体可以包括如下步骤:
步骤501,在存储所生成的数据之后,移动位于数据存储列表中第一上升沿对应的第一指针位置;
在本发明实施例中,在最开始数据准备进行存储时,可以对数据存储列表进行初始化操作,即将数据存储列表中最开始用于存储数据的位置的标识 由“1”变为“0”;在将业务数据按照队列的存储方式进入数据存储空间,写入目标存储单元之后,可以将数据存储列表中目标存储位置的第一标识修改为预设标识,在数据存储列表中相应的目标存储单元对应的存储位置的标识可以修改为预设标识,此预设标识可以为当检测到写入操作时的低电平信号,即可以在数据存储列表中的标识由高电平“1”变为低电平“0”。
在将标识修改为预设标识之后,可以基于目标存储位置的预设标识,按照上升沿原理中低电平到高电平的变化瞬间,将位于数据存储列表中第一上升沿对应的第一指针位置按照预设方向移动预设字节,以使得通过移位后的第一指针位置以及第一指针位置对应的字节记录针对数据存储列表的相关存储信息。
在实际应用中,数据存储列表中所具有的第一上升沿对应的第一指针位置也可以相应按照预设方向移动预设字节,在本发明实施例中,预设方向可以是基于当前存储位置向下一存储位置移动的方向,业务数据按照队列的存储方式进入数据存储空间,那么预设字节可以为1比特,即可以将第一指针位置移动到后一比特位的位置,在第一指针位置在数据存储列表移动的过程中,其在数据存储空间中所指向的数据单元也同样相应移动。
步骤502,在读取所读取的数据之后,移动位于数据读取列表中第二上升沿对应的第二指针位置;
在本发明实施例中,在最开始数据准备进行存储时,可以对数据读取列表进行初始化操作,即将数据存储列表中最开始用于读取数据的位置的标识由“1”变为“0”;在将业务数据按照队列的读取方式进入数据存储空间,从目标读取单元读取数据之后,可以将数据读取列表中目标读取位置的第二标识修改为预设标识,在数据读取列表中相应的目标读取单元对应的读取位置的标识可以由高电平变为低电平,即由1变为0。
在将标识修改为预设标识之后,可以基于目标读取位置的预设标识,按照上升沿原理中低电平到高电平的变化瞬间,将位于数据读取列表中第二上升沿对应的第二指针位置按照预设方向移动预设字节,以使得通过移位后的第二指针位置以及第二指针位置对应的字节记录针对数据读取列表的相关 读取信息。
此时,数据读取列表中所具有的第二上升沿对应的第一指针位置也可以相应按照预设方向移动预设字节,在本发明实施例中,预设方向可以是基于当前读取位置向下一读取位置移动的方向,业务数据按照队列的读取方式从数据存储空间读取数据,那么预设字节可以为1比特,即可以将第二指针位置移动到后一比特位的位置,在第二指针位置在数据读取列表移动的过程中,其在数据存储空间中所指向的数据单元也同样相应移动。
具体的,参照图6,示出了本发明实施例所提供的数据存取的过程示意图,当从数据存储空间读取第一条数据时,可以将Qout第2个比特数据设置为0,此时Qout的第二上升沿的第二指针位置,可以由图3所示的箭头位置移动到如图6所示的箭头位置。
在实际应用中,在每写入一条数据到数据存储空间,可以将Qin对应的位置设置为0,而每从数据存储空间读取一个数据,则Qout的上升沿对应的指针位置就往后一位推进,对应的比特也可以由1变成0,以此类推。
需要说明的是,在对数据进行写入数据存储空间或从数据存储空间读取数据的过程中,采用的是对数据存储空间中队列的顺序存储与顺序读取,序并不存在非顺序读取的现象。
在一种优选的实施例中,采用数据存储空间对数据进行存储时,除了可以具有用于记录数据存储的数据存储起点位置信息与数据读取的位置信息以外,还可以具有数据条数信息Qcnt,Qcnt可以计算数据存储空间存储有多少条数据。
其中,数据条数信息Qcnt可以通过Qcnt=Qin-Qout实现,那么在对数据存储列表Qin和数据读取列表Qout进行初始化操作时,Qcnt=Qin-Qout=0;而在第一条数据被读取时,此时Qcnt=Qin-Qout=4,表示数据存储空间目前存储有4条数据。
在本发明实施例中,在对数据进行存取时,可以在磁盘区域/扇区中按照队列存储和/或队列读取的方式实现,且数据记录信息按照具有标识的数据存储列表Qin和/数据读取列表Qout实现,其中,数据存储列表中包含与磁盘 队列相对应的用于存储数据的存储单元,数据读取列表中包含与磁盘队列相对应的用于读取数据的读取单元,各个存储单元与读取单元是相互独立的,那么记录信息中所包含的数据存储列表Qin、数据读取列表Qout、数据条数信息Qcnt的字节是相互独立的,数据记录信息并不会出现由于Qin、Qout和Qcnt中某个字节发生改变而导致需要擦除磁盘区域中旧数据的现象。
步骤503,当数据存储列表和/或数据读取列表均为预设标识时,对磁盘扇区进行擦除操作。
在本发明的一种实施例中,数据存储空间可以位于磁盘扇区,当数据存储列表和/或数据读取列表均为预设标识,即均为低电平“0”时,可以出现以下三种情况:1)数据存储列表均为预设标识;2)数据读取列表均为预设标识;3)数据存储列表均为预设标识,且数据读取列表均为预设标识。
在出现前述三种情况时,可以对磁盘扇区进行擦除操作,避免由于数据存储起点位置信息,数据的读取的位置信息和数据条数存储中的某个字节发生改变则需要对磁盘数据进行擦除重写,而导致的磁盘擦除次数频繁,缩短磁盘寿命的现象。
在实际应用中,在每写入一条数据到数据存储空间时可以将Qin对应位置的标识设置为“0”,且在每从数据存储空间读取一个数据时对应的比特也可以由“1”变成“0”,而磁盘在进行数据存储时只能将“1”变为“0”或者保持“1”不变,若需要将标识由“0”变成“1”,只能通过对磁盘进行擦除实现,那么在数据存储空间所具有的每个存储单元都被使用或者Qin字节或者Qout字节都被使用的情况下,才需要擦除该扇区的磁盘数据。
需要说明的是,本发明实施例所提出的采用上升沿的思路和队列存储的方式共同解决飞行数据/行车数据的存储的方式,其通过队列存储以及在将数据存储空间所具有的每个存储单元都被使用的情况下再进行的数据擦除,不仅可以满足需要独立写入磁盘的飞行数据/行车数据存储量的需求,还可以通过保证不需要频繁擦除磁盘,即减少磁盘的擦写次数,进而提高磁盘的使用寿命。
那么,本发明实施例所提出的数据存储方式,可以适用于任何将飞行数 据或行车数据进行存储以及上传的场景,基于其能够满足的数据存储量需求以及所能保证的磁盘擦写次数,特别可以应用到无网络或网络质量较差的情况下所进行的数据存储与上传的特殊场景。
在本发明实施例中,通过使用专门的扇区存储数据写入的位置和数据读取的位置,只有当数据存储空间每个存储单元都使用完或者Qin字节或者Qout字节都使用完才需要擦除该扇区的磁盘数据,数据存储量大,且不需要频繁擦除磁盘,进而提高磁盘的使用寿命。
需要说明的是,对于方法实施例,为了简单描述,故将其都表述为一系列的动作组合,但是本领域技术人员应该知悉,本发明实施例并不受所描述的动作顺序的限制,因为依据本发明实施例,某些步骤可以采用其他顺序或者同时进行。其次,本领域技术人员也应该知悉,说明书中所描述的实施例均属于优选实施例,所涉及的动作并不一定是本发明实施例所必须的。
参照图7,示出了本发明所提供的数据存储装置实施例的结构框图,应用于机载设备,所述机载设备具有数据存储空间,具体可以包括如下模块:
数据存储列表获取模块701,用于获取记录所述数据存储空间的存储信息的数据存储列表中的第一指针位置,其中,所述数据存储列表基于上升沿原理中低电平到高电平的变化瞬间设置所述第一指针位置,且在对磁盘扇区进行擦除后所述数据存储列表为具有高电平标识的列表;
存储请求检测模块702,用于在所述数据存储空间中针对所述数据存储列表的数据电平变为低电平时,检测到待存储数据的存储请求;
目标存储单元确定模块703,用于根据所述数据存储列表的第一指针位置确定位于所述数据存储空间的目标存储单元;
数据存储模块704,用于向所述目标存储单元中存储所述待存储数据;
第一位置移动模块705,用于按照上升沿原理中低电平到高电平的变化瞬间移动位于所述数据存储列表中的第一指针位置。
在本发明的一种实施例中,所述数据存储空间包括多个数据单元,目标存储单元确定模块703可以包括如下子模块:
第一位置信息确定子模块,用于确定位于所述数据存储列表中所述第一指针位置的位置信息;
目标存储位置确定子模块,用于根据所述第一指针位置的位置信息确定在所述数据存储列表的目标存储位置;所述数据存储列表的多个存储位置与所述数据存储空间的多个数据单元具有对应关系;
目标存储单元确定子模块,用于从所述数据存储空间的多个数据单元中确定与所述目标存储位置具有对应关系的目标存储单元。
在本发明的一种实施例中,所述目标存储位置具有第一标识,第一位置移动模块705可以包括如下子模块:
第一标识修改子模块,用于在存储所生成的数据之后,将所述数据存储列表中目标存储位置的第一标识修改为预设标识;
第一位置移动子模块,用于基于所述目标存储位置的预设标识,将位于所述数据存储列表中的第一指针位置按照预设方向移动预设字节。
在本发明的一种实施例中,所述装置还可以包括如下模块:
数据读取列表获取模块,用于获取记录所述数据存储空间的读取信息的数据读取列表中的第二指针位置,其中,所述数据读取列表基于上升沿原理中低电平到高电平的变化瞬间设置所述第二指针位置;
读取请求检测模块,用于在所述数据存储空间中针对所述数据存储列表的数据电平变为低电平时,检测到待存储数据的存储请求;
目标读取单元确定模块,用于根据所述数据读取列表的第二指针位置确定位于所述数据存储空间的目标读取单元;
数据读取模块,用于从所述目标读取单元中读取所述待读取数据;第二位置移动模块,用于按照上升沿原理中低电平到高电平的变化瞬间移动位于所述数据读取列表中的第二指针位置。
在本发明的一种实施例中,所述数据存储空间包括多个数据单元,目标读取单元确定模块可以包括如下子模块:
第二位置信息确定子模块,用于确定位于所述数据读取列表中所述第二指针位置的位置信息;
目标读取位置确定子模块,用于根据所述第二指针位置的位置信息确定在所述数据读取列表的目标读取位置;所述数据读取列表的多个读取位置与所述数据存储空间的多个数据单元具有对应关系;
目标读取单元确定子模块,用于从所述数据存储空间的多个数据单元中确定与所述目标读取位置具有对应关系的目标读取单元。
在本发明的一种实施例中,所述目标读取位置具有第二标识,第二位置移动模块可以包括如下子模块:
第二标识修改子模块,用于在读取所读取的数据之后,将所述数据存储列表中目标读取位置的第二标识修改为预设标识;
第二位置移动子模块,用于基于所述目标读取位置的预设标识,将位于所述数据读取列表的第二指针位置按照预设方向移动预设字节。
在本发明的一种实施例中,所述数据存储空间位于磁盘扇区,所述装置还可以包括如下模块:
磁盘扇区擦除模块,用于当所述数据存储列表和/或所述数据读取列表均为预设标识时,对所述磁盘扇区进行擦除操作。
对于装置实施例而言,由于其与方法实施例基本相似,所以描述的比较简单,相关之处参见方法实施例的部分说明即可。
本发明实施例还提供了一种电子设备,包括:
包括上述数据存储装置、处理器、存储器及存储在所述存储器上并能够在所述处理器上运行的计算机程序,该计算机程序被处理器执行时实现上述数据存储方法实施例的各个过程,且能达到相同的技术效果,为避免重复,这里不再赘述。
本发明实施例还公开了一种车辆或者飞行器,包括:上述电子设备。
本发明实施例还提供了一种计算机可读存储介质,计算机可读存储介质上存储计算机程序,计算机程序被处理器执行时实现上述数据存储方法实施例的各个过程,且能达到相同的技术效果,为避免重复,这里不再赘述。
本说明书中的各个实施例均采用递进的方式描述,每个实施例重点说明 的都是与其他实施例的不同之处,各个实施例之间相同相似的部分互相参见即可。
本领域内的技术人员应明白,本发明实施例的实施例可提供为方法、装置、或计算机程序产品。因此,本发明实施例可采用完全硬件实施例、完全软件实施例、或结合软件和硬件方面的实施例的形式。而且,本发明实施例可采用在一个或多个其中包含有计算机可用程序代码的计算机可用存储介质(包括但不限于磁盘存储器、CD-ROM、光学存储器等)上实施的计算机程序产品的形式。
本发明实施例是参照根据本发明实施例的方法、终端设备(系统)、和计算机程序产品的流程图和/或方框图来描述的。应理解可由计算机程序指令实现流程图和/或方框图中的每一流程和/或方框、以及流程图和/或方框图中的流程和/或方框的结合。可提供这些计算机程序指令到通用计算机、专用计算机、嵌入式处理机或其他可编程数据处理终端设备的处理器以产生一个机器,使得通过计算机或其他可编程数据处理终端设备的处理器执行的指令产生用于实现在流程图一个流程或多个流程和/或方框图一个方框或多个方框中指定的功能的装置。
这些计算机程序指令也可存储在能引导计算机或其他可编程数据处理终端设备以特定方式工作的计算机可读存储器中,使得存储在该计算机可读存储器中的指令产生包括指令装置的制造品,该指令装置实现在流程图一个流程或多个流程和/或方框图一个方框或多个方框中指定的功能。
这些计算机程序指令也可装载到计算机或其他可编程数据处理终端设备上,使得在计算机或其他可编程终端设备上执行一系列操作步骤以产生计算机实现的处理,从而在计算机或其他可编程终端设备上执行的指令提供用于实现在流程图一个流程或多个流程和/或方框图一个方框或多个方框中指定的功能的步骤。
尽管已描述了本发明实施例的优选实施例,但本领域内的技术人员一旦得知了基本创造性概念,则可对这些实施例做出另外的变更和修改。所以,所附权利要求意欲解释为包括优选实施例以及落入本发明实施例范围的所 有变更和修改。
最后,还需要说明的是,在本文中,诸如第一和第二等之类的关系术语仅仅用来将一个实体或者操作与另一个实体或操作区分开来,而不一定要求或者暗示这些实体或操作之间存在任何这种实际的关系或者顺序。而且,术语“包括”、“包含”或者其任何其他变体意在涵盖非排他性的包含,从而使得包括一系列要素的过程、方法、物品或者终端设备不仅包括那些要素,而且还包括没有明确列出的其他要素,或者是还包括为这种过程、方法、物品或者终端设备所固有的要素。在没有更多限制的情况下,由语句“包括一个……”限定的要素,并不排除在包括所述要素的过程、方法、物品或者终端设备中还存在另外的相同要素。
以上对本发明所提供的一种数据存储方法和一种数据存储装置,进行了详细介绍,本文中应用了具体个例对本发明的原理及实施方式进行了阐述,以上实施例的说明只是用于帮助理解本发明的方法及其核心思想;同时,对于本领域的一般技术人员,依据本发明的思想,在具体实施方式及应用范围上均会有改变之处,综上所述,本说明书内容不应理解为对本发明的限制。

Claims (10)

  1. 一种数据存储方法,其特征在于,应用于机载设备,所述机载设备具有数据存储空间,所述方法包括:
    获取记录所述数据存储空间的存储信息的数据存储列表中的第一指针位置,其中,所述数据存储列表基于上升沿原理中低电平到高电平的变化瞬间设置所述第一指针位置,且在对磁盘扇区进行擦除后所述数据存储列表为具有高电平标识的列表;
    在所述数据存储空间中针对所述数据存储列表的数据电平变为低电平时,检测到待存储数据的存储请求;
    根据所述数据存储列表的第一指针位置确定位于所述数据存储空间的目标存储单元,并向所述目标存储单元中存储所述待存储数据;
    按照上升沿原理中低电平到高电平的变化瞬间移动位于所述数据存储列表中的第一指针位置。
  2. 根据权利要求1所述的方法,其特征在于,所述数据存储空间包括多个数据单元,所述根据所述数据存储列表的第一指针位置确定位于所述数据存储空间的目标存储单元,包括:
    确定位于所述数据存储列表中所述第一指针位置的位置信息;
    根据所述第一指针位置的位置信息确定在所述数据存储列表中的目标存储位置;所述数据存储列表的多个存储位置与所述数据存储空间的多个数据单元具有对应关系;
    从所述数据存储空间的多个数据单元中确定与所述目标存储位置具有对应关系的目标存储单元。
  3. 根据权利要求2所述的方法,其特征在于,所述目标存储位置具有第一标识,所述按照上升沿原理中低电平到高电平的变化瞬间移动位于所述数据存储列表中的第一指针位置,包括:
    在存储所生成的数据之后,将所述数据存储列表中目标存储位置的第一标识修改为预设标识;
    基于所述目标存储位置的预设标识,将位于所述数据存储列表中的第一指针位置按照预设方向移动预设字节。
  4. 根据权利要求1所述的方法,其特征在于,所述方法还包括:
    获取记录所述数据存储空间的读取信息的数据读取列表中的第二指针位置,其中,所述数据读取列表基于上升沿原理中低电平到高电平的变化瞬间设置所述第二指针位置;
    在所述数据存储空间中针对所述数据读取列表的数据电平变为低电平时,检测到待读取数据的读取请求;
    根据所述数据读取列表的第二指针位置确定位于所述数据存储空间的目标读取单元,并从所述目标读取单元中读取所述待读取数据;
    按照上升沿原理中低电平到高电平的变化瞬间移动位于所述数据读取列表中的第二指针位置。
  5. 根据权利要求4所述的方法,其特征在于,所述数据存储空间包括多个数据单元,所述根据所述数据读取列表的第二指针位置确定位于所述数据存储空间的目标读取单元,包括:
    确定位于所述数据读取列表中所述第二指针位置的位置信息;
    根据所述第二指针位置的位置信息确定在所述数据读取列表中的目标读取位置;所述数据读取列表的多个读取位置与所述数据存储空间的多个数据单元具有对应关系;
    从所述数据存储空间的多个数据单元中确定与所述目标读取位置具有对应关系的目标读取单元。
  6. 根据权利要求5所述的方法,其特征在于,所述目标读取位置具有第二标识,所述按照上升沿原理中低电平到高电平的变化瞬间移动位于所述数据读取列表中的第二指针位置,包括:
    在读取所读取的数据之后,将所述数据存储列表中目标读取位置的第二标识修改为预设标识;
    基于所述目标读取位置的预设标识,将位于所述数据读取列表中的第二指针位置按照预设方向移动预设字节。
  7. 根据权利要求4所述的方法,其特征在于,所述数据存储空间位于磁盘扇区,所述方法还包括:
    当所述数据存储列表和/或所述数据读取列表均为预设标识时,对所述磁盘扇区进行擦除操作。
  8. 一种数据存储装置,其特征在于,应用于机载设备,所述机载设备具有数据存储空间,所述装置包括:
    数据存储列表获取模块,用于获取记录所述数据存储空间的存储信息的数据存储列表中的第一指针位置,其中,所述数据存储列表基于上升沿原理中低电平到高电平的变化瞬间设置所述第一指针位置,且在对磁盘扇区进行擦除后所述数据存储列表为具有高电平标识的列表;
    存储请求检测模块,用于在所述数据存储空间中针对所述数据存储列表的数据电平变为低电平时,检测到待存储数据的存储请求;
    目标存储单元确定模块,用于根据所述数据存储列表的第一指针位置确定位于所述数据存储空间的目标存储单元;
    数据存储模块,用于向所述目标存储单元中存储所述待存储数据;
    第一位置移动模块,用于按照上升沿原理中低电平到高电平的变化瞬间移动位于所述数据存储列表中的第一指针位置。
  9. 一种电子设备,其特征在于,包括:如权利要求8所述数据存储装置、处理器、存储器及存储在所述存储器上并能够在所述处理器上运行的计算机程序,所述计算机程序被所述处理器执行时实现如权利要求1-7中任一项所述数据存储方法的步骤。
  10. 一种车辆或者飞行器,其特征在于,包括:如权利要求9所述的电子设备。
PCT/CN2021/116058 2021-06-04 2021-09-01 一种数据存储方法和装置 WO2022252419A1 (zh)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN202110621657.X 2021-06-04
CN202110621657.XA CN113064558B (zh) 2021-06-04 2021-06-04 一种数据存储方法和装置

Publications (1)

Publication Number Publication Date
WO2022252419A1 true WO2022252419A1 (zh) 2022-12-08

Family

ID=76568675

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2021/116058 WO2022252419A1 (zh) 2021-06-04 2021-09-01 一种数据存储方法和装置

Country Status (2)

Country Link
CN (1) CN113064558B (zh)
WO (1) WO2022252419A1 (zh)

Families Citing this family (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113064558B (zh) * 2021-06-04 2021-09-17 广东汇天航空航天科技有限公司 一种数据存储方法和装置
CN115407942B (zh) * 2022-08-29 2023-07-14 深圳市锦锐科技股份有限公司 一种适用于单片机芯片的数据处理方法
CN115622954B (zh) * 2022-09-29 2024-03-01 中科驭数(北京)科技有限公司 数据传输方法、装置、电子设备及存储介质

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103294615A (zh) * 2012-02-24 2013-09-11 北京四达时代软件技术股份有限公司 一种存储机顶盒用户信息的方法
US20140108711A1 (en) * 2011-04-18 2014-04-17 Gemalto Sa Portable secure device providing storage service
CN106371763A (zh) * 2016-08-23 2017-02-01 浪潮(北京)电子信息产业有限公司 一种存储快照的方法、装置、磁盘及计算机
CN111666330A (zh) * 2019-03-06 2020-09-15 阿里巴巴集团控股有限公司 数据的读写方法和装置
CN113064558A (zh) * 2021-06-04 2021-07-02 广东汇天航空航天科技有限公司 一种数据存储方法和装置

Family Cites Families (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US7653778B2 (en) * 2006-05-08 2010-01-26 Siliconsystems, Inc. Systems and methods for measuring the useful life of solid-state storage devices
US9165005B2 (en) * 2012-02-24 2015-10-20 Simplivity Corporation Method and apparatus utilizing non-uniform hash functions for placing records in non-uniform access memory
CN104035884B (zh) * 2014-06-30 2017-04-05 河南百旺金赋电脑有限公司 一种双环形队列数据存储方法和智能网关
US20160162186A1 (en) * 2014-12-09 2016-06-09 San Disk Technologies Inc. Re-Ordering NAND Flash Commands for Optimal Throughput and Providing a Specified Quality-of-Service
CN110618950B (zh) * 2018-06-19 2023-02-17 中国科学院上海高等研究院 一种异步fifo读写控制电路及方法、可读存储介质及终端
CN109992530A (zh) * 2019-03-01 2019-07-09 晶天电子(深圳)有限公司 一种固态驱动器设备及基于该固态驱动器的数据读写方法
US11183250B2 (en) * 2019-04-16 2021-11-23 Samsung Electronics Co., Ltd. Memory controller, memory device and memory system having improved threshold voltage distribution characteristics and related operating methods
CN111443873A (zh) * 2020-03-27 2020-07-24 深圳天岳创新科技有限公司 一种Nand Flash存储器的管理方法和装置

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20140108711A1 (en) * 2011-04-18 2014-04-17 Gemalto Sa Portable secure device providing storage service
CN103294615A (zh) * 2012-02-24 2013-09-11 北京四达时代软件技术股份有限公司 一种存储机顶盒用户信息的方法
CN106371763A (zh) * 2016-08-23 2017-02-01 浪潮(北京)电子信息产业有限公司 一种存储快照的方法、装置、磁盘及计算机
CN111666330A (zh) * 2019-03-06 2020-09-15 阿里巴巴集团控股有限公司 数据的读写方法和装置
CN113064558A (zh) * 2021-06-04 2021-07-02 广东汇天航空航天科技有限公司 一种数据存储方法和装置

Also Published As

Publication number Publication date
CN113064558A (zh) 2021-07-02
CN113064558B (zh) 2021-09-17

Similar Documents

Publication Publication Date Title
WO2022252419A1 (zh) 一种数据存储方法和装置
EP2746927B1 (en) Data-tiered storage processing method and device and storage device
US8190811B2 (en) Defragmentation of solid state memory
US10037778B1 (en) Indexing zones for storage devices
CN104091617A (zh) 一种闪存存储设备检测的方法及装置
US9852756B2 (en) Method of managing, writing, and reading file on tape
CN107608625B (zh) 一种提升固存储设备读性能的方法
KR20120121735A (ko) 리드 또는 라이트 동작 제어 방법, 그 방법을 이용하는 저장 장치 및 컴퓨터 시스템
US8902534B2 (en) Implementing track following using data characteristics for positional information
CN103745007A (zh) 一种文件管理方法及装置
US9684664B2 (en) Elimination of fragmentation of files in storage medium by utilizing head movement time
CN106126421A (zh) 一种自动测试并对比pcie‑ssd性能的方法
RU2006137288A (ru) Носитель записи типа с однократной записью, устройство записи и его способ, устройство воиспроизведения и его способ и компьютерная программа
GB2503314A (en) Implementing remapping command with indirection update for indirected storage
KR20060037332A (ko) 디지털 정보신호를 기록하는 장치 및 방법
US20150324128A1 (en) Efficient use of metadata accompanying file writing to media
CN1989566A (zh) 将信息记录在记录载体上的设备和方法
US20120162809A1 (en) Magnetic disk drive and method of accessing a disk in the drive
CN104133640B (zh) 从休眠快速恢复
US8688938B2 (en) Data copying
US9535796B2 (en) Method, apparatus and computer for data operation
CN109697767B (zh) 数据处理方法、相关设备及计算机存储介质
KR20090011247A (ko) 디스크 디펙트 목록 생성 방법, 디스크 디펙트 목록 저장매체, 및 하드디스크 드라이브 제어 방법
US20120079166A1 (en) Electronic device and method for initializing data storage
JP2016009510A (ja) リードヘッドとライトヘッドとを活用して記録データの削除所要時間を削減する手法

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 21943773

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE