[go: up one dir, main page]

CN102521289B - File synchronization method, device and system - Google Patents

File synchronization method, device and system Download PDF

Info

Publication number
CN102521289B
CN102521289B CN2011103868296A CN201110386829A CN102521289B CN 102521289 B CN102521289 B CN 102521289B CN 2011103868296 A CN2011103868296 A CN 2011103868296A CN 201110386829 A CN201110386829 A CN 201110386829A CN 102521289 B CN102521289 B CN 102521289B
Authority
CN
China
Prior art keywords
file
ramdisk
flash
value
registration
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.)
Expired - Fee Related
Application number
CN2011103868296A
Other languages
Chinese (zh)
Other versions
CN102521289A (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.)
Li Fei
Original Assignee
Huawei Technologies Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Huawei Technologies Co Ltd filed Critical Huawei Technologies Co Ltd
Priority to CN2011103868296A priority Critical patent/CN102521289B/en
Publication of CN102521289A publication Critical patent/CN102521289A/en
Priority to PCT/CN2012/078911 priority patent/WO2013078870A1/en
Application granted granted Critical
Publication of CN102521289B publication Critical patent/CN102521289B/en
Expired - Fee Related legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/10File systems; File servers
    • G06F16/17Details of further file system functions
    • G06F16/178Techniques for file synchronisation in file systems

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Data Mining & Analysis (AREA)
  • Databases & Information Systems (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)
  • Hardware Redundancy (AREA)

Abstract

The embodiment of the invention discloses a file synchronization method, device and system. The file synchronization method comprises the following steps of: synchronizing files in a flash of a LINUX embedded system to a RAMDISK, and carrying out inotify registration or dnotify registration on files in the RAMDISK; and carrying out operation on the files in the RAMDISK, which are subjected to the inotify registration or the dnotify registration, by an application program of the LINUX embedded system, and synchronizing changed files in the RAMDISK to the flash when the files in the RAMDISK, which are subjected to the inotify registration or the dnotify registration, are changed. Visibly, the application program of the LINUX embedded system only needs to read/write the files in the RAMDISK, thus, the reading/writing speed of the embedded system is increased, and the response speed of the system is accelerated.

Description

A kind of file synchronisation method, Apparatus and system
Technical field
The embodiment of the present invention relates to communication technical field, relates in particular to a kind of file synchronisation method, Apparatus and system.
Background technology
At present, usually use flash (flash memory) in the embedded system based on LINUX, as BMC (Baseboard Management Controller, baseboard management controller), due to the erase mechanism of flash inside, after wiping, can again write, can cause written document on flash second time delay of level to occur, therefore, if need written document on flash continually, so just there will be overtime or respond situation slowly.
Summary of the invention
The embodiment of the present invention provides a kind of file synchronisation method, Apparatus and system, reduces the time delay of written document.
The embodiment of the present invention is achieved through the following technical solutions:
On the one hand, the embodiment of the present invention provides a kind of file synchronisation method, comprising:
File synchronization in flash memory flash in the LINUX embedded system, in random store-memory body disk RAMDISK, and is carried out to inotify registration or dnotify registration to the file in described RAMDISK;
The file that the application program of LINUX embedded system is registered in the RAMDISK after rear or described dnotify registers described inotify is operated, after described inotify registration or the file in the described RAMDISK after described dnotify registration while changing, by the file synchronization in the described RAMDISK changed in described flash.
On the other hand, the embodiment of the present invention provides a kind of file synchronization device, comprising:
The first lock unit, for the file synchronization by LINUX embedded system flash memory flash in random store-memory body disk RAMDISK;
Registering unit, carry out inotify registration or dnotify registration for the file to described RAMDISK;
The second lock unit, the file of described inotify being registered to the RAMDISK after rear or described dnotify registers for the application program of LINUX embedded system is operated, after described inotify registration or the file in the described RAMDISK after described dnotify registration while changing, by the file synchronization in the described RAMDISK changed in described flash.
On the other hand, the embodiment of the present invention provides a kind of file syn chronizing system, comprises lock unit, flash and RAMDISK, and described lock unit is used for, file synchronization in flash, in RAMDISK, and is carried out to inotify registration or dnotify registration to the file in described RAMDISK; The file that the application program of LINUX embedded system is registered in the RAMDISK after rear or described dnotify registers described inotify is operated, after described inotify registration or the file in the described RAMDISK after described dnotify registration while changing, by the file synchronization in the described RAMDISK changed in described flash.
As seen from the above technical solution provided by the invention, the LINUX embedded system is used inotify or dnotify documentary information mechanism, file in RAMDISK and the File Mapping in flash are got up, the application program of embedded system only need to be read and write the file in RAMDISK, thereby improved the read or write speed of embedded system, improved the response speed of system.
The accompanying drawing explanation
In order to be illustrated more clearly in the technical scheme of the embodiment of the present invention, in below describing embodiment, the accompanying drawing of required use is briefly described, apparently, accompanying drawing in the following describes is only some embodiments of the present invention, for those of ordinary skill in the art, under the prerequisite of not paying creative work, can also obtain other accompanying drawings according to these accompanying drawings.
The schematic flow sheet of the file synchronisation method that Fig. 1 provides for the embodiment of the present invention.
The formation schematic diagram of the file synchronization device that Fig. 2 provides for the embodiment of the present invention.
The application flow schematic diagram one of the file synchronisation method that Fig. 3 provides for the embodiment of the present invention.
The application flow schematic diagram two of the file synchronisation method that Fig. 4 provides for the embodiment of the present invention.
The application flow schematic diagram three of the file synchronisation method that Fig. 5 provides for the embodiment of the present invention.
The application flow schematic diagram four of the file synchronisation method that Fig. 6 provides for the embodiment of the present invention.
The application flow schematic diagram five of the file synchronisation method that Fig. 7 provides for the embodiment of the present invention.
Embodiment
Below in conjunction with the accompanying drawing in the embodiment of the present invention, the technical scheme in the embodiment of the present invention is clearly and completely described, obviously, described embodiment is only the present invention's part embodiment, rather than whole embodiment.Based on embodiments of the invention, those of ordinary skills, not making under the creative work prerequisite the every other embodiment obtained, belong to protection scope of the present invention.
As described in Figure 1, the embodiment of the present invention provides a kind of file synchronisation method, can be applied in the embedded system based on LINUX, and method comprises:
11, by the file synchronization in flash memory flash in the LINUX embedded system in random store-memory body disk RAMDISK, and the file in described RAMDISK is carried out to inotify registration or dnotify registration.
12, the file that the application program of LINUX embedded system is registered in the RAMDISK after rear or described dnotify registers described inotify is operated, after described inotify registration or the file in the described RAMDISK after described dnotify registration while changing, by the file synchronization in the described RAMDISK changed in described flash.
The file synchronisation method of the embodiment of the present invention, do not change in the situation of reading and writing of files mode of application program of LINUX embedded system, use LINUX kernel inotify or dnotify documentary information mechanism, file in RAMDISK and the File Mapping in flash are got up, the application program of embedded system only need to be read and write the file in RAMDISK, thereby improved the read or write speed of embedded system, improved the response speed of system.
Optionally, in above-mentioned steps 12, the file that the application program of LINUX embedded system is registered in the RAMDISK after rear or described dnotify registers described inotify is operated, can comprise: the file that described inotify is registered after rear or described dnotify registers carries out read operation, perhaps write operation, perhaps move operation, or deletion action etc.
Optionally, in above-mentioned steps 12, after described inotify registration or the described file after described dnotify registration change, can comprise: after described inotify registration or the described file after described dnotify registration be modified, or be moved or deleted etc.
Optionally, the file synchronisation method of the embodiment of the present invention can also comprise:
The frequency characteristic be modified according to file and file purposes, by the Divide File in described flash, be Log Types file and Configuration Type file, the frequency that described Log Types file is modified is greater than the frequency that described Configuration Type file is modified, described Log Types file is for log, and described Configuration Type file loads the setting of required environment for application program.
The Log Types file for log, operates frequency large usually, and and the mode that only can append with content of Log Types file revise.The Configuration Type file loads the setting of required environment for application program, although the Configuration Type file can be modified, usually operate frequency little.
Further, for the Log Types file, owing to usually can not being modified, in flash, do not need to be backed up.And, for the Configuration Type file, owing to usually can being modified, increasing, need the file in flash is backed up, obtain corresponding master file and backup file.
Optionally, in the file synchronisation method of the embodiment of the present invention, can determine that the file in flash belongs to Log Types file or Configuration Type file by reading configuration file.
Below, to Log Types file and Configuration Type file, respectively the file synchronisation method of the embodiment of the present invention described:
For the Log Types file, the file synchronization in flash, in RAMDISK, can be comprised:
Directly by the Log Types file copy in flash in RAMDISK.
Further, for the Log Types file, the file synchronization in the RAMDISK changed, in flash, can be comprised:
Use the synchronous method of increment, by the Log Types file synchronization in RAMDISK in flash.Based in this Log Types file every record fixing length, or finish with newline, the record increased in file can be synchronized in flash, and will all not be synchronized in flash by whole file.
Optionally, for the Log Types file, after starting (comprise initial start and restart) LINUX embedded system, can according to the characteristics of this Log Types file, (every records fixing length, perhaps with newline, finish), Log Types file in flash is carried out to the check of integrality, imperfect if the last item of Log Types file records, can fall the last item record deletion.
For the Configuration Type file, the file synchronization in flash, in RAMDISK, can be comprised:
CRC (Cyclic Redundancy Check according to master file in flash, cyclic redundancy check (CRC)) value or MD5 (Message-Digest Algorithm 5, Message-Digest Algorithm 5) legitimacy of the described master file of value judgement, when described master file is legal, is synchronized in RAMDISK by described master file and is synchronized in described backup file;
When described master file is illegal, legitimacy according to backup file in the crc value of backup file in flash or the described flash of MD5 value judgement, when described backup file is legal, is synchronized in RAMDISK by described backup file and is synchronized in described master file.
Wherein, crc value or MD5 value can comprise: initial crc value or MD5 value, or upgrade crc value or MD5 value.
Wherein, be not limited to CRC algorithm or MD5, anyly can realize that the algorithm that judges file validation can be suitable for.
Further, for the Configuration Type file, the file synchronization in the RAMDISK changed, in flash, can be comprised:
According to CRC algorithm or MD5, calculate renewal crc value or the MD5 value of the file in the RAMDISK changed;
First described renewal crc value or MD5 value are synchronized to master file in described flash, then by the file synchronization in the described described RAMDISK changed to master file corresponding in described flash;
First described renewal crc value or MD5 value are synchronized to backup file in described flash, then by the file synchronization in the described described RAMDISK changed to backup file corresponding in described flash.
Optionally, the file synchronisation method of the embodiment of the present invention, can be used hardware cryptographic engine, carrys out crc value or the MD5 value of calculation document, reduces the expense of CPU.Exemplary, C3 hardware cryptographic engine for example, so when the crc value of calculation document or MD5 value, can call API (the Application Programming Interface of C3 hardware cryptographic engine, application programming interface) calculate, thereby reduced the expense of CPU (Central Processing Unit, central processing unit).
As described in Figure 2, corresponding to the file synchronisation method of above-described embodiment, the embodiment of the present invention provides a kind of file synchronization device 20, and this device 20 can be small-size computer, or personal computer, and network node etc. comprise:
The first lock unit 21, for the file synchronization by LINUX embedded system flash memory flash in random store-memory body disk RAMDISK.
Registering unit 22, carry out inotify registration or dnotify registration for the file to described RAMDISK.
The second lock unit 23, the file of described inotify being registered to the RAMDISK after rear or described dnotify registers for the application program of LINUX embedded system is operated, after described inotify registration or the file in the described RAMDISK after described dnotify registration while changing, by the file synchronization in the described RAMDISK changed in described flash.
The file synchronization device of the embodiment of the present invention, do not change in the situation of reading and writing of files mode of application program of LINUX embedded system, use LINUX kernel inotify or dnotify documentary information mechanism, file in RAMDISK and the File Mapping in flash are got up, the application program of embedded system only need to be read and write the file in RAMDISK, thereby improved the read or write speed of embedded system, improved the response speed of system.
Optionally, the first lock unit 21 and the second lock unit 23 can be realized by a lock unit, unrestricted.
Optionally, the second lock unit 23, specifically can carry out read operation for the file after or described dnotify registration rear to described inotify registration, perhaps write operation, perhaps move operation, or deletion action, the described file that described inotify registers after rear or described dnotify registration is modified, perhaps be moved or when deleted, by the file synchronization in the described RAMDISK changed in described flash.
The file synchronization device of the embodiment of the present invention can also comprise:
Division unit, for frequency characteristic and the file purposes be modified according to file, by the Divide File in described flash, be Log Types file and Configuration Type file, the frequency that described Log Types file is modified is greater than the frequency that described Configuration Type file is modified, described Log Types file is for log, and described Configuration Type file loads the setting of required environment for application program.And,
Backup units, for for described Configuration Type file, backed up the file in flash, obtains corresponding master file and backup file.
Optionally, for the Configuration Type file, the first lock unit 21, specifically can for:
Legitimacy according to the crc value of master file in flash or the described master file of MD5 value judgement, when described master file is legal, is synchronized in RAMDISK by described master file and is synchronized in described backup file;
When described master file is illegal, legitimacy according to backup file in the crc value of backup file in flash or the described flash of MD5 value judgement, when described backup file is legal, is synchronized in RAMDISK by described backup file and is synchronized in described master file.
Wherein, crc value or MD5 value can comprise: initially establish crc value or MD5 value, or upgrade crc value or MD5 value.
Further, optional, for the Configuration Type file, the second lock unit 23, specifically can for:
According to CRC algorithm or MD5, calculate renewal crc value or the MD5 value of the file in the RAMDISK changed;
First described renewal crc value or MD5 value are synchronized to master file in described flash, then by the file synchronization in the described described RAMDISK changed to master file corresponding in described flash;
First described renewal crc value or MD5 value are synchronized to backup file in described flash, then by the file synchronization in the described described RAMDISK changed to backup file corresponding in described flash.
File synchronization device and the formation thereof of the embodiment of the present invention, can correspondence be understood with reference to the related content of the file synchronisation method of above-described embodiment, and therefore not to repeat here.
The embodiment of the present invention provides a kind of file syn chronizing system, comprise lock unit, flash and RAMDISK, described lock unit is used for, and the file synchronization in flash, in RAMDISK, and is carried out to inotify registration or dnotify registration to the file in described RAMDISK; The file that the application program of LINUX embedded system is registered in the RAMDISK after rear or described dnotify registers described inotify is operated, after described inotify registration or the file in the described RAMDISK after described dnotify registration while changing, by the file synchronization in the described RAMDISK changed in described flash.
The file syn chronizing system of the embodiment of the present invention, do not change in the situation of reading and writing of files mode of application program of LINUX embedded system, use LINUX kernel inotify or dnotify documentary information mechanism, file in RAMDISK and the File Mapping in flash are got up, the application program of embedded system only need to be read and write the file in RAMDISK, thereby improved the read or write speed of embedded system, improved the response speed of system.
The embodiment of the present invention provides a kind of file synchronisation method, for response speed and the user experience that improves embedded system, in the situation that do not change the reading and writing of files mode of the application program of embedded system, increase a lock unit, use LINUX kernel inotify or dnotify documentary information mechanism, file in RAMDISK and the File Mapping in flash are got up, the application program of embedded system only need to be read and write the file in RAMDISK, thereby improved the read or write speed of embedded system, improved the response speed of system.
As shown in Figure 3, the file synchronisation method of the embodiment of the present invention comprises:
31, start the LINUX embedded system.
Start the LINUX embedded system, because lock unit must, before other process initiations, arrive RAMDISK to the file synchronization in flash.Therefore, can use process lock, prevent other processes in the situation that read less than the RAMDISK File and start, cause unpredictable mistake, until lock unit the file synchronization in flash in RAMDISK, could discharge process lock, allow other process initiations.
32, by the file synchronization in flash in RAMDISK.
Lock unit is determined the type of file by reading configuration file, and then determines which file synchronization in flash in RAMDISK.
Exemplary, " LOG " expression " Log Types " in the ProtectType field of configuration file, " CONF " expression " Configuration Type ".
Exemplary, table 1:
Figure BDA0000113830590000071
As shown in Figure 4, for Log Types, by the file synchronization in flash in RAMDISK, specifically: be directly corresponding file in flash, be synchronized in RAMDISK.
As shown in Figure 5, for Configuration Type, by the file synchronization in flash in RAMDISK, specifically:
51, the legitimacy of judgement master file.
The legitimacy of master file if the master file is legal, enter 52 as judged by CRC algorithm or MD5, if the master file is illegal, enter 53.
If 52 master files are legal, the master file synchronization in RAMDISK, upgrade the backup file simultaneously.
As the master file synchronization in RAMDISK, upgrade the backup file, and crc value or the MD5 value of upgrading the backup file simultaneously.
If 53 master files are illegal, the legitimacy of judgement backup file.
The legitimacy of backup file if the backup file is legal, enter 54 as judged by CRC algorithm or MD5, if the backup file is illegal, enter abnormality processing.
If 54 backup files are legal, the backup file synchronization in RAMDISK, upgrade the master file simultaneously.
As the backup file synchronization in RAMDISK, upgrade the master file, and crc value or the MD5 value of upgrading the master file simultaneously.
Afterwards, the file synchronization in flash, after RAMDISK, need is discharged to process lock, allow other process initiations.
33, the file in Inotify or dnotify registration RAMDISK.
Call the API (Application Programming Interface, application programming interface) of LINUX kernel inotify or dnotify, carry out the file in Inotify or dnotify registration RAMDISK.
File in Inotify or dnotify registration RAMDISK, can be understood with reference to prior art, and therefore not to repeat here.
34, receive that LINUX kernel inotify or dnotify notice RAMDISK File change.
Use the API of LINUX kernel inotify or dnotify, determine that the RAMDISK File changes.
Receive that LINUX kernel inotify or dnotify notice RAMDISK File change, can be understood with reference to prior art, therefore not to repeat here.
35, by vicissitudinous file synchronization in RAMDISK in flash.
As shown in Figure 6, for Log Types, use the synchronous mode of increment, the file synchronization in RAMDISK in flash.
As shown in Figure 7, for Configuration Type, the file synchronization in RAMDISK, in flash, being comprised:
71, calculate renewal crc value or the MD5 value of the file in RAMDISK by CRC algorithm or MD5.
72, first will upgrade crc value or the MD5 value is synchronized to master file in flash, then the file synchronization in RAMDISK is to corresponding master file in flash.
73, first will upgrade crc value or the MD5 value is synchronized to backup file in flash, then by the file synchronization in RAMDISK to corresponding backup file in flash.
The umconfig.tx in LINUX embedded system flash of below take is example, and the file synchronization of Configuration Type is briefly described:
During the initial electrifying startup of LINUX embedded system, in flash, the MD5 value of the master file of umconfig.txt and backup file is all that 11223344, master file is legal, by the master file synchronization in RAMDISK.
When the umconfig.txt in RAMDISK is modified, calculate the MD5 value of the umconfig.txt in RAMDISK, as, the MD5 value is 55667788.The MD5 value of upgrading the master file of umconfig.txt in flash is 55667788, and the umconfig.txt in RAMDISK is updated to the master file of umconfig.txt in flash.The MD5 value of upgrading the backup file of umconfig.txt in flash is 55667788, and the umconfig.txt in RAMDISK is updated to the backup file of umconfig.txt in flash.Now, in flash, the MD5 value of the master file of umconfig.txt and backup file is all 55667788.
If the umconfig.txt in RAMDISK is updated in the master file process of umconfig.txt in flash, the unexpected power down of LINUX embedded system, the MD5 value that can cause the master file of umconfig.txt in flash is 55667788, but in flash, the content of the master file of umconfig.txt is imperfect, and in flash, the content of the backup file of umconfig.txt is complete, the MD5 value of backup file is still 11223344.
So, the LINUX embedded system re-powers while starting, the master file that is umconfig.txt in 55667788 judgement flash according to the MD5 value is illegal, and then the backup file that is umconfig.txt in 11223344 judgement flash according to the MD5 value is legal, thereby by the backup file synchronization of umconfig.txt in flash in RAMDISK, and by the backup file synchronization of umconfig.txt in flash the master file to umconfig.txt in flash.
One of ordinary skill in the art will appreciate that all or part of flow process realized in above-described embodiment method, to come the hardware that instruction is relevant to complete by computer program, described program can be stored in a computer read/write memory medium, this program, when carrying out, can comprise the flow process as the embodiment of above-mentioned each side method.Wherein, described storage medium can be magnetic disc, CD, read-only store-memory body (Read-Only Memory, ROM) or random store-memory body (Random Access Memory, RAMDISK) etc.

Claims (8)

1. a file synchronisation method, is characterized in that, comprising:
File synchronization in flash memory flash in the LINUX embedded system, in random store-memory body disk RAMDISK, and is carried out to inotify registration or dnotify registration to the file in described RAMDISK;
The file that the application program of LINUX embedded system is registered in the RAMDISK after rear or described dnotify registers described inotify is operated, after described inotify registration or the file in the described RAMDISK after described dnotify registration while changing, by the file synchronization in the described RAMDISK changed in described flash;
The file that the application program of described LINUX embedded system is registered in the RAMDISK after rear or described dnotify registers described inotify is operated, and comprising:
The file that described inotify is registered after rear or described dnotify registers carries out read operation, or write operation, or move operation, or deletion action;
The described file that described inotify registers after rear or described dnotify registration changes, and comprising:
After described inotify registration or the described file after described dnotify registration be modified, or be moved or deleted.
2. method according to claim 1, is characterized in that, described method also comprises:
By the Divide File in described flash, be Log Types file and Configuration Type file, the frequency that described Log Types file is modified is greater than the frequency that described Configuration Type file is modified, described Log Types file is for log, and described Configuration Type file loads the setting of required environment for application program;
For described Configuration Type file, the file in flash is backed up, obtain corresponding master file and backup file.
3. method according to claim 2, is characterized in that, for described Configuration Type file, described by the file synchronization in flash in RAMDISK, comprising:
Legitimacy according to master file in the cyclic redundancy check (CRC) value of master file in described flash or the described flash of md5-challenge MD5 value judgement, when described master file is legal, is synchronized in RAMDISK by described master file and is synchronized in described backup file;
When described master file is illegal, legitimacy according to backup file in the crc value of backup file in described flash or the described flash of MD5 value judgement, when described backup file is legal, is synchronized in RAMDISK by described backup file and is synchronized in described master file;
Wherein, described crc value or MD5 value comprise initial crc value or MD5 value, or upgrade crc value or MD5 value.
4. method according to claim 3, is characterized in that, for described Configuration Type file, described by the file synchronization in the described RAMDISK changed in described flash, comprising:
According to CRC algorithm or MD5, calculate renewal crc value or the MD5 value of the file in the described RAMDISK changed;
First described renewal crc value or MD5 value are synchronized to master file in described flash, then by the file synchronization in the described described RAMDISK changed to master file corresponding in described flash;
First described renewal crc value or MD5 value are synchronized to backup file in described flash, then by the file synchronization in the described described RAMDISK changed to backup file corresponding in described flash.
5. a file synchronization device, is characterized in that, comprising:
The first lock unit, for the file synchronization by LINUX embedded system flash memory flash in random store-memory body disk RAMDISK;
Registering unit, carry out inotify registration or dnotify registration for the file to described RAMDISK;
The second lock unit, the file of described inotify being registered to the RAMDISK after rear or described dnotify registers for the application program of LINUX embedded system is operated, after described inotify registration or the file in the described RAMDISK after described dnotify registration while changing, by the file synchronization in the described RAMDISK changed in described flash;
File after described the second lock unit is registered specifically for or described dnotify rear to described inotify registration carries out read operation, perhaps write operation, perhaps move operation, perhaps deletion action, the described file that described inotify registers after rear or described dnotify registration is modified, perhaps be moved or when deleted, by the file synchronization in the described RAMDISK changed in described flash.
6. device according to claim 5, is characterized in that, described device also comprises:
Division unit, being used for is Log Types file and Configuration Type file by the Divide File of described flash, the frequency that described Log Types file is modified is greater than the frequency that described Configuration Type file is modified, described Log Types file is for log, and described Configuration Type file loads the setting of required environment for application program;
Backup units, for for described Configuration Type file, backed up the file in flash, obtains corresponding master file and backup file.
7. device according to claim 6, is characterized in that, for described Configuration Type file, and described the second lock unit, specifically for:
Legitimacy according to master file in the cyclic redundancy check (CRC) value of master file in described flash or the described flash of md5-challenge MD5 value judgement, when described master file is legal, is synchronized in RAMDISK by described master file and is synchronized in described backup file;
When described master file is illegal, legitimacy according to backup file in the described crc value of backup file in described flash or the described flash of MD5 value judgement, when described backup file is legal, is synchronized in RAMDISK by described backup file and is synchronized in described master file;
Wherein, described crc value or MD5 value comprise initial crc value or MD5 value, or upgrade crc value or MD5 value.
8. device according to claim 7, is characterized in that, for described Configuration Type file, and described the first lock unit, specifically for:
According to CRC algorithm or MD5, calculate renewal crc value or the MD5 value of the file in the described RAMDISK changed;
First described renewal crc value or MD5 value are synchronized to master file in described flash, then by the file synchronization in the described described RAMDISK changed to master file corresponding in described flash;
First described renewal crc value or MD5 value are synchronized to backup file in described flash, then by the file synchronization in the described described RAMDISK changed to backup file corresponding in described flash.
CN2011103868296A 2011-11-29 2011-11-29 File synchronization method, device and system Expired - Fee Related CN102521289B (en)

Priority Applications (2)

Application Number Priority Date Filing Date Title
CN2011103868296A CN102521289B (en) 2011-11-29 2011-11-29 File synchronization method, device and system
PCT/CN2012/078911 WO2013078870A1 (en) 2011-11-29 2012-07-20 File synchronization method, device and system

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN2011103868296A CN102521289B (en) 2011-11-29 2011-11-29 File synchronization method, device and system

Publications (2)

Publication Number Publication Date
CN102521289A CN102521289A (en) 2012-06-27
CN102521289B true CN102521289B (en) 2013-12-04

Family

ID=46292210

Family Applications (1)

Application Number Title Priority Date Filing Date
CN2011103868296A Expired - Fee Related CN102521289B (en) 2011-11-29 2011-11-29 File synchronization method, device and system

Country Status (2)

Country Link
CN (1) CN102521289B (en)
WO (1) WO2013078870A1 (en)

Families Citing this family (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102521289B (en) * 2011-11-29 2013-12-04 华为技术有限公司 File synchronization method, device and system
CN103384266B (en) * 2013-06-07 2016-12-28 曙光信息产业(北京)有限公司 A kind of Parastor200 based on file-level real-time synchronization manages node high availability method
CN103561102B (en) * 2013-11-08 2017-03-22 北京奇虎科技有限公司 Data real-time synchronization method and system
CN103699846B (en) * 2013-12-25 2017-06-27 浪潮(北京)电子信息产业有限公司 Method and device for intercepting changed files in LINUX system
EP3186706A4 (en) * 2014-08-27 2018-05-09 Hewlett-Packard Development Company, L.P. Portable storage device
WO2017113316A1 (en) * 2015-12-31 2017-07-06 深圳配天智能技术研究院有限公司 System processing method and numerical control system
CN106933695B (en) * 2017-02-28 2020-06-16 武汉斗鱼网络科技有限公司 A SWF file verification method and system
CN108762986A (en) * 2018-05-24 2018-11-06 四川斐讯信息技术有限公司 A kind of method and system for preventing abnormal power-down from leading to configuration loss
US11574055B2 (en) 2018-09-27 2023-02-07 Landis+Gyr Innovations, Inc. Validation and installation of a file system

Family Cites Families (12)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US6847983B2 (en) * 2001-02-28 2005-01-25 Kiran Somalwar Application independent write monitoring method for fast backup and synchronization of open files
KR100389867B1 (en) * 2001-06-04 2003-07-04 삼성전자주식회사 Flash memory management method
CN1186728C (en) * 2001-07-03 2005-01-26 联想(北京)有限公司 Method for managing flash memory files
KR20040048713A (en) * 2002-12-04 2004-06-10 엘지전자 주식회사 Output Synchronization Method For Configuration Information Among The Network Element Manager
US20060184719A1 (en) * 2005-02-16 2006-08-17 Sinclair Alan W Direct data file storage implementation techniques in flash memories
KR100642045B1 (en) * 2005-08-09 2006-11-10 (주)씨앤에스 테크놀로지 System and method for downloading multimedia programs from a host processor to a multimedia processor
CN100454258C (en) * 2007-01-09 2009-01-21 京信通信技术(广州)有限公司 Integrative method for updating load program and application program in embedded type system
CN100449549C (en) * 2007-09-30 2009-01-07 浙江大学 Method for establishing file system on NAND Flash memory in embedded system
EP2270693A1 (en) * 2008-04-11 2011-01-05 Microelectronica Española, S.A.U. Method for accessing a storage system with multiple file systems
CN201698426U (en) * 2010-07-29 2011-01-05 郑州新开普电子股份有限公司 File system management module based on FRAM and Flash
CN102073561A (en) * 2011-01-26 2011-05-25 浪潮电子信息产业股份有限公司 Method for correcting error of write operation of solid state hard disk
CN102521289B (en) * 2011-11-29 2013-12-04 华为技术有限公司 File synchronization method, device and system

Also Published As

Publication number Publication date
WO2013078870A1 (en) 2013-06-06
CN102521289A (en) 2012-06-27

Similar Documents

Publication Publication Date Title
CN102521289B (en) File synchronization method, device and system
US8539471B2 (en) Updating firmware of an electronic device
US9870288B2 (en) Container-based processing method, apparatus, and system
CN106155915B (en) Data storage processing method and device
CN102722394B (en) Start upgrading method of embedded equipment
CN106020865A (en) System upgrading method and device
TW201102924A (en) Embedded electronic device and method for updating firmware thereof
WO2014161339A1 (en) Firmware upgrade method and device
US8589647B2 (en) Apparatus and method for synchronizing a snapshot image
WO2011095074A1 (en) Method for upgrading terminal device system and terminal device
CN109086078A (en) Android system upgrade method, device, server and mobile terminal
US20240378042A1 (en) Operating System Update Method, Electronic Device, and Storage Medium
CN105138430A (en) Embedded operating system backup and restoration method and device
CN102880478A (en) Software updating method
CN105550071A (en) System file upgrading and detecting method and communication device
CN109375953B (en) Operating system starting method and device
CN106484312B (en) A kind of virtual machine disk data migration method and device
US10007529B2 (en) Data terminal running mode switching method, device, and data terminal
CN113312071A (en) SSD device firmware upgrading method and related device
WO2017173924A1 (en) Method and device for switching between file systems
CN102184115B (en) Method for updating system software and terminal device
CN115437674B (en) Firmware upgrading method, device, medium and electronic equipment
CN113467698A (en) Writing method and device based on file system, computer equipment and storage medium
WO2023198056A1 (en) Firmware update method for embedded device, and embedded device
CN107291505A (en) A kind of method and device of controller system memory upgrading

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
C14 Grant of patent or utility model
GR01 Patent grant
TR01 Transfer of patent right
TR01 Transfer of patent right

Effective date of registration: 20170607

Address after: 510640 Guangdong City, Tianhe District Province, No. five, road, public education building, unit 371-1, unit 2401

Patentee after: Guangdong Gaohang Intellectual Property Operation Co., Ltd.

Address before: 518129 Bantian HUAWEI headquarters office building, Longgang District, Guangdong, Shenzhen

Patentee before: Huawei Technologies Co., Ltd.

CB03 Change of inventor or designer information
CB03 Change of inventor or designer information

Inventor after: Li Fei

Inventor before: Zhang Jinyi

Inventor before: Zhang Yu

TR01 Transfer of patent right
TR01 Transfer of patent right

Effective date of registration: 20171010

Address after: 061000, 2, 4 unit 301, Huabei oil first refinery District, Renqiu, Cangzhou, Hebei

Patentee after: Li Fei

Address before: 510640 Guangdong City, Tianhe District Province, No. five, road, public education building, unit 371-1, unit 2401

Patentee before: Guangdong Gaohang Intellectual Property Operation Co., Ltd.

CP02 Change in the address of a patent holder
CP02 Change in the address of a patent holder

Address after: 541002 No. two, No. 5, West Road, Xiangshan District, Guilin, the Guangxi Zhuang Autonomous Region

Patentee after: Li Fei

Address before: 061000, 2, 4 unit 301, Huabei oil first refinery District, Renqiu, Cangzhou, Hebei

Patentee before: Li Fei

CF01 Termination of patent right due to non-payment of annual fee
CF01 Termination of patent right due to non-payment of annual fee

Granted publication date: 20131204

Termination date: 20171129