Optical module upgrade device, system and method
By locally storing and burning HEX files in the optical module upgrade device, the problem of low traditional burning efficiency is solved, efficient optical module upgrade and real-time monitoring are achieved, multiple modules are supported to be upgraded at the same time, and equipment utilization is improved.
Patent Information
- Application Number
- CN202110997135.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2021-08-27
- Publication Date
- 2024-09-27
- Estimated Expiration
- 2041-08-27
AI Technical Summary
In the traditional optical module burning method, the HEX file is stored on the PC, which results in a long data transmission path, low burning efficiency, and requires multiple communications, which affects efficiency.
Design an optical module upgrade device, including a connection module, a communication module, a verification module, a storage module and a burning module. The HEX file is stored and burned locally in the device, and is burned directly from the local area, which reduces the need for the PC and the optical module. Data transmission increases programming efficiency and supports simultaneous connection of multiple optical modules through multiple connection ports.
It shortens the data transmission distance during the burning process, improves the burning efficiency, supports batch upgrades and improves equipment resource utilization, and realizes real-time operating parameter monitoring and status adjustment.
Smart Images

Figure CN113672246B
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of module burning, and in particular to an optical module upgrading device, an optical module upgrading system and an optical module upgrading method. Background Art
[0002] As a carrier for transmission between switches and devices, optical modules are more efficient and secure than transceivers, so they are widely used. After the development of the optical module is completed, its data area is blank. Before assembly and use, the latest version of the control program and data need to be written using a burner to enable it to achieve the corresponding functions. Even if the optical module has been put into use, there is still a situation where the control program is upgraded in the future. When upgrading the optical module, it also needs to be burned. In the traditional burning tool, the optical module is inserted into the test board. The test board communicates with the optical module as the main device through I2C (Inter-Integrated Circuit, a two-way two-wire synchronous serial bus). The test board and the computer are connected through a USB (Universal Serial Bus, Universal Serial Bus) data cable, and the burning tool communicates with the test board as the main device. The HEX file used for burning is stored on the computer. During burning, the burning tool will read and verify the HEX file, and then send it to the test board in units of lines. After receiving the data, the test board uses the BootLoader sent to the optical module through the I2C bus for burning. In this burning method, the HEX file is always stored in the PC, and the optical module is burned through the PC, and it needs to be tested at intervals. Therefore, the data transmission path during the entire burning process is very long, and the burning efficiency becomes very low. And when performing burning communication, it is necessary to repeatedly perform multiple communications along the communication link, which further affects the burning efficiency. In view of the many drawbacks of the existing burning method, it is necessary to create a new optical module upgrade method. Summary of the invention
[0003] The purpose of the embodiments of the present invention is to provide an optical module upgrading device, system and method to at least solve the problem of low existing burning efficiency.
[0004] In order to achieve the above-mentioned purpose, the first aspect of the present invention provides an optical module upgrading device, which includes: a connection module, which is used to connect the optical module; a communication module, which is connected to the PC end and is used to obtain the HEX file to be burned; a verification module, which is used to verify the HEX file and send the HEX file that passes the verification to the storage module; the storage module is used to store the HEX file that passes the verification; and a burning module, which is used to obtain the HEX file that passes the verification from the storage module and burn the HEX file that passes the verification into the connected optical module.
[0005] Optionally, the connection module includes multiple connection ports for connecting multiple optical modules at the same time.
[0006] Optionally, the communication module is connected to the PC via USB.
[0007] Optionally, the device further includes: a collection module for collecting operating parameters of the optical module upgrading device during the optical module burning process, and transmitting the operating parameters to the communication module; the communication module is also used to send the operating parameters to the PC.
[0008] The second aspect of the present invention provides an optical module upgrade system, including the above-mentioned optical module upgrade device, and the system also includes: a PC end, used to: provide the HEX file to be burned to the optical module upgrade device; and monitor the operating status of the optical module upgrade device according to the operating parameters received from the optical module upgrade device.
[0009] The third aspect of the present invention provides an optical module upgrade method, which is implemented based on the above-mentioned optical module upgrade system, and the method includes: S1) in response to the optical module upgrade trigger instruction, obtaining a HEX file to be burned from a PC; S2) verifying the obtained HEX file, and storing the HEX file that passes the verification locally; S3) directly extracting the HEX file that passes the verification from the local, and burning the HEX file that passes the verification into the connected optical module.
[0010] Optionally, in step S3), before burning the verified HEX file into the connected optical module, the method also includes: performing an identity review on the connected optical module: obtaining a serial number list of the optical module to be burned this time from the PC; reading the serial number of the connected optical module; if the serial number of the connected optical module exists in the serial number list, or the serial number of the connected optical module is displayed as not existing; then it is determined that the identity review of the connected optical module has passed, and the verified HEX file is burned into the connected optical module.
[0011] Optionally, in step S3), burning the verified qualified HEX file into the connected optical module includes at least the following steps: jumping to BootLoader, flash erasing, burning and testing communication.
[0012] Optionally, the method also includes: acquiring operating parameters during the optical module burning process in real time, and transmitting the operating parameters to a PC, so that the PC can monitor the operating status of the optical module upgrade device in real time according to the operating parameters; and executing operating status adjustment of the optical module upgrade device in response to abnormal operation adjustment instructions received from the PC.
[0013] On the other hand, the present invention provides a computer-readable storage medium, on which instructions are stored, which, when executed on a computer, enable the computer to execute the above-mentioned optical module upgrading method.
[0014] Through the above technical solution, the HEX file to be burned is stored locally in the optical module upgrade device. When burning, the connected optical module is burned directly through the local HEX file. This avoids the step of real-time data transmission from the PC to the optical module during the burning process, greatly shortening the transmission distance and improving the burning efficiency.
[0015] Other features and advantages of the embodiments of the present invention will be described in detail in the following detailed description. BRIEF DESCRIPTION OF THE DRAWINGS
[0016] The accompanying drawings are used to provide a further understanding of the embodiments of the present invention and constitute a part of the specification. Together with the following specific embodiments, they are used to explain the embodiments of the present invention, but do not constitute a limitation on the embodiments of the present invention. In the accompanying drawings:
[0017] Figure 1 It is a structural schematic diagram of an optical module upgrading device provided by an embodiment of the present invention;
[0018] Figure 2 The present invention is a flowchart of the steps of an optical module upgrade method provided by one embodiment of the present invention.
[0019] Description of Reference Numerals
[0020] 10-PC terminal; 20-communication module; 30-verification module; 40-storage module; 50-burning module; 60-connection module. DETAILED DESCRIPTION
[0021] The specific implementation of the present invention is described in detail below in conjunction with the accompanying drawings. It should be understood that the specific implementation described here is only used to illustrate and explain the present invention, and is not used to limit the present invention.
[0022] Figure 1 FIG. 1 is a device structure diagram of an optical module upgrade device provided by an embodiment of the present invention. Figure 1As shown, an embodiment of the present invention provides an optical module upgrading device, which includes: a connection module 60, used to connect the optical module; a communication module 20, connected to the PC end 10, for obtaining a HEX file to be burned; a verification module 30, used to verify the HEX file, and send the verified HEX file to the storage module 40; the storage module 40, used to store the verified HEX file; a burning module 50, used to obtain the verified HEX file from the storage module 40, and burn the verified HEX file into the connected optical module.
[0023] In an embodiment of the present invention, in a traditional burning tool, the optical module is inserted into a test board, and the test board communicates with the optical module as a master device through I2C (Inter-Integrated Circuit, a two-way two-wire synchronous serial bus), and the test board and the computer end are connected through a USB (Universal Serial Bus, Universal Serial Bus) data line, and the burning tool communicates with the test board as a master device. The HEX file used for burning is stored on the computer. During burning, the burning tool reads and verifies the HEX file, and then sends it to the test board in units of lines. After receiving the data, the test board uses the BootLoader sent to the optical module through the I2C bus for burning. Under this burning method, the HEX file is always stored in the PC end 10, and the optical module is burned through the PC end 10, and the test board needs to be performed at intervals. Therefore, the data transmission path in the entire burning process is very long, and the burning efficiency becomes very low. And when performing burning communication, it is necessary to repeatedly perform multiple communications along the communication link, which further affects the burning efficiency. The optical module upgrading device proposed by the present invention stores the HEX file of the optical module in the test board, and allows the test board to do the burning work. In this way, there is no communication between the computer and the test board during the burning process, and the burning speed will be greatly accelerated.
[0024] Preferably, the connection module 60 includes multiple connection ports for connecting multiple optical modules at the same time.
[0025] In the embodiment of the present invention, the existing burning method, the PC end 10, the test board and the optical module are all one-to-one pairing relationships, that is, only one optical module can be burned at the same time. When the number of optical modules to be upgraded is large, not only will the workload be greatly increased and the burning time be extended, but also great equipment resources will be wasted, and the equipment utilization efficiency cannot be improved. By arranging multiple connection ports in the connection module 60, multiple optical modules can be connected at the same time, and the synchronous burning of multiple optical modules is performed, which not only improves the upgrade efficiency of batch optical modules, but also greatly enhances the utilization efficiency of each equipment resource.
[0026] Preferably, the communication module 20 is connected to the PC terminal 10 via USB.
[0027] In the embodiment of the present invention, USB communication technology is the most widely used communication technology between PC and external devices. Its universality and practicality will greatly reduce the architecture cost of the device and ensure the communication stability between the device and the PC end 10.
[0028] Preferably, the device also includes: a collection module for collecting operating parameters of the optical module upgrading device during the optical module burning process, and transmitting the operating parameters to the communication module 20; the communication module 20 is also used to send the operating parameters to the PC terminal 10.
[0029] In an embodiment of the present invention, the traditional burning method, because the optical module is burned directly through the PC terminal 10, all process operating parameters are read locally through the PC terminal 10, although the information reading is relatively simple. But all feedback information needs to be fed back to the PC terminal 10 along the preset link. As is known above, the transmission link of the traditional burning method is very long, so there is a partial delay in the message of the feedback, which makes it impossible to read the real-time operating state in time on the one hand, and also makes the monitoring efficiency lower on the other hand. Therefore, the burning step is concentrated on the optical module upgrade device, and then the monitoring unit is set locally in the optical module for collecting real-time operating parameters, and the operating parameters are transmitted to the PC terminal 10, which ensures that the near light module end is efficiently upgraded while realizing the monitoring of the burning process.
[0030] An embodiment of the present invention also provides an optical module upgrade system, including the above-mentioned optical module upgrade device, and the system also includes: a PC end 10, used to: provide a HEX file for the optical module upgrade device; and monitor the operating status of the optical module upgrade device according to the operating parameters collected by the acquisition module in the optical module upgrade device.
[0031] In an embodiment of the present invention, the HEX file to be upgraded is still generated or uploaded by the PC terminal 10, and then the file is transferred to the optical module upgrade device through the USB port. After the optical module upgrade device stores the acquired HEX file locally, it is burned, avoiding the long-distance communication mode of burning data transmission through the PC terminal 10 in real time, and improving the burning rate. Because the burning step is performed at the optical module upgrade device end, the burning process does not require the participation of the PC terminal 10, so the burning process cannot be monitored through the PC terminal 10. In order to solve this problem, a communication connection is established between the PC terminal 10 and the acquisition module, and the operating parameters of the optical module upgrade device are obtained in real time through the acquisition module, and then the operating status of the optical module upgrade device is monitored according to the operating parameters.
[0032] Figure 2FIG. 1 is a flowchart of a method for upgrading an optical module provided by an embodiment of the present invention. Figure 2 As shown, an embodiment of the present invention provides an optical module upgrading method, the method comprising:
[0033] Step S10: In response to the optical module upgrade trigger instruction, the HEX file to be burned is obtained from the PC terminal 10.
[0034] Specifically, when a batch of optical modules needs to be upgraded or a new optical module needs to be burned, a burning instruction is triggered on the PC end 10. The PC end 10 packages the HEX file to be burned and sends it to the optical module upgrade device for possible burning.
[0035] Step S20: verify the obtained HEX file, and store the HEX file that passes the verification locally.
[0036] Specifically, when the PC terminal 10 transmits the HEX file to the optical module upgrade device, whether it is the early compression transmission or the reception decompression and restoration of the rear drive, the possibility of file damage may occur. In order to avoid the burning failure caused by using the misplaced HEX file for burning, preferably, after the device receives the HEX file, the file integrity is first verified. The verification module 30 verifies the received HEX file according to the HEX file list received as needed, and determines whether the received file is complete. If it is determined that the received file is incomplete, it means that it cannot be burned, and the information of the burning failure is fed back to the PC terminal 10 through the communication module 20, and then the burning failure information is output through the PC terminal 10 for relevant personnel to check. If it is determined that the HEX file is complete, then the version number of the HEX file is verified, that is, it is determined whether the currently obtained HEX file is the HEX file required for the upcoming upgrade. Only when the HEX integrity and version number are both verified and qualified, it is determined that the currently received HEX file can be used for the upcoming burning work. The verification module 30 outputs a verification pass signal and transmits the file to the storage module 40. The storage module 40 stores the HEX file that has passed the verification for subsequent burning steps.
[0037] Step S30: directly extracting the verified HEX file from the local computer, and burning the verified HEX file into the connected optical module.
[0038] Specifically, after completing the file verification, the connected optical module also needs to be verified. The corresponding HEX file is only applicable to the corresponding optical module type or the bare chip that needs to be burned, so after the optical module is connected to the connection module 60, the serial number of each connected optical module is obtained through the acquisition module. Then the optical module serial number of each connection port is compared with the batch upgrade optical module sequence table obtained through the PC terminal 10 one by one to verify whether the actual serial number collected is in the sequence table. If there is a serial number that is not in the table, the corresponding port serial number that is not applicable to the module is fed back to the PC terminal 10, and the burning failure information is output through the PC terminal 10, and the corresponding optical module serial number is displayed. Other optical modules whose serial numbers are in the serial number table are determined to be modules to be upgraded, and the burning path is opened. If there is still a situation where the serial number has not been read, it means that the optical module of the corresponding port is a bare chip and can be burned directly, then the burning path of the corresponding optical module port is also opened. All optical module ports that have not passed the review are disconnected from the burning path, and other paths are opened to start burning the module. Specifically, at least the following steps are included:
[0039] Jump to BootLoader, flash erase, burn and test communication.
[0040] Specifically, the burning module 50 has an embedded Linux system for executing a preset burning algorithm, so during the startup process, a Bootloader is required to guide. Bootloader is a small program executed before the operating system runs. Through this small program, we can initialize the hardware device, establish a mapping table of the memory space, and thus establish an appropriate system hardware and software environment to prepare for the final call to the operating system kernel. This step can be used as a preparatory step for device burning, and then flash erasure is performed, because the write operation of any flash device can only be performed in an empty or erased unit, so in most cases, before the write operation, erasure must be performed before the subsequent burning step can be performed. After completing the pre-order step, the burning can be started. According to the preset program, the burning module 50 automatically connects the optical module for burning. This step is performed simultaneously on the multiple optical film port paths that have been audited and passed, that is, the burning of multiple optical modules that have been audited and passed is performed simultaneously. After running the burning step according to the predetermined program, it is also necessary to verify the burning result to avoid defective products from the failure of burning. Because the optical module and the burning module 50 communicate via I2C, after the burning is completed, the communication is attempted using the address A0 / A2 in I2C. If the communication fails, it indicates that the burning fails, and the burning request is re-initiated. If the communication is successful, it indicates that the burning is successful, and the communication module 20 feeds back the message of the burning success to the PC end 10.
[0041] Preferably, the method also includes: acquiring the operating parameters during the burning process in real time, and transmitting the operating parameters to the PC end 10; the PC end 10 monitors the operating status of the optical module upgrade device in real time according to the operating parameters, and generates adjustment instructions when abnormal operation occurs; and sending the adjustment instructions to the optical module upgrade device to execute corresponding operating status adjustments.
[0042] In the real-time example of the present invention, the optical module upgrade device itself does not have the ability of self-monitoring and displaying monitoring results, but the monitoring of the burning process and the control of the device must ensure sufficient monitoring capabilities for the device. In order to avoid too many modules in the device, resulting in a complicated module structure and increased cost, preferably, the connected PC end 10 is used as the monitoring end of the corresponding optical module upgrade device. Through the acquisition module arranged in the optical module device, the operating parameters of the optical module upgrade device are collected in real time, and then the operating parameters are sent to the PC end 10. The PC end 10 monitors the optical module upgrade device in real time according to the acquired real-time operating parameters. When it is found that there is an abnormal operating state, the adjustment instruction is generated by the PC end 10 to adjust the optical module upgrade device. For example, if the above-mentioned burning is completed, if the communication attempt fails, it is determined that the burning fails and it is necessary to re-initiate the burning request. The PC end 10 generates a corresponding sequence number optical module re-verification request according to the collected failed optical module port sequence number, and if the verification is still passed, the corresponding port continues to generate an instruction to re-execute the burning step. The burning module 50 re-attempts the upgrade of the optical module of the corresponding port according to the re-attempt burning instruction, and continues to feedback the upgrade result. By analogy, if the number of repeated attempts reaches a preset threshold, it indicates that the corresponding optical module or the corresponding port path may have a fault, and an alarm message is output through the PC terminal 10 to remind relevant personnel to troubleshoot the optical module and the optical module upgrade device, thereby improving the intelligence of the entire optical module system.
[0043] The embodiment of the present invention further provides a computer-readable storage medium, on which instructions are stored, which, when executed on a computer, enable the computer to execute the above-mentioned optical module upgrading method.
[0044] Those skilled in the art will understand that all or part of the steps in the method for implementing the above-mentioned embodiments can be completed by instructing the relevant hardware through a program, and the program is stored in a storage medium, including several instructions for making a single-chip microcomputer, a chip or a processor (processor) perform all or part of the steps of the method described in each embodiment of the present invention. The aforementioned storage medium includes: U disk, mobile hard disk, read-only memory (ROM, Read-Only Memory), random access memory (RAM, Random Access Memory), disk or optical disk and other media that can store program codes.
[0045] The optional embodiments of the present invention are described in detail above in conjunction with the accompanying drawings. However, the embodiments of the present invention are not limited to the specific details in the above embodiments. Within the technical concept of the embodiments of the present invention, the technical scheme of the embodiments of the present invention can be subjected to a variety of simple modifications, and these simple modifications all belong to the protection scope of the embodiments of the present invention. It should also be noted that the various specific technical features described in the above specific embodiments can be combined in any suitable manner without contradiction. In order to avoid unnecessary repetition, the embodiments of the present invention will not further describe various possible combinations.
[0046] In addition, various embodiments of the present invention may be arbitrarily combined, and as long as they do not violate the concept of the embodiments of the present invention, they should also be regarded as the contents disclosed in the embodiments of the present invention.
Claims
1. A method for upgrading an optical module, the method being implemented based on an optical module upgrading system, characterized in that: The optical module upgrade system comprises an optical module upgrade device and a PC terminal; The PC terminal is used for: Provide the optical module upgrade device with a HEX file that needs to be burned; Performing operation status monitoring of the optical module upgrading device according to the operation parameters received from the optical module upgrading device; The optical module upgrading device comprises: A connection module, used for connecting an optical module; Communication module, connected to the PC, used to obtain the HEX file to be burned; A verification module, used to verify the HEX file and send the verified HEX file to the storage module; The storage module is used to store the HEX file that has passed the verification; A burning module, used for obtaining the verified HEX file from the storage module, and burning the verified HEX file into the connected optical module; The connection module includes a plurality of connection ports for connecting a plurality of optical modules simultaneously; The communication module is connected to the PC via USB; The device also includes: A collection module, used for collecting the operating parameters of the optical module upgrade device during the optical module burning process, and transmitting the operating parameters to the communication module; The communication module is also used to send the operating parameters to the PC end; The optical module upgrading method comprises: S1) In response to the optical module upgrade trigger instruction, obtain the HEX file to be burned from the PC; S2) Verify the obtained HEX file and store the verified HEX file locally; S3) directly extracting the verified HEX file from the local computer, and burning the verified HEX file into the connected optical module; wherein, Before burning the verified HEX file into the connected optical module, the method further includes: performing an identity verification on the connected optical module: Get the serial number list of the optical modules to be burned from the PC; Read the serial number of the connected optical module; If the serial number of the connected optical module exists in the serial number list, or the serial number of the connected optical module is displayed as not existing; then Determine that the identity of the connected optical module has passed the verification, and burn the qualified HEX file into the connected optical module; During the burning process, the acquisition module collects the operating parameters of the optical module upgrade device in real time, and then sends the operating parameters to the PC; The PC terminal monitors the optical module upgrade device in real time according to the acquired real-time operating parameters; When an abnormal operating state is found, an adjustment command is generated through the PC to adjust the optical module upgrade device; The PC generates a re-verification request for the optical module with the corresponding serial number based on the collected failed optical module port serial number. If the verification still passes, it continues to generate an instruction for the corresponding port to re-execute the burning step; The burning module retries to upgrade the optical module of the corresponding port according to the retry burning instruction, and continues to feedback the upgrade result; If the number of repeated attempts reaches the preset threshold, an alarm message is output through the PC.
2. The optical module upgrade method according to claim 1, characterized in that: In step S3), burning the verified qualified HEX file into the connected optical module includes at least the following steps: Jump to BootLoader, flash erase, burn and test communication.
3. The optical module upgrade method according to claim 1, characterized in that: The method further comprises: Acquire the operating parameters of the optical module during the burning process in real time, and transmit the operating parameters to the PC end, so that the PC end can monitor the operating status of the optical module upgrade device in real time according to the operating parameters; In response to the abnormal operation adjustment instruction received from the PC, the operation state adjustment of the optical module upgrading device is performed.
4. A computer-readable storage medium having instructions stored thereon, which, when executed on a computer, enables the computer to execute the optical module upgrading method according to any one of claims 1 to 3.
