Summary of the invention
In view of this, the embodiment of the invention provides a kind of method of data processing and terminal device, to solve existing skill
In art when storing data, storing process is cumbersome, and the data in storing process when power down restore difficult problem.
The first aspect of the embodiment of the present invention provides a kind of method of data processing, comprising:
Obtain the first property parameters of record to be written;
According to the storage classification in first property parameters, determines and described to be written record sector to be written;
Update the head attribute information of the sector;
According to first property parameters and the head attribute information of the updated sector, be written in the sector
The record to be written.
In one embodiment, the corresponding one group of data of a record, the record include: data attribute mark, data content
The corresponding effective verifying mark of mark, data attribute mark and invalid authentication mark;
The head of the sector stores the head attribute information and customized information of the sector data;
The head attribute information includes: storage class number mark, storage mark and record length indicator.
In one embodiment, before first property parameters for obtaining record to be written, further includes: obtain definition
Sector configuration information;
The head attribute information of m-th of sector to be searched is obtained, the m is more than or equal to 1;
When described m-th sector to be searched head attribute information and n-th of sector to be configured head attribute information not
When matching, the sector configuration information of the definition is written to each mark of the head attribute information of described n-th sector to be configured
Corresponding memory space, the n are more than or equal to 1.
In one embodiment, the head attribute information updated and save the sector, comprising:
The storage overturn in the head attribute information of the sector identifies corresponding content;
The head attribute information of the sector is updated according to first property parameters, saves the updated sector
Head attribute information.
In one embodiment, described to be believed according to first property parameters and the head attribute of the updated sector
The record to be written is written in the sector in breath, comprising:
According to the corresponding content of record length indicator in the updated head attribute information, the sector has been calculated
Storage record total number;
The writing position obtained in first property parameters identifies corresponding data;
When the corresponding data of said write station location marker are greater than the record total number, remember in described sector the last item
It records corresponding address to the section between the corresponding address of said write station location marker and the first data is written;And
The record to be written is written in the corresponding address of said write station location marker.
In one embodiment, described to be believed according to first property parameters and the head attribute of the updated sector
The record to be written is written in the sector in breath, further includes:
When the corresponding data of said write station location marker are less than the record total number, said write station location marker is wiped
Corresponding address to the corresponding address section of the record total number record, and in the corresponding address of said write station location marker
The second data are written to the corresponding address section of the record total number;And
The record to be written is written in the corresponding address of said write station location marker;
Alternatively, when the corresponding data of said write station location marker are equal to the record total number, in said write position
It identifies and the record to be written is written in corresponding address.
The second aspect of the embodiment of the present invention provides a kind of method of reading data, comprising:
Obtain the second property parameters of record to be read;
According to the storage classification in second property parameters, obtain and the storage classification phase in second property parameters
First generic sector;
Obtain the head attribute information of first sector;
According to the head attribute information of first sector, first sector record total number is calculated;
Corresponding content and first fan are identified according to the record number to be read in second property parameters
Area records total number, obtains the address of the record to be read;
According to the address of the record to be read, the record to be read is read.
The third aspect of the embodiment of the present invention provides a kind of device of data processing, comprising:
First obtains module, for obtaining the first property parameters of record to be written;
Determining module described records fan to be written for determining according to the storage classification in first property parameters
Area;
Processing module, for updating and saving the head attribute information of the sector;
Writing module, for the head attribute information according to first property parameters and the sector, in the fan
The record is written in area.
The fourth aspect of the embodiment of the present invention provides a kind of device of reading data, comprising:
Second obtains module, for obtaining the second property parameters of record to be read;
Described second obtains module, is also used to according to the storage classification in second property parameters, obtains and described the
First sector of the storage classification the same category in two property parameters;
Described second obtains module, is also used to obtain the head attribute information of first sector;
Computing module calculates first sector record for the head attribute information according to first sector
Total number;
Described second obtains module, is also used to be corresponded to according to the record number to be read mark in second property parameters
Content and first sector record total number, obtain the address of the record to be read;
Read module reads the record to be read for the address according to the record to be read.
5th aspect of the embodiment of the present invention provides a kind of terminal device, including memory, processor and is stored in
In the memory and the computer program that can run on the processor, when the processor executes the computer program
The step of the step of realizing any one of such as claim 1 to 6 the method and claim 7 the method.
Existing beneficial effect is the embodiment of the present invention compared with prior art: the embodiment of the present invention is to be written by obtaining
First property parameters of record;According to the storage classification in the first property parameters, determines and to be written record sector to be written;More
The head attribute information of new sector;According to the first property parameters and the head attribute information of updated sector, in the fan
The record to be written is written in area.By the data structure of setting record, so that the treatment process of record is without additional
Recording indexes unit, easy to operate, multi storage data store the works such as asynchronous when effectively solving power down in storing process
The possible data of condition restore problem.
Specific embodiment
In being described below, for illustration and not for limitation, the tool of such as particular system structure, technology etc is proposed
Body details, to understand thoroughly the embodiment of the present invention.However, it will be clear to one skilled in the art that there is no these specific
The present invention also may be implemented in the other embodiments of details.In other situations, it omits to well-known system, device, electricity
The detailed description of road and method, in case unnecessary details interferes description of the invention.
In order to illustrate technical solutions according to the invention, the following is a description of specific embodiments.
The embodiment of the present invention provides a kind of method of data processing, as shown in Figure 1, method includes the following steps:
Step 101, the first property parameters of record to be written are obtained.
The corresponding one group of data of the record, shown in following table:
Content |
ValidFlag |
UserData |
CRC16_1 |
CRC16_2 |
Length |
2 |
N |
2 |
2 |
ValidFlag indicates data attribute mark, accounts for the memory space of 2 characters;
UserData indicates data content mark, accounts for the memory space of N number of character;
CRC16_1 indicates the corresponding effective verifying mark of data attribute mark, accounts for the memory space of 2 characters;
CRC16_2 indicates that data attribute mark is corresponding and invalid authentication identifies, and accounts for the memory space of 2 characters.
Optionally, when record is written for the first time, labeled as effectively, ValidFlag=1, CRC16_1 are all bytes in front
Check code, CRC16_2 be sky;
When by recording failureization, which is taken out, it is that this records all bytes that ValidFlag, which is set to 0, CRC16_2,
Check code re-writes.
" record " described in all embodiments of the invention be it is above-mentioned shown in unified format, difference record is only length
Difference.
The head of the sector stores the head attribute information and customized information of the sector data;
The head attribute information includes: storage class number mark, storage mark and record length indicator.
Step 102, it according to the storage classification in first property parameters, determines and described to be written records fan to be written
Area.
Step 103, the head attribute information of the sector is updated.
Optionally, the storage overturn in the head attribute information of the sector identifies corresponding content;
The head attribute information of the sector is updated according to first property parameters, saves the updated sector
Head attribute information.
Step 104, according to first property parameters and the head attribute information of the updated sector, described
The record to be written is written in sector.
Optionally, according to the corresponding content of record length indicator in the updated head attribute information, institute is calculated
It states sector and has stored record total number;
The writing position obtained in first property parameters identifies corresponding data;
When the corresponding data of said write station location marker are greater than the record total number, remember in described sector the last item
It records corresponding address to the section between the corresponding address of said write station location marker and the first data is written, and in said write
The record to be written is written in the corresponding address of station location marker.
When the corresponding data of said write station location marker are less than the record total number, said write station location marker is wiped
Corresponding address to the corresponding address section of the record total number record, and in the corresponding address of said write station location marker
The second data are written to the corresponding address section of the record total number;And
The record to be written is written in the corresponding address of said write station location marker;
Alternatively, when the corresponding data of said write station location marker are equal to the record total number, in said write position
It identifies and the record to be written is written in corresponding address.
The embodiment of the present invention further includes initializing to sector before step 101, specifically includes: matching the sector for obtaining definition
Confidence breath;
The head attribute information of m-th of sector to be searched is obtained, the m is more than or equal to 0;
When the head attribute information of described m-th sector to be searched and the sector configuration information of the definition mismatch,
It deposits the head attribute information of described m-th sector to be searched is written in the sector configuration information of the definition each mark is corresponding
Store up space.
The method of above-mentioned data processing, by the first property parameters for obtaining record to be written;According to first attribute
Storage classification in parameter determines and described records sector to be written;Update the head attribute information of the sector;According to described
The record to be written is written in the sector in first property parameters and the head attribute information of the updated sector.
By the data structure of setting record, so that the treatment process of record is without additional recording indexes unit, it is easy to operate,
Multi storage data store the possible data recovery of operating conditions such as asynchronous and ask when effectively solving power down in storing process
Topic.
The embodiment of the present invention provides the method for another data processing, this method specifically include sector initialization process,
Data flow is written in sector.Two processes are described in detail separately below, as shown in Fig. 2, sector initialization process includes following step
It is rapid:
Step 201, the sector configuration information of definition is obtained.
Optionally, it is necessary first to define the sector configuration information of this classification record.This programme it is each can write record fan
The head in area opens a piece of land location, for storing the head attribute information and customized information of sector data.
As shown in figure 3, the head attribute information includes: Method, Type, SectorNum, CurrentSecNo.,
StoreFlag、Overwrite、RecordLength、Reserve、CRC16。
Method is storage mode mark, accounts for the memory space of 1 byte;
Type is storage class number's mark, accounts for the memory space of 1 byte;
SectorNum is the number of sectors mark of category distribution, accounts for the memory space of 1 byte;
It CurrentSecNo. is current sector in the location of current class number-mark, the storage for accounting for 1 byte is empty
Between;
StoreFlag is storage mark, accounts for the memory space of 1 byte;
Overwrite is writeable number mark, accounts for the memory space of 1 byte, definition can at most be write 16 times;
RecordLength is record length indicator, accounts for the memory space of 2 bytes, the length of user data;
Reserve is reserved mark, accounts for the memory space of 54 bytes;
CRC16 is header information check code mark, accounts for the memory space of 2 bytes.
Head attribute information accounts for the memory space of 64 bytes altogether, and the storage that customized information can account for 64 bytes is empty
Between, the memory space that the content and each content specifically stored can occupy can be defined by user oneself, and initial value 0xFF can
Change.
Step 202, sector number to be searched and sector number to be configured are set.
Optionally, in order to search for all sectors, current sector number m=0 to be searched is set here, m is more than or equal to 0, when
Next sector is searched for and then has searched for;
In order to give all sector configuration head attribute informations that head attribute information is not configured, setting here is current to be configured
Sector label N=0, N are more than or equal to 0, after current sector configuration to be configured completes head attribute information, can continue as it is next not
The sector configuration head attribute information of configuration header attribute information.
Step 203, the head attribute information of m-th of sector to be searched is obtained.
Optionally, m=0 first searches for the 1st sector to be searched.
Step 204, judge the head attribute information of described m-th sector to be searched and the sector configuration information of the definition
Whether match.
Optionally, such as the sector configuration information of definition can be Method be 1, Type 0, according to the note of required storage
Record item number, it is assumed that 2 sectors, i.e. SectorNum=2 need to be distributed.When then initializing, the 1st sector to be searched is first searched for
(CurrentSecNo.=0) whether have existed, existing condition are as follows: in the head attribute information of sector to be searched
Method=1, Type=0, CurrentSecNo.=0.
Optionally, as shown in Fig. 2, when the head attribute information of described m-th sector to be searched and the sector of the definition
When configuration information mismatches, step 205 is executed, when head attribute information and the definition of described m-th sector to be searched
When sector configuration information matches, step 208 is executed.
Step 205, (m+1) operation is executed.
Optionally, (m+1) operation can be executed by counter here, at this time m=1.Optionally, when m-th to be searched
When the head attribute information of sector and the sector configuration information of the definition mismatch, then need to detect next sector to be searched
Head attribute information whether match with the sector configuration information of the definition, until all sector detections to be searched finish.
Step 206, judge whether m is less than sector sum to be searched.
Step 207, when m is greater than sector sum to be searched, by described m-th of sector configuration information write-in of the definition
The corresponding memory space of each mark of the head attribute information of sector to be searched.
Optionally, if all sectors to be searched of traversal mismatch, and when m is greater than sector sum to be searched, illustrate this
Sector is not opened up also, then opens up not currently used sector, and current fan to be configured is written in the sector configuration information of the definition
The corresponding memory space of each mark of the head attribute information of the sector to be searched of area i.e. m-th.
After having executed this step, step 208 is continued to execute.
When m is less than sector sum to be searched, the head attribute information of m-th of sector to be searched is obtained, that is, is continued to execute
Step 203.
Step 208, judge whether to have searched all sectors to be configured.
Optionally, when the head attribute information of m-th of sector to be searched is matched with the sector configuration information of the definition,
Then illustrate the sector initialized completion, then judge whether to have searched all sectors to be configured, when not searching whole
When sector to be configured, step 209 is executed, next sector to be searched is continued searching, continues to detect, until all to be configured
Sector detection finishes.When searching all sectors to be configured, terminate current process.
Step 209, m+1 operation is executed.
After executing the step 209, step 203 is continued to execute.
It should be noted that sector can there are many modes of storing data in this programme, as follows.
Mode one: the iterative accumulated mode of single sector.As shown in Fig. 4 (1), a sector can store n item record, and n is big
In equal to 1.When single sector is stored and recorded, only newest n-th group record is effective.
Mode two: more sector increment formula storage modes.As shown in Fig. 4 (2), m sector forms more sectors, and m is more than or equal to
1, each sector can store n item record.The storage class of the record of m sector storage is identical.Same type of record is referring to
Determining sector, increment type stores backward, and every group of record is all effective.
Mode three: more sector cover type storage modes.As shown in Fig. 4 (3), m sector forms more sectors, and m is more than or equal to
1, each sector can store n item record.The storage class of the record of m sector storage is identical.Same type of record, it is single to fan
Be written and recorded as offset using data directory in area, include two kinds of special operations: the data after the data directory must be clearly
0xFF;Current address must write 0 to data between address to be written.
As shown in figure 5, sector write-in data flow is described in detail in the embodiment of the present invention, comprising the following steps:
Step 501, the first property parameters of record to be written are obtained.
Optionally, the first property parameters include storage mode mark, store category label mark, record pointer to be written,
And respectively identify corresponding particular content.
Step 502, it according to the storage classification in first property parameters, determines and described to be written records fan to be written
Area.
Optionally, according to the storage classification in the first property parameters, the newest sector of the category is searched for, judges this newest sector
Whether full record is write;When full record has been write in this newest sector, next available sector is searched for.When this newest sector is to write for the first time
Enter, then can determine that this newest sector is to record sector to be written.
Optionally, judge whether sector is newest sector according to StoreFlag.For example, the record classification shares 3 fans
Area, under initial unwritten state, the StoreFlag in each sector header attribute information is 0xFF.Start to write the 1st sector,
StoreFlag first overturns as 0, write it is full after followed by the 2nd sector and the 3rd sector is continued, equally by the value of StoreFlag by
0xFF overturning is 0.All write it is full after, the record of the 1st sector write-in is wiped, at the same by StoreFlag overturning be 1 after write again
Enter record.Therefore, the StoreFlag in 3 sector header attribute informations need to be only judged in order, can navigate to newest fan
Area.
Step 503, the storage overturn in the head attribute information of the sector identifies corresponding content.
Step 504, the head attribute information that the sector is updated according to first property parameters saves updated institute
State the head attribute information of sector.
It should be understood that further including that storage mode mark and storage mode mark are corresponding interior in the first property parameters
Hold;Store class number, and the corresponding content of storage class number, i.e. storage classification;Data pointer mark and data refer to
Needle identifies corresponding content;Sector first address mark and sector first address identify corresponding content;Writing position number mark
Knowledge and the corresponding data of writing position number-mark.
Step 505, according to the corresponding content of record length indicator in the updated head attribute information, institute is calculated
It states sector and has stored record total number.
For example, it is 10 that sector, which has stored record total number,.
Step 506, the corresponding data of writing position number-mark in first property parameters are obtained.
Optionally, the corresponding data of writing position number-mark are a number, such as writing position number is 9.
Step 507, judge that said write Position Number identifies whether corresponding data are greater than the record total number.
Step 508, when said write Position Number, which identifies corresponding data, is greater than the record total number, in the fan
Area's the last item records corresponding address to the section between the corresponding address of said write station location marker and the first data is written.
Optionally, when the corresponding data of writing position number-mark are greater than record total number, that is, show record to be written
Address to be written is sky, can be written into current record to be written.According to the characteristic of more sector cover type storage modes, need
Current address is to being written the first data between address to be written.
Optionally, the first data can be 0.
Step 509, it is identified in corresponding address in said write Position Number and the record to be written is written.
Step 510, when said write Position Number, which identifies corresponding data, is less than the record total number, described in erasing
The corresponding address of writing position number-mark to the corresponding address section of the record total number record, and in said write position
It sets the corresponding address of mark to the corresponding address section of the record total number and the second data is written.
Optionally, when the corresponding data of writing position number-mark are less than record total number, show into station location marker pair
It has been stored with record in the address answered, therefore according to the characteristic of more sector cover type storage modes, has needed to compile writing position
Data after number corresponding address of mark must wipe, and the section after the corresponding address of writing position number-mark is write
Enter the second data, optionally, the second data can be 0xFF.Then step 509 is executed.
When said write Position Number, which identifies corresponding data, is equal to the record total number, directly in said write position
It sets and the record to be written is written in the corresponding address of number-mark, is i.e. execution step 509.
As shown in fig. 6, the present embodiment provides a kind of methods of reading data, method includes the following steps:
Step 601, the second property parameters of record to be read are obtained.
Optionally, the second property parameters include that storage mode mark and storage mode identify corresponding content;Store class
It does not number, and the corresponding content of storage class number, i.e. storage classification;Record number mark to be read and note to be read
Record the corresponding content of number-mark.
Step 602, it according to the storage classification in second property parameters, obtains and depositing in second property parameters
Store up first sector of classification the same category.
Step 603, the head attribute information of first sector is obtained.
Step 604, according to the head attribute information of first sector, the total item of first sector record is calculated
Number.
Optionally, according to the corresponding content of record length indicator in the head attribute information of the first sector, first is calculated
Total number is recorded in sector.Optionally, the content of RecordLength is obtained, i=0, TotalNumSec=0 { } are set, according to
ACurrently=AFirst address+LHead+ iRecordLength is successively read the storage region in the first sector in addition to the attribute information of head
Content, every time read RecordLength byte, then the byte of reading is verified, when verify successfully, execution i++
And TotalNumSec++ returns to TotalNumSec, it is hereby achieved that first until having read all bytes in the first sector
Total number is recorded in sector.
Step 605, corresponding content and described is identified according to the record number to be read in second property parameters
First sector record total number obtains the address of the record to be read.
Optionally, it is identified according to the record number to be read in the second property parameters, obtains corresponding record to be read
Number, such as obtaining the number of corresponding record to be read is 18.First sector record total number is 10.Then record to be read
Address is the 8th article of record of the 2nd sector.
Step 606, according to the address of the record to be read, the record to be read is read.
Optionally, after step 606, further include being verified to record to be read, when verifying successfully, return and successfully mark
Know, when verifying failure, return is unsuccessfully identified.
The embodiment of the present invention provides a kind of method of data processing, is initialized by the head attribute information to sector, so
Record can be written according to the attribute information of the record to be written of definition and the head attribute information of sector afterwards, and according to definition
The attribute information of record to be read and the head attribute information of sector read corresponding record.By all types of data in the present embodiment
It is abstracted as certain record, for different types of data, only length is different, and storing process is all made of the same scheme.Make
The data structure that user only needs definition that need to store, determines storage mode according to application scenarios, it can be achieved that various types data are deposited
The functions such as storage, reading, erasing simplify applying step, effectively solve in storing process without additional recording indexes unit
When power down, the possible data of the multi storage data storage operating conditions such as asynchronous restore problem.
It should be understood that the size of the serial number of each step is not meant that the order of the execution order in above-described embodiment, each process
Execution sequence should be determined by its function and internal logic, the implementation process without coping with the embodiment of the present invention constitutes any limit
It is fixed.
The embodiment of the present invention provides a kind of device of data processing, as shown in fig. 7, the device includes: the first acquisition module
701, determining module 702, processing module 703, writing module 704.
First obtains module 701, for obtaining the first property parameters of record to be written.
Optionally, the corresponding one group of data of the record, the record include: data attribute mark, data content mark, institute
State the corresponding effective verifying mark of data attribute mark and invalid authentication mark;
The head of the sector stores the head attribute information and customized information of the sector data;
The head attribute information includes: storage class number mark, storage mark, record length indicator.
Determining module 702, for according to the storage classification in first property parameters, determine the record to be written to
The sector of write-in.
Processing module 703, for updating the head attribute information of the sector.
Optionally, processing module 703 is used for, and the storage mark overturn in the head attribute information of the sector is corresponding interior
Hold;The head attribute information of the sector is updated according to first property parameters, saves the head of the updated sector
Attribute information.
Writing module 704, for according to first property parameters and the head attribute of updated sector letter
The record to be written is written in the sector in breath.
Optionally, writing module 704, for according to the record length indicator pair in the updated head attribute information
The content answered calculates the sector and has stored record total number;
The writing position obtained in first property parameters identifies corresponding data;
When the corresponding data of said write station location marker are greater than the record total number, remember in described sector the last item
It records corresponding address to the section between the corresponding address of said write station location marker and the first data is written, and in said write
The record to be written is written in the corresponding address of station location marker.
When the corresponding data of said write station location marker are less than the record total number, said write station location marker is wiped
Corresponding address to the corresponding address section of the record total number record, and in the corresponding address of said write station location marker
The second data are written to the corresponding address section of the record total number, and in the corresponding address of said write station location marker
The record to be written is written;Alternatively, when the corresponding data of said write station location marker are equal to the record total number, in institute
It states in the corresponding address of writing position mark and the record to be written is written.
The embodiment of the present invention provides a kind of device of data processing, and the first category of record to be written is obtained by obtaining module
Property parameter, according to the storage classification in first property parameters, determining module determines and described to be written records fan to be written
Area;Processing module updates the head attribute information of the sector;According to first property parameters and the updated fan
The record to be written is written in the sector in the head attribute information in area, writing module.By all types of data in the present embodiment
It is abstracted as certain record, for different types of data, only length is different, and storing process is without additional record rope
Draw unit, simplify applying step, when effectively solving power down in storing process, the operating conditions such as the storage of multi storage data is asynchronous
Possible data restore problem.
The embodiment of the present invention provides a kind of device of reading data, as shown in figure 8, the device includes: the second acquisition module
801, computing module 802, read module 803.
Second obtains module 801, for obtaining the second property parameters of record to be read.
Optionally, the second property parameters include that storage mode mark and storage mode identify corresponding content;Store class
It does not number, and the corresponding content of storage class number, i.e. storage classification;Record number mark to be read and note to be read
Record the corresponding content of number-mark.
Described second obtains module 801, is also used to according to the storage classification in second property parameters, obtain with it is described
First sector of the storage classification the same category in the second property parameters.
Described second obtains module 801, is also used to obtain the head attribute information of first sector.
Computing module 802 calculates first sector note for the head attribute information according to first sector
Record total number.
Optionally, according to the corresponding content of record length indicator in the head attribute information of the first sector, first is calculated
Total number is recorded in sector.
Described second obtains module 801, is also used to according to the record number to be read mark in second property parameters
Corresponding content and first sector record total number obtain the address of the record to be read.
Optionally, it is identified according to the record number to be read in the second property parameters, obtains corresponding record to be read
Number, such as obtaining the number of corresponding record to be read is 18.First sector record total number is 10.Then record to be read
Address is the 8th article of record of the 2nd sector.
Read module 803 reads the record to be read for the address according to the record to be read.
Optionally, after reading the record word to be read, record to be read can also be verified, when verification at
When function, success flag is returned to, when verifying failure, return is unsuccessfully identified.
All types of data are abstracted as certain record in the present embodiment, for different types of data, only length is not
Together, reading process is all made of the same scheme, without additional recording indexes unit, simplifies applying step, effectively solves
In storing process when power down, the storage of multi storage data is asynchronous etc., and the possible data of operating conditions restore problem.
Fig. 9 is the schematic diagram for the terminal device that one embodiment of the invention provides.As shown in figure 9, the terminal of the embodiment is set
Standby 900 include: processor 901, memory 902 and are stored in the memory 902 and can transport on the processor 901
Capable computer program 903, such as data processor and data read procedure.The processor 901 executes the computer
The step in the embodiment of above-mentioned each data processing and reading data, such as step 101 shown in FIG. 1 are realized when program 903
To 104 or step 201 shown in Fig. 2 to step 210, step 501 shown in fig. 5 to step 510, step shown in fig. 6
601 to step 606.The processor 901 realizes each module in above-mentioned each Installation practice when executing the computer program 903
Function, such as the function of module 701 to 704 shown in Fig. 7, the function of module 801 to 803 shown in Fig. 8.
Illustratively, the computer program 903 can be divided into one or more modules, one or more of
Module is stored in the memory 902, and is executed by the processor 901, to complete the present invention.It is one or more of
Module can be the series of computation machine program instruction section that can complete specific function, and the instruction segment is for describing the computer
Implementation procedure of the program 903 in the device or terminal device 900 of the data processing.For example, the computer program 903
The first acquisition module 701, determining module 702, processing module 703, writing module 704, each specific function of module can be divided into
It can be as shown in fig. 7, this is no longer going to repeat them.The computer program 903 can be divided into the second acquisition module 801, meter
Module 802 is calculated, read module 803, each module concrete function is as shown in figure 8, this is no longer going to repeat them.
The terminal device 900 can be the calculating such as desktop PC, notebook, palm PC and cloud server and set
It is standby.The terminal device may include, but be not limited only to, processor 901, memory 902.It will be understood by those skilled in the art that
Fig. 9 is only the example of terminal device 900, does not constitute the restriction to terminal device 900, may include more or more than illustrating
Few component perhaps combines certain components or different components, such as the terminal device can also be set including input and output
Standby, network access equipment, bus etc..
Alleged processor 901 can be central processing unit (Central Processing Unit, CPU), can also be
Other general processors, digital signal processor (Digital Signal Processor, DSP), specific integrated circuit
(Application Specific Integrated Circuit, ASIC), ready-made programmable gate array (Field-
Programmable Gate Array, FPGA) either other programmable logic device, discrete gate or transistor logic,
Discrete hardware components etc..General processor can be microprocessor or the processor is also possible to any conventional processor
Deng.
The memory 902 can be the internal storage unit of the terminal device 900, such as terminal device 900 is hard
Disk or memory.The memory 902 is also possible to the External memory equipment of the terminal device 900, such as the terminal device
The plug-in type hard disk being equipped on 900, intelligent memory card (Smart Media Card, SMC), secure digital (Secure
Digital, SD) card, flash card (Flash Card) etc..Further, the memory 902 can also both include the terminal
The internal storage unit of equipment 900 also includes External memory equipment.The memory 902 for store the computer program with
And other programs and data needed for the terminal device 900.The memory 902 can be also used for temporarily storing defeated
Out or the data that will export.
It is apparent to those skilled in the art that for convenience of description and succinctly, only with above-mentioned each function
Can unit, module division progress for example, in practical application, can according to need and by above-mentioned function distribution by different
Functional unit, module are completed, i.e., the internal structure of described device is divided into different functional unit or module, more than completing
The all or part of function of description.Each functional unit in embodiment, module can integrate in one processing unit, can also
To be that each unit physically exists alone, can also be integrated in one unit with two or more units, it is above-mentioned integrated
Unit both can take the form of hardware realization, can also realize in the form of software functional units.In addition, each function list
Member, the specific name of module are also only for convenience of distinguishing each other, the protection scope being not intended to limit this application.Above system
The specific work process of middle unit, module, can refer to corresponding processes in the foregoing method embodiment, and details are not described herein.
In the above-described embodiments, it all emphasizes particularly on different fields to the description of each embodiment, is not described in detail or remembers in some embodiment
The part of load may refer to the associated description of other embodiments.
Those of ordinary skill in the art may be aware that list described in conjunction with the examples disclosed in the embodiments of the present disclosure
Member and algorithm steps can be realized with the combination of electronic hardware or computer software and electronic hardware.These functions are actually
It is implemented in hardware or software, the specific application and design constraint depending on technical solution.Professional technician
Each specific application can be used different methods to achieve the described function, but this realization is it is not considered that exceed
The scope of the present invention.
In embodiment provided by the present invention, it should be understood that disclosed device/terminal device and method, it can be with
It realizes by another way.For example, device described above/terminal device embodiment is only schematical, for example, institute
The division of module or unit is stated, only a kind of logical function partition, there may be another division manner in actual implementation, such as
Multiple units or components can be combined or can be integrated into another system, or some features can be ignored or not executed.Separately
A bit, shown or discussed mutual coupling or direct-coupling or communication connection can be through some interfaces, device
Or the INDIRECT COUPLING or communication connection of unit, it can be electrical property, mechanical or other forms.
The unit as illustrated by the separation member may or may not be physically separated, aobvious as unit
The component shown may or may not be physical unit, it can and it is in one place, or may be distributed over multiple
In network unit.It can select some or all of unit therein according to the actual needs to realize the mesh of this embodiment scheme
's.
It, can also be in addition, the functional units in various embodiments of the present invention may be integrated into one processing unit
It is that each unit physically exists alone, can also be integrated in one unit with two or more units.Above-mentioned integrated list
Member both can take the form of hardware realization, can also realize in the form of software functional units.
If the integrated module/unit be realized in the form of SFU software functional unit and as independent product sale or
In use, can store in a computer readable storage medium.Based on this understanding, the present invention realizes above-mentioned implementation
All or part of the process in example method, can also instruct relevant hardware to complete, the meter by computer program
Calculation machine program can be stored in a computer readable storage medium, the computer program when being executed by processor, it can be achieved that on
The step of stating each embodiment of the method.Wherein, the computer program includes computer program code, the computer program
Code can be source code form, object identification code form, executable file or certain intermediate forms etc..Computer-readable Jie
Matter may include: can carry the computer program code any entity or device, recording medium, USB flash disk, mobile hard disk,
Magnetic disk, CD, computer storage, read-only memory (ROM, Read-Only Memory), random access memory (RAM,
Random Access Memory), electric carrier signal, telecommunication signal and software distribution medium etc..It should be noted that described
The content that computer-readable medium includes can carry out increasing appropriate according to the requirement made laws in jurisdiction with patent practice
Subtract, such as does not include electric carrier signal and electricity according to legislation and patent practice, computer-readable medium in certain jurisdictions
Believe signal.
Embodiment described above is merely illustrative of the technical solution of the present invention, rather than its limitations;Although referring to aforementioned reality
Applying example, invention is explained in detail, those skilled in the art should understand that: it still can be to aforementioned each
Technical solution documented by embodiment is modified or equivalent replacement of some of the technical features;And these are modified
Or replacement, the spirit and scope for technical solution of various embodiments of the present invention that it does not separate the essence of the corresponding technical solution should all
It is included within protection scope of the present invention.