CN108255433A - The file management method and device of flash storage, flash storage - Google Patents

The file management method and device of flash storage, flash storage Download PDF

Info

Publication number
CN108255433A
CN108255433A CN201810031114.0A CN201810031114A CN108255433A CN 108255433 A CN108255433 A CN 108255433A CN 201810031114 A CN201810031114 A CN 201810031114A CN 108255433 A CN108255433 A CN 108255433A
Authority
CN
China
Prior art keywords
page
file
data
stored
information
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
CN201810031114.0A
Other languages
Chinese (zh)
Other versions
CN108255433B (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.)
Zhuhai Geehy Semiconductor Co Ltd
Original Assignee
Nasida Ltd By Share 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 Nasida Ltd By Share Ltd filed Critical Nasida Ltd By Share Ltd
Priority to CN202111355122.9A priority Critical patent/CN114089916B/en
Priority to CN201810031114.0A priority patent/CN108255433B/en
Priority to CN202111353834.7A priority patent/CN114035749B/en
Publication of CN108255433A publication Critical patent/CN108255433A/en
Application granted granted Critical
Publication of CN108255433B publication Critical patent/CN108255433B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

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/061Improving I/O performance
    • 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/0673Single storage device
    • G06F3/0679Non-volatile semiconductor memory device, e.g. flash memory, one time programmable memory [OTP]

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)
  • Read Only Memory (AREA)

Abstract

The embodiment of the present application provides the file management method and device of a kind of flash storage, flash storage, this method is included when file to be stored is at least one, for each file to be stored, determine the target setting page of file to be stored, it will be in target setting information relevant with the data of file to be stored write-in target setting page;Wherein, target setting information includes the First page information of the target data page of corresponding file to be stored;For each file to be stored, according to corresponding First page information, determine the homepage of corresponding target data page, and since the homepage, the target data of acquisition is continuously written into flash storage.The data page and setting page of the embodiment of the present application file are provided separately, the fast and easy of data writing process, and can be ensured when needing to obtain multiple files to be stored, the fast and easy of data writing process.

Description

The file management method and device of flash storage, flash storage
Technical field
The invention relates to memory technology more particularly to a kind of flash storage, the files of flash storage Management method and device.
Background technology
Flash storage is a kind of nonvolatile memory based on semiconductor technology, have it is low in energy consumption, capacity is big, body The advantages that product is small, light-weight, and access speed is high, has gradually replaced other semiconductor storage units and has been widely used in mobile electron In product.
Any flash storage all has fixed storage capacity, and write operation can only be in list that is empty or having wiped It is carried out in first, so in most cases, erasing must be first carried out before write operation is carried out, but the longevity of Flash chip Life is limited, more than maximum erasing times, is easily damaged Flash chip.In order to which solve must before write operation is carried out The problem of erasing must be first carried out, existing Flash file memory management method, such as application No. is 01142240, it is entitled 《FLASH storage file management methods》Patent application, by Flash memory partitionings be file index area and file data storage region Two regions, file index area are used to record the distribution information of file directory and basic allocation unit " block ", file data storage Area is used for the particular content of storage file, and suitable for being read and write at random to file and erasing operation, operation is flexible.
But the above method for storage file include setting information and continuous data it is two-part in the case of, it may appear that It is complicated for operation, it is not easy to realize, the problems such as operation delay is long.
Invention content
The embodiment of the present application provides the file management method and device of a kind of flash storage, flash storage, with reality Now to the fast operating comprising setting information and the two-part file of continuous data.
In a first aspect, the embodiment of the present application provides a kind of flash storage, including:Storage region;
The storage region is divided into multiple pages, and the storage region includes content regions, and the content regions are used to store At least one file, each file include setting page and data page, and for storing data, the setting page is used for the data page Storage is with acquiring the relevant setting information of data.
In a kind of possible design, the storage region further includes distribution area, and the distribution area includes multiple items, when interior When appearance area is stored with N number of file, then page number of the respective content of N number of item for the setting page of corresponding document in area is distributed, it is described The page number of setting page is used to indicate the storage location of setting page.
In a kind of possible design, the storage region further includes boot section and default configuration area;
The boot section is used to store the attribute information of corresponding data acquisition device and the division letter of the storage region Breath;
The default configuration area is for storage and the relevant default information of gathered data.
Second aspect, the embodiment of the present application provide a kind of file management method of flash storage, the method be based on The method of flash storage described in any possible design of first aspect;The method includes:
When file to be stored is at least one, for each file to be stored, the target setting of file to be stored is determined Page, and will be written in the target setting page with the relevant target setting information of data for acquiring file to be stored;Wherein, it is described Target setting information includes the First page information of the target data page of file to be stored;
For each file to be stored, the First page information in target setting information determines the target of file to be stored The homepage of data page, and since the homepage, the target data of acquisition is continuously written into the flash storage;Wherein, The target data is that data acquisition device is acquired according to corresponding target setting information.
In a kind of possible design, distribution area is further included, and the distribution area includes multiple items in the storage region, When content regions are stored with N number of file, then page number of the respective content of N number of item for the setting page of corresponding document in area is distributed When, the target setting page of the determining file to be stored, including:
The information that page where reading the distribution area includes obtains the content of all that the distribution area includes;
If content regions are stored at least one file, obtain in the content of item that all items include page number most Big page number;
According to the maximum page number, the page number of the target setting page is obtained, the page number of the target setting page is described The sum of maximum page number and preset value;
The page number of page according to the target is set, determines the target setting page.
In a kind of possible design, in the information that the page where the reading distribution area includes, at least one item is obtained Content after, the method further includes:
The quantity of page number that the content of described all includes is obtained, the quantity is used to indicate the text of content regions storage The quantity of part;
According to the byte number that the offset address of first item and each item occupy in the quantity, distribution area, described in acquisition The page number of target configuration page is in the target storage position in the distribution area;
According to the maximum page number, after obtaining the page number of the target setting page, the method further includes:
The page number of the write-in target setting page at the target storage position in the distribution area.
In a kind of possible design, after the maximum page number in the content for obtaining described at least one, packet It includes:
The content of the first setting page of maximum page number instruction is read, obtains the first setting information in the first setting page, institute State the endpage information that the first setting information includes the data page of file;
According to the endpage information, the First page information of the target data page of the file to be stored is determined.
In a kind of possible design, distribution area is further included, and the distribution area includes multiple items in the storage region, When content regions are stored with N number of file, then page number of the respective content of N number of item for the setting page of corresponding document in area is distributed When, the method further includes:
After the process of gathered data, for each file to be stored, the endpage information of file to be stored is written In the target configuration page of file to be stored;Wherein, the endpage information is including storing the data of last acquisition physically Location.
In a kind of possible design, distribution area is further included, and the distribution area includes multiple items in the storage region, When content regions are stored with N number of file, then page number of the respective content of N number of item for the setting page of corresponding document in area is distributed When;The method further includes:
The information that page where reading the distribution area includes obtains the page number of at least one setting page;
According to the page number of at least one setting page, the setting information of the setting page of each page number instruction is read, is obtained The setting information of each file stored in the flash storage;
According to the mark of the file input by user that continues, continue the data that the data page of file includes described in reading;Its In, the mark of the file that continues is that user gets according to the setting information of each file stored in flash storage.
The third aspect, a kind of document management apparatus of flash storage of the embodiment of the present application, described device is is based on The device of flash storage described in any possible design of first aspect, described device include:
Information setup module, for when file to be stored is at least one, for each file to be stored, determining to wait to deposit The target setting page of file is stored up, and is set the target is written with the relevant target setting information of data for acquiring file to be stored It puts in page;Wherein, the target setting information includes the First page information of the target data page of file to be stored;
Data write. module, for for each file to be stored, the First page information in target setting information to determine The homepage of the target data page of file to be stored, and since the homepage, the target data of acquisition is continuously written into described In flash storage;Wherein, the target data is that data acquisition device is acquired according to corresponding target setting information.
In a kind of possible design, described device further includes:Data read module;
The data read module is used for, and distribution area is further included, and the distribution area is including multiple in the storage region , when content regions are stored with N number of file, then distribute page of the respective content of N number of item for the setting page of corresponding document in area Number when;The information that page where reading the distribution area includes obtains the page number of at least one setting page;
According to the page number of at least one setting page, the setting information of the setting page of each page number instruction is read, is obtained The setting information of each file stored in the flash storage;
According to the mark of the file input by user that continues, continue the data that the data page of file includes described in reading;Its In, the mark of the file that continues is that user gets according to the setting information of each file stored in flash storage.
Fourth aspect, the embodiment of the present application provide a kind of file management system of flash storage, including:First aspect Flash storage, data acquisition device, the control device of the data acquisition device and end described in any possible design End equipment;
The flash storage, the data acquisition device and the terminal device with the data acquisition device Control device connects;
Wherein, the control device of the data acquisition device is included described in any possible design of the third aspect The document management apparatus of flash storage.
5th aspect, the embodiment of the present application provide a kind of computer readable storage medium, including instruction, when it is in computer During upper operation so that computer performs the method described in any possible design of second aspect.
6th aspect, the embodiment of the present application provide a kind of electronic equipment, including:Processor, memory and communication bus, institute The connection that communication bus is used to implement between each component is stated, the memory for storing program instruction, use by the processor Program instruction in the reading memory, and the program instruction in the memory performs any possibility of second aspect Method described in design.
Setting page and data page in the application due to file are provided separately, and set and corresponding data page is included in page First page information, therefore, can easily and fast by setting information be written setting page, write data into data page.Meanwhile may be used also With first by the setting information of multiple files to be stored write-in it is respective setting page in, then respectively according in respective setting information with adopting Collect the acquisition that the related setting information of data carries out data, be written in respective data page, ensure that is needing to obtain multiple treat During storage file, the fast and easy of data writing process.
Description of the drawings
In order to illustrate the technical solutions in the embodiments of the present application or in the prior art more clearly, to embodiment or it will show below There is attached drawing needed in technology description to be briefly described, it should be apparent that, the accompanying drawings in the following description is this Shen Some embodiments please, for those of ordinary skill in the art, without having to pay creative labor, can be with Other attached drawings are obtained according to these attached drawings.
Fig. 1 is a kind of possible system architecture diagram provided by the embodiments of the present application;
Fig. 2 is that the storage region of flash storage provided by the embodiments of the present application divides schematic diagram;
Fig. 3 is file attribute provided by the embodiments of the present application definition figure;
Fig. 4 is Starting mode provided by the embodiments of the present application definition figure;
Fig. 5 defines figure for stopping mode provided by the embodiments of the present application;
Fig. 6 is the file management method flow chart one of flash storage that the application provides;
Fig. 7 is the storage region distribution schematic diagram of flash storage provided by the embodiments of the present application;
Fig. 8 is the file management method flowchart 2 of flash storage that the application provides;
Fig. 9 is that the document management apparatus of flash storage provided by the embodiments of the present application implements one structure diagram
Figure 10 is that the document management apparatus of flash storage provided by the embodiments of the present application implements two structure diagram;
Figure 11 is the structure diagram of electronic equipment provided by the embodiments of the present application.
Specific embodiment
Purpose, technical scheme and advantage to make the embodiment of the present application are clearer, below in conjunction with the embodiment of the present application In attached drawing, the technical solution in the embodiment of the present application is clearly and completely described, it is clear that described embodiment is Some embodiments of the present application, instead of all the embodiments.Based on the embodiment in the application, those of ordinary skill in the art All other embodiments obtained without creative efforts shall fall in the protection scope of this application.
Fig. 1 is a kind of possible system architecture diagram provided by the embodiments of the present application, and referring to Fig. 1, which may include Flash storage 11, data acquisition device 12, the control device 13 of data acquisition device and terminal 14.Wherein, Flash is stored The storage region of device 11 is divided into multiple pages, and storage region includes content regions, and content regions are for storing at least one file, often A file includes setting page and data page, and data page is used to store the data of data acquisition device acquisition, sets page for storing With the relevant setting information of gathered data, setting information includes the First page information of data page corresponding with the setting page, Mei Gewen The data page of part is at least one page.
Specifically, after flash storage 11 establishes connection with control device 13, control device 13 can be to flash storage It carries out write operation and reads the operation of the information of flash storage memory storage.Control device 13 can receive terminal 14 and send With the relevant setting information of gathered data, and will setting information relevant with gathered data be written flash storage 11 in Set page in, control device 13 according in flash storage 11 set page in setting information control data acquisition device 12 into Row data acquire, and 12 collected data of data acquisition device are written in data page;Wherein, page and data page group are set Into the content of a file.
Since each file stored in flash storage includes setting page and data page, in the corresponding text of write-in During part, setting page is first determined, and Part setting information is written in page is set, so that control device can control data acquisition device According to setting information gathered data, setting information ablation process is quick and convenient, and due to including corresponding document in setting information Data page First page information, the region that the data of acquisition are continuously written into also is determined, and therefore, continuous data ablation process is also fast Speed is convenient.
The flash storage of the application is described in detail using specific embodiment below.
Fig. 2 is that the storage region of flash storage provided by the embodiments of the present application divides schematic diagram, referring to Fig. 2, Flash The storage region of memory is divided into multiple pages, and storage region includes content regions 21, distribution area 22, boot section 23 and acquiescence and matches Put area 24.
Content regions 21 are for storing at least one file, and each file includes setting page and data page, and data page is used to deposit Data are stored up, setting page is used to storing and obtaining the relevant setting information of data.
It distributes area 22 and includes multiple items, when content regions are stored with N number of file, then distribute N number of item in area respectively content The page number of setting page including corresponding document.
Boot section 23 is used to store the attribute information of corresponding data acquisition device and the division information of storage region.
Default configuration area 24 is for storage and the relevant default information of gathered data.
Specifically, the least unit that the storage region of the flash storage in the present embodiment is wiped according to Flash divides For multiple pages of No. 0 starting, if the memory capacity of flash storage is 2M, the least unit of Flash erasings is 1KB, then stores Region is divided into page 2048, wherein, it is smaller than being equal to page 2048 for the number of pages of storage.
First, first boot section 23 is illustrated.
Boot section 23 is used to store the attribute information of corresponding data acquisition device and the division information of storage region, such as Each area of the storage version of data acquisition device, title, creation time, type, storage region is respective to be started page number at and shared page Number etc., may also include:The data acquisition device time of making the product and calibration data etc..It can be using page 0 of storage region as boot section.
If data acquisition device be Temperature Humidity Sensor, flash storage boot section storage specific data and Attribute can be found in table 1.
Table 1, the specific data and attribute of boot section storage
Referring to table 1 it is found that boot section includes:The store name of Temperature Humidity Sensor, temperature resolution, 0 reality represented Minimum temperature, maximum temperature, humidity resolution ratio, the 0 practical minimum humidity represented, highest humidity etc.;It further includes:Boot section originates Page number, boot section number of pages, default configuration area start page number at, default configuration area number of pages, distribution area start page number at, distribute area's number of pages, Content regions start page number at, content regions number of pages.
Therefore, by reading the content of boot section, it can know the position of distribution area, default configuration area, content regions.
Wherein, for temperature resolution;Use two byte representations:[ByteHigh,ByteLow], ByteHighRepresent decimal Digit after point, ByteLowRepresent number, therefore temperature resolution T1Reduction formula be:I.e. If the temperature resolution that boot section stores is 0x201, then practical temperature resolution isWherein, The corresponding low byte Byte of 0x201LowIt is 0X01, the corresponding upper byte Byte of 0x201HighIt is 0X02, [0X02,0X01]= 0X201。
In the actual use process, the control device of Temperature Humidity Sensor reads the temperature stored in boot section and differentiates Rate, according to the method described above, you can practical temperature resolution is obtained, for controlling measurement of the Temperature Humidity Sensor to temperature.
For the practical minimum temperature T that can be detected in Temperature Humidity Sensor detection rangeMin is real:If flash storage The temperature value T of middle storageFlash1- 46.85 DEG C are represented when being 0, is expressed as TMin=-46.85 DEG C, then TMin is real=TFlash1*T1+TMin =0*0.01-46.85=-46.85.
For humidity resolution ratio:With two byte representations:[ByteHigh,ByteLow], ByteHighRepresent the position after decimal point Number, ByteLowTable number, therefore humidity resolution ratio H1Reduction formula be:I.e. as boot section is deposited The humidity resolution ratio of storage is 0x201, then practical temperature resolution isWherein, 0x201 is corresponding Low byte ByteLowIt is 0X01, the corresponding upper byte Byte of 0x201HighIt is 0X02, [0X02,0X01]=0X201.
In the actual use process, the control device of Temperature Humidity Sensor reads the humidity stored in boot section and differentiates Rate, according to the method described above, you can practical humidity resolution ratio is obtained, for controlling measurement of the Temperature Humidity Sensor to humidity.
For the conversion between the temperature value that is stored in actual temperature and flash storage:If in known flash storage The temperature value of storage is TFlash2, then actual temperature TIt is real=TFlash2×T1+TMin is realIf known real temperature TIt is real, then
In the actual use process, if the control device of Temperature Humidity Sensor reads the temperature stored in flash storage Angle value can then pass through formula:TIt is real=TFlash2×T1+TMin is real, obtain practical temperature;If the control device of Temperature Humidity Sensor By in the collected temperature value write-in flash storage of Temperature Humidity Sensor, then pass through formulaIt obtains Store the value into flash storage.
For the conversion between the humidity value that is stored in actual humidity and flash storage:If in known flash storage The humidity value of storage is HFlash, then actual humidity HIt is real=HFlash×H1+HMinIf known actual humidity HIt is real, thenAs shown in Table 1, HMinEqual to 0.
In the actual use process, if being stored in the control device reading flash storage of Temperature Humidity Sensor wet Angle value can then pass through formula:HIt is real=HFlash×H1+HMin, obtain practical humidity;If the control device of Temperature Humidity Sensor will In the collected humidity value write-in flash storage of Temperature Humidity Sensor, then pass through formulaIt is stored Value into flash storage.
Secondly, default configuration area 24 is illustrated.
Default setting area 24, for storage and the relevant default information of gathered data, for example, adopting in setting information Sample interval.
Then, distribution area 22 is illustrated.
It distributes area 22 and includes multiple items, each single item occupies 2 bytes, and each byte is 8, i.e. 16bytes, each item Content sets the page number of page for respective file;If content regions 21 are stored with N number of file, distributing in area has N number of item, respective Page number of the content for the setting page of corresponding document;In addition to N number of item, the content of remaining can be ffffH.
In this way, the physical address of the first item in distribution area is the initial address of page where distributing area, it may thus be appreciated that point Offset address with the first item in area, quantity and each byte number occupied further according to content area file, it is possible to To the corresponding offset address of storage location of the target setting page of current file to be stored, the storage location of page is set according to target Corresponding offset address, so that it may obtain the physical address of storage target setting page.
Then, content regions 21 are illustrated.
For storing at least one file, each file includes setting page and data page for content regions 21.
Data page is used for the data of Coutinuous store data acquisition device acquisition, and the data page of each file includes at least one Page, and the number of pages that the data page for not limiting each file includes are related to the data for specifically needing to store.
Page is set and includes number corresponding with the setting page with the relevant setting information of gathered data, setting information for storing According to the First page information of page.
If data acquisition device is Temperature Humidity Sensor, the specific data of the setting page storage of flash storage can join It is shown in Table 2.
The specific data that table 2, setting page store
As shown in Table 2, the setting option of page is set to include:File attribute, the Starting mode of Temperature Humidity Sensor, humiture pass The stopping mode of sensor, the sampling interval of Temperature Humidity Sensor, the initial time of sampling, the dwell time of sampling, storage sampling Address, valid data termination address at 0 location of homepage of data etc..
After being configured to above-mentioned each setting option, it can obtain and the relevant setting information of gathered data.
Fig. 3 is file attribute provided by the embodiments of the present application definition figure, and Fig. 4 is Starting mode provided by the embodiments of the present application Definition figure, Fig. 5 define figure for stopping mode provided by the embodiments of the present application.
For file attribute, referring to Fig. 3, two bytes are occupied, 16, the position do not used is defaulted as " 1 ";For 0: If 0 represents to carry out temperature sampling for 0, represented for 1 without temperature sampling;For 1:It represents to carry out humidity sampling for 0, is 1 represents to sample without humidity.
When user demand is detection temperature, user is referred to temperature acquisition by terminal input temp acquisition instructions, terminal The control device for being sent to Temperature Humidity Sensor is enabled, the control device of Temperature Humidity Sensor is incited somebody to action according to temperature acquisition instruction is received File attribute is set as collecting temperature, i.e., is substituted for " 0 " by " 1 " in the value of 0 of the corresponding byte of file attribute.When user needs When asking as detection temperature and humidity, user inputs humiture collection by terminal and instructs, and humiture collection is instructed and sent by terminal To the control device of Temperature Humidity Sensor, the control device of Temperature Humidity Sensor is instructed according to humiture collection is received by file Attribute is set as acquisition humiture, i.e., is substituted for " 0 " by " 1 " in the value of 0 of the corresponding byte of file attribute, the value of 1 by " 1 " is substituted for " 0 ".
By the above process, that is, the setting to file attribute is completed, obtained the corresponding setting information of file attribute.
For the Starting mode of Temperature Humidity Sensor, referring to Fig. 4, occupy two bytes, 16, the position acquiescence do not used For " 1 ";For 0:If 0 represents that button starts Temperature Humidity Sensor for 1, otherwise button does not influence opening for Temperature Humidity Sensor It is dynamic;For 1:Delaying a period of time after setting completed for 0 expression setting information, (delay time is that user is set by terminal ) startup Temperature Humidity Sensor, for 2:Start by set date Temperature Humidity Sensor is represented for 1.
Setting for Starting mode obtains the process of the corresponding setting information of Starting mode, referring to obtaining file attribute The process of corresponding setting information, details are not described herein again.
For stopping mode, referring to Fig. 5, occupy two bytes, 16, the position do not used is defaulted as " 1 ";For 0: Represent that button stops Temperature Humidity Sensor for 0, otherwise button does not influence the stopping of Temperature Humidity Sensor;For 1:It is represented for 0 To stop sampling when reading data from flash storage, otherwise not influence to sample;For 2:It is fixed for 0 expression hits, Otherwise sampling length does not limit.
For stopping the setting of mode, the process of the corresponding setting information of stopping mode being obtained, referring to obtaining file attribute The process of corresponding setting information, details are not described herein again.
For the sampling interval:User will be sent to temperature and humidity sensing in the sampling interval by terminal input sample interval, terminal The control device of device, the control device of Temperature Humidity Sensor will receive the sampling interval and byte corresponding to the sampling interval are written Place, has obtained setting information:Sampling interval.
If user is set not over terminal using interval, the control device of Temperature Humidity Sensor is in control temperature and humidity sensing When device is sampled, it can be sampled by the default sample Separation control Temperature Humidity Sensor read in default setting page.
For sampling initial time:When Temperature Humidity Sensor startup starts to acquire corresponding data, Temperature Humidity Sensor The corresponding time is written to the corresponding byte of sampling initial time control device, has obtained setting information:During sampling starting Between.
For sampling dwell time:When Temperature Humidity Sensor stops acquisition corresponding data, the control of Temperature Humidity Sensor The corresponding time is written to the corresponding byte of sampling dwell time equipment, has obtained setting information:Sample dwell time.
The address at 0 location of homepage for storing sampled data:A kind of mode can input storage by terminal for user and adopt Address at 0 location of homepage for storing sampled data is sent to Temperature Humidity Sensor by the address at 0 location of homepage of sample data, terminal Control device, the control device of Temperature Humidity Sensor by the address at 0 location of homepage for receiving storage sampled data be written to It sets in page, has obtained setting information:Store the address at 0 location of homepage of sampled data.Another mode is:Humiture passes The control device of sensor sets " address at 0 location of homepage of storage sampled data " write-in in page.
Wherein, " address at 0 location of homepage of storage sampled data " determines the First page information of the data page of corresponding document, Page namely corresponding to " address at 0 location of homepage of storage sampled data " is exactly the homepage of the data page of corresponding document.
For valid data termination address:After data acquire, the control device of Temperature Humidity Sensor will actually have Imitate data termination address (address for storing last gathered data of corresponding document) write-in.
For being repeated no more in setting up procedure the present embodiment of the setting information of other setting options.The setting of one file The setting information that page includes is the description of the attribute of the data of the data page storage to this document.The control of data acquisition device is set Standby control Temperature Humidity Sensor is during current gathered data, according to the setting information set:For example it is acquisition Temperature or humidity, the sampling interval, acquisition data (the namely homepage of data page) be written since which page, progress data Acquisition and acquisition data write-in, and during the entire process of gathered data, improve and the relevant setting of gathered data The information of page is such as:Sample initial time, sampling dwell time, valid data termination address.After data acquire, with this The corresponding file of data acquisition, which just stores, to be finished, and the setting information of this document is stored (also in this document setting page Attribute), that is, how to acquire, what, the storage address of gathered data etc. of acquisition, Coutinuous store is adopted in data page The data of collection.
The file management method of the flash storage of the application is carried out specifically using specific embodiment below It is bright.
Fig. 6 is the file management method flow chart one of flash storage that the application provides, as shown in fig. 6, the present embodiment Method can include:
Step S101, when file to be stored is at least one, for each file to be stored, file to be stored is determined Target sets page, will be set in page with the relevant target setting information write-in target of data for acquiring file to be stored;Wherein, mesh Mark the First page information that setting information includes the target data page of corresponding file to be stored;
Step S102, for each file to be stored, the First page information in target setting information determines text to be stored The homepage of the target data page of part, and since homepage, the target data of acquisition is continuously written into flash storage;Wherein, Target data is that data acquisition device is acquired according to respective objects setting information.
Specifically, the executive agent in the present embodiment can be the control device 13 in Fig. 1, be related to implementation shown in Fig. 2 The method of flash storage write-in file in example.
Below by data acquisition device for for Temperature Humidity Sensor, file is written in embodiment shown in Fig. 2 The process of flash storage illustrates.
For step S101:When user needs to start one or more data acquisition, that is to say, that exist to A few file to be stored, it is thus necessary to determine that each respective target configuration page of file to be stored, it will text to be stored corresponding to acquisition The relevant target setting information of data of part is written in corresponding target configuration page;And to the data of the corresponding file to be stored of acquisition Relevant setting information includes the First page information of the target data page of corresponding file to be stored, therefore, when user needs to start During one or more data acquisition, that is to say, that there are during at least one file to be stored, it is also necessary to determine that this waits to deposit Store up the First page information of the target data page of file.
Above-mentioned target setting information further includes:File attribute, the Starting mode of Temperature Humidity Sensor, Temperature Humidity Sensor Stopping mode, Temperature Humidity Sensor sampling interval etc..File attribute, the Starting mode of Temperature Humidity Sensor, humiture pass The stopping mode of sensor, sampling interval of Temperature Humidity Sensor etc., these target setting informations are all need of the user according to oneself Decision is asked, therefore, these target setting informations are sent to the control device of Temperature Humidity Sensor after being set by terminal, temperature Target configuration page is written in these target setting informations by the control device of humidity sensor.
It will be appreciated by persons skilled in the art that above-mentioned target setting information is not the setting of file to be stored whole Information, after data acquisition starts, the control device of Temperature Humidity Sensor can also be written and the relevant setting of gathered data Information, such as starting sample time, termination sampling time etc..
Process to the First page information of the target data page of determining file to be stored and determining text to be stored separately below The process of the target configuration page of part illustrates.
The process of the First page information of the target data page of file to be stored and determining file to be stored are determined in explanation Before the process of target configuration page, the distribution of the storage region of flash storage is illustrated first.
Fig. 7 is the storage region distribution schematic diagram of flash storage provided by the embodiments of the present application.
Referring to Fig. 7, it is known that the page of boot section up front, page of the default configuration area behind boot section distribute Qu Mo Recognize the page behind configuring area, page of the content regions behind distribution area.Setting page of first P pages of content regions for each file, Mei Gewen The setting page of part is page 1, the S pages of data page for each file below.
For distribution area and content regions:Referring to Fig. 7, it is 000BH to distribute the content of item that item No. is 0005H in area, instruction The 000BH pages of setting page in content regions, it is 0010H to distribute the content of item that item No. is 0006H in area, is indicated the in content regions 0010H pages of setting page.Wherein, item No. is intended merely to clearly illustrate distribution area, distributes in area and is not stored with Item No..
The process of the First page information for the target data page for determining the file to be stored is illustrated first.
Determine that the process of the First page information of the target data page of the file to be stored can be as follows:
A1, the information that the page where distributing area includes is read, obtains the content of all that distribution area includes;
If A2, content regions are stored at least one file, obtain in the content for the item that all items include page number most Big page number;
A3, the first of the maximum page number instruction content that page is set is read, obtains the first setting information in the first setting page, First setting information includes the endpage information of the data page of file;
A4, included according to the first setting information file data page endpage information, determine the homepage of file to be stored Information.
For A1, Temperature Humidity Sensor control device by reading boot section, know distribution area start page and point With the number of pages that area occupies, that is, the page where distribution area is known.
After the page where having known distribution area, the page that the control device of Temperature Humidity Sensor is read where distributing area includes Information, obtain the content of all that includes of distribution area;Wherein, distribution area includes multiple items, might not each item it is interior Hold the page number that page is all set for file.
If being stored at least one file for A2~A3, content regions, all items included from distribution area include page Number content in extract maximum page number;According to the maximum page number, the setting letter of the first setting page of maximum page number instruction is read Breath, if that is, maximum page number is M, read the M pages of content.Wherein, maximum page number is last of content regions storage The page number of the configuration page of a file, then the first setting page is the setting page of the last one file of content regions storage.According to The aforementioned elaboration to setting page, it is known that setting page includes the endpage information of file:Valid data termination address, therefore, according to The setting information of the first setting page read can obtain the endpage information of the last one file of content regions storage.
For A4, in the case of content regions are stored at least one file, according to content regions store the last one text The endpage information of part determines the First page information of file to be stored.Such as the endpage of the last one file stored according to content regions Information determines that the endpage page number of the last one file of content regions storage is K, then the data homepage page number of file to be stored can For K+1, it is alternatively K+2 etc. certainly, and then can obtain the First page information of the target data page of file to be stored, such as:Number of targets According to the address at 0 location of homepage of page.
If content regions do not have storage file, when determining the homepage of first file to be stored, then the head of file to be stored Page page number can be P+3 (it is corresponding with:Content regions include P pages of setting page, and area accounts for one page, default configuration area accounts for one page, boot section for distribution One page is accounted for, then content regions can store the P+4 pages of the homepage of data for storage region, page number P+3).
The executive agent of the process of the First page information of above-mentioned acquisition target data page is the control device of Temperature Humidity Sensor, It is that button starts to be applicable in the Starting mode that scene is Temperature Humidity Sensor, and the control device of Temperature Humidity Sensor can receive at this time After enabled instruction to user by key-press input Temperature Humidity Sensor, according to the method in A1~A4, file to be stored is determined Target data page First page information after, by the First page information of the target data page of file to be stored write-in target setting page, Then control Temperature Humidity Sensor starts gathered data.
In addition, the control device of Temperature Humidity Sensor can set page according to the method in A1~A3 by read first Setting information is sent to terminal and is shown, user determines the head of the target data page of file to be stored according to the method in A4 After page information, by the First page information input terminal of the target data page of file to be stored, terminal sends it to temperature and humidity sensing The control device of device, the First page information write-in target of the target data page of the control device file to be stored of Temperature Humidity Sensor are matched It puts in page.At this point, if content regions do not have storage file, in the homepage for determining first file to be stored, it is sent to end The page number at end can be P+3.
At this point, the endpage information in the first setting page can be shown as the control of endpage page number, i.e. Temperature Humidity Sensor in terminal " valid data termination address " can be converted into retransmit to terminal after endpage page number and show by control equipment.Head input by user Page information is alternatively homepage page number, and the homepage page number received can be converted to that " storage is adopted by the control device of Temperature Humidity Sensor Address at 0 location of homepage of sample data " is written afterwards in target setting page.
It will be appreciated by those skilled in the art that when file to be stored have it is multiple, and first by the setting of each storage file believe When breath write-in to corresponding target is set in page, since data are acquired write-in not yet, each text to be stored can not be known The endpage information of part, first file to be stored (file to be stored of the page number minimum of setting page) can be according to above-mentioned method Determine the First page information of target data page, it can be at first for the First page information of the target data page of second file to be stored After file to be stored stores, the control device of Temperature Humidity Sensor is write after determining First page information according to the method in A1~A4 Enter into corresponding setting page (i.e. the First page information of setting information does not first pass through terminal setting), at this point, content regions are just not present Do not include the situation of file, and page number of the maximum page number in distribution area read at this time for the configuration page of the first file to be stored, The last one file of content regions storage is first file to be stored.For the target data page of other files to be stored Homepage, acquisition principle is identical with the acquisition principle of second file to be stored, and details are not described herein again.
Secondly, the process of the target configuration page to obtaining file to be stored illustrates.
The process for obtaining the target configuration page of file to be stored can be as follows:
B1, the information that the page where distributing area includes is read, obtains the content of all that distribution area includes;
If B2, content regions are stored at least one file, obtain in the content for the item that all items include page number most Big page number;
B3, according to maximum page number, obtain the page number of target setting page, the page number of target setting page be maximum page number with it is default The sum of value;
B4, the page number that page is set according to target determine that target sets page.
For B1:Referring to the aforementioned description to A1, details are not described herein again.
If being stored at least one file for B2~B3, content regions, distribute all items that area includes and include page number Content in extract maximum page number;If the number of pages that the setting page of each file occupies is page 1, after can maximum page number being added 1 To the page number of target setting page, i.e., preset value at this time is 1.After the page number of target setting page has been obtained, target has been determined that Page is set, that is, the physical address of flash storage corresponding with target setting page is determined.
If content regions do not have storage file, there is no maximum page numbers, determine that the target of first file to be stored is set When putting the page number of page, if area accounts for one page, default configuration area accounts for one page, boot section accounts for one page, first text to be stored for distribution The page number of the target setting page of part is 3.
In addition, it is necessary to the page number of the target setting page of file to be stored is written in distribution area.Specific method is:
C1, the information that the page where distributing area includes is read, obtains the content of all that distribution area includes;
C2, the quantity of page number that the content of all includes is obtained, which is used to indicate the file of content regions storage Quantity;
The word that the item No. of first item and each item occupy in C3, the quantity of file stored according to content regions, distribution area Joint number obtains target storage position of the page number in distribution area of target configuration page;
C4, the page number that page object is written at target storage position.
Specifically, for C1, referring to the aforementioned elaboration to A1, details are not described herein again.
For C2, how many a page numbers are read out from distribution area, there are how many setting pages with regard to description area, because often A file is respectively provided with a setting page, therefore, distributes the quantity of page number and content regions packet that the content of all in area includes The quantity of the file included is identical.
For C3, as previously mentioned, each item occupies two bytes, therefore, the text that can include according to content regions in distribution area First item is inclined in the quantity (quantity of page number that the content of at least one read in other words includes) of part, distribution area It moves address, the byte number that each item occupies, obtains target storage position of the page number in distribution area of target configuration page.Wherein, mesh Mark storage location is the physical address for the page number for storing target configuration page.Wherein, the physical address of the first item in distribution area is To distribute the initial address of area place page, it may thus be appreciated that the offset address of the first item in distribution area.
Specifically, mode can be achieved by the following procedure and obtain target storage position of the page number in distribution area of target configuration page: The byte number that offset address, each item of first item occupy in the quantity of file that is included according to content regions, distribution area, obtains Store the target offset address of the item of the page number of target configuration page;According to target offset address and the sum of the base address in distribution area, The physical address of the page number of storage target configuration page is obtained, that is, has obtained target storage position.
For step S102, target setting information is being written to target setting page, the control of Temperature Humidity Sensor is set It is standby can be according to the First page information in target setting information:" address at 0 location of homepage of storage sampled data ", obtains target data The homepage of page, that is, obtain the physical address of the homepage of target data page;Wherein, target data page is used to store text to be stored The data of part, the data of file to be stored are that current gatherer process starts rear Temperature Humidity Sensor and set in page according to target The data that configured good target setting information collects, target set the target setting information set in page that can wrap It includes:Carry out temperature sampling, sampling interval 0.01S etc..
After the homepage of target data page determines, the control device of Temperature Humidity Sensor sets the temperature set in page according to target The Starting mode of humidity sensor, control Temperature Humidity Sensor start gathered data, and control Temperature Humidity Sensor according to target Setting information relevant with data acquisition carries out data acquisition, the number that Temperature Humidity Sensor is collected in setting information According to since the homepage, it is continuously written into flash storage.
Specifically, Temperature Humidity Sensor will be adopted according in target setting information with the relevant setting information of data acquisition After the data that collection obtains are converted to the value of flash storage storage, since the homepage, it is continuously written into flash storage.Its In, Temperature Humidity Sensor refers to the method that collected temperature and/or humidity are converted into the value that flash storage stores above-mentioned Introduction to " boot section " part.
The each single item in every page in target data page is the data of a sampled point, the length of each sampled point be by What file attribute determined.When file attribute is temperature sampling, the length of each sample point data is two bytes, when file category Property when being sampled to carry out temperature sampling and humidity, the data length of each sampled point is four bytes, and the first two byte is temperature It represents, latter two byte is that humidity represents.I.e. target data page is made of a series of sample point data, is not had in corresponding page Each byte used can be 0xff.
It is for each file to be stored, the endpage information write-in of file to be stored is to be stored after gathered data In the target configuration page of file, the target configuration information of target configuration page is improved, that is, improve the data of file to be stored Attribute information.Endpage information may include storing the physical address of last sampled data.
It will be appreciated by persons skilled in the art that if file to be stored has multiple, step S101 and step S102 can be first After carry out, i.e., after the setting information of multiple files to be stored first being respectively written into respective setting page, then respectively according to respectively setting The setting information related with gathered data carries out the acquisition of data in confidence breath, is written in respective data page, i.e., first to multiple File to be stored is configured the setting of information, then acquires the data of each file to be stored respectively;Step S101 and step S102 Sequencing also may not be present, i.e., first by the corresponding setting page of setting information write-in of a file to be stored, then acquisition should The data of file to be stored, then the setting information write-in of next file to be stored is set page and acquires this accordingly and waits to deposit The data of file are stored up, i.e., after the setting information of one file to be stored of setting, acquire the data of a file to be stored.
Setting page and data page in the present embodiment due to file are provided separately, and set and corresponding data is included in page Therefore setting information, can be written setting page easily and fast, write data into data page by the First page information of page.Meanwhile also Can first by the setting information of multiple files to be stored write-in it is respective setting page in, then respectively according in respective setting information with The related setting information of gathered data carries out the acquisition of data, is written in respective data page, ensure that need to obtain it is multiple During file to be stored, the fast and easy of data writing process.
The file management method of the flash storage of the present embodiment, including when file to be stored for it is at least one when, for Each file to be stored determines the target setting page of file to be stored, target relevant with the data of file to be stored is set In information write-in target setting page;Wherein, target setting information includes the First page information of the data page of corresponding file to be stored;It is right In each file to be stored, the First page information included according to target setting information determines the target data page of file to be stored Homepage, and since the homepage, the target data of acquisition is continuously written into flash storage;Wherein, target data is several According to harvester according in respective objects setting information with gathered data relevant information collection.The Flash of the present embodiment The file management method of memory, the fast and easy of data writing process, and can ensure needing to obtain multiple files to be stored When, the fast and easy of data writing process.
The process that file is read from flash storage is illustrated using specific embodiment below.
Fig. 8 is the file management method flowchart 2 of flash storage that the application provides, as shown in figure 8, the present embodiment Method can include:
Step S201, the information that the page where reading distribution area includes obtains the page number of at least one setting page;
Step S202, according to the page number of at least one setting page, the setting information of the setting page of each page number instruction is read, Obtain the setting information of each file stored in flash storage;
Step S203, according to the file identification input by user that continues, read the file that continues data page include it is specific Data;Wherein, the file identification that continues is that user determines according to the setting information of each file stored in flash storage.
Specifically, for step S201, humidity sensor control device by reading boot section, know rising for distribution area The number of pages that beginning page and distribution area occupy, that is, known the page where distribution area.
After the page where having known distribution area, the page that the control device of Temperature Humidity Sensor is read where distributing area includes Information, obtain the content of all, extract the page number in the content for the item that all items include page number, obtain at least one set Put the page number of page.
For step S202, according to the page number of at least one setting page, read the setting letter of the setting page of each page number instruction Breath, obtains the setting information of each file stored in flash storage, that is, obtained a setting information list, this sets Put the setting information that information list includes the All Files stored in flash storage.
The All Files stored in flash storage are got for the control device of step S203, Temperature Humidity Sensor Setting information after, send it to terminal and shown, user, which is known by the display interface of terminal in flash storage, to deposit The setting information of the All Files of storage.
As previously mentioned, the setting information of each file includes file attribute, sampling interval, sampling initial time, sampling Terminate time, the First page information of data page and endpage information etc..For example, user wants to check the temperature sampled in a1~a2 time ranges Degrees of data, and the file attribute in the setting information of some file is temperature sampling, sampling initial time is b1, when sampling terminates Between for b2, b1 is later than earlier than or equal to a1, b2 or equal to a2, then this document is can determine as the file that continues, in the setting information The First page information and endpage information of data page are the mark of the determining file that continues;User inputs the file that continues by terminal Mark, wherein, user can be homepage page number in the First page information that display interface is seen, can in the endpage information that display interface is seen For endpage page number.
The mark for the file that continues is sent to the control device of Temperature Humidity Sensor by terminal, and the control of Temperature Humidity Sensor is set After the data of the data page of the standby file that will continue are read, terminal is sent to, it is achieved thereby that reading the file in flash storage Process.
Specifically, the control device of Temperature Humidity Sensor reads data since the homepage of the data page for the file that continues, if The page number of the page currently read, which is less than or equal to, terminates page number, then judges whether occur FFFF pages, if it is not, the current page then read Data, if so, stop read data;If the page number of the page currently read, which is more than, terminates page number, stop reading data.Its In, FFFF pages refers to the page for mistake occur.
It will be appreciated by persons skilled in the art that if the First page information stored in the setting page of flash storage is " deposits Store up the address at 0 location of homepage of sampled data ", and homepage page number is shown to user in terminal, then the control of Temperature Humidity Sensor " address at 0 location of homepage of storage sampled data " can be converted into retransmit to terminal after homepage page number and shown by control equipment Show.If the endpage information stored in the setting page of flash storage is " valid data termination address ", and terminal is shown to user Be endpage page number, then " valid data termination address " can be converted into after endpage page number again by the control device of Temperature Humidity Sensor Terminal is sent to be shown.
Setting page and data page in the present embodiment due to file are provided separately, and set and corresponding data is included in page The attribute information of page, user can determine to want the file of reading, reading process fast and easy according to the setting information in setting page.
Fig. 9 is that the document management apparatus of flash storage provided by the embodiments of the present application implements one structure diagram, such as Shown in Fig. 9, the device of the present embodiment can include:Information setup module 11 and Data write. module 12.
Wherein, the storage region of flash storage is divided into multiple pages, and storage region includes content regions, and content regions are used In storing at least one file, each file includes setting page and data page, and data page sets page for depositing for storing data Storage and the relevant setting information of gathered data;Information setup module 11, for when file to be stored for it is at least one when, for every A file to be stored, determine file to be stored target setting page, and by with acquire file to be stored the relevant target of data In setting information write-in target setting page;Wherein, target setting information includes the homepage letter of the target data page of file to be stored Breath;Data write. module 12, for for each file to be stored, the First page information in target setting information to determine to treat The homepage of the target data page of storage file, and since homepage, the target data of acquisition is continuously written into flash storage In;Wherein, target data is that data acquisition device is acquired according to corresponding target setting information.
Information setup module 11, the information included specifically for reading the page where distributing area, obtains at least one Content;If content regions are stored at least one file, the maximum page number in the content of at least one is obtained;According to most big page Number, the page number of target setting page is obtained, the page number of target setting page is maximum the sum of page number and preset value;Page is set according to target Page number, determine target set page.
Information setup module 11, also particularly useful for the content of item further includes item No., and the corresponding offset address of item is item No. Preset multiple in the information that the page read where distributing area includes, after obtaining the content of at least one, obtains at least one The quantity of page number that the content of item includes, quantity are used to indicate the quantity of the file of content regions storage;According to quantity, distribution area In the item No. of first item and the byte number that occupies of each item, obtain target of the page number of target configuration page in distribution area and store position It puts;The byte number that each item occupies is identical with preset multiple;After the page number for according to maximum page number, obtaining target setting page, The page number of target setting page is written at target storage position.
Information setup module 11, also particularly useful for, after the maximum page number in obtaining multiple setting respective page numbers of page, The content of the first setting page of maximum page number instruction is read, obtains the first setting information in the first setting page, the first setting letter Breath includes the endpage information of the data page of file;According to endpage information, the First page information of file to be stored is determined.
Information setup module 11,, will for each file to be stored after the process for being additionally operable to obtain gathered data In the target configuration page of the endpage information write-in file to be stored of file to be stored;Wherein, endpage information includes storing last The physical address for the data that item obtains.
The device of the present embodiment can be used for performing the technical solution of above method embodiment, realization principle and technology Effect is similar, and details are not described herein again.
Figure 10 is that the document management apparatus of flash storage provided by the embodiments of the present application implements two structure diagram, As shown in Figure 10, on the basis of the device of the present embodiment apparatus structure shown in Fig. 9, further, can also include:Data are read Modulus block 13.
Data read module 13 obtains the page of at least one setting page for reading the information that the page where distribution area includes Number;According to the page number of at least one setting page, the setting information of the setting page of each page number instruction is read, obtains Flash storages The setting information of each file stored in device;According to the mark of the file input by user that continues, the data page for the file that continues is read The data included;Wherein, the mark of file of continuing is user according to the setting information of each file stored in flash storage It gets.
The device of the present embodiment can be used for performing the technical solution of above method embodiment, realization principle and technology Effect is similar, and details are not described herein again.
The embodiment of the present application also provides a kind of file management system of flash storage, including:Flash shown in Fig. 2 is deposited Reservoir, data acquisition device, data acquisition device control device and terminal device;Flash storage, data acquisition device and The terminal device is connect with the control device of data acquisition device;Wherein, the control device of data acquisition device includes Fig. 9 Or the document management apparatus of flash storage shown in Fig. 10.
The embodiment of the present application also provides a kind of computer readable storage medium, including instruction, when it runs on computers When so that computer is performed such as the method in Fig. 6 or shown in Fig. 8 embodiments.
Figure 11 is the structure diagram of electronic equipment provided by the embodiments of the present application, referring to Figure 11, the electronics of the present embodiment Equipment 300, including:Processor 31, memory 32 and communication bus 33, communication bus 33 are used to implement the company between each component It connects, for storing program instruction, processor 31 is used to read the program instruction in memory 32, and according to memory memory 32 Program instruction in 32 performs the method in Fig. 6 or shown in Fig. 8 embodiments.
One of ordinary skill in the art will appreciate that:Realizing all or part of step of above-mentioned each method embodiment can lead to The relevant hardware of program instruction is crossed to complete.Aforementioned program can be stored in a computer read/write memory medium.The journey Sequence when being executed, performs the step of including above-mentioned each method embodiment;And aforementioned storage medium includes:ROM, RAM, magnetic disc or The various media that can store program code such as person's CD.
Finally it should be noted that:The above various embodiments is only to illustrate the technical solution of the application, rather than its limitations;To the greatest extent Pipe is described in detail the application with reference to foregoing embodiments, it will be understood by those of ordinary skill in the art that:Its according to Can so modify to the technical solution recorded in foregoing embodiments either to which part or all technical features into Row equivalent replacement;And these modifications or replacement, each embodiment technology of the application that it does not separate the essence of the corresponding technical solution The range of scheme.

Claims (14)

1. a kind of flash storage, which is characterized in that including:Storage region;
The storage region is divided into multiple pages, and the storage region includes content regions, and the content regions are used to store at least One file, each file include setting page and data page, and for storing data, the setting page is used to store the data page With acquiring the relevant setting information of data.
2. flash storage according to claim 1, which is characterized in that the storage region further includes distribution area, described It distributes area and includes multiple items, when content regions are stored with N number of file, then the respective content of N number of item distributed in area is corresponding text The page number of the setting page of part, the page number of the setting page are used to indicate the storage location of setting page.
3. flash storage according to claim 1 or 2, which is characterized in that the storage region further include boot section and Default configuration area;
The boot section is used to store the attribute information of corresponding data acquisition device and the division information of the storage region;
The default configuration area is for storage and the relevant default information of gathered data.
4. a kind of file management method of flash storage, which is characterized in that the method is any based on claims 1 to 3 The method of flash storage described in;The method includes:
When file to be stored is at least one, for each file to be stored, the target setting page of file to be stored is determined, and It will be written in the target setting page with the relevant target setting information of data for acquiring file to be stored;Wherein, the target Setting information includes the First page information of the target data page of file to be stored;
For each file to be stored, the First page information in target setting information determines the target data of file to be stored The homepage of page, and since the homepage, the target data of acquisition is continuously written into the flash storage;Wherein, it is described Target data is that data acquisition device is acquired according to corresponding target setting information.
5. according to the method described in claim 4, it is characterized in that, further include distribution area, and described point in the storage region Include multiple items with area, when content regions are stored with N number of file, then the respective content of N number of item distributed in area is corresponding document Setting page page number when, the determining file to be stored target setting page, including:
The information that page where reading the distribution area includes obtains the content of all that the distribution area includes;
If content regions are stored at least one file, the most big page in the content of item that all items include page number is obtained Number;
According to the maximum page number, the page number of the target setting page is obtained, the page number of the target setting page is the maximum The sum of page number and preset value;
The page number of page according to the target is set, determines the target setting page.
6. according to the method described in claim 5, it is characterized in that, the information that includes of page where the distribution area is read, After obtaining the content of at least one, the method further includes:
The quantity of page number that the content of described all includes is obtained, the quantity is used to indicate the file of content regions storage Quantity;
According to the byte number that the offset address of first item and each item occupy in the quantity, distribution area, the target is obtained The page number of configuration page is in the target storage position in the distribution area;
According to the maximum page number, after obtaining the page number of the target setting page, the method further includes:
The page number of the write-in target setting page at the target storage position in the distribution area.
7. according to the method described in claim 5, it is characterized in that, in the content for obtaining described at least one most After big page number, including:
The content of the first setting page of maximum page number instruction is read, obtains the first setting information in the first setting page, described the One setting information includes the endpage information of the data page of file;
According to the endpage information, the First page information of the target data page of the file to be stored is determined.
8. according to the method described in claim 4, it is characterized in that, further include distribution area, and described point in the storage region Include multiple items with area, when content regions are stored with N number of file, then the respective content of N number of item distributed in area is corresponding document Setting page page number when, the method further includes:
After the process of gathered data, for each file to be stored, the endpage information of file to be stored is written and waits to deposit In the target configuration page for storing up file;Wherein, the endpage information includes storing the physical address of the data of last acquisition.
9. according to the method described in claim 4, it is characterized in that, further include distribution area, and described point in the storage region Include multiple items with area, when content regions are stored with N number of file, then the respective content of N number of item distributed in area is corresponding document Setting page page number when;The method further includes:
The information that page where reading the distribution area includes obtains the page number of at least one setting page;
According to the page number of at least one setting page, the setting information of the setting page of each page number instruction is read, is obtained described The setting information of each file stored in flash storage;
According to the mark of the file input by user that continues, continue the data that the data page of file includes described in reading;Wherein, institute The mark for stating the file that continues is that user gets according to the setting information of each file stored in flash storage.
10. a kind of document management apparatus of flash storage, which is characterized in that described device is to be appointed based on claims 1 to 3 The device of flash storage described in one, described device include:
Information setup module, for when file to be stored is at least one, for each file to be stored, determining text to be stored The target setting page of part, and page is set by the target is written with the relevant target setting information of data for acquiring file to be stored In;Wherein, the target setting information includes the First page information of the target data page of file to be stored;
Data write. module, for for each file to be stored, the First page information in target setting information to determine to wait to deposit The homepage of the target data page of file is stored up, and since the homepage, the target data of acquisition is continuously written into the Flash and is deposited In reservoir;Wherein, the target data is that data acquisition device is acquired according to corresponding target setting information.
11. device according to claim 10, which is characterized in that described device further includes:Data read module;
The data read module is used for, and distribution area is further included, and the distribution area includes multiple items in the storage region, when When content regions are stored with N number of file, then when distributing page number of the respective content of N number of item in area for the setting page of corresponding document; The information that page where reading the distribution area includes obtains the page number of at least one setting page;
According to the page number of at least one setting page, the setting information of the setting page of each page number instruction is read, is obtained described The setting information of each file stored in flash storage;
According to the mark of the file input by user that continues, continue the data that the data page of file includes described in reading;Wherein, institute The mark for stating the file that continues is that user gets according to the setting information of each file stored in flash storage.
12. a kind of file management system of flash storage, which is characterized in that including:Claims 1 to 3 any one of them Flash storage, data acquisition device, the data acquisition device control device and terminal device;
The control of the flash storage, the data acquisition device and the terminal device with the data acquisition device Equipment connects;
Wherein, the control device of the data acquisition device includes the file of the flash storage described in claim 10 or 11 Managing device.
A kind of 13. computer readable storage medium, which is characterized in that including instructing, when run on a computer so that meter Calculation machine performs such as claim 4~9 any one of them method.
14. a kind of electronic equipment, which is characterized in that including:Processor, memory and communication bus, the communication bus are used for Realize the connection between each component, for storing program instruction, the processor is used to read the storage memory Program instruction in device, and the program instruction perform claim in the memory requires 4~9 any one of them methods.
CN201810031114.0A 2018-01-12 2018-01-12 Flash memory, file management method and device of Flash memory Active CN108255433B (en)

Priority Applications (3)

Application Number Priority Date Filing Date Title
CN202111355122.9A CN114089916B (en) 2018-01-12 2018-01-12 Data acquisition system and temperature and humidity sensor system
CN201810031114.0A CN108255433B (en) 2018-01-12 2018-01-12 Flash memory, file management method and device of Flash memory
CN202111353834.7A CN114035749B (en) 2018-01-12 2018-01-12 Electronic equipment and Flash memory

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201810031114.0A CN108255433B (en) 2018-01-12 2018-01-12 Flash memory, file management method and device of Flash memory

Related Child Applications (2)

Application Number Title Priority Date Filing Date
CN202111353834.7A Division CN114035749B (en) 2018-01-12 2018-01-12 Electronic equipment and Flash memory
CN202111355122.9A Division CN114089916B (en) 2018-01-12 2018-01-12 Data acquisition system and temperature and humidity sensor system

Publications (2)

Publication Number Publication Date
CN108255433A true CN108255433A (en) 2018-07-06
CN108255433B CN108255433B (en) 2021-12-07

Family

ID=62726963

Family Applications (3)

Application Number Title Priority Date Filing Date
CN202111353834.7A Active CN114035749B (en) 2018-01-12 2018-01-12 Electronic equipment and Flash memory
CN202111355122.9A Active CN114089916B (en) 2018-01-12 2018-01-12 Data acquisition system and temperature and humidity sensor system
CN201810031114.0A Active CN108255433B (en) 2018-01-12 2018-01-12 Flash memory, file management method and device of Flash memory

Family Applications Before (2)

Application Number Title Priority Date Filing Date
CN202111353834.7A Active CN114035749B (en) 2018-01-12 2018-01-12 Electronic equipment and Flash memory
CN202111355122.9A Active CN114089916B (en) 2018-01-12 2018-01-12 Data acquisition system and temperature and humidity sensor system

Country Status (1)

Country Link
CN (3) CN114035749B (en)

Cited By (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2020140361A1 (en) * 2019-01-04 2020-07-09 中国科学院声学研究所东海研究站 Fpga-based intelligent storage control system and application thereof
CN112084147A (en) * 2020-09-10 2020-12-15 珠海美佳音科技有限公司 Data storage method, data acquisition recorder and electronic equipment
CN112698984A (en) * 2020-12-17 2021-04-23 宁波三星医疗电气股份有限公司 Database recovery method of embedded device, electronic device and medium
CN113031880A (en) * 2021-05-27 2021-06-25 湖南博匠信息科技有限公司 Upper computer communication method and system suitable for multi-model storage equipment
CN114265562A (en) * 2021-12-27 2022-04-01 北京国腾创新科技有限公司 File storage method and system based on flash memory

Citations (13)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1405683A (en) * 2001-09-18 2003-03-26 华为技术有限公司 FLASH storage file management method
US20050132129A1 (en) * 2001-08-28 2005-06-16 International Business Machines Corporation Data management in flash memory
CN1632765A (en) * 2004-12-31 2005-06-29 大唐微电子技术有限公司 A flash memory file system management method
CN101079075A (en) * 2007-05-24 2007-11-28 北京交通大学 Portable serial number recorder and implementation method
CN101520787A (en) * 2008-03-19 2009-09-02 中国科学院自动化研究所 Method for storing real-time data
US7690030B1 (en) * 2000-01-06 2010-03-30 Super Talent Electronics, Inc. Electronic data flash card with fingerprint verification capability
US7984303B1 (en) * 2000-01-06 2011-07-19 Super Talent Electronics, Inc. Flash memory devices with security features
CN102375781A (en) * 2010-08-04 2012-03-14 群联电子股份有限公司 Data protecting method, memory controller and portable memory storage device
CN102981965A (en) * 2012-11-07 2013-03-20 江苏乐买到网络科技有限公司 NAND FLASH file system
CN104317732A (en) * 2014-10-27 2015-01-28 上海动联信息技术股份有限公司 Large-capacity Flash chip space management method
US20150293880A1 (en) * 2013-10-16 2015-10-15 The Regents Of The University Of California Serial bus interface to enable high-performance and energy-efficient data logging
CN105917322A (en) * 2013-12-31 2016-08-31 赫耳墨斯科姆股份责任有限公司 Method for exchanging controls through a usb disc and relative devices which allow the implementation thereof
CN106776752A (en) * 2016-11-22 2017-05-31 上海拓攻机器人有限公司 A kind of embedded type file storage system and method for being applied to unmanned plane during flying data

Family Cites Families (28)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP4433792B2 (en) * 2003-12-26 2010-03-17 Tdk株式会社 MEMORY CONTROLLER, FLASH MEMORY SYSTEM PROVIDED WITH MEMORY CONTROLLER, AND FLASH MEMORY CONTROL METHOD
US7984084B2 (en) * 2005-08-03 2011-07-19 SanDisk Technologies, Inc. Non-volatile memory with scheduled reclaim operations
CN100370445C (en) * 2005-08-10 2008-02-20 北京中星微电子有限公司 A data transmission apparatus and method based on file allocation table (FAT)
JP4895262B2 (en) * 2005-12-09 2012-03-14 株式会社メガチップス Information processing apparatus, controller, and file reading method
TW201025002A (en) * 2008-12-26 2010-07-01 Asmedia Technology Inc Method of writing data into flash memory based on file system
CN101582089B (en) * 2009-07-02 2011-06-29 北京讯风光通信技术开发有限责任公司 File management method of embedded equipment and system
TWI473101B (en) * 2011-03-08 2015-02-11 Dust Networks Inc Methods and system for erasing data stored in nonvolatile memory in low power applications
KR20130010343A (en) * 2011-07-18 2013-01-28 삼성전자주식회사 Flash memory apparatus
CN102279805A (en) * 2011-09-06 2011-12-14 四川九洲电器集团有限责任公司 Memory data storing and reading method
CN103198166B (en) * 2013-04-16 2015-10-21 电子科技大学 A kind of down-hole Large Copacity acoustic logging while drilling data real-time storage device
CN103456360B (en) * 2013-09-13 2016-08-17 昆腾微电子股份有限公司 The management method of nonvolatile memory and device
CN103646063B (en) * 2013-11-27 2016-08-17 中国航天科技集团公司第五研究院第五一三研究所 A kind of spaceborne high speed document management system
CN103645993B (en) * 2013-12-24 2016-04-06 飞天诚信科技股份有限公司 A kind of Data Update based on large page Flash and read method
JP6274857B2 (en) * 2013-12-26 2018-02-07 キヤノン株式会社 MEMORY CONTROL DEVICE, MEMORY CONTROL METHOD, AND PROGRAM
KR102252419B1 (en) * 2014-01-09 2021-05-14 한국전자통신연구원 System and method for efficient address translation on Flash memory device
EP3115903B1 (en) * 2014-03-07 2020-04-15 Huawei Technologies Co., Ltd. File accessing method and related device
TWI516922B (en) * 2014-03-12 2016-01-11 慧榮科技股份有限公司 Data storage device and flash memory garbage collection method
KR20150113572A (en) * 2014-03-31 2015-10-08 삼성전자주식회사 Electronic Apparatus and Method for Acquiring of Image Data
CN104090732A (en) * 2014-07-21 2014-10-08 昆腾微电子股份有限公司 Nonvolatile memory management method and device
CN111736773A (en) * 2015-04-09 2020-10-02 株式会社日立制作所 Storage system and data control method
JP6542076B2 (en) * 2015-08-28 2019-07-10 東芝メモリ株式会社 Memory system
US9875156B2 (en) * 2015-10-01 2018-01-23 Sandisk Technologies Llc Data storage device with a memory die that includes an interleaver
CN105204788B (en) * 2015-10-28 2018-03-30 内蒙古青电云电力服务有限公司 A kind of data processing method based on Internet of Things
CN105550345B (en) * 2015-12-25 2019-03-26 百度在线网络技术(北京)有限公司 File operation method and device
CN106406756B (en) * 2016-09-05 2019-07-09 华为技术有限公司 A kind of space allocation method and device of file system
CN106878779B (en) * 2016-10-12 2023-10-13 珠海极海半导体有限公司 NFC video playing device and video processing method
CN106569748B (en) * 2016-10-27 2019-04-09 南方电网科学研究院有限责任公司 The data processing method and device of Flash File System
CN107247563A (en) * 2017-07-06 2017-10-13 济南浪潮高新科技投资发展有限公司 A kind of block message mark implementation method of NAND FLASH chips

Patent Citations (13)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US7690030B1 (en) * 2000-01-06 2010-03-30 Super Talent Electronics, Inc. Electronic data flash card with fingerprint verification capability
US7984303B1 (en) * 2000-01-06 2011-07-19 Super Talent Electronics, Inc. Flash memory devices with security features
US20050132129A1 (en) * 2001-08-28 2005-06-16 International Business Machines Corporation Data management in flash memory
CN1405683A (en) * 2001-09-18 2003-03-26 华为技术有限公司 FLASH storage file management method
CN1632765A (en) * 2004-12-31 2005-06-29 大唐微电子技术有限公司 A flash memory file system management method
CN101079075A (en) * 2007-05-24 2007-11-28 北京交通大学 Portable serial number recorder and implementation method
CN101520787A (en) * 2008-03-19 2009-09-02 中国科学院自动化研究所 Method for storing real-time data
CN102375781A (en) * 2010-08-04 2012-03-14 群联电子股份有限公司 Data protecting method, memory controller and portable memory storage device
CN102981965A (en) * 2012-11-07 2013-03-20 江苏乐买到网络科技有限公司 NAND FLASH file system
US20150293880A1 (en) * 2013-10-16 2015-10-15 The Regents Of The University Of California Serial bus interface to enable high-performance and energy-efficient data logging
CN105917322A (en) * 2013-12-31 2016-08-31 赫耳墨斯科姆股份责任有限公司 Method for exchanging controls through a usb disc and relative devices which allow the implementation thereof
CN104317732A (en) * 2014-10-27 2015-01-28 上海动联信息技术股份有限公司 Large-capacity Flash chip space management method
CN106776752A (en) * 2016-11-22 2017-05-31 上海拓攻机器人有限公司 A kind of embedded type file storage system and method for being applied to unmanned plane during flying data

Cited By (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2020140361A1 (en) * 2019-01-04 2020-07-09 中国科学院声学研究所东海研究站 Fpga-based intelligent storage control system and application thereof
US11379129B2 (en) 2019-01-04 2022-07-05 Shanghai Acoustics Laboratory, Chinese Academy Of Sciences FPGA-based intelligent storage control system and application thereof
CN112084147A (en) * 2020-09-10 2020-12-15 珠海美佳音科技有限公司 Data storage method, data acquisition recorder and electronic equipment
CN112698984A (en) * 2020-12-17 2021-04-23 宁波三星医疗电气股份有限公司 Database recovery method of embedded device, electronic device and medium
CN112698984B (en) * 2020-12-17 2023-07-04 宁波三星医疗电气股份有限公司 Database recovery method of embedded device, electronic device and medium
CN113031880A (en) * 2021-05-27 2021-06-25 湖南博匠信息科技有限公司 Upper computer communication method and system suitable for multi-model storage equipment
CN114265562A (en) * 2021-12-27 2022-04-01 北京国腾创新科技有限公司 File storage method and system based on flash memory
CN114265562B (en) * 2021-12-27 2022-09-20 北京国腾创新科技有限公司 File storage method and system based on flash memory

Also Published As

Publication number Publication date
CN114035749B (en) 2023-02-28
CN114089916A (en) 2022-02-25
CN114089916B (en) 2022-12-20
CN108255433B (en) 2021-12-07
CN114035749A (en) 2022-02-11

Similar Documents

Publication Publication Date Title
CN108255433A (en) The file management method and device of flash storage, flash storage
CN103197898B (en) Memory control device, storage device and the control method for controlling memory control device
CN104809075B (en) A kind of solid state record device and method for accessing real-time parallel processing
CN104881259B (en) A kind of data processing method and device and storage device
US7062602B1 (en) Method for reading data in a write-once memory device using a write-many file system
CN101542447B (en) Write once recording device
CN106201923B (en) Method for reading and writing data and device
CN106649627B (en) A kind of method and apparatus that log is searched
US20110302224A1 (en) Data storage device with preloaded content
CN108334284A (en) Tail delay perception foreground garbage collection algorithm
CN108563532A (en) Data processing method and relevant apparatus
CN108399050B (en) Data processing method and device
CN107133011A (en) A kind of multi-channel data storage method of electrographic recording instrument
CN110442308B (en) Data block storage method, device, equipment and storage medium
CN104156748B (en) Method for reading and writing label and device thereof
US8688663B2 (en) Providing additional information from a removable storage medium
CN110908927A (en) Data storage device and method for deleting name space thereof
CN111104178A (en) Dynamic library loading method, terminal device and storage medium
CN108287665A (en) Flash memory device and access control method
CN108701080A (en) It is effective to ensure that storage device acts using reference value
CN104951569B (en) File system and the file management method for using this document system
CN107562766B (en) Data file writing method, device and system
CN109840048A (en) Store command processing method and its storage equipment
US7461204B2 (en) Method to store and retrieve memory card usage information
CN112181275A (en) Data processor and data processing method

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
TA01 Transfer of patent application right
TA01 Transfer of patent application right

Effective date of registration: 20190717

Address after: 519060 Guangwan Street, Xiangzhou District, Zhuhai City, Guangdong Province, 83, 01, 1st, 3rd, 4th, 5th, 6th, 7th and 8th floors

Applicant after: Zhuhai APEX Microelectronics Co., Ltd.

Address before: 519060 Zhuhai City, Guangdong Province, 3883 Zhuhai Avenue 3883, 01 Building 2, 7 Building B, 02, 03, 04 Building 1, 2, 3, 4, 5, 05

Applicant before: Nasida Limited by Share Ltd

TA01 Transfer of patent application right
TA01 Transfer of patent application right

Effective date of registration: 20200515

Address after: 519000 room 105-68710, No. 6, Baohua Road, Hengqin New District, Zhuhai City, Guangdong Province (centralized office area)

Applicant after: Zhuhai Jihai Semiconductor Co., Ltd

Address before: 519060 Guangwan Street, Xiangzhou District, Zhuhai City, Guangdong Province, 83, 01, 1st, 3rd, 4th, 5th, 6th, 7th and 8th floors

Applicant before: APEX MICROELECTRONICS Co.,Ltd.

GR01 Patent grant
GR01 Patent grant