CN104021806B - A kind of method and apparatus of data processing - Google Patents

A kind of method and apparatus of data processing Download PDF

Info

Publication number
CN104021806B
CN104021806B CN201410209078.4A CN201410209078A CN104021806B CN 104021806 B CN104021806 B CN 104021806B CN 201410209078 A CN201410209078 A CN 201410209078A CN 104021806 B CN104021806 B CN 104021806B
Authority
CN
China
Prior art keywords
sector
data
media
reading times
reading
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Expired - Fee Related
Application number
CN201410209078.4A
Other languages
Chinese (zh)
Other versions
CN104021806A (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.)
Global Innovation Polymerization LLC
Tanous Co
Original Assignee
Huawei Technologies Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Huawei Technologies Co Ltd filed Critical Huawei Technologies Co Ltd
Priority to CN201410209078.4A priority Critical patent/CN104021806B/en
Publication of CN104021806A publication Critical patent/CN104021806A/en
Priority to PCT/CN2015/078703 priority patent/WO2015172698A1/en
Application granted granted Critical
Publication of CN104021806B publication Critical patent/CN104021806B/en
Expired - Fee Related legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • GPHYSICS
    • G11INFORMATION STORAGE
    • G11BINFORMATION STORAGE BASED ON RELATIVE MOVEMENT BETWEEN RECORD CARRIER AND TRANSDUCER
    • G11B20/00Signal processing not specific to the method of recording or reproducing; Circuits therefor
    • G11B20/10Digital recording or reproducing
    • G11B20/18Error detection or correction; Testing, e.g. of drop-outs

Abstract

The embodiment of the present invention provides a kind of method and apparatus of data processing, is related to data processing field, and to improve the fluency of reading media data, the method includes:The first data stored in first sector of data processing equipment reading memory, 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, and when first sector is determined for media sector according to the identification information of first sector, 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 the configured information of first sector storage, read the second data stored in second sector in address according to second sector.The method embodiment is used for the treatment of data.

Description

A kind of method and apparatus of data processing
Technical field
The present invention relates to data processing field, more particularly to a kind of method and apparatus of data processing.
Background technology
The storage devices such as the upgrading of development and the user's request of built-in multimedia technology, hard disk have been widely used for In embedded multimedia equipments, in embedded multimedia equipments, the main memory system data of hard disk and media data, wherein, The system data includes CONFIG.SYS, system database and system information data, the media data etc. system start-up parameter Including graphic image data, voice data, video data, text data and multi-medium data etc. multimedia database.
For computer system, it is ensured that the integrality and accuracy of data are highest demands, therefore in order to ensure The data for reading, when digital independent is carried out, are checked by the stability of system by check code, if the data for reading There is mistake, then correction verification is carried out to the data according to the check code, when it is determined that the data are correct, continue executing with data Treatment operation.
But, computer system cannot correct the data it is wrong when, it is impossible to the data perform next step operation, When the data are media data, if there is the mistake that cannot be corrected, media data can be caused to occur significantly stopping when playing , the fluency of media data broadcasting is have impact on, so as to reduce Consumer's Experience.
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.
Brief description of the drawings
Fig. 1 is a kind of schematic flow sheet of data processing method provided in an embodiment of the present invention;
Fig. 2 is the schematic flow sheet of another data processing method provided in an embodiment of the present invention;
Fig. 3 is a kind of structural representation of data processing equipment provided in an embodiment of the present invention;
Fig. 4 is the structural representation of another data processing equipment provided in an embodiment of the present invention.
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.

Claims (12)

1. a kind of method of data processing, it is characterised in that 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 wrong data according to the check code When, obtain the identification information of first sector;
When first sector is determined for media sector according to the identification information of first sector, first sector is determined Reading times;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 letter of the first sector storage is obtained Breath;Wherein, the configured information includes the address of the second sector;
The second data stored in second sector are read in address according to second sector, and second data are in institute State on the playing sequence of media data, come the data after first data.
2. method according to claim 1, it is characterised in that the reading times of determination first sector include:
The reading times flag bit stored according to first sector obtains the reading times of first sector, wherein, it is described Reading times flag bit represents the reading times of first sector.
3. method according to claim 2, it is characterised in that it is determined that the reading times of first sector are less than described During the first preset value, the first data stored in first sector are changed to by the 3rd data according to the check code;
The 3rd data stored in first sector are read, and the reading times flag bit of first sector is added 1.
4. according to the method in claim 2 or 3, it is characterised in that described in being read according to the address of second sector After the second data stored in second sector, methods described also includes:
The reading times flag bit of first sector is reset.
5. method according to claim 1, it is characterised in that read the first fan of memory in the data processing equipment Before the first data stored in area, methods described 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, determine that first sector is matchmaker Body sector.
6. method according to claim 5, it is characterised in that it is determined that not including described the in first logo collection During the identification information of one sector, the first data stored in first sector are changed to by the 4th number according to the check code According to;
Read the 4th data stored in first sector.
7. a kind of data processing equipment, it is characterised in that including:
Memory, for by sector data storage;
Acquiring unit, for the first data stored in the first sector for reading the memory, and obtains first sector Corresponding check code;
Processing unit, for checking first data according to the check code;
The acquiring unit is additionally operable to, and determines that first data are wrong data according to the check code in the processing unit When, obtain the identification information of first sector;
The processing unit is additionally operable to, and the identification information in the first sector obtained according to the acquiring unit determines described first When sector is media sector, the reading times of first sector are determined;Wherein, the media sector is storage media data Sector;
The acquiring unit is additionally operable to, and determines that the reading times are more than or equal to the first preset value in the processing unit When, obtain the configured information of the first sector storage;Wherein, the configured information includes the address of the second sector;
The acquiring unit is additionally operable to, and the second number stored in second sector is read in the address according to second sector According to second data are on the playing sequence of the media data, to come the data after first data.
8. equipment according to claim 7, it is characterised in that the acquiring unit is additionally operable to, obtains first sector The reading times flag bit of storage;Wherein, the reading times flag bit represents the reading times of first sector;
The processing unit is specifically for obtaining the reading times of first sector according to the reading times flag bit.
9. equipment according to claim 8, it is characterised in that the processing unit is additionally operable to, it is determined that first fan When the reading times in area are less than first preset value, according to the first data that the check code will be stored in first sector It is changed to the 3rd data;
The acquiring 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.
10. equipment according to claim 8 or claim 9, it is characterised in that the processing unit is additionally operable to, obtains single described After unit reads the second data stored in second sector according to the address of second sector, by the reading of first sector Take the clearing of number of times flag bit.
11. equipment according to claim 7, it is characterised in that the processing unit is additionally operable to, read in the acquiring unit Before taking the first data stored in the first sector of the memory, determine the media sector in the memory, and by each The identification information of media sector is stored in the first logo collection;
The processing unit 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.
12. equipment according to claim 11, it is characterised in that the processing unit is additionally operable to, it is determined that described first In logo collection not including first sector identification information when, according to the check code by first sector store First data are changed to the 4th data;
The acquiring unit is additionally operable to, and reads the 4th data stored in first sector.
CN201410209078.4A 2014-05-16 2014-05-16 A kind of method and apparatus of data processing Expired - Fee Related CN104021806B (en)

Priority Applications (2)

Application Number Priority Date Filing Date Title
CN201410209078.4A CN104021806B (en) 2014-05-16 2014-05-16 A kind of method and apparatus of data processing
PCT/CN2015/078703 WO2015172698A1 (en) 2014-05-16 2015-05-11 Data processing method and device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201410209078.4A CN104021806B (en) 2014-05-16 2014-05-16 A kind of method and apparatus of data processing

Publications (2)

Publication Number Publication Date
CN104021806A CN104021806A (en) 2014-09-03
CN104021806B true CN104021806B (en) 2017-06-16

Family

ID=51438525

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201410209078.4A Expired - Fee Related CN104021806B (en) 2014-05-16 2014-05-16 A kind of method and apparatus of data processing

Country Status (2)

Country Link
CN (1) CN104021806B (en)
WO (1) WO2015172698A1 (en)

Families Citing this family (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104021806B (en) * 2014-05-16 2017-06-16 华为技术有限公司 A kind of method and apparatus of data processing
CN109542685A (en) * 2018-11-20 2019-03-29 江门市兰格电子有限公司 Checking memory data method, apparatus, equipment and medium based on more sectors
CN110069360B (en) * 2019-04-22 2023-03-21 重庆长安新能源汽车科技有限公司 Motor controller data storage and reading method and device
CN113791930A (en) * 2021-09-14 2021-12-14 浙江大华存储科技有限公司 Method and device for processing read command, storage medium and electronic device

Family Cites Families (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20060026376A1 (en) * 2002-10-16 2006-02-02 Microsoft Corporation Retrieving graphics from slow retrieval storage devices
CN1306381C (en) * 2004-08-18 2007-03-21 华为技术有限公司 Read-write method for disc array data and parallel read-write method
KR100689436B1 (en) * 2004-11-19 2007-03-08 삼성전자주식회사 Method for access to data sector and management bad sector in mobile phone's hdd
CN102200937A (en) * 2011-05-31 2011-09-28 深圳创维-Rgb电子有限公司 Method, device and television system for reading data in not-and (NAND) flash memory
US8914668B2 (en) * 2012-09-06 2014-12-16 International Business Machines Corporation Asynchronous raid stripe writes to enable response to media errors
CN104021806B (en) * 2014-05-16 2017-06-16 华为技术有限公司 A kind of method and apparatus of data processing

Also Published As

Publication number Publication date
CN104021806A (en) 2014-09-03
WO2015172698A1 (en) 2015-11-19

Similar Documents

Publication Publication Date Title
KR101675075B1 (en) Method and apparatus for non-volatile ram error re-mapping
TWI443512B (en) Block management method, memory controller and memory stoarge apparatus
CN104021806B (en) A kind of method and apparatus of data processing
CN101573761B (en) Nonvolatile memory with variable read threshold
TWI343001B (en) Data preserving method and data accessing method for non-volatile memory
TWI459393B (en) Data writing method for a non-volatile memory module, memory controller and memory storage apparatus
US20090259896A1 (en) Bad block identifying method for flash memory, storage system, and controller thereof
CN103839595B (en) For correcting the device and method from the mistake in the data that memory device accesses
CN103294615B (en) A kind of method for storing set-top box users information
US8516184B2 (en) Data updating using mark count threshold in non-volatile memory
CN105988722B (en) Data storage method and embedded system
CN107315616A (en) A kind of loading method of firmware, device and electronic equipment
CN103823642A (en) Method and system used for Flash balance storage
CN105892932A (en) Method and device for managing disk data
US20180254092A1 (en) Data-storage device and block-releasing method
CN105679373B (en) A kind of processing method, device and and NOT-AND flash with column bad in NOT-AND flash
CN105538917B (en) A kind of anti-error consumable chip and control method
US20120284497A1 (en) Booting method of main chip
CN105867833B (en) Data storage device and date storage method
CN103942012B (en) A kind of method, device and equipment for reading data
CN104699727B (en) A kind of date storage method and device
CN105260130A (en) Read-write method for Seagate hard disk system file
CN107562655B (en) A kind of date storage method and device
JP4863472B2 (en) Memory management method
US9558110B2 (en) Method for managing a flash memory

Legal Events

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

Effective date of registration: 20180226

Address after: California, USA

Patentee after: Tanous Co.

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

Patentee before: HUAWEI TECHNOLOGIES Co.,Ltd.

Effective date of registration: 20180226

Address after: California, USA

Patentee after: Global innovation polymerization LLC

Address before: California, USA

Patentee before: Tanous Co.

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

Granted publication date: 20170616

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