CN104866431B - A kind of data processing method and device - Google Patents

A kind of data processing method and device Download PDF

Info

Publication number
CN104866431B
CN104866431B CN201510323413.8A CN201510323413A CN104866431B CN 104866431 B CN104866431 B CN 104866431B CN 201510323413 A CN201510323413 A CN 201510323413A CN 104866431 B CN104866431 B CN 104866431B
Authority
CN
China
Prior art keywords
partition table
partition
information
operating system
type
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
CN201510323413.8A
Other languages
Chinese (zh)
Other versions
CN104866431A (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.)
Lenovo Beijing Ltd
Original Assignee
Lenovo Beijing 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 Lenovo Beijing Ltd filed Critical Lenovo Beijing Ltd
Priority to CN201510323413.8A priority Critical patent/CN104866431B/en
Publication of CN104866431A publication Critical patent/CN104866431A/en
Application granted granted Critical
Publication of CN104866431B publication Critical patent/CN104866431B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Landscapes

  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)

Abstract

A kind of data processing method of present invention offer and device can determine the type of operating system after the system information for obtaining the operating system that electronic equipment enables based on system information;When it is the first kind to determine the type of operating system, the corresponding partition table of the first kind is chosen from the first partition table and the second partition table, and based on identified partition table, data are read from the storage device of electronic equipment.I.e. for electronic equipment, it distributes corresponding partition table for different types of operating system, electronic equipment is in switching operating system in this way, itself corresponding partition table can be still based on and read data, the loss of data caused by operating system switches is reduced, storage device is reformatted particularly without based on operating system.

Description

A kind of data processing method and device
Technical field
The present invention relates to data partition technical field, more particularly to a kind of data processing method and device.
Background technology
The information for multiple subregions that some big data table that partition table is used in recording disk is divided so that electronics The storage device of equipment such as hard disk can read and write data based on partition table.Current partition table includes MBR (Master Boot Record, master boot record) partition table and GPT (GUID Partition Table, globally unique identifier's partition table)
Wherein MBR partition tables are stored in 64 bytes in first sector of hard disk, and each subregion item occupies 16 A byte is stored with each partition number (which subregion expression is), the initial position of each subregion and knot in this 16 bytes The information such as beam position, zoned format.Due to only having 64 bytes to be used for partition table in first sector, so MBR partition tables can To record the information of 4 subregions.And GPT then allows each hard disk to have up to 128 subregions.
Although having MBR partition tables and GPT to carry out each subregion in recording disk at present, each partition table corresponds to a kind of The operating system of type, in electronic equipment after Win10 operating systems are changed to Win7 operating systems, hard disk is also required to overall It formats, original GPT is changed to MBR partition tables.
Invention content
In view of this, the present invention provides a kind of data processing method and device so that electronic equipment can be stored with it is same Two partition tables of a storage device, in this way when starting some operating system can based on the corresponding partition table of operating system come Hard disk is read, storage device is reformatted without being based on operating system.Technical solution is as follows:
In a first aspect, the present invention provides a kind of data processing method, the method includes:
Obtain the system information for the operating system that electronic equipment enables;
Based on the system information, the type of the operating system is determined;
When it is the first kind to determine the type of the operating system, institute is chosen from the first partition table and the second partition table The corresponding partition table of the first kind is stated, wherein first partition table and second partition table are corresponding different types of operation The partition table of system;
Based on identified partition table, data are read from the storage device of the electronic equipment.
Preferably, the method further includes:First partition table and second partition table are built in advance.
Preferably, described to build first partition table and second partition table in advance, including:
Based on the storage information of each subregion in the storage device, first partition table is built;
Based on the standard of the second partition table, one content of structure is the second partition table of sky;
Determine the partition information of first partition table;
The partition information of first partition table is written in the second partition table that content is empty, obtains second subregion Table.
Preferably, the partition information of the determination first partition table includes:Based on the standard of first partition table, Each byte in first partition table is parsed one by one, obtains the partition information.
Preferably, described to build first partition table and second partition table in advance, including:
Based on the storage information of each subregion in the storage device, first partition table is built;
Based on the storage information of each subregion in the storage device, second partition table is built.
Second aspect, the present invention also provides a kind of data processing equipment, described device includes:
Acquiring unit, the system information of the operating system for obtaining electronic equipment enabling;
Determination unit determines the type of the operating system for being based on the system information;
Selection unit, for when determine the operating system type be the first kind when, from the first partition table and second The corresponding partition table of the first kind is chosen in partition table, wherein first partition table and second partition table are to correspond to The partition table of different types of operating system;
Reading unit, for based on identified partition table, data to be read from the storage device of the electronic equipment.
Preferably, described device further includes:Construction unit, for building first partition table and second point described in advance Area's table.
Preferably, the construction unit includes:
First structure subelement, is used for the storage information based on each subregion in the storage device, structure described first Partition table;
Second structure subelement, is used for the standard based on the second partition table, and one content of structure is the second partition table of sky;
Determination subelement, the partition information for determining first partition table;
Subelement is filled in, for the partition information of the first partition table to be written in the second partition table that content is empty, is obtained To second partition table.
Preferably, the determination subelement is used for:Based on the standard of first partition table, in first partition table Each byte parsed one by one, obtain the partition information.
Preferably, the construction unit is used for:Based on the storage information of each subregion in the storage device, described in structure First partition table, and for the storage information based on each subregion in the storage device, build second partition table.
The third aspect, the present invention also provides a kind of data processing method, the method includes:
Obtain the system information for the operating system that electronic equipment enables;
Based on the system information, the type of the operating system is determined;
When it is the first kind to determine the type of the operating system, the first partition table is converted into the second partition table, and First partition table is backed up, wherein first partition table corresponds to the operating system of Second Type, second partition table pair Answer the operating system of the first kind;
Based on second partition table, data are read from the storage device of the electronic equipment.
Preferably, described when it is the first kind to determine the type of the operating system, first partition table is converted At the second partition table, including:
Based on the standard of the second partition table, one content of structure is the second partition table of sky;
Obtain the first partition information of first partition table;
Based on the standard of second partition table, first partition information is converted, obtains meeting described second Second partition information of the standard of partition table;
Second partition information is written in the second partition table that content is empty, obtains second partition table.
Fourth aspect, the present invention also provides a kind of data processing equipment, described device includes:
Information acquisition unit, the system information of the operating system for obtaining electronic equipment enabling;
Type determining units determine the type of the operating system for being based on the system information;
Converting unit, for when it is the first kind to determine the type of the operating system, the first partition table to be converted into Second partition table, wherein first partition table corresponds to the operating system of Second Type, second partition table corresponds to the first kind The operating system of type;
Backup units, for when first partition table is converted into the second partition table, backing up first partition table;
Data-reading unit reads number for being based on second partition table from the storage device of the electronic equipment According to.
Preferably, the converting unit includes:
Partition table builds subelement, is used for the standard based on the second partition table, and one content of structure is the second partition table of sky;
Obtain subelement, the first partition information for obtaining first partition table;
Conversion subunit is used for the standard based on second partition table, converts, obtain to first partition information To the second partition information of the standard for meeting second partition table;
Subelement is written in information, for second partition information to be written in the second partition table that content is empty, obtains To second partition table.
Compared with prior art, above-mentioned technical proposal provided by the invention has the following advantages that:
Above-mentioned technical proposal provided by the invention can after the system information for obtaining the operating system that electronic equipment enables To determine the type of operating system based on system information;When it is the first kind to determine the type of operating system, from the first subregion The corresponding partition table of the first kind is chosen in table and the second partition table, and based on identified partition table, from depositing for electronic equipment Data are read in storage device.I.e. for electronic equipment, corresponding partition table is distributed for different types of operating system, this Sample electronic equipment can still be based on itself corresponding partition table and read data, reduce because of operating system in switching operating system Loss of data caused by switching reformats storage device particularly without based on operating system.
Description of the drawings
To describe the technical solutions in the embodiments of the present invention more clearly, make required in being described below to embodiment Attached drawing is briefly described, it should be apparent that, drawings in the following description are only some embodiments of the invention, for For those of ordinary skill in the art, without having to pay creative labor, it can also be obtained according to these attached drawings His attached drawing.
Fig. 1 is a kind of a kind of flow chart of data processing method provided in an embodiment of the present invention;
Fig. 2 is a kind of another flow chart of data processing method provided in an embodiment of the present invention;
Fig. 3 is the flow that the first partition table and the second partition table are built in data processing method provided in an embodiment of the present invention Figure;
Fig. 4 is a kind of a kind of structural schematic diagram of data processing equipment provided in an embodiment of the present invention;
Fig. 5 is a kind of another structural schematic diagram of data processing equipment provided in an embodiment of the present invention;
Fig. 6 is the structural schematic diagram of construction unit in data processing equipment provided in an embodiment of the present invention;
Fig. 7 is the flow chart of another data processing method provided in an embodiment of the present invention;
Fig. 8 is the structural schematic diagram of another data processing equipment provided in an embodiment of the present invention.
Specific implementation mode
In order to make those skilled in the art more fully understand the embodiment of the present invention, below in conjunction in the embodiment of the present invention Attached drawing, technical scheme in the embodiment of the invention is clearly and completely described, it is clear that described embodiment is only A part of the embodiment of the present invention, instead of all the embodiments.Based on the embodiments of the present invention, those of ordinary skill in the art The every other embodiment obtained without making creative work, shall fall within the protection scope of the present invention.
Referring to Fig. 1, it illustrates a kind of flow charts of data processing method provided in an embodiment of the present invention, for solving The problem of needing to be formatted storage device after operating system change in the prior art.At data wherein shown in FIG. 1 Reason method may comprise steps of:
101:Obtain the system information for the operating system that electronic equipment enables.
102:Based on system information, the type of operating system is determined.
It can be understood that:System information is used to indicate the type of operating system, therefore can be determined based on system information The type of operating system.Such as system information includes at least:System version number and supplier information, wherein system version number are used for Indicating operating system is which version of which type operation system, supplier information is used to indicate the provider of operating system, The type of operating system can be determined based on the two information.Such as system version number is Windows XP 2007, and supplier When information is Microsoft, it may be determined that the type of operating system is Windows operating system.
103:When it is the first kind to determine the type of operating system, the is chosen from the first partition table and the second partition table The corresponding partition table of one type.
In embodiments of the present invention, the first partition table and the second partition table are while being stored in two points in electronic equipment Area's table, and the two partition tables correspond to different types of operating system, e.g., the first partition table corresponds to the operation system of the first kind System, the second partition table correspond to the operating system of Second Type, and the wherein first kind and Second Type refers to the difference of operating system Type, such as the first kind can be Windows types, and Second Type can be Linux types, in this way when determining operating system Type after, can the type based on operating system choose corresponding partition table from the first partition table and the second partition table.
Such as when it is the first kind to determine the type of operating system, the partition table corresponding to the first kind is the first subregion Table then can select the corresponding partition table of the first kind, i.e., based on the first kind from the first partition table and the second partition table First partition table.
104:Based on identified partition table, data are read from the storage device of electronic equipment.Divide determined by wherein Area's table records the information for the multiple subregions for having some corresponding big data table of the storage device of electronic equipment to be divided, That is the data information of each sector storage of storage device can be known by partition table, therefore electronic equipment can be based on Partition table reads data from storage device.
From above-mentioned technical proposal it is found that data processing method provided in an embodiment of the present invention is obtaining what electronic equipment enabled After the system information of operating system, the type of operating system can be determined based on system information;When the type for determining operating system For the first kind when, choose the corresponding partition table of the first kind from the first partition table and the second partition table, and based on determining Partition table, read data from the storage device of electronic equipment.It is different types of operation i.e. for electronic equipment System distributes corresponding partition table, and such electronic equipment can still be based on itself corresponding partition table in switching operating system Data are read, the loss of data caused by operating system switches is reduced, are deposited particularly without based on operating system reformatting Storage device.
Referring to Fig. 2, it illustrates another flow charts of data processing method provided in an embodiment of the present invention, in Fig. 1 On the basis of can also include the following steps:
100:The first partition table of structure and the second partition table in advance, so as to which two subregions can be existed simultaneously in electronic equipment Table, after such Subsequent electronic equipment enables some operating system, can based on the type of operating system come from the first partition table and Partition table corresponding with the type of operating system is chosen in second partition table.
Above-mentioned first partition table and the second partition table are the partition table designed using various criterion, and such as the first partition table is MBR partition tables, the second partition table are GPT partition tables, and the storage device that the two partition tables are used to record electronic equipment is corresponding The information of multiple subregions that is divided of some big data table, that is to say, that storage device can be known by partition table The data information of each sector storage, therefore electronic equipment can read data based on partition table from storage device.
In embodiments of the present invention, building the first partition table and a kind of feasible pattern of the second partition table is:Based on storage The storage information of each subregion in device builds the first partition table, and the storage information based on each subregion in storage device, Build the second partition table.
By taking hard disk as an example, each sector is used to store the data in some database in hard disk, then each sector stores The information of which subregion is certain in database, i.e., its storage information is certain, therefore the storage information based on each sector can To build the first partition table and the second partition table, so that the first partition table and the second partition table carry out each subregion in database of record Partition information.
The partition information of wherein each subregion includes:The initial position of sector and end position, zoned format, the sector Initial position and end position be used to indicate subregion terminates since which sector to which sector, zoned format then be used for refer to Show that the data type stored in sector, the partition information in this way based on each subregion can read data from corresponding sector.
In embodiments of the present invention, building the first partition table and another feasible pattern of the second partition table is:In electronics Some partition table is built when equipment is initial, another partition table is being built subsequently based on constructed partition table, such as Fig. 3 institutes Show, may comprise steps of:
1001:Based on the storage information of each subregion in storage device, the first partition table is built.
1002:Based on the standard of the second partition table, one content of structure is the second partition table of sky.Wherein the second partition table Standard refers to the requirement to the second partition table in the world, such as the requirement etc. to its format and inner parameter.Corresponding so-called structure Building the second partition table that a content is sky is:One frame of structure meets the second partition table of international requirement, and constructed second Without actual information in partition table.
1003:The partition information of the first partition table is determined, wherein determining that the process of the partition information of the first partition table can be with It is:Based on the standard of the first partition table, each byte in the first partition table is parsed one by one, obtains partition information.Institute The standard for stating the first partition table refers to the requirement to the first partition table in the world, such as the requirement to its format and inner parameter Deng, therefore parsed one by one by each byte in first partition table of standard pair and can be obtained by partition information.
1004:Partition information is written in the second partition table that content is empty, obtains the second partition table.In write-in second Before partition table, need to convert partition information according to the standard of the second partition table, then transformed partition information is added To the corresponding position of the second partition table.
For each method embodiment above-mentioned, for simple description, therefore it is all expressed as a series of combination of actions, but Be those skilled in the art should understand that, the present invention is not limited by the described action sequence because according to the present invention, certain A little steps can be performed in other orders or simultaneously.Secondly, it those skilled in the art should also know that, is retouched in specification The embodiment stated belongs to preferred embodiment, and involved action and module are not necessarily essential to the invention.
Corresponding with above method embodiment, the embodiment of the present invention also provides a kind of data processing equipment, structural representation Figure is as shown in figure 4, may include:Acquiring unit 11, determination unit 12, selection unit 13 and reading unit 14.
Acquiring unit 11, the system information of the operating system for obtaining electronic equipment enabling.
Determination unit 12 determines the type of operating system for being based on system information.
It can be understood that:System information is used to indicate the type of operating system, therefore can be determined based on system information The type of operating system.Such as system information includes at least:System version number and supplier information, wherein system version number are used for Indicating operating system is which version of which type operation system, supplier information is used to indicate the provider of operating system, The type of operating system can be determined based on the two information.Such as system version number is Windows XP 2007, and supplier When information is Microsoft, it may be determined that the type of operating system is Windows operating system.
Selection unit 13, for when determine operating system type be the first kind when, from the first partition table and second point The corresponding partition table of the first kind is chosen in area's table.
In embodiments of the present invention, the first partition table and the second partition table are while being stored in two points in electronic equipment Area's table, and the two partition tables correspond to different types of operating system, e.g., the first partition table corresponds to the operation system of the first kind System, the second partition table correspond to the operating system of Second Type, and the wherein first kind and Second Type refers to the difference of operating system Type, such as the first kind can be Windows types, and Second Type can be Linux types, in this way when determining operating system Type after, selection unit 13 can the type based on operating system chosen from the first partition table and the second partition table it is corresponding Partition table.
Such as when it is the first kind to determine the type of operating system, the partition table corresponding to the first kind is the first subregion Table, it is corresponding that selection unit 13 then can select the first kind based on the first kind from the first partition table and the second partition table Partition table, i.e. the first partition table.
Reading unit 14, for based on identified partition table, data to be read from the storage device of electronic equipment.Wherein Identified partition table records have some corresponding big data table of the storage device of electronic equipment to be divided multiple points The information in area, that is to say, that can know the data information of each sector storage of storage device by partition table, therefore read Unit 14 can read data based on partition table from storage device.
From above-mentioned technical proposal it is found that data processing equipment provided in an embodiment of the present invention is obtaining what electronic equipment enabled After the system information of operating system, the type of operating system can be determined based on system information;When the type for determining operating system For the first kind when, choose the corresponding partition table of the first kind from the first partition table and the second partition table, and based on determining Partition table, read data from the storage device of electronic equipment.It is different types of operation i.e. for electronic equipment System distributes corresponding partition table, and such electronic equipment can still be based on itself corresponding partition table in switching operating system Data are read, the loss of data caused by operating system switches is reduced, are deposited particularly without based on operating system reformatting Storage device.
Referring to Fig. 5, it illustrates another structural schematic diagram of data processing equipment provided in an embodiment of the present invention, Can also include construction unit 10, for building the first partition table and the second partition table in advance, so that electronics is set on the basis of Fig. 4 Two partition tables can be existed simultaneously in standby, after such Subsequent electronic equipment enables some operating system, operation system can be based on The type of system is chosen partition table corresponding with the type of operating system from the first partition table and the second partition table.
Above-mentioned first partition table and the second partition table are the partition table designed using various criterion, and such as the first partition table is MBR partition tables, the second partition table are GPT partition tables, and the storage device that the two partition tables are used to record electronic equipment is corresponding The information of multiple subregions that is divided of some big data table, that is to say, that storage device can be known by partition table The data information of each sector storage, therefore electronic equipment can read data based on partition table from storage device.
In embodiments of the present invention, building the first partition table and a kind of feasible pattern of the second partition table is:Based on storage The storage information of each subregion in device builds the first partition table, and the storage information based on each subregion in storage device, Build the second partition table.
By taking hard disk as an example, each sector is used to store the data in some database in hard disk, then each sector stores The information of which subregion is certain in database, i.e., its storage information is certain, therefore the storage information based on each sector can To build the first partition table and the second partition table, so that the first partition table and the second partition table carry out each subregion in database of record Partition information.
The partition information of wherein each subregion includes:The initial position of sector and end position, zoned format, the sector Initial position and end position be used to indicate subregion terminates since which sector to which sector, zoned format then be used for refer to Show that the data type stored in sector, the partition information in this way based on each subregion can read data from corresponding sector.
In embodiments of the present invention, building the first partition table and another feasible pattern of the second partition table is:In electronics Some partition table is built when equipment is initial, is building another partition table subsequently based on constructed partition table, as shown in Figure 6 The structural schematic diagram of construction unit 10, including:First structure subelement 101, second builds subelement 102, determination subelement 103 With fill in subelement 104.
First structure subelement 101, is used for the storage information based on each subregion in storage device, builds the first subregion Table.
Second structure subelement 102, is used for the standard based on the second partition table, and one content of structure is the second subregion of sky Table.The standard of wherein the second partition table refers to the requirement to the second partition table in the world, such as to its format and inner parameter It is required that etc..One content of corresponding so-called structure is the second empty partition table:One frame of structure meets the second of international requirement Partition table, without actual information in the second constructed partition table.
Determination subelement 103, the partition information for determining the first partition table.Wherein determine the subregion letter of the first partition table The process of breath can be:Based on the standard of the first partition table, each byte in the first partition table is parsed one by one, is obtained Partition information.The standard of first partition table refers to the requirement to the first partition table in the world, such as to its format and inside The requirement etc. of parameter, therefore parsed one by one by each byte in first partition table of standard pair and can be obtained by subregion letter Breath.
Subelement 104 is filled in, for the partition information of the first partition table to be written in the second partition table that content is empty, Obtain the second partition table.Before the second partition table is written, need to convert partition information according to the standard of the second partition table, Transformed partition information is added to the corresponding position of the second partition table again.
Referring to Fig. 7, it illustrates the flow chart of another data processing method provided in an embodiment of the present invention, can wrap Include following steps:
201:Obtain the system information for the operating system that electronic equipment enables.
202:Based on system information, the type of operating system is determined.
It can be understood that:System information is used to indicate the type of operating system, therefore can be determined based on system information The type of operating system.Such as system information includes at least:System version number and supplier information, wherein system version number are used for Indicating operating system is which version of which type operation system, supplier information is used to indicate the provider of operating system, The type of operating system can be determined based on the two information.Such as system version number is Windows XP 2007, and supplier When information is Microsoft, it may be determined that the type of operating system is Windows operating system.
203:When it is the first kind to determine the type of operating system, the first partition table is converted into the second partition table, and The first partition table is backed up, wherein the first partition table corresponds to the operating system of Second Type, the second partition table corresponds to the first kind Operating system.When the first partition table is converted into the second partition table, the first partition table can also be backed up, be to make electricity Sub- equipment has there are two partition table simultaneously, and each partition table corresponds to different operating system, and such electronic equipment is grasped in switching When making system, it can still be based on itself corresponding partition table and read data, reduce the loss of data caused by operating system switches.
The process that first partition table is converted into the second partition table in embodiments of the present invention is:First, it is based on second point The standard of area's table, one content of structure are the second partition table of sky;Secondly, the first partition information of the first partition table, and base are obtained In the standard of the second partition table, the first partition information is converted, obtains the second subregion for meeting the standard of the second partition table Information;Finally, the second partition information is written in the second partition table that content is empty, obtains the second partition table.
The standard of wherein the second partition table refers to the requirement to the second partition table in the world, such as to its format and internal ginseng Several requirements etc..One content of corresponding so-called structure is the second empty partition table:One frame of structure meets international requirement Second partition table, without actual information in the second constructed partition table.
First partition information of the first partition table includes:The initial position of sector and end position, zoned format, the fan The initial position in area and end position are used to indicate subregion terminates since which sector to which sector, and zoned format is then used for It indicates the data type stored in sector, the second partition table is mainly based upon when being converted the first partition information to these The requirement of information is converted, and the second partition information for meeting the standard of the second partition table is obtained, and then again believes the second subregion After breath is written to the second partition table that content is empty, then the second partition table is obtained.
204:Based on the second partition table, data are read from the storage device of electronic equipment.Since the first partition table corresponds to The operating system of Second Type, the second partition table correspond to the operating system of the first kind, and such electronic equipment is different in enabling When operating system, data can be read based on the corresponding partition table of different operating system.
From above-mentioned technical proposal it is found that data processing method provided in an embodiment of the present invention is obtaining what electronic equipment enabled After the system information of operating system, the type of operating system can be determined based on system information;When the type for determining operating system For the first kind when, the first partition table is converted into the second partition table, and back up the first partition table, so that electronic equipment is same When tool there are two partition table, and each partition table corresponds to different operating system, such electronic equipment in switching operating system, Itself corresponding partition table can be still based on and read data, reduce the loss of data caused by operating system switches, especially without It need to be based on operating system and reformat storage device.
Corresponding with data processing method shown in Fig. 7, the embodiment of the present invention also provides a kind of data processing equipment, structure Schematic diagram is as shown in figure 8, may include:Information acquisition unit 21, type determining units 22, converting unit 23, backup units 24 With data-reading unit 25.
Information acquisition unit 21, the system information of the operating system for obtaining electronic equipment enabling.
Type determining units 22 determine the type of operating system for being based on system information.
Converting unit 23, for when it is the first kind to determine the type of operating system, the first partition table to be converted into the Two partition tables, wherein the first partition table corresponds to the operating system of Second Type, the second partition table corresponds to the operation system of the first kind System.
Backup units 24, it is electric in this way for when the first partition table is converted into the second partition table, backing up the first partition table Sub- equipment can have simultaneously there are two partition table, and each partition table corresponds to different operating system, and such electronic equipment is being cut When changing operating system, it can still be based on itself corresponding partition table and read data, reduce the data caused by operating system switches It loses.
Data-reading unit 25 reads data for being based on the second partition table from the storage device of electronic equipment.
In embodiments of the present invention, converting unit 23 includes:Partition table builds subelement, obtains subelement, conversion son list Subelement is written in member and information.
Partition table builds subelement, is used for the standard based on the second partition table, and one content of structure is the second partition table of sky. The standard of wherein the second partition table refers to the requirement to the second partition table in the world, such as the requirement to its format and inner parameter Deng.One content of corresponding so-called structure is the second empty partition table:One frame of structure meets the second subregion of international requirement Table, without actual information in the second constructed partition table.
Subelement is obtained, the first partition information for obtaining the first partition table.
Conversion subunit is used for the standard based on the second partition table, is converted to the first partition information, obtains meeting the Second partition information of the standard of two partition tables.
Wherein the first partition information includes:The initial position of sector and end position, zoned format, the starting of the sector Position and end position are used to indicate subregion terminates since which sector to which sector, and zoned format is then used to indicate sector The data type of interior storage is mainly based upon the second partition table when being converted the first partition information and is wanted to these information It asks and is converted, obtain the second partition information for meeting the standard of the second partition table
Subelement is written in information, for the second partition information to be written in the second partition table that content is empty, obtains the Two partition tables.
It should be noted that each embodiment in this specification is described in a progressive manner, each embodiment weight Point explanation is all difference from other examples, and the same or similar parts between the embodiments can be referred to each other. For device class embodiment, since it is basically similar to the method embodiment, so fairly simple, the related place ginseng of description See the part explanation of embodiment of the method.Herein, relational terms such as first and second and the like be used merely to by One entity or operation are distinguished with another entity or operation, without necessarily requiring or implying these entities or operation Between there are any actual relationship or orders.Moreover, the terms "include", "comprise" or its any other variant meaning Covering non-exclusive inclusion, so that the process, method, article or equipment including a series of elements includes not only that A little elements, but also include other elements that are not explicitly listed, or further include for this process, method, article or The intrinsic element of equipment.In the absence of more restrictions, the element limited by sentence "including a ...", is not arranged Except there is also other identical elements in the process, method, article or apparatus that includes the element.
A kind of data processing method provided by the present invention and device are described in detail above, it is used herein Principle and implementation of the present invention are described for specific case, and the explanation of above example is only intended to help to understand this The method and its core concept of invention;Meanwhile for those of ordinary skill in the art, according to the thought of the present invention, specific There will be changes in embodiment and application range, in conclusion the content of the present specification should not be construed as to the present invention's Limitation.

Claims (14)

1. a kind of data processing method, which is characterized in that the method includes:
Obtain the system information for the operating system that electronic equipment enables;
Based on the system information, the type of the operating system is determined;
When it is the first kind to determine the type of the operating system, described the is chosen from the first partition table and the second partition table The corresponding partition table of one type, wherein first partition table and second partition table are corresponding different types of operating system Partition table;First partition table and second partition table are the partition table designed using various criterion, for recording State the information for multiple subregions that the corresponding big data table of storage device of electronic equipment is divided;
Based on identified partition table, data are read from the storage device of the electronic equipment.
2. according to the method described in claim 1, it is characterized in that, the method further includes:First subregion is built in advance Table and second partition table.
3. according to the method described in claim 2, it is characterized in that, described build first partition table and described second in advance Partition table, including:
Based on the storage information of each subregion in the storage device, first partition table is built;
Based on the standard of the second partition table, one content of structure is the second partition table of sky;
Determine the partition information of first partition table;
The partition information of first partition table is converted according to the standard of the second partition table, transformed partition information is added Into the second partition table, second partition table is obtained.
4. according to the method described in claim 3, it is characterized in that, the partition information packet of the determination first partition table It includes:Based on the standard of first partition table, each byte in first partition table is parsed one by one, is obtained described Partition information.
5. according to the method described in claim 2, it is characterized in that, described build first partition table and described second in advance Partition table, including:
Based on the storage information of each subregion in the storage device, first partition table is built;
Based on the storage information of each subregion in the storage device, second partition table is built.
6. a kind of data processing equipment, which is characterized in that described device includes:
Acquiring unit, the system information of the operating system for obtaining electronic equipment enabling;
Determination unit determines the type of the operating system for being based on the system information;
Selection unit, for when determine the operating system type be the first kind when, from the first partition table and the second subregion The corresponding partition table of the first kind is chosen in table, wherein first partition table and second partition table are corresponding different The partition table of the operating system of type;First partition table and second partition table are the subregion designed using various criterion Table, the information for multiple subregions that the corresponding big data table of storage device for recording the electronic equipment is divided;
Reading unit, for based on identified partition table, data to be read from the storage device of the electronic equipment.
7. device according to claim 6, which is characterized in that described device further includes:Construction unit, for building in advance First partition table and second partition table.
8. device according to claim 7, which is characterized in that the construction unit includes:
First structure subelement, is used for the storage information based on each subregion in the storage device, builds first subregion Table;
Second structure subelement, is used for the standard based on the second partition table, and one content of structure is the second partition table of sky;
Determination subelement, the partition information for determining first partition table;
Subelement is filled in, for the partition information of the first partition table to be written in the second partition table that content is empty, obtains institute State the second partition table.
9. device according to claim 8, which is characterized in that the determination subelement is used for:Based on first subregion The standard of table parses each byte in first partition table, obtains the partition information one by one.
10. device according to claim 7, which is characterized in that the construction unit is used for:Based in the storage device The storage information of each subregion, build first partition table, and for being deposited based on each subregion in the storage device Information is stored up, second partition table is built.
11. a kind of data processing method, which is characterized in that the method includes:
Obtain the system information for the operating system that electronic equipment enables;
Based on the system information, the type of the operating system is determined;
When it is the first kind to determine the type of the operating system, the first partition table is converted into the second partition table, and back up First partition table, wherein first partition table corresponds to the operating system of Second Type, second partition table corresponds to the The operating system of one type;First partition table and second partition table are the partition table designed using various criterion, are used In the information for multiple subregions that the corresponding big data table of storage device for recording the electronic equipment is divided;
Based on second partition table, data are read from the storage device of the electronic equipment.
12. according to the method for claim 11, which is characterized in that described when the type for determining the operating system is first When type, first partition table is converted into the second partition table, including:
Based on the standard of the second partition table, one content of structure is the second partition table of sky;
Obtain the first partition information of first partition table;
Based on the standard of second partition table, first partition information is converted, obtains meeting second subregion Second partition information of the standard of table;
Second partition information is written in the second partition table that content is empty, obtains second partition table.
13. a kind of data processing equipment, which is characterized in that described device includes:
Information acquisition unit, the system information of the operating system for obtaining electronic equipment enabling;
Type determining units determine the type of the operating system for being based on the system information;
Converting unit, for when it is the first kind to determine the type of the operating system, the first partition table to be converted into second Partition table, wherein first partition table corresponds to the operating system of Second Type, second partition table corresponds to the first kind Operating system;First partition table and second partition table are the partition table designed using various criterion, for recording State the information for multiple subregions that the corresponding big data table of storage device of electronic equipment is divided;
Backup units, for when first partition table is converted into the second partition table, backing up first partition table;
Data-reading unit reads data for being based on second partition table from the storage device of the electronic equipment.
14. device according to claim 13, which is characterized in that the converting unit includes:
Partition table builds subelement, is used for the standard based on the second partition table, and one content of structure is the second partition table of sky;
Obtain subelement, the first partition information for obtaining first partition table;
Conversion subunit is used for the standard based on second partition table, converts, accorded with to first partition information Close the second partition information of the standard of second partition table;
Subelement is written in information, for second partition information to be written in the second partition table that content is empty, obtains institute State the second partition table.
CN201510323413.8A 2015-06-12 2015-06-12 A kind of data processing method and device Active CN104866431B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201510323413.8A CN104866431B (en) 2015-06-12 2015-06-12 A kind of data processing method and device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201510323413.8A CN104866431B (en) 2015-06-12 2015-06-12 A kind of data processing method and device

Publications (2)

Publication Number Publication Date
CN104866431A CN104866431A (en) 2015-08-26
CN104866431B true CN104866431B (en) 2018-08-31

Family

ID=53912276

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201510323413.8A Active CN104866431B (en) 2015-06-12 2015-06-12 A kind of data processing method and device

Country Status (1)

Country Link
CN (1) CN104866431B (en)

Families Citing this family (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105701162B (en) * 2015-12-30 2020-03-31 青岛海信移动通信技术股份有限公司 Management method for user data partition of intelligent terminal and intelligent terminal
CN105786569B (en) * 2016-02-26 2019-07-26 联想(北京)有限公司 A kind of information processing method and electronic equipment
CN107368389B (en) * 2017-06-26 2020-11-06 合肥美的智能科技有限公司 Control method and control device for one-key recovery function of operating system and EMMC

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
TWI317093B (en) * 2005-05-27 2009-11-11 Hon Hai Prec Ind Co Ltd Method and system for controlling of loading multi operation systems in multi clients from a remote console
CN101957769A (en) * 2010-09-27 2011-01-26 浙江大学 MID (Mobile Internet Device) multiple operating system parallelizing method
CN103853664A (en) * 2012-11-28 2014-06-11 联想(北京)有限公司 Method and electronic device for achieving multiple operating systems
CN103870762A (en) * 2012-12-18 2014-06-18 联想(北京)有限公司 Partition accessing method and electronic equipment

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US7437546B2 (en) * 2005-08-03 2008-10-14 Intel Corporation Multiple, cooperating operating systems (OS) platform system and method

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
TWI317093B (en) * 2005-05-27 2009-11-11 Hon Hai Prec Ind Co Ltd Method and system for controlling of loading multi operation systems in multi clients from a remote console
CN101957769A (en) * 2010-09-27 2011-01-26 浙江大学 MID (Mobile Internet Device) multiple operating system parallelizing method
CN103853664A (en) * 2012-11-28 2014-06-11 联想(北京)有限公司 Method and electronic device for achieving multiple operating systems
CN103870762A (en) * 2012-12-18 2014-06-18 联想(北京)有限公司 Partition accessing method and electronic equipment

Also Published As

Publication number Publication date
CN104866431A (en) 2015-08-26

Similar Documents

Publication Publication Date Title
CN107391744B (en) Data storage method, data reading method, data storage device, data reading device and equipment
CN107766575B (en) Read-write separation database access method and device
CN108345485B (en) Identification method and device for interface view
US8099421B2 (en) File system, and method for storing and searching for file by the same
CN104731896B (en) A kind of data processing method and system
US20070204089A1 (en) Multi-protocol removable storage device
CN104866431B (en) A kind of data processing method and device
CN111209344A (en) Data synchronization method and device
CN102523129A (en) Universal avionics bus test analysis method and device
CN107315659B (en) Metadata redundancy backup method and device
CN101853254A (en) Method and device for mounting file or catalogue to local or remote host
CN113946547B (en) Method and device for ferrying network disk file, network disk and storage medium
CN101311896A (en) Computer system possessing multipurpose desktop
CN103257987A (en) Rule-based distributed log service implementation method
CN106210026B (en) The control method and system of distributed file system multi-client catalogue quota precision
CN106156044B (en) Database switching method and device
CN112073241B (en) Switch configuration method and device, electronic equipment and storage medium
CN109101644A (en) A kind of sound state journal file scanning collecting method
CN105260266A (en) Snapshot volume writing method and dependent snapshot system
CN107148612A (en) A kind of method and apparatus of extending user subregion
CN109542727B (en) Information prompting method and device
CN116049153B (en) Database data processing method and device, electronic equipment and storage medium
CN103714179A (en) Multi-language supporting method and system for system blog
CN110489442A (en) A kind of data query method and system
CN110221778A (en) Processing method, system, storage medium and the electronic equipment of hotel's data

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
EXSB Decision made by sipo to initiate substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant