[go: up one dir, main page]

CN102193846B - Method for backing up and recovering non-volatile (NV) data - Google Patents

Method for backing up and recovering non-volatile (NV) data Download PDF

Info

Publication number
CN102193846B
CN102193846B CN201110157472A CN201110157472A CN102193846B CN 102193846 B CN102193846 B CN 102193846B CN 201110157472 A CN201110157472 A CN 201110157472A CN 201110157472 A CN201110157472 A CN 201110157472A CN 102193846 B CN102193846 B CN 102193846B
Authority
CN
China
Prior art keywords
data
backup
nonvolatile data
nonvolatile
mobile internet
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.)
Active
Application number
CN201110157472A
Other languages
Chinese (zh)
Other versions
CN102193846A (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.)
Xiamen Ruiqi Iot Technology Co ltd
Original Assignee
REACH TECH (XIAMEN) 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 REACH TECH (XIAMEN) Co Ltd filed Critical REACH TECH (XIAMEN) Co Ltd
Priority to CN201110157472A priority Critical patent/CN102193846B/en
Publication of CN102193846A publication Critical patent/CN102193846A/en
Application granted granted Critical
Publication of CN102193846B publication Critical patent/CN102193846B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Landscapes

  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)
  • Techniques For Improving Reliability Of Storages (AREA)

Abstract

The invention discloses a method for backing up and recovering non-volatile (NV) data. The method comprises the following steps of: when a mobile Internet terminal receives a backup command, reading an NV table in a backup subarea, reading NV data stored in a system file system by using an application program interface of a system, filling the NV data into an NV data structure and writing the filled data into the backup subarea; and setting a recovery mark when the system detects the incompleteness of the NV data and reading the NV table from the backup subarea of the mobile Internet terminal, obtaining the quantity of the NV data needing to be recovered and the start position of the NV data from the NV table, reading the NV data in the NV table from a first item of the NV data and recovering the NV data from the an NV backup file into the system by using the application program interface of the system when the system detects the recovery mark. By adopting the method, operation can be performed without connecting a USB (Universal Serial Bus) with a computer, the requirement for professional knowledge on an end user is not high, and correct data items relevant to system configuration can be obtained for the system under any condition.

Description

A kind of backup of Nonvolatile data and restoration methods
Technical field
The present invention relates to communication technical field, relate in particular to the backup and the restoration methods of the Nonvolatile data of mobile Internet terminal.
Background technology
Nonvolatile data is the data item relevant with system configuration of storing on the mobile Internet terminal, and these data item are stored on non-volatile storage medium usually, does not allow to lose.When the mobile Internet terminal opening initialization, system can read out these data item from this storage medium, and system is carried out proper configuration, for example address of the calibration data of RF, Bluetooth and WLAN etc.Because these data item are extremely important; For the assurance system under any circumstance can both obtain correct Nonvolatile data; We need pack them in some way to store and back up; When system carries out firmware (Firmware) upgrading or destroyed, can from backed up data, recover automatically.
Present backup to the important Nonvolatile data of mobile Internet terminal need be connected computer through USB with the recovery majority and carry out; Not only need terminal device manufacturer to provide the backup tool of PC end and USB to drive, and final user's professional knowledge is had relatively high expectations.When the Nonvolatile data of needs backup increased, the backup tool of the PC end of having issued can not be discerned these new Backup Datas automatically.
Summary of the invention
The object of the present invention is to provide a kind of backup and restoration methods of Nonvolatile data; Need not connect computer through USB operates; Professional knowledge to the final user is less demanding, and the assurance system under any circumstance can both obtain the correct data item relevant with system configuration.
The backup of a kind of Nonvolatile data of the present invention and restoration methods mainly comprise the steps:
At first; The Nonvolatile data of packing mainly is divided into NV Table and NV Data two parts; Be stored in the backup subregion of mobile Internet terminal; Wherein all NV labels of record in the NV Table write down concrete data item in the NV Data, and this NV Table has been stored in when mobile Internet terminal is produced in the backup subregion; This Nonvolatile data is side by side to store according to the specified order of the NV_Num array of NV Table, when the Nonvolatile data of needs backup increases, adds new NV label list in the back of NV Table;
The backup flow process of described Nonvolatile data is: after mobile Internet terminal receives the NV backup instruction; At first read the NV Table in the backup subregion; Obtain being stored in NV label list and the NV total number that needs backup in the NV_Num array; Utilize the application programming interfaces of system from the NV_Num array, to take out the NV label one by one,, read the NV data that are stored in the system file system as the parameter of these application programming interfaces; Be filled in the NV DATA data structure, and populated data are write in the backup subregion;
The recovery flow process of described Nonvolatile data is: when the Nonvolatile data that will carry out firmware upgrade or system when mobile Internet terminal is destroyed; System can detect this Nonvolatile data when starting imperfect and recovering mark is set; After system detects this recovering mark; Earlier from the backup subregion of mobile Internet terminal, read NV Table; NV number that acquisition need to recover from NV Table and the reference position of NV Data begin to read the Nonvolatile data the NV Data from first of NV Data, and utilize the application programming interfaces of system that this Nonvolatile data is returned to the system from the NV backup file.
Because the backup of Nonvolatile data of the present invention is just carried out when terminal device is produced; Do not need the final user to participate in; Backed up data also is sightless to the final user, and recovery routine is automatically operation, does not also need the final user to participate in; So whole process all is foolproof to the final user, do not require that the final user possesses any professional knowledge.When the Nonvolatile data of needs backup increases; Only need after new NV label list is added in the back of NV Table, restart stand-by program, this stand-by program is when operation; Can read new NV tabulation automatically, the Nonvolatile data that increases is carried out backup operation.
Description of drawings
Fig. 1 is the schematic flow sheet of data backup among the present invention;
The schematic flow sheet that Fig. 2 recovers for data among the present invention;
Fig. 3 is the tabulation of the NV of system label among the present invention;
Fig. 4 is the data structure diagram of NV DATA among the present invention.
Below in conjunction with accompanying drawing and specific embodiment the present invention is made further detailed description.
Embodiment
The backup of a kind of Nonvolatile data of the present invention and restoration methods mainly comprise as follows:
At first; The Nonvolatile data of packing mainly is divided into two parts: NV Table and NV Data, be stored in the backup subregion of mobile Internet terminal, and this backup subregion is a hidden partition; For the final user is sightless; What wherein write down in the NV Table is all NV labels, and what write down in the NV Data is concrete data item, and this NV Table has been stored in when mobile Internet terminal is produced in the backup subregion.
Wherein the data structure definition of NV Table is following:
typedef struct tagNVTable{
uint32 Signature1; //?Signature?number?1
uint32 Signature2; //?Signature?number?2
uint32 TotalNumbers; //?How?many?items
uint16 NV_Num[1]; //?NV?number?list
}NV_TABLE,?*pNV_TABLE;
Data structure definition by NV Table can find out that NV Table has a head, is used to identify the beginning of an effective NV Table, and TotalNumbers representes the number of NV, and then the tabulation of the NV of a system label is as shown in Figure 3.
Described NV Data data structure definition is following:
Typedef __packed struct _tagNVItem{
uint32 ArrayNumber; //?Sequence?number?of?array
uint8 Data[1];
}NV_Item,?*pNV_Item;
Typedef __packed struct tagNVData{
uint16 NV_Num; //?Which?NV?item
uint32 ArraySize; //?How?many?arrays?dose?this?NV?have
uint32 ItemSize; //?Size?of?each?array?of?this?NV
NV_Item NV_Items[1]; //?NV?data
}NV_DATA,?*pNV_DATA;
This Nonvolatile data is side by side stored; The order of storage is according to the specified order of the NV_Num array of NV Table; When the Nonvolatile data of needs backup increases, after new NV label list is added in the back of NV Table, restart stand-by program.
Data structure by NV Data can be found out; Each NV Data is made up of quite a few groups of data; Can know that by the ArraySize indication size of every group of data is identical; What can know NV Data storage by ItemSize indication is the real data of this Nonvolatile data, and its size is ItemSize, and is as shown in Figure 4.
As shown in Figure 1, the backup flow process of described Nonvolatile data is:
After mobile Internet terminal receives the NV backup instruction; At first read the NV Table in the backup subregion; Obtain being stored in NV label list and the NV total number that needs backup in the NV_Num array. utilize the application programming interfaces (API) of system to take out the NV label one by one,, read the NV data that are stored in the system file system as the parameter of this API from the NV_Num array; Be filled in the NV DATA data structure, and populated data are write in the backup subregion.
As shown in Figure 2, the recovery flow process of described Nonvolatile data is:
When the Nonvolatile data that will carry out firmware upgrade or system when mobile Internet terminal is destroyed; System can detect this Nonvolatile data when starting imperfect and recovering mark is set; After system detects this recovering mark; Earlier from the backup subregion of mobile Internet terminal, read NV Table; NV number that acquisition need to recover from NV Table and the reference position of NV Data begin to read the Nonvolatile data the NV Data from first of NV Data, and utilize the application programming interfaces of system that this Nonvolatile data is returned to the system from the NV backup file.
Because the present invention operates in the system of mobile Internet terminal, all steps are all directly moved on terminal device, and the order of backup can connect computer through USB sends, and also can directly send through the program on the terminal device.When terminal device starts, can detect the integrality of Nonvolatile data,, the recovering mark of Nonvolatile data is set then, start recovery routine if imperfect.Because the backup of Nonvolatile data is just carried out when terminal device is produced; Do not need the final user to participate in; Backed up data also is sightless to the final user, and recovery routine is automatically operation, does not also need the final user to participate in; So whole process all is foolproof to the final user, do not require that the final user possesses any professional knowledge.When the Nonvolatile data of needs backup increases; Only need after new NV label list is added in the back of NV Table, restart stand-by program, this stand-by program is when operation; Can read new NV tabulation automatically, the Nonvolatile data that increases is carried out backup operation.
The above; It only is preferred embodiment of the present invention; Be not that technical scope of the present invention is done any restriction, so every foundation technical spirit of the present invention all still belongs in the scope of technical scheme of the present invention any trickle modification, equivalent variations and modification that above embodiment did.

Claims (1)

1. the backup of a Nonvolatile data and restoration methods is characterized in that mainly comprising the steps:
At first; The Nonvolatile data of packing mainly is divided into NV Table and NV Data two parts; Be stored in the backup subregion of mobile Internet terminal; Wherein all NV labels of record in the NV Table write down concrete data item in the NV Data, and this NV Table has been stored in when mobile Internet terminal is produced in the backup subregion; This Nonvolatile data is side by side to store according to the specified order of the NV_Num array of NV Table, when the Nonvolatile data of needs backup increases, adds new NV label list in the back of NV Table;
The backup flow process of described Nonvolatile data is: after mobile Internet terminal receives backup instruction; At first read the NV Table in the backup subregion; Obtain being stored in NV label list and the Nonvolatile data total number that needs backup in the NV_Num array; Utilize the application programming interfaces of system from the NV_Num array, to take out the NV label one by one,, read the Nonvolatile data that is stored in the system file system as the parameter of these application programming interfaces; Be filled in the NV DATA data structure, and populated data are write in the backup subregion;
The recovery flow process of described Nonvolatile data is: when the Nonvolatile data that will carry out firmware upgrade or system when mobile Internet terminal is destroyed; System can detect this Nonvolatile data when starting imperfect and recovering mark is set; After system detects this recovering mark; Earlier from the backup subregion of mobile Internet terminal, read NV Table; The number of the Nonvolatile data that acquisition need recover from NV Table and the reference position of NV Data; First from NV Data begins to read the Nonvolatile data the NV Data, and utilizes the application programming interfaces of system that this Nonvolatile data is returned to the system from the NV backup file.
CN201110157472A 2011-06-13 2011-06-13 Method for backing up and recovering non-volatile (NV) data Active CN102193846B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201110157472A CN102193846B (en) 2011-06-13 2011-06-13 Method for backing up and recovering non-volatile (NV) data

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201110157472A CN102193846B (en) 2011-06-13 2011-06-13 Method for backing up and recovering non-volatile (NV) data

Publications (2)

Publication Number Publication Date
CN102193846A CN102193846A (en) 2011-09-21
CN102193846B true CN102193846B (en) 2012-10-24

Family

ID=44601949

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201110157472A Active CN102193846B (en) 2011-06-13 2011-06-13 Method for backing up and recovering non-volatile (NV) data

Country Status (1)

Country Link
CN (1) CN102193846B (en)

Families Citing this family (10)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US10817421B2 (en) 2010-12-13 2020-10-27 Sandisk Technologies Llc Persistent data structures
US10817502B2 (en) 2010-12-13 2020-10-27 Sandisk Technologies Llc Persistent memory management
CN103186387B (en) * 2011-12-27 2016-07-13 宏碁股份有限公司 Electronic device and method for updating its operating system
CN103077100B (en) * 2013-01-31 2016-03-02 广东欧珀移动通信有限公司 Fro backing-up non-volatile data and restoration methods
KR20160048814A (en) * 2013-08-09 2016-05-04 샌디스크 테크놀로지스, 인코포레이티드 Persistent data structures
CN104281502A (en) * 2014-09-22 2015-01-14 宇龙计算机通信科技(深圳)有限公司 Nonvolatile-parameter recovery and/or update method and system based on communication terminal
CN104598335A (en) * 2015-01-16 2015-05-06 深圳市中兴物联科技有限公司 Method and device for restoring backup of NV parameters
CN105550066A (en) * 2015-12-10 2016-05-04 希姆通信息技术(上海)有限公司 File system breakdown solution method and system
CN105743698A (en) * 2016-01-27 2016-07-06 宇龙计算机通信科技(深圳)有限公司 Parameter processing method and terminal
CN110209529A (en) * 2019-04-29 2019-09-06 深圳市有方科技股份有限公司 The guard method of radio frequency parameter and electronic equipment

Family Cites Families (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
MY122279A (en) * 1999-03-03 2006-04-29 Sony Corp Nonvolatile memory and nonvolatile memory reproducing apparatus
US6801994B2 (en) * 2000-12-20 2004-10-05 Microsoft Corporation Software management systems and methods for automotive computing devices
US7174420B2 (en) * 2002-10-22 2007-02-06 Microsoft Corporation Transaction-safe FAT file system
CN101719959B (en) * 2009-12-14 2013-03-20 中兴通讯股份有限公司 Method and device for automatically backing up and recovering key files of mobile terminal

Also Published As

Publication number Publication date
CN102193846A (en) 2011-09-21

Similar Documents

Publication Publication Date Title
CN102193846B (en) Method for backing up and recovering non-volatile (NV) data
CN102541676B (en) Method for detecting and mapping states of NAND FLASH
US8549237B2 (en) Method and apparatus for use in data transfer
CN104216796A (en) Data backup and recovery method and electronic device
TWI489466B (en) Memory erasing method, memory controller and memory storage apparatus
CN103280238A (en) EMMC controller based on FPGA, and working method of eMMC controller
CN101794110B (en) Machine recognition method and device between imaging device and imaging box
CN102625281A (en) Wireless communication module and upgrade method thereof
CN105183388A (en) Obtaining method, device and system for hardware physics serial number
CN105607972A (en) Abnormity remedying method and device
CN109614118A (en) A kind of SPI Flash firmware burning method and device
US20090198930A1 (en) Information backup system for handheld devices
CN112199166B (en) Business emergency takeover and drilling system and method thereof
CN103246527A (en) Mobile terminal operating system updating method and system and computer
US10108537B2 (en) Mechanisms for reproducing storage system metadata inconsistencies in a test environment
CN104034492A (en) Water pressure testing curve and parameter processing method
CN107220153A (en) A kind of calculator memory switching card test method and device based on UEFI
CN107632913B (en) Storage equipment and interface testing method based on domestic operating system
CN102411522A (en) Method and system for backing up data of mobile terminal
EP1942503B1 (en) Memory device with control chip having compatible configure function and manufacturing method thereof
CN104156175A (en) Virtual disk size smooth expansion method
CN107168650B (en) Method and device for processing data in memory of BIOS
CN102955755A (en) Data card and method for repairing abnormal communication between data card and main unit
CN103702112A (en) Register debugging method and device based on factory menu
CN105376481B (en) The driving device of driving method for video camera and photographic device

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
C53 Correction of patent of invention or patent application
CB03 Change of inventor or designer information

Inventor after: Xiao Le

Inventor after: Lu Xiao

Inventor after: Wu Junhua

Inventor before: Xiao Le

Inventor before: Lu Xiao

Inventor before: Guan Junhua

COR Change of bibliographic data

Free format text: CORRECT: INVENTOR; FROM: XIAO LE LU XIAO GUAN JUNHUA TO: XIAO LE LU XIAO WU JUNHUA

C14 Grant of patent or utility model
GR01 Patent grant
CP01 Change in the name or title of a patent holder

Address after: View of the road Xiamen city Fujian province 361009 Software Park No. 18 unit 303

Patentee after: Xiamen Ruiqi IOT Technology Co.,Ltd.

Address before: View of the road Xiamen city Fujian province 361009 Software Park No. 18 unit 303

Patentee before: REACH TECH (XIAMEN) Co.,Ltd.

CP01 Change in the name or title of a patent holder
PE01 Entry into force of the registration of the contract for pledge of patent right

Denomination of invention: A method of non-volatile data backup and recovery

Effective date of registration: 20210610

Granted publication date: 20121024

Pledgee: Xiamen Torch Group Financing Guarantee Co.,Ltd.

Pledgor: Xiamen Ruiqi IOT Technology Co.,Ltd.

Registration number: Y2021980004622

PE01 Entry into force of the registration of the contract for pledge of patent right
PC01 Cancellation of the registration of the contract for pledge of patent right

Date of cancellation: 20230717

Granted publication date: 20121024

Pledgee: Xiamen Torch Group Financing Guarantee Co.,Ltd.

Pledgor: Xiamen Ruiqi IOT Technology Co.,Ltd.

Registration number: Y2021980004622

PC01 Cancellation of the registration of the contract for pledge of patent right