The content of the invention
Embodiments of the invention provide a kind of method and apparatus of data processing, to improve the smoothness of reading media data
Property.
To reach above-mentioned purpose, embodiments of the invention are adopted the following technical scheme that:
A kind of first aspect, there is provided method of data processing, including:
The first data stored in first sector of data processing equipment reading memory;
The corresponding check code in first sector is obtained, and is determining that first data are mistake according to the check code
During data, the identification information of first sector is obtained;
When first sector is determined for media sector according to the identification information of first sector, described first is determined
The reading times of sector;Wherein, the media sector is the sector of storage media data;
When it is determined that the reading times are more than or equal to the first preset value, the instruction of the first sector storage is obtained
Information;Wherein, the configured information includes the address of the second sector;
Read the second data stored in second sector in address according to second sector.
It is described to determine first sector with reference in a first aspect, in first aspect in the first possible implementation
Reading times include:
The reading times flag bit stored according to first sector obtains the reading times of first sector, wherein,
The reading times flag bit represents the reading times of first sector.
The first possible implementation with reference to first aspect, in second possible implementation of first aspect,
When determining that the reading times of first sector are less than first preset value, according to the check code by first sector
First data of storage are changed to the 3rd data;
The 3rd data stored in first sector are read, and the reading times flag bit of first sector is added 1.
With reference to the possible implementation of first aspect the first or second, the third possible implementation in first aspect
In, after the second data stored in reading second sector according to the address of second sector, methods described also includes:
The reading times flag bit of first sector is reset.
With reference to any one in first aspect to first aspect the third possible implementation, in the 4th kind of first aspect
In possible implementation, before the data processing equipment reads the first data stored in the first sector of memory, institute
Stating method also includes:
Determine the media sector in the memory;
The identification information of each media sector is stored in the first logo collection;
The identification information according to first sector determines first sector for media sector includes:
When it is determined that first logo collection includes the identification information of first sector, first sector is determined
It is media sector.
With reference to the 4th kind of possible implementation of first aspect, in the 5th kind of possible implementation of first aspect,
When determining in first logo collection identification information including first sector, according to the check code by described first
The first data stored in sector are changed to the 4th data;
Read the 4th data stored in first sector.
A kind of second aspect, there is provided data processing equipment, including:Memory, for by sector data storage;
Acquiring unit, for the first data stored in the first sector for reading the memory, and obtains described first
The corresponding check code in sector;
Processing unit, for checking first data according to the check code;
The acquiring unit is additionally operable to, and determines that first data are mistake according to the check code in the processing unit
During data, the identification information of first sector is taken;
The processing unit is additionally operable to, described in the identification information determination in the first sector obtained according to the acquiring unit
When first sector is media sector, the reading times of first sector are determined;Wherein, the media sector is storage media number
According to sector;
The acquiring unit is additionally operable to, and determines that the reading times are preset more than or equal to first in the processing unit
During value, the configured information of the first sector storage is obtained;Wherein, the configured information includes the address of the second sector;
The acquiring unit is additionally operable to, and second of storage in second sector is read in the address according to second sector
Data.
With reference to second aspect, in second aspect in the first possible implementation, the acquiring unit is additionally operable to, and obtains
The reading times flag bit of the first sector storage;Wherein, the reading times flag bit indicates the reading of first sector
Take number of times;
The processing unit is specifically for obtaining the reading time of first sector according to the reading times flag bit
Number.
The first possible implementation with reference to second aspect, in second possible implementation of second aspect, institute
State processing unit to be additionally operable to, when it is determined that the reading times of first sector are less than first preset value, according to the school
Test code and the first data stored in first sector are changed to the 3rd data;
The reading unit is additionally operable to, and reads the 3rd data stored in first sector;
The processing unit is additionally operable to, and adds 1 by the reading times flag bit of first sector.
With reference to the possible implementation of second aspect the first or second, the third possible implementation in second aspect
In, the processing unit is additionally operable to, in the acquiring unit reads second sector according to the address of second sector
After second data of storage, the reading times flag bit of first sector is reset.
With reference to the third possible implementation of second aspect to first aspect, in the 4th kind of possible realization of second aspect
In mode, the processing unit is additionally operable to, first stored in the acquiring unit reads the first sector of the memory
Before data, the media sector in the memory is determined, and the identification information of each media sector is stored in the first mark
Know in gathering;
The processing unit is specifically for it is determined that first logo collection includes the mark letter of first sector
During breath, determine that first sector is media sector.
With reference to the 4th kind of possible implementation of second aspect, in the 5th kind of possible implementation of second aspect, institute
Processing unit is stated to be additionally operable to, when it is determined that not including the identification information of first sector in first logo collection, according to
The first data stored in first sector are changed to the 4th data by the check code;
The acquiring unit is additionally operable to, and reads the 4th data stored in first sector.
By using such scheme, the first data stored in the first sector of data processing equipment reading memory are obtained
Take the corresponding check code in the first sector, and when to determine first data be wrong data according to the check code, obtain this
The identification information of one sector, and when first sector is determined for media sector according to the identification information of first sector, it is determined that
The reading times of first sector, when it is determined that the reading times are more than or equal to the first preset value, obtain first sector
The second data stored in second sector are read in the configured information of storage, the address according to second sector, in multipass
When the check code changes and re-reads the media data stored in first sector and is still wrong data, media data is determined
It is the wrong data that cannot be corrected by the check code, then data processing equipment is according to the configured information stored in first sector
Read next data of the data stored in first sector, so, run into occur mistake and cannot error correction media data
When, data processing equipment can directly read the media data after the media data, can solve media data play when
The problem for occurring pausing, improves the fluency of reading media data, so as to improve Consumer's Experience.
Specific embodiment
Below in conjunction with the accompanying drawing in the embodiment of the present invention, the technical scheme in the embodiment of the present invention is carried out clear, complete
Site preparation is described, it is clear that described embodiment is only a part of embodiment of the invention, rather than whole embodiments.It is based on
Embodiment in the present invention, it is every other that those of ordinary skill in the art are obtained under the premise of creative work is not made
Embodiment, belongs to the scope of protection of the invention.
The embodiment of the present invention provides a kind of method of data processing, as shown in figure 1, the executive agent of the method is at data
Reason equipment, the method includes:
The first data stored in S101, the first sector of data processing equipment reading memory.
Specifically, by sector data storage, each sector can store the data of 512 bytes to memory, additionally, each
Sector also stores identification information, configured information and the check code of the sector, and the identification information can be sector label, data processing
Equipment determines corresponding sector according to the sector label, and the configured information is used to indicate reading the data of the sector memory storage
Afterwards, data processing equipment further reads the address of data, and the check code is used to check the data of the sector memory storage.
Illustratively, the data processing equipment can be the multimedia equipment with hard disk, and the multimedia equipment can read this
The sector of hard disk, obtains the data of the sector memory storage.
Further, before the data processing equipment reads the first data stored in the first sector of memory, data
Processing equipment determines the media sector in the memory, and the identification information of each media sector is stored in into the first logo collection
In.
Specifically, data processing equipment presets media sector in whole sectors of memory, and by each media sector
Identification information be stored in the first logo collection, in storage media data, data processing equipment is according to first identification sets
Close and search the media sector, and by media data storage in media sector.
Illustratively, the data processing equipment can be the Set Top Box with hard disk, and the Set Top Box can determine from the hard disk
The sector of storage media data, and the sector of record storage media data mark, to find storage media according to the mark
The sector of data.
S102, data processing equipment obtain the corresponding check code in the first sector, and according to the check code determine this
When one data are wrong data, the identification information of first sector is obtained.
Specifically, the check code can be ECC code, and data processing equipment can check first data according to the ECC code
Data bit, determined according to the ECC code first data data bit malfunction when, determine first data be wrong data
When (i.e. first corrupt data), data processing equipment reads the identification information of first sector.
S103, data processing equipment are determining that first sector is media sector according to the identification information of first sector
When, determine the reading times of first sector.
Wherein, the media sector is the sector of storage media data.
Specifically, data processing equipment is when it is determined that first logo collection includes the identification information of first sector,
Determine that first sector is media sector.
Illustratively, data processing equipment can determine to number be 010 sector to number be 015 6 sectors be media
Sector, then will numbering storage in the first logo collection, when data processing equipment determine the identification information of the first sector for 010 to
During any one in 015, then first sector can be determined for media sector, merely just for example, the embodiment of the present invention
This is not construed as limiting.
Further, data processing equipment is not it is determined that include the identification information of first sector in first logo collection
When, the first data stored in first sector are changed to by the 4th data according to the check code, and read first sector
4th data of storage.
Specifically, when it is determined that not including the identification information of first sector in first logo collection, it may be determined that should
First sector is not media sector, then the first data for being stored in first sector are not media datas, then data processing equipment
First data are changed according to the check code and obtains the 4th data, and the first data stored in first sector are replaced with the
Four data, re-read first sector, obtain the 4th data.
Further, the check code can be ECC code, and data processing equipment can check first number according to the ECC code
According to, if a data bit makes a mistake in first data, the data bit for making a mistake can be determined according to the ECC code,
Data processing equipment changes the data bit, you can complete the error correcting of first data, if two or two in first data
Individual data above position is made a mistake, then data processing equipment can determine first corrupt data according to the ECC code, but cannot be true
Surely the data bit for making a mistake, it is impossible to correct the data bit for mistake occur.
Illustratively, first data can be system data, identification information of the data processing equipment according to first sector
Determine that first sector is not media sector, and when determining that first data are not media data, then data processing equipment reparation
And the data of the first sector memory storage are re-read, to ensure the accuracy of data, if there are two generations in first data
The data bit of mistake, then the data processing equipment will circulate to perform and repair and read, and by Preset Time or read this book
During more than preset value, bomp is sent.
Further, data processing equipment obtains first sector according to the reading times flag bit that first sector stores
Reading times.
Wherein, the reading times flag bit represents the reading times of first sector.
Specifically, reading times flag bit, reading of the data processing equipment according to the first sector can be set to each sector
Take the reading times that number of times flag bit determines the first sector.
Illustratively, when it is determined that the reading times flag bit of the first sector is 5, it may be determined that repeatedly read first sector
Take 5 times.
S104, data processing equipment it is determined that the reading times be more than or equal to the first preset value when, obtain this first
The configured information of sector storage.
Wherein, the configured information includes the address of the second sector.
Specifically, when data processing equipment reads first sector more than preset times, it may be determined that in first sector
The data of storage cannot be corrected by the check code, at this moment, in order to ensure fluency of the media data when playing, data processing
Equipment determines to skip the data in first sector.
Illustratively, the data for being stored in the memory can be video, and the first frame of the video is stored in the first sector,
Second frame of the video is stored in the second sector, if first preset value is 5, is read in the data processing equipment the 5th
During the first frame video, still determine that mistake occur in the data of the first frame video, then the data processing equipment stops reading and is somebody's turn to do
First frame video, and the address of the second sector of the first sector memory storage is obtained, to read the second frame video, so, broadcasting
When putting video, if the mistake that cannot be corrected occurs in a certain frame video, next frame video can be directly played, so as to improve broadcasting video
Fluency.
Further, when it is determined that the reading times of first sector are less than first preset value, will according to the check code
The first data stored in first sector are changed to the 3rd data, read the 3rd data stored in first sector, and will
The reading times flag bit of first sector adds 1.
Specifically, data processing equipment changes first data and obtains the 3rd data according to the check code, and by this first
The first data stored in sector replace with the 3rd data, re-read first sector, obtain what is stored in first sector
3rd data, and after the 3rd data are read, the reading times flag bit of first sector is added 1.
It should be noted that after the data stored in reading first sector, by the reading times mark of first sector
Will position Jia 1, so that the data processing equipment determines the number of times that first sector is continuously read according to the reading times flag bit,
In addition, data processing equipment is after the first data stored in reading first sector, also by the reading times of first sector
Flag bit adds 1, i.e., after data processing equipment reads the data stored in first sector every time, by the reading of first sector time
Number flag bit adds 1.
S105, data processing equipment read the second data stored in second sector according to the address of second sector.
Specifically, data processing equipment obtains the address of second sector according to the configured information that first sector stores,
And the second data stored in the second sector are read according to the address of second sector.
Further, data processing equipment resets the reading times flag bit of first sector.
Specifically, the reading times flag bit of first sector represents that the number of times of first sector is read in repetition, in data
After processing equipment reads the data of second sector storage, it may be determined that the data processing equipment stops reading first sector and deposits
The data of storage, then reset the reading times flag bit of first sector, waits read the data of first sector storage next time
Shi Chongxin is counted.
It is the method for data processing equipment by using above-mentioned executive agent, data processing equipment reads the first of memory
The first data stored in sector, obtain the corresponding check code in the first sector, and determining first number according to the check code
During according to for wrong data, obtain the identification information of first sector, and according to the identification information of first sector determine this
When one sector is media sector, the reading times of first sector are determined, it is determined that the reading times are more than or equal to first
During preset value, the configured information of first sector storage is obtained, the address according to second sector is deposited in reading second sector
Second data of storage, the media data stored in the multipass check code is changed and re-reads first sector is still
During wrong data, determine that media data is the wrong data that cannot be corrected by the check code, then data processing equipment is according to this
The configured information stored in first sector reads next data of the data stored in first sector, so, is running into appearance
Mistake and cannot error correction media data when, data processing equipment can directly read the media data after the media data,
Can solve the problems, such as that pausing occurs when playing in media data, the fluency of reading media data be improved, so as to improve user
Experience.
The embodiment of the present invention provides a kind of method of data processing, as shown in Fig. 2 the method includes:
S201, data processing equipment determine the media sector in memory, and the identification information of each media sector is protected
In the presence of in the first logo collection.
Wherein, the media sector is that, for the sector of storage media data, first logo collection includes total medium
The identification information of sector.
Specifically, data processing equipment presets media sector in whole sectors of memory, and by each media sector
Identification information be stored in the first logo collection, in storage media data, data processing equipment is according to first identification sets
Close and search the media sector, and by media data storage in media sector.
Illustratively, the data processing equipment can be multimedia equipment (such as:Set Top Box), the memory can be many matchmakers
The hard disk of body equipment, the multimedia equipment can be by the hard-disc storage data.
The first data stored in S202, the first sector of data processing equipment reading memory.
Specifically, by sector data storage, each sector can store the data of 512 bytes to memory, additionally, each
Sector also stores identification information, configured information and the check code of the sector, and the identification information can be sector label, data processing
Equipment determines corresponding sector according to the sector label, and the configured information is used to indicate reading the data of the sector memory storage
Afterwards, data processing equipment further reads the address of data, and the check code is used to check the data of the sector memory storage.
S203, data processing equipment obtain the corresponding check code in the first sector.
Specifically, the check code can be ECC (Error Correcting Code, error checking and correction) code, data
Processing equipment can be according to the ECC code inspection and the mistake of the data for correcting storage in first sector.
S204, data processing equipment according to the check code determine first data be wrong data when, obtain this first
The identification information of sector.
Specifically, the check code can be ECC code, and data processing equipment can check first data according to the ECC code
Data bit, determined according to the ECC code first data data bit malfunction when, determine first data be wrong data
When (i.e. first corrupt data), data processing equipment reads the identification information of first sector.
S205, data processing equipment determine the type of first sector according to the identification information of first sector.
Specifically, data processing equipment is not it is determined that include the identification information of first sector in first logo collection
When, perform following steps S2060 to S2070.
The first data stored in first sector are changed to the 4th by S2060, data processing equipment according to the check code
Data.
Specifically, when it is determined that not including the identification information of first sector in first logo collection, it may be determined that should
First sector is not media sector, then the first data for being stored in first sector are not media datas, then data processing equipment
First data are changed according to the check code and obtains the 4th data, and the first data stored in first sector are replaced with the
Four data.
S2070, data processing equipment read the 4th data stored in first sector.
Illustratively, first data can be system data, identification information of the data processing equipment according to first sector
Determine that first sector is not media sector, and when determining that first data are not media data, then data processing equipment reparation
And the data of the first sector memory storage are re-read, to ensure the accuracy of data, if there are two generations in first data
The data bit of mistake, then the data processing equipment will circulate to perform and repair and read, and by Preset Time or read this book
During more than preset value, failure alarms are sent.
Alternatively, data processing equipment is when it is determined that first logo collection includes the identification information of first sector,
Perform following steps S206 to S207.
S206, data processing equipment obtain the reading times flag bit of first sector storage.
S207, data processing equipment obtain the reading of first sector according to the reading times flag bit that first sector stores
Take number of times.
Specifically, reading times flag bit, reading of the data processing equipment according to the first sector can be set to each sector
Take the reading times that number of times flag bit determines the first sector.
Illustratively, when it is determined that the reading times flag bit of the first sector is 5, it may be determined that repeatedly read first sector
Take 5 times.
Further, after data processing equipment obtains the reading times of first sector, however, it is determined that the reading times are less than
During the first preset value, following steps S2080 to S2090 is performed.
The first data stored in first sector are changed to the 3rd by S2080, data processing equipment according to the check code
Data.
Specifically, data processing equipment checks first data according to the check code, according to the check code find this
After the mistake of one data, the data bit malfunctioned in first data is changed, and the data after change are re-write into first fan
Area.
Illustratively, the check code can be ECC code, and data processing equipment is checking first data according to the ECC code
The 10th data bit there is mistake, however, it is determined that the 10th data bit is " 0 ", then be changed to " 1 " data bit, and will be become
Data after more are re-write in the first sector.
S2090, data processing equipment read the 3rd data stored in first sector, and by the reading of first sector
Number of times flag bit adds 1.
Specifically, data processing equipment changes first data and obtains the 3rd data according to the check code, and by this first
In sector store the first data replace with the 3rd data, data processing equipment again reads off first sector, obtain this first
The 3rd data stored in sector, and after the 3rd data are read, the reading times flag bit of first sector is added 1.
Further, if after data processing equipment obtains the 3rd data, the 3rd data are checked according to the check code, if
Determine that the 3rd data do not have mistake, then continue with the 3rd data, if determining that the 3rd data are mistake according to the check code
Data, then change the 3rd data according to the check code by mistake.
It should be noted that after the data stored in reading first sector, by the reading times mark of first sector
Will position Jia 1, so that the data processing equipment determines the number of times that first sector is continuously read according to the reading times flag bit,
In addition, data processing equipment is after the first data stored in reading first sector, also by the reading times of first sector
Flag bit adds 1, i.e., after data processing equipment reads the data stored in first sector every time, by the reading of first sector time
Number flag bit adds 1.
Alternatively, data processing equipment is performed following when it is determined that the reading times are more than or equal to the first preset value
Step S208 to S210,
S208, data processing equipment obtain the configured information of first sector storage.
Wherein, the configured information includes the address of the second sector.
Specifically, when data processing equipment reads first sector more than preset times, it may be determined that in first sector
The data of storage cannot be corrected by the check code, at this moment, in order to ensure fluency of the media data when playing, data processing
Equipment determines to skip the data in first sector.
S209, data processing equipment read the second data stored in second sector according to the address of second sector.
Illustratively, the data for being stored in the memory can be video, and the first frame of the video is stored in the first sector,
Second frame of the video is stored in the second sector, if first preset value is 5, is read in the data processing equipment the 5th
During the first frame video, still determine that mistake occur in the data of the first frame video, then the data processing equipment stops reading and is somebody's turn to do
First frame video, and the address of the second sector of the first sector memory storage is obtained, to read the second frame video, so, broadcasting
When putting video, if the mistake that cannot be corrected occurs in a certain frame video, next frame video can be directly played, so as to improve broadcasting video
Fluency.
S210, data processing equipment reset the reading times flag bit of first sector.
Specifically, the reading times flag bit of first sector represents that the number of times of first sector is read in repetition, in data
After processing equipment reads the data of second sector storage, it may be determined that the data processing equipment stops reading first sector and deposits
The data of storage, then reset the reading times flag bit of first sector, waits read the data of first sector storage next time
Shi Chongxin is counted.
By using the above method, the first data stored in the first sector of data processing equipment reading memory are obtained
Take the corresponding check code in the first sector, and when to determine first data be wrong data according to the check code, obtain this
The identification information of one sector, and when first sector is determined for media sector according to the identification information of first sector, it is determined that
The reading times of first sector, when it is determined that the reading times are more than or equal to the first preset value, obtain first sector
The second data stored in second sector are read in the configured information of storage, the address according to second sector, in multipass
When the check code changes and re-reads the media data stored in first sector and is still wrong data, media data is determined
It is the wrong data that cannot be corrected by the check code, then data processing equipment is according to the configured information stored in first sector
Read next data of the data stored in first sector, so, run into occur mistake and cannot error correction media data
When, data processing equipment can directly read the media data after the media data, can solve media data play when
The problem for occurring pausing, improves the fluency of reading media data, so as to improve Consumer's Experience.
The embodiment of the present invention provides a kind of data processing equipment 30, as shown in figure 3, including:
Memory 31, for by sector data storage.
Wherein, the memory can be hard disk, and by sector data storage, each sector can store 512 bytes to hard disk
Data, additionally, each sector also stores identification information, configured information and the check code of the sector, the identification information can be
Sector label, data processing equipment determines corresponding sector according to the sector label, and the configured information is used to indicate to be somebody's turn to do in reading
After the data of sector memory storage, data processing equipment further reads the address of data, and the check code is used to check in the sector
The data of storage.
Acquiring unit 32, in the first sector for reading the memory 31 store the first data, and obtain this first
The corresponding check code in sector.
Processing unit 33, for according to the verification code check first data.
The acquiring unit 32 is additionally operable to, and unit 33 is managed in this place and determines that first data are wrong data according to the check code
When, take the identification information of first sector.
The processing unit 33 is additionally operable to, the identification information in the first sector obtained according to the acquiring unit 32 determine this
When one sector is media sector, the reading times of first sector are determined.
Wherein, the media sector is the sector of storage media data.
The acquiring unit 32 is additionally operable to, and unit 33 is managed in this place and determines that the reading times are more than or equal to the first preset value
When, obtain the configured information of first sector storage.
Wherein, the configured information includes the address of the second sector.
The acquiring unit 32 is additionally operable to, and the second number stored in second sector is read in the address according to second sector
According to.
Alternatively, the acquiring unit 32 is additionally operable to, and obtains the reading times flag bit of first sector storage.
Wherein, the reading times flag bit indicates the reading times of first sector.
The processing unit 33 is specifically for obtaining the reading times of first sector according to the reading times flag bit.
Specifically, reading times flag bit, reading of the data processing equipment according to the first sector can be set to each sector
Take the reading times that number of times flag bit determines the first sector.
Illustratively, when it is determined that the reading times flag bit of the first sector is 5, it may be determined that repeatedly read first sector
Take 5 times.
Alternatively, the processing unit 33 is additionally operable to, it is determined that the reading times of first sector are less than first preset value
When, the first data stored in first sector are changed to by the 3rd data according to the check code.
Specifically, data processing equipment checks first data according to the check code, according to the check code find this
After the mistake of one data, the data bit malfunctioned in first data is changed, and the data after change are re-write into first fan
Area.
Illustratively, the check code can be ECC code, and data processing equipment is checking first data according to the ECC code
The 10th data bit there is mistake, however, it is determined that the 10th data bit is " 0 ", then be changed to " 1 " data bit, and will be become
Data after more are re-write in the first sector.
The reading unit 32 is additionally operable to, and reads the 3rd data stored in first sector.
The processing unit 33 is additionally operable to, and adds 1 by the reading times flag bit of first sector.
Specifically, data processing equipment changes first data and obtains the 3rd data according to the check code, and by this first
In sector store the first data replace with the 3rd data, data processing equipment again reads off first sector, obtain this first
The 3rd data stored in sector, and after the 3rd data are read, the reading times flag bit of first sector is added 1.
Further, if after data processing equipment obtains the 3rd data, the 3rd data are checked according to the check code, if
Determine that the 3rd data do not have mistake, then continue with the 3rd data, if determining that the 3rd data are mistake according to the check code
Data, then change the 3rd data according to the check code by mistake.
It should be noted that after the data stored in reading first sector, by the reading times mark of first sector
Will position Jia 1, so that the data processing equipment determines the number of times that first sector is continuously read according to the reading times flag bit,
In addition, data processing equipment is after the first data stored in reading first sector, also by the reading times of first sector
Flag bit adds 1, i.e., after data processing equipment reads the data stored in first sector every time, by the reading of first sector time
Number flag bit adds 1.
Alternatively, the processing unit 33 is additionally operable to, the acquiring unit according to the address of second sector read this second
After the second data stored in sector, the reading times flag bit of first sector is reset.
Specifically, the reading times flag bit of first sector represents that the number of times of first sector is read in repetition, in data
After processing equipment reads the data of second sector storage, it may be determined that the data processing equipment stops reading first sector and deposits
The data of storage, then reset the reading times flag bit of first sector, waits read the data of first sector storage next time
Shi Chongxin is counted.
Alternatively, the processing unit 33 is additionally operable to, and is stored in the acquiring unit 32 reads the first sector of the memory
The first data before, determine the media sector in the memory, and the identification information of each media sector is stored in first
In logo collection.
Specifically, data processing equipment presets media sector in whole sectors of memory, and by each media sector
Identification information be stored in the first logo collection, in storage media data, data processing equipment is according to first identification sets
Close and search the media sector, and by media data storage in media sector.
Illustratively, the data processing equipment can be multimedia equipment (such as:Set Top Box), the memory can be many matchmakers
The hard disk of body equipment, the multimedia equipment can be by the hard-disc storage data.
The processing unit 33 is specifically for it is determined that first logo collection includes the identification information of first sector
When, determine that first sector is media sector.
Alternatively, the processing unit 33 is additionally operable to, it is determined that not including the mark of first sector in first logo collection
During knowledge information, the first data stored in first sector are changed to by the 4th data according to the check code.
Specifically, when it is determined that not including the identification information of first sector in first logo collection, it may be determined that should
First sector is not media sector, then the first data for being stored in first sector are not media datas, then data processing equipment
First data are changed according to the check code and obtains the 4th data, and the first data stored in first sector are replaced with the
Four data.
The acquiring unit 32 is additionally operable to, and reads the 4th data stored in first sector.
Illustratively, first data can be system data, identification information of the data processing equipment according to first sector
Determine that first sector is not media sector, and when determining that first data are not media data, then data processing equipment reparation
And the data of the first sector memory storage are re-read, to ensure the accuracy of data, if there are two generations in first data
The data bit of mistake, then the data processing equipment will circulate to perform and repair and read, and by Preset Time or read this book
During more than preset value, failure alarms are sent.
By using above-mentioned data processing equipment, first stored in the first sector of data processing equipment reading memory
Data, obtain the corresponding check code in the first sector, and when first data are determined for wrong data according to the check code, obtain
The identification information of first sector is taken, and is determining that first sector is media sector according to the identification information of first sector
When, determine the reading times of first sector, when it is determined that the reading times are more than or equal to the first preset value, obtain this
The second data stored in second sector are read in the configured information of one sector storage, the address according to second sector, many
It is secondary when changing and re-read the media data stored in first sector by the check code and being still wrong data, determine matchmaker
Volume data is the wrong data that cannot be corrected by the check code, then data processing equipment is according to the finger stored in first sector
Show that information reads next data of the data stored in first sector, so, run into occur mistake and cannot error correction matchmaker
During volume data, data processing equipment can directly read the media data after the media data, can solve media data and exist
The problem for occurring pausing during broadcasting, improves the fluency of reading media data, so as to improve Consumer's Experience.
The embodiment of the present invention provides a kind of data processing equipment 40, as shown in figure 4, including:
Processor (processor) 41, communication interface (Communications Interface) 42, memory
(memory) 43 and communication bus 44;Wherein, the processor 41, the communication interface 42 and the memory 43 pass through the communication bus
44 complete mutual communication.
Processor 41 is probably a central processor CPU, or specific integrated circuit ASIC (Application
Specific Integrated Circuit), or it is arranged to implement one or more integrated electricity of the embodiment of the present invention
Road.
Memory 43 is used to deposit program code, and the program code includes computer-managed instruction.Memory 43 may bag
Memory containing high-speed RAM, it is also possible to also including nonvolatile memory (non-volatile memory), for example, at least one
Magnetic disk storage.
The communication interface 42, for realizing the connection communication between these devices.
The configuration processor code of processor 41, for the first data stored in the first sector for reading memory, obtains
The corresponding check code in first sector, and according to the check code determine first data be wrong data when, obtain this first
The identification information of sector, and when first sector is determined for media sector according to the identification information of first sector, it is determined that should
The reading times of the first sector, when it is determined that the reading times are more than or equal to the first preset value, obtain first sector and deposit
Read the second data stored in second sector in the configured information of storage, the address according to second sector.
Wherein, the media sector is the sector of storage media data, and the configured information includes the address of the second sector.
Alternatively, the processor 41 is additionally operable to, according to first sector store reading times flag bit obtain this first
The reading times of sector.
Wherein, the reading times flag bit represents the reading times of first sector.
Alternatively, the processor 41 is additionally operable to, when it is determined that the reading times of first sector are less than first preset value,
The first data stored in first sector are changed to by the 3rd data according to the check code, read what is stored in first sector
3rd data, and the reading times flag bit of first sector is added 1.
Alternatively, the processor 41 is additionally operable to, and is stored in second sector is read according to the address of second sector
After second data, the reading times flag bit of first sector is reset.
Alternatively, the processor 41 is additionally operable to, and is stored in the data processing equipment reads the first sector of memory
Before first data, the media sector in the memory is determined, the identification information of each media sector is stored in the first mark
In set.
Alternatively, the processor 41 is specifically for it is determined that first logo collection includes the mark of first sector
During information, determine that first sector is media sector.
Alternatively, the processor 41 is additionally operable to, it is determined that not including the mark of first sector in first logo collection
During information, the first data stored in first sector are changed to by the 4th data according to the check code, and read first fan
The 4th data stored in area.
The above, specific embodiment only of the invention, but protection scope of the present invention is not limited thereto, and it is any
Those familiar with the art the invention discloses technical scope in, change or replacement can be readily occurred in, should all contain
Cover within protection scope of the present invention.Therefore, protection scope of the present invention described should be defined by scope of the claims.