CN103825649A - Optical module information restoration method and apparatus - Google Patents
Optical module information restoration method and apparatus Download PDFInfo
- Publication number
- CN103825649A CN103825649A CN201210462365.7A CN201210462365A CN103825649A CN 103825649 A CN103825649 A CN 103825649A CN 201210462365 A CN201210462365 A CN 201210462365A CN 103825649 A CN103825649 A CN 103825649A
- Authority
- CN
- China
- Prior art keywords
- optical module
- data
- memory
- checked
- checksum
- 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.)
- Pending
Links
- 230000003287 optical effect Effects 0.000 title claims abstract description 279
- 238000000034 method Methods 0.000 title claims abstract description 47
- 238000004364 calculation method Methods 0.000 claims abstract description 16
- 238000005192 partition Methods 0.000 claims description 34
- 230000005540 biological transmission Effects 0.000 claims description 14
- 230000008439 repair process Effects 0.000 claims description 13
- 238000012795 verification Methods 0.000 abstract 4
- 238000010586 diagram Methods 0.000 description 11
- 238000001514 detection method Methods 0.000 description 10
- 230000002159 abnormal effect Effects 0.000 description 9
- 238000011084 recovery Methods 0.000 description 7
- 230000008569 process Effects 0.000 description 6
- 230000006854 communication Effects 0.000 description 5
- 230000005856 abnormality Effects 0.000 description 4
- 238000004891 communication Methods 0.000 description 4
- 230000006870 function Effects 0.000 description 4
- 238000003780 insertion Methods 0.000 description 4
- 230000037431 insertion Effects 0.000 description 4
- 238000012545 processing Methods 0.000 description 4
- 239000012634 fragment Substances 0.000 description 2
- 230000001960 triggered effect Effects 0.000 description 2
- 238000013461 design Methods 0.000 description 1
- 238000003745 diagnosis Methods 0.000 description 1
- 238000012423 maintenance Methods 0.000 description 1
- 238000004377 microelectronic Methods 0.000 description 1
- 238000012986 modification Methods 0.000 description 1
- 230000004048 modification Effects 0.000 description 1
- 230000002093 peripheral effect Effects 0.000 description 1
- 238000006467 substitution reaction Methods 0.000 description 1
Images
Landscapes
- Optical Communication System (AREA)
- Techniques For Improving Reliability Of Storages (AREA)
Abstract
The embodiments of the invention provide an optical module information restoration method and apparatus. The method comprises: obtaining data to be verified from the memory of an optical module and an original verification sum of the data to be verified, obtaining the verification sum of the data to be verified through calculation, comparing the calculated verification sum with the original verification sum, and if the two sums are different, obtaining type identification information from the memory, the type identification information being used for identifying the type of the optical module; obtaining optical module data corresponding to the type identification information from an optical module information base; and rewriting the optical module data into the memory. The method and apparatus provided by the embodiments of the invention are used for restoring abnormally rewritten optical module information again.
Description
Technical Field
The embodiment of the invention relates to the technical field of communication, in particular to a method and a device for repairing optical module information.
Background
In an optical network communication system, a network device generally performs reception and transmission of an optical signal through an optical module. The optical module information is stored in the memory of the optical module, and the network equipment can read the relevant information stored in the optical module in the communication process so as to configure the corresponding working parameters.
In the prior art, a network device reads information stored in a Memory of an optical module, which is usually an Electrically Erasable Programmable Read-Only Memory (EEPROM) through an Inter-Integrated Circuit (IIC) bus. The high level in the read-write operation code in the form of the IIC signal indicates a read operation, and the low level indicates a write operation. However, the IIC bus, as a low-frequency communication bus, is susceptible to external interference and has low reliability, so that when an IIC signal is interfered in a process of reading information of an optical module through the IIC bus, a read operation code is easily subjected to signal hopping and becomes a write operation code, which causes information stored in a memory in the optical module to be changed, and a network device cannot read correct information, thereby causing access failure of the optical module, failing to perform correct working configuration, causing flow interruption and affecting services.
Disclosure of Invention
The embodiment of the invention provides a method and a device for repairing optical module information, which are used for repairing optical module information which is abnormally rewritten in a memory.
In a first aspect, an embodiment of the present invention provides a method for repairing optical module information, including:
acquiring data to be checked and an original checksum of the data to be checked from a memory of an optical module, calculating to obtain a checksum of the data to be checked, comparing the calculated checksum with the original checksum, and if the checksum and the original checksum are different, acquiring type identification information from the memory, wherein the type identification information is used for identifying the type of the optical module;
acquiring optical module data corresponding to the type identification information from an optical module information base;
and rewriting the light module data into the memory.
In a first possible implementation manner, the calculating to obtain the checksum of the data to be verified may specifically be:
summing the data to be checked by taking a byte as a unit, and taking the data of the lowest byte of the sum as the check sum.
In a second possible implementation manner, before the obtaining of the data to be verified and the original checksum of the data to be verified from the memory of the optical module, the method further includes:
and establishing the optical module information base, wherein optical module data corresponding to the types of the plurality of optical modules are recorded in the optical module information base.
In a third possible implementation manner, the obtaining of the data to be verified and the original checksum of the data to be verified from the memory of the optical module may specifically be:
acquiring data to be checked and an original checksum of the data to be checked from a memory of the optical module at preset time intervals; or,
and acquiring data to be checked and an original checksum of the data to be checked from a memory of the optical module through an interrupt mode.
With reference to the first aspect or any one of the first to third possible implementation manners of the first aspect, in a fourth possible implementation manner, the type identification information may be:
the product factory serial number; or,
a combination of vendor name, wavelength, operating rate, transmission distance, and operating mode.
With reference to the first aspect or any one of the first to third possible implementation manners of the first aspect, in a fifth possible implementation manner, the data to be checked is data stored in bytes 0 to 62 in a first slice area of the memory, and the original checksum is data stored in bytes 63 in the first slice area; or,
the data to be checked is data stored in bytes 64 to 94 in a first partition of the memory, and the original checksum is data stored in bytes 95 in the first partition; or,
the data to be checked is data stored in bytes 0 to 94 in a second partition of the memory, and the original checksum is data stored in bytes 95 in the second partition.
In a second aspect, an embodiment of the present invention provides an apparatus for repairing optical module information, including:
the device comprises a calculation identification module, a storage module and a control module, wherein the calculation identification module is used for acquiring data to be checked and an original checksum of the data to be checked from a memory of an optical module, calculating to obtain the checksum of the data to be checked, comparing the calculated checksum with the original checksum, and acquiring type identification information from the memory if the calculated checksum and the original checksum are different, wherein the type identification information is used for identifying the type of the optical module;
an obtaining module, configured to obtain optical module data corresponding to the type identification information from an optical module information base;
and the repair module is used for rewriting the optical module data into the memory.
In a first possible implementation manner, the calculation identification module is specifically configured to:
summing the data to be checked by taking a byte as a unit, and taking the data of the lowest byte of the sum as the check sum.
In a second possible implementation manner, the apparatus for repairing optical module information may further include:
and the base building module is used for building the optical module information base, wherein optical module data corresponding to the types of the plurality of optical modules are recorded in the optical module information base.
In a third possible implementation manner, the obtaining module may be specifically configured to:
acquiring data to be checked and an original checksum of the data to be checked from a memory of the optical module at preset time intervals; or,
and acquiring data to be checked and an original checksum of the data to be checked from a memory of the optical module through an interrupt mode.
With reference to the first aspect or any one of the first to third possible implementation manners of the first aspect, in a fourth possible implementation manner, the type identification information may be:
the product factory serial number; or,
a combination of vendor name, wavelength, operating rate, transmission distance, and operating mode.
With reference to the first aspect or any one of the first to third possible implementation manners of the first aspect, in a fifth possible implementation manner, the data to be checked is data stored in bytes 0 to 62 in a first slice area of the memory, and the original checksum is data stored in bytes 63 in the first slice area; or,
the data to be checked is data stored in bytes 64 to 94 in a first partition of the memory, and the original checksum is data stored in bytes 95 in the first partition; or,
the data to be checked is data stored in bytes 0 to 94 in a second partition of the memory, and the original checksum is data stored in bytes 95 in the second partition.
According to the method and the device for repairing the optical module information, the checksum of the data to be verified in the optical module memory is obtained through calculation, the optical module with abnormal data to be verified is identified through comparison with the original checksum, the type identification information of the optical module is obtained, and the optical module data corresponding to the type identification information in the optical module information base is rewritten into the memory, so that the modified optical module information in the memory is repaired again. The embodiment of the invention solves the problem that in the prior art, after the information in the optical module memory is abnormally rewritten and the optical module fails, the failed optical module can only be replaced manually and cannot be repaired.
Drawings
In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings needed to be used in the description of the embodiments or the prior art will be briefly introduced below, and it is obvious that the drawings in the following description are some embodiments of the present invention, and for those skilled in the art, other drawings can be obtained according to these drawings without creative efforts.
Fig. 1 is a flowchart of a first embodiment of a method for repairing optical module information according to the present invention;
fig. 2 is a flowchart of a second embodiment of a method for repairing optical module information according to the present invention;
FIG. 3 is a diagram illustrating a memory information distribution according to the embodiment of FIG. 2;
fig. 4 is a schematic structural diagram of a first embodiment of an optical module information recovery apparatus according to the present invention;
fig. 5 is a schematic structural diagram of a second embodiment of an optical module information recovery apparatus according to the present invention;
fig. 6 is a schematic structural diagram of a third embodiment of an optical module information recovery apparatus according to the present invention.
Detailed Description
In order to make the objects, technical solutions and advantages of the embodiments of the present invention clearer, the technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the drawings in the embodiments of the present invention, and it is obvious that the described embodiments are some, but not all, embodiments of the present invention. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present invention.
Fig. 1 is a flowchart of a first embodiment of a method for repairing optical module information according to the present invention, and as shown in fig. 1, the embodiment of the present invention provides a method for repairing optical module information, which can be specifically applied to a process of detecting and repairing an optical module in an optical network system. The optical module information repairing method provided in this embodiment may be executed by an optical module information repairing apparatus, and the optical module information repairing apparatus may be integrated in a network device communicating with an optical module, or may be separately set.
The method provided by the embodiment specifically comprises the following steps:
s101, acquiring data to be verified and an original checksum of the data to be verified from a memory of an optical module, calculating to obtain a checksum of the data to be verified, comparing the calculated checksum with the original checksum, and if the calculated checksum and the original checksum are different, acquiring type identification information from the memory, wherein the type identification information is used for identifying the type of the optical module;
specifically, the information of the optical module is stored in the memory of the optical module, and is generally implemented by using an EEPROM. The information of the optical module may include basic identification information, where the basic identification information includes a manufacturer name, an optical module factory serial number, a wavelength, a work rate, a transmission distance, a work mode, and other basic type identification information, and may further include other work parameters. The basic type identification information may indicate the type of the light module. For the enhanced optical module, the information of the optical module may further include diagnostic information, where the diagnostic information may specifically include a temperature parameter, a voltage parameter, a transmission power parameter, a reception power parameter, a bias current parameter, and the like, and the type of the parameter may specifically be a calculation coefficient or an alarm threshold value, and the like. In practical application, the optical module can acquire information such as temperature, voltage, transmission power and bias current of the optical module and store the information in the memory, and the optical module can judge the working state of the optical module according to the parameters and the acquired information and give an alarm when abnormality occurs.
The memory is divided into a plurality of storage areas, and the information of the optical module can be stored in different storage areas. Each memory area has its corresponding check bit, which is, for example, one byte, for storing a checksum, which is the lowest byte of data after all data in the memory area are summed in units of bytes. The data to be verified is the data stored in each storage area. When the optical module is abnormal, the optical module can be repaired through the repairing device of the optical module information, the repairing device of the optical module information can also detect the optical module at a preset time interval, the optical module is repaired when the abnormity is detected, the optical module can also be detected in an interruption mode, and the optical module is repaired when the abnormity is detected.
The optical module information repairing device reads data to be verified from a storage area of a memory, reads an original checksum from a check bit corresponding to the storage area, calculates the checksum of the data to be verified, if the data in the storage area is not modified, the calculated checksum is the same as the original checksum obtained by reading, and if the data in the storage area is modified, the calculated checksum is different from the original checksum obtained by reading.
S102, acquiring optical module data corresponding to the type identification information from an optical module information base;
specifically, if the data in the stored area is modified, the type identification information can be read from the memory, and the probability of the type identification information being modified is small because the type identification information is only a small portion of the data stored in the memory. And inquiring an optical module information base according to the type identification information so as to acquire the optical module data corresponding to the type identification information. The optical module information base is specifically preset, preferably, data of all different types of optical modules are stored in the optical module information base, and can be searched through the type identification information. The optical module information base may be provided in the optical module information repair device, or may be provided in a network device or other network device communicating with the optical module.
And S103, rewriting the optical module data into the memory.
Specifically, the memory of the optical module is subjected to write operation, and correct information is rewritten into the optical module, so that data recovery is completed. In the data recovery process, all data of the optical module can be rewritten into the memory, or only the data corresponding to the modified storage area can be written into the storage area, so that the pertinence of data repair is improved.
According to the method for repairing the optical module information, the device for repairing the optical module information acquires the data to be verified and the original checksum of the data to be verified from the memory of the optical module, calculates the checksum of the data to be verified, compares the calculated checksum with the original checksum, acquires the type identification information from the memory if the checksum and the original checksum are different, acquires the data of the optical module corresponding to the type identification information from the optical module information base, and writes the data of the optical module into the memory again. When the network equipment reads the data in the memory in the optical module through the IIC bus, and the data in the memory is modified due to the fact that IIC signals are unstable, the data in the memory can be determined to be modified in a mode of comparing checksums, the modified data can be repaired, timely and effective recovery of damaged information in the memory of the optical module is achieved, and normal operation of an optical network system is guaranteed.
In the method in the above embodiment, the step of calculating to obtain the checksum of the data to be verified may specifically be:
summing the data to be checked by taking a byte as a unit, and taking the data of the lowest byte of the sum as the check sum.
In particular, the checksum, which ultimately stores only the lowest byte of data, as the checksum, the data of the other overflow bits are no longer stored,
further, in the method in the above embodiment, before the obtaining the data to be verified and the original checksum of the data to be verified from the memory of the optical module, the method may further include:
and establishing the optical module information base, wherein optical module data corresponding to the types of the plurality of optical modules are recorded in the optical module information base.
Specifically, the optical module information base stores data of all different types of optical modules, and can search through the type identification information. The method for establishing the optical module information base can be realized by adopting the existing database establishing method.
Fig. 2 is a flowchart of a second embodiment of a method for repairing optical module information according to the present invention, and fig. 3 is a schematic diagram of a memory information distribution in the embodiment of fig. 2, which is specifically described in this embodiment by taking an optical module of a Small Form-factor plug packages (SFP) type as an example, where the memory information distribution diagram shown in fig. 3 is a schematic diagram of a memory in one embodiment of the present invention, and the memory information distribution diagram is for an optical module of an SFP package type, and there are differences between optical modules of other types. The information stored in the memory and how the storage partition is partitioned in the embodiment of the present invention include, but are not limited to, correspondence between each information and an address.
As shown in fig. 2 and 3, the optical module stores basic identification information and diagnostic information using an EEPROM, for example. The network equipment accesses the EEPROM built in the optical module through an IIC bus, and the IIC bus is a two-wire serial bus and is widely used for connecting a microcontroller and peripheral equipment thereof in the field of microelectronic communication control. In this embodiment, the information of the optical module in the EEPROM can be conveniently obtained through the IIC bus, and the information in the EEPROM is described below:
as shown in fig. 3, the distribution of the optical module information according to the embodiment of the present invention is illustrated, and specifically includes the following information: the optical module type identification information and other diagnostic information may be stored in different partitions, and for the enhanced optical module, the information may further include an inherent value of a parameter to be detected, such as a calculation coefficient or an alarm threshold value of one parameter.
In the method of this embodiment, the optical module type identification information may be:
the product factory serial number; or a combination of vendor name, wavelength, operating rate, transmission distance, and operating mode.
When the optical module is detected, the data of the information is the data to be detected. The data to be checked may be data stored in bytes 0 to 62 in a first partition of the memory, and the original checksum is data stored in bytes 63 in the first partition; or,
the data to be checked is data stored in bytes 64 to 94 in a first partition of the memory, and the original checksum is data stored in bytes 95 in the first partition; or,
the data to be checked is data stored in bytes 0 to 94 in a second partition of the memory, and the original checksum is data stored in bytes 95 in the second partition.
Specifically, taking an SFP optical module as an example, according to the SFF-8472 standard in the optical module industry, a general EEPROM built in the optical module includes two areas a0 and a2, that is, the first chip area and the second chip area. The a0 chip area mainly stores optical module basic identification information, such as address 9 for marking the operating mode of the optical module, address 12 for marking the operating speed of the optical module, addresses 14-17 for marking the transmission distance of the optical module, addresses 20-35 for marking the manufacturer name of the optical module, addresses 40-55 for marking the factory serial number of the optical module, and addresses 60-61 for marking the transmission wavelength of the optical module. The A2 area mainly stores the diagnosis information of the optical module, including temperature, transmitting and receiving optical power, current and voltage, etc.
The 63 th byte of the A0 fragment area stores checksum data of 0-62 bytes, and the 95 th byte stores checksum data of 64-94 bytes. For the enhanced optical module, the 95 th byte of the A2 parcel is used for checking the data accuracy of 0-94 bytes.
According to the SFF-8472 specification, the data checksum algorithm on the optical module is to accumulate all data in the data area to be checked, and take the lowest byte data value of the accumulated sum as the checksum.
The following describes in detail a specific implementation procedure of the optical module information repairing method according to this embodiment with reference to fig. 2.
S201, detecting a light module by software at regular time, namely acquiring data to be verified and an original checksum of the data to be verified from a memory of the light module at a preset time interval, wherein the time interval of the regular detection can be set arbitrarily as required; or,
s202, an optical module is inserted into the network equipment, an optical module insertion interrupt processing process is triggered to detect the optical module, namely, the optical module is inserted into the equipment when the optical network equipment normally operates, the optical module insertion interrupt processing process is triggered, and data to be verified and an original checksum of the data to be verified are acquired from a memory of the optical module through interrupt mode triggering.
Specifically, through the combination of software timing detection and optical module insertion interruption, in a timer processing function and an optical module insertion interruption processing function, a certain algorithm is used for calculating the checksum of each area in the optical module built-in EEPROM, wherein the checksum comprises checksum data of 0-62 bytes stored in the 63 th byte of the A0 fragment area and checksum data of 64-94 bytes stored in the 95 th byte. For the enhanced optical module, the method further comprises checksum data of 0-94 bytes stored in the 95 th byte of the A2 parcel.
In the practical application process, the detection mode can be preset, namely the mode of timing detection or interrupt detection can be selected, or the timing detection mode and the interrupt detection mode can be matched. Step 201 and step 202 do not necessarily have a timing relationship.
And S203, calculating the checksum of the data to be checked, comparing the calculated checksum with the original checksum, and judging whether the optical module is normal.
And calculating the checksum of the data to be verified acquired in any one of the detection modes of S201 or S202, for example, calculating the checksum obtained from the 0 th to 62 th byte of the a0 chip area, and comparing the checksum with the original checksum data read from the corresponding check bit in the EEPROM built in the optical module, for example, the 63 th byte of the a0 chip area, wherein if the data in the characteristic information storage area of the optical module is not modified, the calculated checksum is the same as the original checksum obtained by reading, and if the data in the storage area is modified, the calculated checksum is different from the original checksum obtained by reading. If the checksum comparison is the same, indicating that the optical module information is normal, executing detection to end S208; if the difference indicates that the optical module information is abnormal, the following steps are continuously executed, and the accuracy of the optical module information can be timely and stably detected in a mode of calculating and comparing checksums, so that the abnormal condition of the optical module information can be found as soon as possible.
And S204, acquiring the type identification information from the memory, and identifying the type of the abnormal optical module.
The type identification information is used to identify the type of the optical module, and may include unique identification information of the following optical module type. Specifically, after the module abnormality is detected, the model of the specific faulty optical module may be identified through unique identification information of the optical module type, such as a combination of a manufacturer name + a wavelength + a work rate + a transmission distance + a work mode or a single use of an optical module factory serial number, for example, first, the optical module factory serial number is used to see whether the corresponding optical module type exists or not, if the optical module factory serial number can be normally identified, the following steps are performed, if the optical module type cannot be identified, then, whether the corresponding optical module type exists or not is checked through a combination of the manufacturer name + the wavelength + the work rate + the transmission distance + the work mode, and if the optical module type cannot be identified, the following step S207 is performed.
S205, obtaining the optical module data corresponding to the type identification information from the optical module information base, that is, accessing the optical module information base to obtain correct optical module information.
Specifically, an optical module information base is accessed, the identified type of the optical module is searched and compared in the information base, correct information of the optical module is taken out, writing operation is carried out on an EEPROM of the optical module, the correct information is rewritten into the optical module, and data recovery is completed.
And S206, repairing the optical module.
Specifically, the optical module data is rewritten into the memory.
And S207, prompting the user. The prompt information including the unrecognizable or repair success is respectively corresponding to S204 and S206 described above. Furthermore, the user can be prompted in modes of abnormal printing, system logs and the like while repairing, and problem positioning is facilitated.
And S208, finishing detection.
The design idea of the software part of the embodiment is as follows: and the abnormity of the optical module is detected in time, the type of the optical module is rapidly identified, and the abnormal optical module is accurately repaired.
The embodiment provides a method for detecting the information abnormality of the built-in EEPROM of the optical module timely, effectively and stably when the optical module is used by the network equipment, and provides a scheme for repairing the data abnormality of the optical module.
The method of the embodiment can repair the phenomenon that the service of the network equipment is damaged or even interrupted due to the problems in time, can reduce the service loss of the client to the minimum and better improve the satisfaction degree of the client to the network equipment.
Fig. 4 is a schematic structural diagram of a first embodiment of the apparatus for repairing optical module information according to the present invention, as shown in fig. 4, the apparatus for repairing optical module information provided in this embodiment may specifically implement each step of the method for repairing optical module information provided in any embodiment of the present invention, and a specific implementation process is not described herein again, and the apparatus for repairing optical module information provided in this embodiment specifically includes:
a calculation and identification module 401, configured to obtain data to be checked and an original checksum of the data to be checked from a memory of an optical module, calculate a checksum of the data to be checked, compare the calculated checksum with the original checksum, and if the checksum and the original checksum are different, obtain type identification information from the memory, where the type identification information is used to identify a type of the optical module;
an obtaining module 402, configured to obtain optical module data corresponding to the type identification information from an optical module information base;
and a repair module 403, configured to rewrite the optical module data into the memory.
The apparatus of this embodiment may be used to implement the technical solution of the method embodiment shown in fig. 1, and the implementation principle thereof is similar, which is not described herein again.
In this embodiment, a checksum of data to be verified in a memory of an optical module is obtained through calculation by the calculation and identification module 401, the optical module with abnormal data to be verified is identified through comparison with an original checksum, and by acquiring optical module type identification information, the acquisition module 402 and the repair module 403 rewrite optical module data corresponding to the type identification information in an optical module information base into the memory, so as to implement repair of modified optical module information in the memory. The embodiment of the invention solves the problem that in the prior art, after the information in the optical module memory is abnormally rewritten and the optical module fails, the failed optical module can only be replaced manually and cannot be repaired.
Further, in the apparatus in the foregoing embodiment, the calculation identifying module 401 is specifically configured to:
summing the data to be checked by taking a byte as a unit, and taking the data of the lowest byte of the sum as the check sum.
In the apparatus in the foregoing embodiment, the obtaining module 402 may be specifically configured to:
acquiring data to be checked and an original checksum of the data to be checked from a memory of the optical module at preset time intervals; or,
and acquiring data to be checked and an original checksum of the data to be checked from a memory of the optical module through an interrupt mode.
In the apparatus in the foregoing embodiment, the type identification information may be:
the product factory serial number; or,
a combination of vendor name, wavelength, operating rate, transmission distance, and operating mode.
The apparatus of the above-described embodiment, wherein,
the data to be checked is data stored in bytes 0 to 62 in a first partition of the memory, and the original checksum is data stored in bytes 63 in the first partition; or,
the data to be checked is data stored in bytes 64 to 94 in a first partition of the memory, and the original checksum is data stored in bytes 95 in the first partition; or,
the data to be checked is data stored in bytes 0 to 94 in a second partition of the memory, and the original checksum is data stored in bytes 95 in the second partition.
Fig. 5 is a schematic structural diagram of a second embodiment of the optical module information repairing apparatus according to the present invention, as shown in fig. 5, the difference between this embodiment and the embodiment shown in fig. 4 is that further the apparatus may further include:
and a base building module 404, configured to build the optical module information base, where optical module data corresponding to the types of the multiple optical modules are recorded in the optical module information base.
The embodiment of the invention identifies the fault optical module and automatically repairs the fault optical module aiming at the condition that the information of the EEPROM arranged in the optical module is rewritten to influence the correct use of the optical module due to the abnormity of the IIC bus. The embodiment of the invention can effectively identify and solve the optical module fault, enhance the maintainability of the equipment and greatly reduce the maintenance cost of the equipment.
Fig. 6 is a schematic structural diagram of a third embodiment of the optical module information repairing apparatus according to the present invention, and as shown in fig. 6, the optical module information repairing apparatus 100 provided in the embodiment of the present invention is used for repairing information in the EEPROM 300 in the optical module 100. The repair device includes at least one processor 400, a memory 500. The processor 400 comprises a calculation identification module 401, an acquisition module 402, a repair module 403 and a library building module 404, which are described above, and the functions and functions of the modules are the same as those of the above embodiment. The memory 500 contains a light module information base 501, and the memory 500 may be a high-speed RAM memory or a non-volatile memory (non-volatile memory), such as at least one disk memory. The memory 500 may optionally comprise at least one storage device located remotely from the light module. In some embodiments, the memory 500 stores elements of type identification information of the light modules and data of the related light modules.
The optical module information repairing apparatus 100 may be independent or may be integrated with other network devices. Meanwhile, the types of the optical modules in the above embodiments are not limited.
In summary, in the method and apparatus for repairing optical module information according to the embodiments of the present invention, a checksum of data to be verified in an optical module memory is obtained through calculation, an optical module with abnormal data to be verified is identified through comparison with an original checksum, and optical module data corresponding to type identification information in an optical module information base is rewritten into the memory by acquiring optical module type identification information, so as to implement reparation of modified optical module information in the memory. The embodiment of the invention solves the problem that in the prior art, after the information in the optical module memory is rewritten and the optical module fails, the failed optical module can only be replaced manually and cannot be repaired.
Those of ordinary skill in the art will understand that: all or a portion of the steps of implementing the above-described method embodiments may be performed by hardware associated with program instructions. The program may be stored in a computer-readable storage medium. When executed, the program performs steps comprising the method embodiments described above; and the aforementioned storage medium includes: various media that can store program codes, such as ROM, RAM, magnetic or optical disks.
Finally, it should be noted that: the above embodiments are only used to illustrate the technical solution of the present invention, and not to limit the same; while the invention has been described in detail and with reference to the foregoing embodiments, it will be understood by those skilled in the art that: the technical solutions described in the foregoing embodiments may still be modified, or some or all of the technical features may be equivalently replaced; and the modifications or the substitutions do not make the essence of the corresponding technical solutions depart from the scope of the technical solutions of the embodiments of the present invention.
Claims (12)
1. A method for repairing optical module information, comprising:
acquiring data to be checked and an original checksum of the data to be checked from a memory of an optical module, calculating to obtain a checksum of the data to be checked, comparing the calculated checksum with the original checksum, and if the checksum and the original checksum are different, acquiring type identification information from the memory, wherein the type identification information is used for identifying the type of the optical module;
acquiring optical module data corresponding to the type identification information from an optical module information base;
and rewriting the light module data into the memory.
2. The method for repairing optical module information according to claim 1, wherein the calculating to obtain the checksum of the data to be verified specifically includes:
summing the data to be checked by taking a byte as a unit, and taking the data of the lowest byte of the sum as the check sum.
3. The method for repairing optical module information according to claim 1, wherein before the obtaining the data to be verified and the original checksum of the data to be verified from the memory of the optical module, the method further comprises:
and establishing the optical module information base, wherein optical module data corresponding to the types of the plurality of optical modules are recorded in the optical module information base.
4. The method for repairing optical module information according to claim 1, wherein the obtaining of the data to be verified and the original checksum of the data to be verified from the memory of the optical module specifically includes:
acquiring data to be checked and an original checksum of the data to be checked from a memory of the optical module at preset time intervals; or,
and acquiring data to be checked and an original checksum of the data to be checked from a memory of the optical module through an interrupt mode.
5. The method for repairing optical module information according to any one of claims 1 to 4, wherein the type identification information is:
the product factory serial number; or,
a combination of vendor name, wavelength, operating rate, transmission distance, and operating mode.
6. The method for repairing optical module information according to any one of claims 1 to 4, wherein:
the data to be checked is data stored in bytes 0 to 62 in a first partition of the memory, and the original checksum is data stored in bytes 63 in the first partition; or,
the data to be checked is data stored in bytes 64 to 94 in a first partition of the memory, and the original checksum is data stored in bytes 95 in the first partition; or,
the data to be checked is data stored in bytes 0 to 94 in a second partition of the memory, and the original checksum is data stored in bytes 95 in the second partition.
7. An optical module information repair device, comprising:
the device comprises a calculation identification module, a storage module and a control module, wherein the calculation identification module is used for acquiring data to be checked and an original checksum of the data to be checked from a memory of an optical module, calculating to obtain the checksum of the data to be checked, comparing the calculated checksum with the original checksum, and acquiring type identification information from the memory if the calculated checksum and the original checksum are different, wherein the type identification information is used for identifying the type of the optical module;
an obtaining module, configured to obtain optical module data corresponding to the type identification information from an optical module information base;
and the repair module is used for rewriting the optical module data into the memory.
8. The apparatus for repairing optical module information according to claim 7, wherein the calculation and identification module is specifically configured to:
summing the data to be checked by taking a byte as a unit, and taking the data of the lowest byte of the sum as the check sum.
9. The apparatus for repairing optical module information according to claim 7, further comprising:
and the base building module is used for building the optical module information base, wherein optical module data corresponding to the types of the plurality of optical modules are recorded in the optical module information base.
10. The apparatus for repairing optical module information according to claim 7, wherein the obtaining module is specifically configured to:
acquiring data to be checked and an original checksum of the data to be checked from a memory of the optical module at preset time intervals; or,
and acquiring data to be checked and an original checksum of the data to be checked from a memory of the optical module through an interrupt mode.
11. The apparatus for repairing optical module information according to any one of claims 7 to 10, wherein the type identification information is:
the product factory serial number; or,
a combination of vendor name, wavelength, operating rate, transmission distance, and operating mode.
12. The apparatus for restoring optical module information according to any one of claims 7 to 10, wherein:
the data to be checked is data stored in bytes 0 to 62 in a first partition of the memory, and the original checksum is data stored in bytes 63 in the first partition; or,
the data to be checked is data stored in bytes 64 to 94 in a first partition of the memory, and the original checksum is data stored in bytes 95 in the first partition; or,
the data to be checked is data stored in bytes 0 to 94 in a second partition of the memory, and the original checksum is data stored in bytes 95 in the second partition.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201210462365.7A CN103825649A (en) | 2012-11-16 | 2012-11-16 | Optical module information restoration method and apparatus |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201210462365.7A CN103825649A (en) | 2012-11-16 | 2012-11-16 | Optical module information restoration method and apparatus |
Publications (1)
Publication Number | Publication Date |
---|---|
CN103825649A true CN103825649A (en) | 2014-05-28 |
Family
ID=50760512
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201210462365.7A Pending CN103825649A (en) | 2012-11-16 | 2012-11-16 | Optical module information restoration method and apparatus |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN103825649A (en) |
Cited By (6)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN106936653A (en) * | 2015-12-30 | 2017-07-07 | 华为数字技术(苏州)有限公司 | A kind of recognition methods of optical mode block type and device |
CN107068181A (en) * | 2017-04-05 | 2017-08-18 | 青岛海信宽带多媒体技术有限公司 | The method for writing data and device of driving chip in optical module |
CN109100116A (en) * | 2018-05-24 | 2018-12-28 | 烽火通信科技股份有限公司 | A kind of optical module fault diagnosis system and method |
WO2019000510A1 (en) * | 2017-06-30 | 2019-01-03 | 杭州旗捷科技有限公司 | Data protection method for chip rewriting equipment, electronic equipment and storage medium |
CN110535674A (en) * | 2018-05-25 | 2019-12-03 | 中兴通讯股份有限公司 | Optical module threshold regulating method, device, equipment and the storage medium of the network equipment |
CN113727208A (en) * | 2021-08-30 | 2021-11-30 | 杭州云合智网技术有限公司 | Communication method, device, equipment and medium for quickly reading and writing parameter information of optical module |
Citations (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN1650267A (en) * | 2002-04-25 | 2005-08-03 | 甲骨文国际公司 | Enhancements to data integrity verification mechanism |
CN1949687A (en) * | 2006-11-20 | 2007-04-18 | 杭州华为三康技术有限公司 | Method and apparatus for processing light module information in communication apparatus |
US20110138240A1 (en) * | 2001-10-11 | 2011-06-09 | Altera Corporation | Error detection on programmable logic resources |
-
2012
- 2012-11-16 CN CN201210462365.7A patent/CN103825649A/en active Pending
Patent Citations (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US20110138240A1 (en) * | 2001-10-11 | 2011-06-09 | Altera Corporation | Error detection on programmable logic resources |
CN1650267A (en) * | 2002-04-25 | 2005-08-03 | 甲骨文国际公司 | Enhancements to data integrity verification mechanism |
CN1949687A (en) * | 2006-11-20 | 2007-04-18 | 杭州华为三康技术有限公司 | Method and apparatus for processing light module information in communication apparatus |
Cited By (8)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN106936653A (en) * | 2015-12-30 | 2017-07-07 | 华为数字技术(苏州)有限公司 | A kind of recognition methods of optical mode block type and device |
CN106936653B (en) * | 2015-12-30 | 2020-04-28 | 华为数字技术(苏州)有限公司 | Optical module type identification method and device |
CN107068181A (en) * | 2017-04-05 | 2017-08-18 | 青岛海信宽带多媒体技术有限公司 | The method for writing data and device of driving chip in optical module |
CN107068181B (en) * | 2017-04-05 | 2020-09-29 | 青岛海信宽带多媒体技术有限公司 | Data writing method and device for driving chip in optical module |
WO2019000510A1 (en) * | 2017-06-30 | 2019-01-03 | 杭州旗捷科技有限公司 | Data protection method for chip rewriting equipment, electronic equipment and storage medium |
CN109100116A (en) * | 2018-05-24 | 2018-12-28 | 烽火通信科技股份有限公司 | A kind of optical module fault diagnosis system and method |
CN110535674A (en) * | 2018-05-25 | 2019-12-03 | 中兴通讯股份有限公司 | Optical module threshold regulating method, device, equipment and the storage medium of the network equipment |
CN113727208A (en) * | 2021-08-30 | 2021-11-30 | 杭州云合智网技术有限公司 | Communication method, device, equipment and medium for quickly reading and writing parameter information of optical module |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN103825649A (en) | Optical module information restoration method and apparatus | |
US7240178B2 (en) | Non-volatile memory and non-volatile memory data rewriting method | |
CN105308609B (en) | The system and method for storing event data | |
CN110413439B (en) | Method, apparatus and computer readable medium for detecting incomplete writing of data | |
CN110442473B (en) | Nonvolatile data storage method and device, electronic equipment and medium | |
CN110286853B (en) | Data writing method and device and computer readable storage medium | |
CN102467440A (en) | Internal memory error detection system and method | |
US20170031595A1 (en) | Performance optimization of read functions in a memory system | |
CN105843699A (en) | Error monitoring of a memory device containing embedded error correction | |
JP2013131893A (en) | Optical communication module, log recording method for optical communication module, and optical communication device | |
KR20140051864A (en) | Mram field disturb detection and recovery | |
CN113760619A (en) | Storage device testing method and device, electronic device and storage medium | |
CN109801668A (en) | Data memory device and the operating method being applied thereon | |
CN102369515B (en) | System and method for data survivability | |
CN102971984B (en) | Method for authenticating a storage device and host device | |
CN112231140A (en) | Method, system, terminal and storage medium for fault recovery of BMC (baseboard management controller) of storage device | |
CN112114220A (en) | Fault detection method and device | |
US20180373648A1 (en) | Method for writing in a non-volatile memory of an electronic entity, and related electronic entity | |
US8527839B2 (en) | On-the-fly repair method for memory | |
US8151176B2 (en) | CPU instruction RAM parity error procedure | |
US20140281725A1 (en) | Detection of memory cells that are stuck in a physical state | |
CN106940666B (en) | Memory data detection method | |
CN108829417B (en) | Upgrading device, method, equipment and storage medium of CPLD | |
CN108334286B (en) | High-reliability embedded software data power-down prevention method and system | |
US10754566B2 (en) | Data storage device and data storage method |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
C06 | Publication | ||
PB01 | Publication | ||
C10 | Entry into substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
RJ01 | Rejection of invention patent application after publication |
Application publication date: 20140528 |
|
RJ01 | Rejection of invention patent application after publication |