Upgrading method of optical module and related device
By mapping the version information of the execution file in the upgrade file into the unique upgrade file version information on the device side, the optical module parses the upgrade file internally to achieve unified upgrade of the corresponding units, solving the problems of cumbersome upgrade process and complex management, improving the upgrade efficiency and realizing normalized management.
Patent Information
- Application Number
- CN202311290426.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2023-09-28
- Publication Date
- 2025-03-28
AI Technical Summary
The multiple units that can upgrade firmware in the optical module cause cumbersome upgrade process and affect the upgrade efficiency. The equipment side needs to identify the units in the optical module corresponding to each execution file, which increases management complexity.
By mapping the version information of the execution file in the upgrade file into the unique upgrade file version information on the device side, the optical module parses the upgrade file internally to achieve unified upgrade of the corresponding units, simplifying the upgrade process and improving efficiency.
The upgrade process of optical modules is simplified, upgrade efficiency is improved, and the normalized management of optical modules is realized, reducing the identification and management burden on the equipment side.
Smart Images

Figure CN119718363A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the technical field of software management, and in particular to an optical module upgrade method, device, optical module, computer-readable storage medium, and computer program product. Background Art
[0002] With the continuous development of optical communication technology, more and more manufacturers have launched optical modules. Optical modules are optoelectronic devices that realize electrical-optical conversion and photoelectric conversion in optical communication. They usually include various optical devices, functional circuits and optical interfaces. Optical devices include a transmitter and a receiver. In the data transmission process of optical communication, the transmitter in the optical module converts the electrical signal into an optical signal. After being transmitted through the optical fiber, the receiver converts the optical signal into an electrical signal. Optical modules can be configured to network devices, for example, by plugging and unplugging, thereby forming an optical network device.
[0003] Considering the security requirements or the need for functional enhancement, the optical module can also deploy computer programs, such as firmware, components, etc., for security protection or functional enhancement. With the complexity of optical modules, optical module firmware upgrade has become an indispensable function of optical modules.
[0004] However, the optical module may include multiple units with upgradeable firmware, such as the module central processing unit, light source, analog-to-digital converter, digital-to-analog converter, etc. The network device side needs to identify the unit in the optical module corresponding to the upgrade firmware, and then send the upgrade firmware to the corresponding unit for upgrading. This makes the upgrade process more cumbersome and affects the upgrade efficiency. Summary of the invention
[0005] The present application provides an upgrade method for an optical module, which maps the version information of the executable file in the upgrade file to the version information of the upgrade file unique to the device side, and parses the version information of the upgrade file inside the optical module, thereby achieving the upgrade of the corresponding unit in the optical module, simplifying the upgrade process, and improving the upgrade efficiency. Moreover, when the device side (such as a network device) issues the upgrade file, it is not necessary to identify the units in the optical module corresponding to each executable file, so that the optical module can be managed in a normalized manner. The present application also provides a device, an optical module, a computer-readable storage medium, and a computer program product corresponding to the above method.
[0006] In a first aspect, the present application provides an upgrade method for an optical module. The method can be applied to an optical module. The optical module includes a module central processing unit (also referred to as a module central processor) and at least one functional unit supporting the upgrade. The functional unit may refer to a hardware unit having or implementing a corresponding function.
[0007] Specifically, the module central processing unit receives an upgrade file, which includes at least one execution file and version information of the upgrade file. The version information of the upgrade file can be determined based on the version information of at least one execution file in the upgrade file. Then, the module central processing unit parses the upgrade file to determine the target unit to be upgraded in the optical module. The target unit includes at least one of the module central processing unit and the functional unit. When the target unit includes the module central processing unit, the module central processing unit runs the execution file corresponding to the module central processing unit in at least one execution file; when the target unit includes the functional unit, the module central processing unit sends the execution file corresponding to the target unit in at least one execution file to the target unit.
[0008] This method maps the version information of the execution file in the upgrade file to the version information of the upgrade file that is unique to the device side, so that the device side can perform normalized management of the optical module. When upgrading the optical module, the device side does not need to identify the units in the optical module corresponding to each execution file, but instead uniformly upgrades different units in the optical module based on the upgrade file, thereby simplifying the upgrade process and improving the upgrade efficiency. When it is necessary to perform firmware upgrades on multiple units of the optical module, it is not necessary to trigger the upgrade process multiple times, further improving the upgrade efficiency.
[0009] In some possible implementations, the functional unit includes at least one of a digital signal processor, a light source, a serial circuit or a digital-to-analog converter, and an analog-to-digital converter. The method supports upgrading any one or any combination of a module central processing unit, a digital signal processor, a light source, a serial circuit or a digital-to-analog converter, and an analog-to-digital converter in an optical module, which can meet business needs. Moreover, when upgrading multiple units, the network device side can trigger the upgrade at one time, thereby improving the upgrade efficiency.
[0010] In some possible implementations, the upgrade file includes a file header, and the file header includes version information of the upgrade file. The method packages the execution file into an upgrade file, and records the version information of the upgrade file in the file header, so that it can be reflected as a unique upgrade file for the network device. The network device can implement normalized upgrade management based on the unique upgrade file.
[0011] In some possible implementations, the file header also includes version information of at least one executable file. The module central processing unit can also query the version information of the target unit after the upgrade is completed. The module central processing unit compares the version information of the target unit after the upgrade is completed with the version information of the executable file corresponding to the target unit in the file header to obtain the upgrade result. For example, if the version information of the target unit after the upgrade is completed and the version information of the executable file corresponding to the target unit in the file header are consistent, it means that the upgrade is successful. If the version information of at least one unit in the target unit after the upgrade is completed is inconsistent with the version information in the file header, it means that the upgrade has failed.
[0012] The method checks the upgrade result by comparing the actual version information of the target unit with the expected version information after the upgrade is completed, so that upgrade problems can be discovered in time and timely handled when the upgrade fails, reducing risks and ensuring reliability. Moreover, based on the version information of a single executable file, the accuracy of the upgrade of a single executable file can be verified. When a problem occurs during the upgrade, it can be quickly located to help solve the problem.
[0013] In some possible implementations, the upgrade file includes a configuration file. The configuration file includes version information of the upgrade file. The method forms an upgrade file by combining the configuration file and the execution file, which does not require packaging and can be flexibly combined according to requirements, and has high usability.
[0014] In some possible implementations, the configuration file also includes the identifier of at least one executable file in the upgrade file and the upgrade order. For executable files with dependencies, by specifying the upgrade order in the configuration file, it can be ensured that the corresponding target units can be upgraded in order, avoiding upgrade errors and improving upgrade efficiency.
[0015] In some possible implementations, the upgrade file also includes identification information, which indicates the optical module to which the upgrade file is adapted. For example, the identification information may be the manufacturing information of the optical module to which the upgrade file is adapted. The module central processing unit may send the manufacturing information of the optical module to the network device. Accordingly, the network device may match the optical module according to the manufacturing information of the optical module and the identification information of the execution file, thereby obtaining an upgrade file that successfully matches the optical module. The module central processing unit may receive the upgrade file that successfully matches the optical module obtained by the network device according to the manufacturing information of the optical module and the identification information.
[0016] In this method, the network device can identify the optical module corresponding to the upgrade file through a common identification rule, thereby realizing automatic upgrade management of the optical module. Further, the network device can also identify the supported upgrade version through the upgrade file, thereby realizing upgrading the optical module of the specified version.
[0017] In some possible implementations, the upgrade file also includes identification information. The identification information indicates the optical module to which the upgrade file is adapted. The module central processing unit may also receive the identification information of the upgrade file sent by the network device. The module central processing unit matches the manufacturing information of the optical module with the identification information of the upgrade file, and returns the matching result to the network device. The module central processing unit receives the upgrade file sent by the network device that successfully matches the optical module.
[0018] In this method, the optical module can identify the upgrade file corresponding to the optical module based on a general identification rule, and return the identification result to the network device, so that the network device sends the upgrade file to the optical module to realize automatic upgrade management of the optical module.
[0019] In some possible implementations, the manufacturing information includes at least one of the manufacturer name, the organizational unique identifier OUI or the serial number SN, the part number PN, and the module custom identification. The above manufacturing information can be used to identify the optical module. Based on this, the manufacturing information of the optical module carried or indicated in the upgrade file can realize the automatic matching of the optical module and the upgrade file, and then realize the automatic upgrade management of the optical module.
[0020] In some possible implementations, the module central processing unit can also perform packet-level verification, file-level integrity verification and / or overall integrity verification on the upgrade file to obtain a verification result. For example, the module central processing unit can verify the correctness of the data packet at the packet level through a hash value. For another example, the module central processing unit can perform an integrity verification on a single executable file through the checksum of the executable file to ensure integrity. The module central processing unit can perform an integrity verification on the entire upgrade file through the checksum of the upgrade file to ensure the integrity of the entire upgrade file. When the verification result indicates that the verification is passed, the module central processing unit executes the step of running the executable file corresponding to the module central processing unit in at least one executable file. And / or, when the verification result indicates that the verification is passed, the module central processing unit can execute the step of sending the executable file corresponding to the target unit in at least one executable file to the target unit.
[0021] This method can ensure the correctness and accuracy of the upgrade file by checking the upgrade file at different granularities, thereby ensuring the reliability of the upgrade. In addition, this method also supports judging the legitimacy of the upgrade file to ensure the correctness of the upgrade file running on the optical module, thereby ensuring the reliability of the upgrade.
[0022] In a second aspect, the present application provides an optical module upgrade device. The device is used to upgrade the optical module, the optical module includes a module central processing unit and at least one functional unit supporting the upgrade, and the device includes:
[0023] A transceiver unit, configured to receive an upgrade file, wherein the upgrade file includes at least one execution file and version information of the upgrade file, wherein the version information of the upgrade file is determined according to version information of at least one execution file in the upgrade file;
[0024] A parsing unit, used to parse the upgrade file and determine a target unit to be upgraded in the optical module, wherein the target unit includes at least one of the module central processing unit and the functional unit;
[0025] an operating unit, configured to operate the execution file corresponding to the module central processing unit in the at least one execution file when the target unit includes the module central processing unit;
[0026] The transceiver unit is further configured to send an execution file corresponding to the target unit in the at least one execution file to the target unit when the target unit includes the functional unit.
[0027] In some possible implementations, the functional unit includes at least one of a digital signal processor, a light source, a serial circuit, a digital-to-analog converter, and an analog-to-digital converter.
[0028] In some possible implementations, the upgrade file includes a file header, and the file header includes version information of the upgrade file.
[0029] In some possible implementations, the file header also includes version information of the at least one executable file;
[0030] The device also includes:
[0031] The result checking unit is used to query the version information of the target unit after the upgrade is completed, compare the version information of the target unit after the upgrade is completed with the version information of the execution file corresponding to the target unit in the file header, and obtain the upgrade result.
[0032] In some possible implementations, the upgrade file includes a configuration file, and the configuration file includes version information of the upgrade file.
[0033] In some possible implementations, the configuration file also includes an identifier and an upgrade sequence of the at least one execution file in the upgrade file.
[0034] In some possible implementations, the upgrade file further includes identification information, and the identification information indicates an optical module to which the upgrade file is adapted;
[0035] The transceiver unit is also used for:
[0036] Sending manufacturing information of the optical module to a network device;
[0037] The transceiver unit is specifically used for:
[0038] An upgrade file successfully matching the optical module is received, which is obtained by the network device according to the manufacturing information of the optical module and the identification information.
[0039] In some possible implementations, the upgrade file further includes identification information, and the identification information indicates an optical module to which the upgrade file is adapted;
[0040] The transceiver unit is also used to: receive the identification information of the upgrade file sent by the network device;
[0041] The device also includes:
[0042] A matching unit, used to match the manufacturing information of the optical module with the identification information of the upgrade file, and return a matching result to the network device;
[0043] The transceiver unit is specifically used for:
[0044] Receive the upgrade file sent by the network device and successfully matched with the optical module.
[0045] In some possible implementations, the manufacturing information includes at least one of a manufacturer name, an organizational unique identifier OUI or a serial number SN, a part number PN, and a module custom identifier.
[0046] In some possible implementations, the device further includes:
[0047] A verification unit, configured to perform a data packet level verification, a file level integrity verification and / or an overall integrity verification on the upgrade file to obtain a verification result;
[0048] The running unit is configured to execute the step of running the execution file corresponding to the module central processing unit in the at least one execution file when the verification result indicates that the verification has passed;
[0049] The transceiver unit is used for sending an execution file corresponding to the target unit in the at least one execution file to the target unit when the verification result indicates that the verification has passed.
[0050] In a third aspect, the present application provides an optical module. The optical module includes a module central processing unit, at least one functional unit supporting upgrades, and a module memory. The module central processing unit is used to execute instructions stored in the module memory so that the optical module performs the upgrade method of the optical module as described in the first aspect or any implementation of the first aspect.
[0051] In a fourth aspect, the present application provides a computer-readable storage medium, wherein the computer-readable storage medium stores instructions, wherein the instructions instruct the optical module to execute the optical module upgrade method described in the first aspect or any one of the implementations of the first aspect.
[0052] In a fifth aspect, the present application provides a computer program product comprising instructions, which, when executed on a computing device or a computing device cluster, enables the computing device or the computing device cluster to execute the optical module upgrade method described in the first aspect or any one of the implementations of the first aspect.
[0053] Based on the implementations provided in the above aspects, this application can also be further combined to provide more implementations. BRIEF DESCRIPTION OF THE DRAWINGS
[0054] In order to more clearly illustrate the technical method of the embodiments of the present application, the drawings required for use in the embodiments are briefly introduced below.
[0055] Figure 1 A schematic diagram of the architecture of an optical module upgrade system provided in an embodiment of the present application;
[0056] Figure 2 A schematic diagram of a firmware upgrade process of an optical module configured in a network device provided in an embodiment of the present application;
[0057] Figure 3 A schematic diagram of a firmware upgrade process of an optical module configured in a network device provided in an embodiment of the present application;
[0058] Figure 4 A flowchart of an optical module upgrade method provided in an embodiment of the present application;
[0059] Figure 5 A schematic diagram of the format of an upgrade file provided in an embodiment of the present application;
[0060] Figure 6 A schematic diagram of another format of an upgrade file provided in an embodiment of the present application;
[0061] Figure 7 A flowchart of an optical module upgrade method provided in an embodiment of the present application;
[0062] Figure 8 An interactive flow chart of an optical module upgrade method provided in an embodiment of the present application;
[0063] Fig. 9 An interactive flow chart of an optical module upgrade method provided in an embodiment of the present application;
[0064] Fig.10An interactive flow chart of an optical module upgrade method provided in an embodiment of the present application;
[0065] Fig.11 An interactive flow chart of an optical module upgrade method provided in an embodiment of the present application;
[0066] Fig.12 An interactive flow chart of an optical module upgrade method provided in an embodiment of the present application;
[0067] Fig.13 An interactive flow chart of an optical module upgrade method provided in an embodiment of the present application;
[0068] Fig.14 A schematic diagram of the structure of an optical module upgrade device provided in an embodiment of the present application. DETAILED DESCRIPTION
[0069] The terms "first" and "second" in the embodiments of the present application are used for descriptive purposes only and should not be understood as indicating or implying relative importance or implicitly indicating the number of the indicated technical features. Therefore, the features defined as "first" and "second" may explicitly or implicitly include one or more of the features.
[0070] First, some technical terms involved in the embodiments of the present application are introduced.
[0071] An execution file, also known as an executable file, is a file that can work on hardware (such as general hardware or specific hardware). An execution file usually includes instructions encoded in binary, and is sometimes also called a binary file or an instruction file. Typical examples of execution files include, but are not limited to, firmware and components.
[0072] The executable file can be executed on the optical module to implement specific functions to meet security requirements or functional enhancement requirements. Among them, the optical module can be hardware configured to the network device, and the module can be a pluggable module or a non-pluggable module. The network device is the parent device of the optical module, which can usually be a switch or a router. Furthermore, the network device can also be divided into a network device with a single board and a network device without a single board according to whether it includes a single board. In the field of optical communications, a single board can include a wavelength division single board.
[0073] In order to realize photoelectric conversion and electro-optical conversion, optical modules usually include various optical devices, functional circuits and optical interfaces. There are many units that support firmware upgrades in various optical devices and functional circuits. When network equipment performs firmware upgrades on optical modules, it is usually necessary to identify the units in the optical module corresponding to the upgraded firmware, and then send the upgraded firmware (for example, an executable file) to the corresponding units. This makes the upgrade process more cumbersome and affects the upgrade efficiency. When it is necessary to perform firmware upgrades on multiple units in the optical module, it is even necessary to start the upgrade process separately and identify the units in the optical module corresponding to the upgraded firmware multiple times, further reducing the upgrade efficiency.
[0074] In view of this, the present application provides an upgrade method for an optical module. The method is applied to an optical module. The optical module includes a module central processing unit and at least one functional unit that supports upgrading. The module central processing unit can receive an upgrade file, which includes at least one execution file and version information of the upgrade file, and the version information of the upgrade file is determined according to the version information of at least one execution file in the upgrade file. The module central processing unit parses the upgrade file and determines the target unit to be upgraded in the optical module, and the target unit includes at least one of the module central processing unit and the functional unit. When the target unit includes the module central processing unit, the module central processing unit runs the execution file corresponding to the module central processing unit in at least one execution file; when the target unit includes the functional unit, the module central processing unit sends the execution file corresponding to the target unit in at least one execution file to the target unit.
[0075] This method maps the version information of the execution file in the upgrade file to the unique upgrade file version information on the device side, which facilitates the device side to perform normalized management of the optical module. When upgrading the optical module, the device side does not need to identify the units in the optical module corresponding to each execution file. The optical module internally parses the upgrade file and upgrades the corresponding units in the optical module, which simplifies the upgrade process and improves the upgrade efficiency. When it is necessary to upgrade the firmware of multiple units of the optical module, there is no need to trigger the upgrade process multiple times, which further improves the upgrade efficiency.
[0076] In order to make the upgrade method of the optical module of the present application clearer and easier to understand, the system architecture of the present application is first introduced.
[0077] See also Figure 1 The schematic diagram of the architecture of an optical module upgrade system is shown, the system 10 includes at least one network device 100 and a network management device 200. The network management device may be a terminal with a network management application deployed thereon. One network management device may be used to control multiple network devices.
[0078] The network device 100 can be divided into different types according to whether or not a single board is present. Figure 1As shown, the network device 100 can be directly configured with one or more optical modules (e.g., optical module 1, optical module 2 ... optical module N), or the network device 100 can also be configured with one or more boards (e.g., board 1, board 2 ... board M). Each board can be configured with one or more optical modules (e.g., optical module 1 to optical module P).
[0079] In the system 10, the network devices 100 at the same bureau (such as the same computer room or the same cabinet) can be configured with modules of different manufacturers and different versions. The network management device 200 sends an upgrade file to the network device 100. The network device 100 can send the upgrade file to the optical module that matches the upgrade file (send the upgrade file that matches the optical module to the optical module), and the upgrade file includes at least one execution file and version information of the upgrade file. Among them, the version information of the upgrade file is determined according to the version information of at least one execution file in the upgrade file. Based on this, the module central processor in the optical module receives the upgrade file, can parse the upgrade file, and determine the target unit to be upgraded in the optical module, and the target unit includes at least one of the module central processing unit and the functional unit. When the target unit includes the module central processing unit, the module central processing unit runs the execution file corresponding to the module central processing unit in at least one execution file. When the target unit includes the functional unit, the module central processing unit can send the execution file corresponding to the target unit in at least one execution file to the target unit, so that the target unit runs the execution file corresponding to the target unit in at least one execution file. In this way, the optical module can upgrade the target unit in the optical module by identifying the upgrade file inside. The network device 100 only needs to send the upgrade file to the corresponding optical module, and there is no need to identify the unit in the optical module corresponding to the upgrade file. In this way, the optical modules configured by the network device 100 can be managed in a unified upgrade process.
[0080] Moreover, the upgrade file may further include identification information, which indicates the optical module to which the upgrade file is adapted. For example, the identification information may be the manufacturing information of the optical module to which the upgrade file is adapted. Among them, the manufacturing information may also be referred to as manufacturer information. The manufacturing information may include at least one of the manufacturer's name, an organizationally unique identifier (OUI) or a serial number (SN), a part number (PN), and a module custom identifier. The module custom identifier may be a unique identifier customized by the manufacturer of the optical module. For example, the module custom identifier may be generated based on the type code and random number of the optical module.
[0081] The network device 100 can send the upgrade file to the optical module that has been successfully matched based on the identification information. Specifically, the optical module can send the manufacturing information of the optical module to the network device, and the network device 100 can match the manufacturing information of the optical module with the identification information of the execution file. When the match is successful, the upgrade file that successfully matches the optical module can be sent to the optical module to achieve automatic upgrade of the optical module. It should be noted that the network device 100 can also send the identification information of the upgrade file to the optical module, and the optical module identifies whether the identification information of the upgrade file matches the manufacturing information of the optical module successfully, and returns the matching result to the network device 100. Then, the optical module can receive the successfully matched upgrade file returned by the network device 100 to achieve automatic upgrade of the optical module.
[0082] The following is an example of upgrading an optical module. Figure 2 As shown, the network management device transfers the upgrade file (for example, provided by the manufacturer of the optical module) to the network device side memory, and then the network device central processor transfers the upgrade file to one or more optical modules on the network device through the communication bus. Figure 2 In the example, the optical module includes a module central processing unit, a digital signal processing unit (DSP), and an integrated tunable laser assembly (ITLA). The module central processing unit, DSP, and ITLA usually support upgrade functions. The above-mentioned units of the optical module (such as the module central processing unit, or DSP, ITLA and other functional units) usually include two types, one with a power-off storage medium, and the other requires an external memory to save data. The present application can support upgrades of units with two storage mechanisms.
[0083] Among them, the interaction process between the network device and the optical module can be that when the network device and the optical module communicate normally, the network device can send a query request to the optical module to query the manufacturing information of the optical module. The network device can obtain an upgrade file whose identification information successfully matches the manufacturing information of the optical module. It should be noted that the matching process can be performed on the network device side or on the optical module side. For example, the network device can obtain the manufacturing information of the optical module, match the manufacturing information with the identification information of the upgrade file, and thus obtain a successfully matched upgrade file. For another example, the network device can send the identification information of the upgrade file to the optical module, and the optical module can match the manufacturing information of the optical module with the identification information of the upgrade file. When the match is successful, the network device sends the successfully matched upgrade file to the optical module. The optical module can start the upgrade process based on the upgrade file, and the network device can wait for the optical module upgrade to be completed.
[0084] Furthermore, the network device can also obtain the version information of the optical module (for example, the version number determined according to the version number of the executable file currently deployed by the optical module). When the version information of the optical module meets the set conditions, the network device can send the above-mentioned successfully matched executable file to the optical module. Among them, the set conditions can be set according to business needs. In some examples, the set condition may be that the version information of the optical module (such as the version number of the optical module) is inconsistent with the version information of the upgrade file (such as the version number of the upgrade file). In other examples, the set condition may be that the version information of the optical module is the set version information. The following example illustrates that in this example, the user's expectation is to upgrade versions A and B to version D. The network device is respectively configured with optical modules of version A, version B, and version C. Based on this, the set condition may be that the version information of the module is version A or version B.
[0085] The solution of this application is also applicable to the scenario where a network device has multiple boards and a board has multiple optical modules. Figure 3 As shown, the single board includes a single board central processor and a memory. The network management device transmits the upgrade file to the network device side memory. The single board central processor can choose to obtain the required upgrade file from the network management device central processor after obtaining the manufacturing information of the optical module, or can choose to store the upgrade file in the single board side memory first, and then transmit the required upgrade file to the optical module by identifying the demand.
[0086] Based on the aforementioned optical module upgrade system 10, the optical module upgrade method of the present application will be introduced from the perspectives of the optical module and the network device 100 respectively.
[0087] First, see Figure 4 The flowchart of a method for upgrading an optical module is shown, and the method is applied to the optical module, the optical module includes a module central processing unit and at least one functional unit supporting upgrading, the functional unit includes but is not limited to at least one of a digital signal processor, a light source, a serial circuit or a digital-to-analog converter, and an analog-to-digital converter, wherein the light source can be an ITLA, and the method includes the following steps:
[0088] S402, the module central processing unit receives the upgrade file.
[0089] The upgrade file includes at least one executable file and version information of the upgrade file. The version information of the upgrade file may be a version number presented to the outside by the upgrade file as a whole. The version information of the upgrade file may generally be determined based on the version information of at least one executable file in the upgrade file. In this embodiment, the version information of the upgrade file may be obtained by mapping the version information of at least one executable file in the upgrade file.
[0090] As an example, the version information of the upgrade file can be obtained by splicing the version information of the executable files in the upgrade file. For example, the upgrade file of an optical module includes an executable file corresponding to the module central processor and an executable file corresponding to the DSP, wherein the version information (such as version number) of the executable file corresponding to the module central processor is C101, and the version information of the executable file corresponding to the DSP is D307, then the version information of the upgrade file of the optical module can be C101-D307. By combining the version information of the executable files corresponding to different units and presenting them as a unique version number, it can be ensured that from the perspective of the device side, the version information of the upgrade file of the optical module is unique.
[0091] In some possible implementations, at least one executable file in the upgrade file can be packaged, and accordingly, the version information of the upgrade file can be written into the file header of the packaged file, so that it can be reflected as a unique upgrade file for the network device. Furthermore, the file header can also include version information of at least one executable file. For example, the executable file includes an executable file corresponding to the module central processing unit and an executable file corresponding to the DSP, then the file header can also include the version information of the module central processing unit and the version information of the DSP. Among them, the version information of the executable file can be used to verify whether the upgrade is successful after the upgrade is completed. For example, after the upgrade is completed, if the version information of the corresponding unit is found to be consistent with the version information of the executable file in the file header, it means that the upgrade is successful.
[0092] Furthermore, the file header of the upgrade file also includes identification information of the upgrade file. The identification information indicates the manufacturing information of the optical module adapted by the upgrade file. For example, the identification information may include at least one of the manufacturer name, organizational unique identifier OUI or serial number SN, part number PN, and module custom identification of the optical module adapted by the upgrade file. In this way, the upgrade file can be sent to the optical module that successfully matches the upgrade file.
[0093] For ease of understanding, this application also provides an example of an upgrade file. Figure 5 A schematic diagram of the format of an upgrade file is shown. In this example, the upgrade file includes an execution file corresponding to the module central processing unit, an execution file corresponding to the DSP, and a microcode (a patch file running on the DSP, a type of execution file). The above-mentioned execution files are packaged into one file. The file header of the packaged file includes the version information of the upgrade file. Furthermore, the file header of the packaged file also includes the version information of the execution file, such as the version information of the execution file corresponding to the module central processing unit, the version information of the execution file corresponding to the DSP, and the version information of the microcode (patch file of the DSP). The file header of the packaged file also includes the manufacturing information of the optical module adapted by the upgrade file, that is, the module manufacturer information.
[0094] It should be noted that the upgrade file may also include other executable files (other firmware), and accordingly, the file header of the upgrade file may also include version information of other executable files. In this embodiment, the file header may be combined with any one or more executable files, and the information order of the file header may be changed based on the specific design exchange.
[0095] In some other possible implementations, at least one of the execution files in the upgrade file may be independent, and the version information of the upgrade file may be configured in a configuration file. The configuration file may also be referred to as an upgrade management configuration file. The configuration file is also independent of the execution file. The configuration file supports the upgrade of a single execution file, or supports the upgrade of a combination of multiple execution files.
[0096] Furthermore, the configuration file may also include an identifier of at least one execution file included in the upgrade file and an upgrade order. The identifier of the execution file may include but is not limited to the name of the execution file. In other words, the configuration file may also include the name and upgrade order of the execution file corresponding to the unit to be upgraded in the optical module. The upgrade order may be user-configured, and when the user does not configure it, the upgrade order may be a default order.
[0097] For ease of understanding, this application also provides another example of an upgrade file. Figure 6 The format diagram of an upgrade file is shown in the figure. In this example, the upgrade file includes the execution file corresponding to the module central processing unit, the execution file corresponding to the DSP, the microcode (a patch file running on the DSP, a type of execution file) and the configuration file. Figure 5 The upgrade file, Figure 6 The executable files in the upgrade file are not packaged. The version information of the upgrade file is configured in the configuration file, that is, the only version information reflected by the combination of the executable files. The configuration file also includes the names of the executable files to be upgraded and the upgrade order. In this way, it is possible to support the deployment or upgrade of a single executable file or any combination of executable files. By managing the configuration file, the number and order of files that need to be deployed or upgraded can be controlled.
[0098] Furthermore, the configuration file may also include identification information of the upgrade file. The identification information indicates the manufacturing information of the optical module adapted by the upgrade file. For example, the identification information may include at least one of the manufacturer name, organizational unique identifier OUI or serial number SN, part number PN, and module custom identification of the optical module adapted by the upgrade file.
[0099] Since network devices can be configured with optical modules from different manufacturers and versions, by matching the identification information and version information of the upgrade files with the manufacturing information and version information of the optical modules, upgrade files from different manufacturers and different solutions can be implemented. The process on the device side is unified, which facilitates the network devices to perform standardized management of optical modules, thereby reducing the reliability risks caused by manual management as well as reducing labor costs and time costs.
[0100] In this embodiment, the upgrade file received by the optical module is an upgrade file that successfully matches the optical module. The matching process can be performed on the network device side or on the optical module side.
[0101] First, the matching of the manufacturing information of the optical module and the identification information of the upgrade file is used as an example for explanation.
[0102] In some possible implementations, the module central processing unit may send the manufacturing information of the optical module to the network device, and the network device may compare the manufacturing information of the optical module with the identification information of the upgrade file, thereby matching the manufacturing information and the identification information. For example, if the manufacturing information of the optical module is consistent with the identification information of the upgrade file, it indicates a successful match. The module central processing unit may receive the upgrade file that successfully matches the optical module obtained by the network device based on the manufacturing information and identification information of the optical module.
[0103] In other possible implementations, the module central processing unit can receive identification information of the upgrade file sent by the network device, the module central processing unit matches the manufacturing information of the optical module with the identification information of the upgrade file, and returns the matching result to the network device; the module central processing unit receives the upgrade file sent by the network device that successfully matches the optical module.
[0104] Furthermore, the optical module or the network device can also match the version information of the optical module and the version information of the upgrade file. When the upgrade file is used to upgrade the optical module of a specified version, the optical module or the network device can also match the version information of the optical module (determined according to the version information of the currently deployed execution file) with the version information of the specified version in the version information of the upgrade file. Accordingly, the upgrade file that successfully matches the optical module includes the upgrade file whose identification information and version information successfully match the optical module.
[0105] For ease of understanding, an example is provided below for explanation. In this example, the upgrade file includes an execution file corresponding to the module central processing unit and an execution file corresponding to the DSP, wherein the version information of the execution file corresponding to the module central processing unit is C203, and the version information of the execution file corresponding to the DSP is D317, and the upgrade file is used to upgrade the optical module whose version information includes C201-D310. Based on this, when the execution text currently deployed in the optical module includes an execution file with version information C201 and an execution file with version information D310, it can be determined that the version information of the upgrade module matches the version information of the optical module. It should be noted that the successful matching of the version information may also include the inconsistency between the version information of the execution file in the upgrade file and the version information of the corresponding unit in the optical module. For example, in the scenario where the optical modules are uniformly upgraded to a certain version, if the version information of the corresponding unit in the optical module is not equal to the version information of the execution file, it means that the corresponding unit has not been successfully upgraded to the version, and the unit can be upgraded.
[0106] S404, the module central processing unit parses the upgrade file and determines the target unit to be upgraded in the optical module. When the target unit includes the module central processing unit, S406 is executed; when the target unit includes the functional unit, S408 is executed.
[0107] Specifically, the module central processing unit can parse the file header of the upgrade file or the configuration file of the upgrade file to obtain the version information of the upgrade file, and the target unit to be upgraded in the optical module can be determined based on the version information of the upgrade file. The version information of the upgrade file can be obtained by mapping the execution file included in the upgrade file. Based on this, the version information of each execution file can be obtained by reverse mapping the version information of the upgrade file, and then the unit corresponding to each execution file is determined. The unit corresponding to each execution file is the target unit to be upgraded in the optical module.
[0108] The following is an example for explanation. In this example, the version information of the upgrade file is C203-D317. The module central processing unit parses the version information of the upgrade file to obtain the version information C203 and D317 of the executable file in the upgrade file, where C represents CPU and D represents DSP. Based on this, it can be determined that the target unit includes the module central processing unit and DSP.
[0109] When the target unit includes a module central processing unit, S406 may be executed to upgrade the module central processing unit. When the target unit includes a functional unit, S408 may be executed to upgrade the functional unit.
[0110] S406. The module central processing unit runs at least one executable file corresponding to the module central processing unit.
[0111] S408. The module central processing unit sends at least one execution file corresponding to the target unit to the target unit.
[0112] Among them, when the execution file is packaged into an upgrade file, if the target unit includes a module central processing unit, the module central processing unit can execute the entire upgrade file; if the target unit includes a functional unit, the module central processing unit can send the entire upgrade file to the target unit.
[0113] When the execution files are managed uniformly through the configuration files, if the target unit includes a module central processing unit, the module central processing unit can execute the execution file corresponding to the module central processing unit; if the target unit includes a functional unit, the module central processing unit can send the execution file corresponding to the functional unit to the functional unit so that the functional unit can run the execution file.
[0114] Further, the module central processing unit can verify the upgrade file. For example, the module central processing unit can perform packet-level verification, file-level integrity verification, and overall integrity verification on the upgrade file. Accordingly, the verification result may include at least one of the file-level integrity verification result, the overall integrity verification result, or the packet-level verification result (also referred to as the range verification result). Among them, the integrity verification can be implemented by a checksum. The checksum is a form of redundancy verification, which is a simple method for checking the integrity of data transmitted through space (such as a communication link) or time (such as computer storage) through an error detection method. Typical examples of checksums include cyclic redundancy check (CRC), message digest algorithm (MD5), or secure hash algorithm (SHA). For example, the checksum can be the accumulation of the number of transmission bits, and when the transmission is completed, the recipient can judge whether all the data has been received based on the value. If the values match, it means that the transmission has been completed. The packet-level verification can be a consistency check (accuracy check) of the data packet, and the consistency check can be performed by comparing the hash value in the specific implementation. In addition, network devices can also implement self-verification of upgrade files based on checksums, thereby ensuring the correctness and integrity of upgrade files.
[0115] When the verification result indicates that the verification is passed, the module central processing unit executes the step of running the execution file corresponding to the module central processing unit in the at least one execution file, and / or executes the step of sending the execution file corresponding to the target unit in the at least one execution file to the target unit.
[0116] In some possible implementations, the module central processing unit may also return a verification result to the network device. The network device may send a run command to the module when the verification result indicates that the verification has passed. The run command (e.g., RUN command) is used to run the upgrade file (the executable file in the upgrade file). This can reduce the possibility of errors in the upgrade file transmission process causing the optical module to be unavailable or the network device to fall into repeated retries, improve reliability, and reduce security risks caused by incomplete upgrade file transmission or transmission errors.
[0117] Considering that the optical module may include different processors, different processors may use different instruction architectures, which may lead to different running instructions used by different processors to deploy or upgrade executable files such as firmware. Therefore, the network device may also query the module for upgrade capabilities and receive the upgrade capabilities returned by the module, which include the running commands for upgrading. Accordingly, the network device may send the corresponding running commands when triggering the deployment or upgrade of the executable file.
[0118] Furthermore, the optical module can also receive a commit command (e.g., a commit command) sent by the network device. The commit command is used to persist the upgrade file in the optical module so that the upgrade file can continue to run after the optical module is reset. Among them, the optical module can mark the current running area (the area where the execution file is currently running) as valid when receiving the commit command, thereby realizing the commit. When the marking is completed, the optical module can return a successful commit to the network device.
[0119] Taking into account the possibility of failure of the optical module, the present application also supports copying upgrade files to facilitate subsequent fault recovery. The optical module can set the current operation area and the backup area. The optical module can not only be deployed or upgraded in the current operation area, but also deployed or upgraded in the backup area. Specifically, the optical module can receive a copy command sent by a network device. The copy command is used to copy the upgrade file to the backup area of the optical module. In this way, when the optical module fails, the optical module can also obtain the upgrade file from the backup area and run the above-mentioned upgrade file to perform fault recovery.
[0120] Based on the above description, this method maps the version information of the execution file in the upgrade file to the unique upgrade file version information on the device side, so as to facilitate the normalized management of the optical module on the device side. When the device side upgrades the optical module configured by it, it is not necessary to identify the units in the optical module corresponding to each execution file, but to parse the upgrade file inside the optical module and uniformly upgrade the corresponding units in the optical module, thereby simplifying the upgrade process and improving the upgrade efficiency. When it is necessary to perform a firmware upgrade on multiple units of the optical module, there is no need to trigger the upgrade process multiple times, further improving the upgrade efficiency. Moreover, the method supports identification information based on the upgrade file, such as information configured in the file header or configuration file for indicating the optical module adapted by the upgrade file, identifying the optical module corresponding to the upgrade file, and sending the upgrade file to the corresponding optical module to realize automatic deployment or upgrade. The method realizes automatic management of all optical modules configured on the network device through the above process, greatly reducing the management cost of deploying or upgrading the optical module.
[0121] Secondly, see Figure 7 A flowchart of a method for upgrading an optical module is shown, and the method is applied to a network device, comprising the following steps:
[0122] S702: The network device receives the upgrade file sent by the network management device.
[0123] The upgrade file includes at least one execution file and version information of the upgrade file. The version information of the upgrade file is determined according to the version information of at least one execution file in the upgrade file. Furthermore, the upgrade file may also include identification information, and the identification information is used to indicate the manufacturing information of the optical module adapted by the upgrade file.
[0124] The upgrade file can support multiple formats. For example, the executable file in the upgrade file is packaged, and the version information of the upgrade file is recorded in the file header of the packaged file. For specific implementation, see Figure 5 For another example, the executable files in the upgrade file can be managed uniformly through the configuration file. For specific implementation, see Figure 6 Description of related content.
[0125] S704: The network device determines an optical module that successfully matches the upgrade file.
[0126] The matching of the upgrade file and the optical module can be performed on the network device side or on the optical module side. The following describes the two situations respectively.
[0127] When the matching process is performed on the network device side, the network device can obtain the identification information of the upgrade file and obtain the manufacturing information of the optical module from the optical module. Among them, the network device can send a query request to the optical module, and the query request is used to query the manufacturing information of the optical module. The optical module can respond to the above query request, query the manufacturing information of the module, and return the attribute information of the optical module to the network device. When the optical module is manufactured, the manufacturer can write information such as the manufacturer name, OUI, SN, PN or module custom identification into a memory, such as a read-only memory (ROM), and provide corresponding instructions or interfaces to read the above information. In this way, the optical module can call the above instructions or interfaces to query the manufacturing information of the optical module. Then the network device compares the identification information of the upgrade file and the manufacturing information of the optical module. When the identification information is consistent with the manufacturing information, it means that the upgrade file and the optical module are successfully matched. Further, the network device can also compare the version information to determine the optical module that successfully matches the upgrade file. For example, the network device may obtain version information of the upgrade file, which includes a specified version. The network device may also obtain version information of the optical module. When the version information of the optical module successfully matches the specified version, it indicates that the upgrade file and the optical module successfully match.
[0128] When the matching process is performed on the optical module side, the network device can obtain the identification information of the upgrade file and send the identification information of the upgrade file to the optical module. The optical module can then compare the identification information of the upgrade file with the manufacturing information of the optical module. When the identification information is consistent with the manufacturing information, it means that the upgrade file and the optical module are successfully matched. The optical module can return the matching result to the network device. Furthermore, the optical module can also compare the version information to determine the optical module that successfully matches the upgrade file. For example, the optical module can receive the version information of the upgrade file sent by the network device, and the version information includes a specified version. The optical module also obtains the version information of the optical module. When the version information of the optical module successfully matches the specified version, it means that the upgrade file and the optical module are successfully matched.
[0129] S706. The network device sends the upgrade file to the optical module.
[0130] Specifically, the network device can send the upgrade file to the optical module that successfully matches the upgrade file based on the matching result. In other words, the upgrade file sent by the network device to each optical module is the upgrade file that successfully matches the optical module. For example, the network device sends an upgrade file to each optical module whose identification information is consistent with the manufacturing information of the optical module. For another example, the network device sends an upgrade file to each optical module whose identification information is consistent with the manufacturing information of the optical module, and the specified version in the version information is consistent with the version information of the optical module.
[0131] In this method, the version information of the execution file in the upgrade file is mapped to the version information of the upgrade file that is unique to the device side, which facilitates the network device to perform normalized management of optical modules. When the network device upgrades the optical modules configured therein, it is not necessary to identify the units in the optical modules corresponding to each execution file, but to uniformly upgrade the different units in the optical modules based on the upgrade file, thereby simplifying the upgrade process and improving the upgrade efficiency. When it is necessary to perform a firmware upgrade on multiple units of the optical module, there is no need to trigger the upgrade process multiple times, further improving the upgrade efficiency. Moreover, this method supports automatic identification of the optical module corresponding to the upgrade file based on the identification information of the upgrade file, and sends the upgrade file to the corresponding optical module, thereby realizing automated deployment or upgrade.
[0132] Considering that the optical module may include a digital signal processor, a light source, a serial circuit or at least one of a digital-to-analog converter and an analog-to-digital converter, and a module central processing unit, the network device may upgrade a single upgradeable unit or a combination of different upgradeable units. Different upgrade scenarios are illustrated below.
[0133] See also Figure 8 The interactive flow chart of an optical module upgrade method shown in FIG. 1 shows the process of upgrading the module central processing unit in the optical module as follows:
[0134] S802, the network device central processor, the network device memory, the module central processing unit and the module memory are initialized.
[0135] Initialization may include but is not limited to power-on or power-on self-test (POST). Power-on self-test, also known as power-on self-test, refers to the self-test logic executed when the computer is turned on. After power-on or power-on self-test, subsequent processes can be executed.
[0136] S804. The network device central processor sends a query request to the module central processing unit.
[0137] S806: The module central processing unit returns the manufacturing information of the optical module to the network device central processor.
[0138] The query request is used to query the manufacturing information of the module, also known as the module authentication information. The module central processing unit can respond to the query request, call the corresponding interface or instruction to query the manufacturing information of the module, and return the manufacturing information to the network device central processor.
[0139] S808. The central processor of the network device obtains identification information of the upgrade file from the network device memory.
[0140] The identification information of the upgrade file is used to indicate the optical module to which the upgrade file is adapted. Specifically, the identification information of the upgrade file may include the manufacturing information of the optical module to which the upgrade file is adapted, including but not limited to at least one of the manufacturer name (such as the manufacturer name), the organization unique identifier or the serial number SN, the part number PN, and the module custom identification of the adapted optical module.
[0141] The network management device may send the identification information of the upgrade file to the network device, and the central processor of the network device may store the identification information in the network device memory for subsequent use.
[0142] S810: The central processor of the network device compares the manufacturing information of the optical module with the identification information of the upgrade file. When the manufacturing information of the optical module and the identification information of the upgrade file match successfully, S812 is executed.
[0143] S812. The network device central processor queries the module central processing unit for upgrade capability.
[0144] S814. The module central processing unit returns the upgrade capability to the network device central processing unit.
[0145] When the upgrade capability indicates that the central processor supports the upgrade, the upgrade capability includes a run instruction (also called a RUN command) for the upgrade.
[0146] S816. The central processing unit of the network device obtains the file header.
[0147] S818. The central processing unit of the network device obtains the upgrade file.
[0148] S820. The network device central processing unit sends a file header to the module central processing unit.
[0149] The network device central processor initiates the upgrade by sending a file header to the module central processing unit.
[0150] S822: The module central processing unit determines whether the file header is legal. If so, execute S824.
[0151] S824. The module central processing unit stores the file header to the module memory.
[0152] S826. The module central processing unit returns a message indicating that the file header reception is complete to the network device central processing unit.
[0153] S828. The network device central processor sends a data packet of the upgrade file to the module central processing unit.
[0154] S830. The module central processing unit stores the received data packet into the module memory.
[0155] S832. The module central processing unit returns a message indicating that the current data packet has been received to the network device central processing unit.
[0156] S834, the central processor of the network device determines whether the data packet is the last data packet of the upgrade file. If not, jump to the next data packet of the upgrade file and continue to execute S828; if yes, execute S836.
[0157] S836. The central processing unit of the network device sends a transmission completion command.
[0158] S838, the module central processing unit verifies the execution file, obtains the verification result, and returns the verification result to the network device central processing unit. When the verification result indicates that the verification is passed, S839 and S840 are executed.
[0159] S839, the module central processing unit parses the upgrade file and determines the target unit to be upgraded in the optical module. When the target unit is the module central processing unit, execute S842.
[0160] In this embodiment, the upgrade file is used to upgrade the module central processing unit. The module central processing unit can determine that the target unit is the module central processing unit by parsing the version information of the upgrade file, so S842 can be executed.
[0161] S840. The network device central processor sends a RUN command to the module central processing unit.
[0162] S842. The module central processing unit obtains the verified upgrade file from the module memory.
[0163] S844. After the module central processing unit successfully runs the upgrade file, it returns a successful operation.
[0164] The module central processing unit may use the RUN command in the instruction set architecture supported by the module central processing unit to run the verified upgrade file to implement the upgrade of the module central processing unit.
[0165] S846. The central processing unit of the network device sends a submit command.
[0166] The submission command may be a commit command, which is used to submit an execution file.
[0167] S848, the module central processing unit marks the current operating area as valid.
[0168] S850. The module central processing unit returns a successful submission.
[0169] S852. The central processing unit of the network device sends a copy command.
[0170] The copy command is used to copy the upgrade file (such as the upgrade file of the new version) to the backup area.
[0171] S854. The module central processing unit copies the upgrade file to the backup area of the module memory.
[0172] S856. The module central processing unit returns a message indicating that the copy is successful.
[0173] It should be noted that S802, S804, S812 to S826, S832 to S838, and S840 to S856 are optional steps of the embodiments of the present application, and the method for upgrading the optical module of the present application may not execute the above-mentioned S802, S804, S812 to S826, S832 to S838, and S840 to S856.
[0174] Figure 8 An example of upgrading the central processing unit of a module separately is given, and an example of upgrading other functional units (such as DSP) in an optical module separately is given below.
[0175] See also Fig. 9 An interactive flow chart of an upgrade method of an optical module is shown. In this example, the DSP includes a DSP processing unit and a DSP memory. The process of upgrading the DSP in the optical module is as follows:
[0176] S901. Initialize the network device central processor, network device memory, module central processing unit, module memory, DSP processing unit, and DSP memory.
[0177] S902. The network device central processor sends a query request to the module central processing unit.
[0178] S904: The module central processing unit returns the manufacturing information of the optical module to the network device central processor.
[0179] S906: The central processor of the network device obtains identification information of the upgrade file from the network device storage.
[0180] S908: The central processor of the network device compares the manufacturing information of the module with the identification information of the upgrade file. When the manufacturing information of the module and the identification information of the upgrade file match successfully, S910 is executed.
[0181] S910. The network device central processor sends an upgrade file to the module central processing unit.
[0182] The central processor of the network device may initiate the upgrade by sending the upgrade file.
[0183] S911, the module central processing unit parses the upgrade file and determines the target unit to be upgraded in the optical module. When the target unit includes the DSP, execute S912.
[0184] Specifically, the module central processing unit parses the upgrade file to obtain the version information of the upgrade file, and obtains the version information of the executable file in the upgrade file based on the inverse mapping of the version information of the upgrade file. In this example, the module central processing unit parses the upgrade file to obtain the version information of the DSP, so it can be determined that the target unit is the DSP.
[0185] S912. The module central processing unit sends the upgrade file to the DSP processing unit.
[0186] S914. The DSP processing unit stores the upgrade file in the DSP memory.
[0187] S916. The DSP processing unit returns a storage success to the module central processing unit.
[0188] S918. The module central processing unit returns a storage success to the network device central processing unit.
[0189] S920. The network device central processor sends a RUN command to the module central processing unit.
[0190] S922. The module central processing unit sends a RUN command to the DSP processing unit.
[0191] S924. The DSP processing unit obtains the verified upgrade file from the DSP memory.
[0192] S926. After the operation is successful, the DSP processing unit returns a successful operation to the module central processing unit.
[0193] S928. The module central processing unit returns a successful operation to the network device central processing unit.
[0194] S930: The central processor of the network device sends a submit command to submit the upgrade file.
[0195] S932. The module central processing unit sends a submit command to the DSP processing unit.
[0196] S934. The DSP processing unit marks the current operating area as valid.
[0197] S936. The DSP processing unit returns a submission success to the module central processing unit.
[0198] S938. The module central processing unit returns a submission success to the network device central processing unit.
[0199] S940. The central processing unit of the network device sends a copy command.
[0200] S942. The module central processing unit sends a copy command to the DSP processing unit.
[0201] S944. The DSP processing unit copies the upgrade file to the backup area of the DSP memory.
[0202] S946. The DSP processing unit returns a message that the copy is successful to the module central processing unit.
[0203] S948. The module central processing unit returns a copy success to the network device central processing unit.
[0204] Fig. 9 The example of the network device without a single board and the direct interaction between the network device central processor and the module central processing unit is used for explanation. When the network device is also equipped with a single board, the single board can choose to directly transparently transmit the network device command to the optical module as an intermediate forwarder to complete the entire upgrade process; it can also save the upgrade file sent by the network device and then complete the entire upgrade interaction as the initiator of the upgrade process.
[0205] It should be noted that Fig. 9 The specific implementation of several steps in the embodiment can refer to the relevant content description of the above embodiment, which will not be repeated here. Fig. 9 Some steps in the embodiment are optional steps, and the method for upgrading the optical module in the embodiment of the present application may not execute the optional steps.
[0206] Considering that some processors in the module do not have dedicated memory (for example, the DSP may not have its own storage medium), the module central processing unit can complete the upgrade interaction through communication control with the DSP (specifically the DSP processing unit).
[0207] See also Fig.10 The interactive flow chart of another method for upgrading an optical module is shown, and the process of upgrading the firmware of the DSP in the optical module is as follows:
[0208] S1002, the network device central processor, the network device memory, the module central processing unit and the module memory are initialized.
[0209] S1004. The network device central processor sends a query request to the module central processing unit.
[0210] S1006. The module central processing unit returns the manufacturing information of the optical module to the network device central processing unit.
[0211] S1008. The central processor of the network device obtains identification information of the upgrade file from the network device memory.
[0212] S1010, the central processor of the network device compares the manufacturing information of the module with the identification information of the upgrade file. When the manufacturing information of the module and the identification information of the upgrade file match successfully, execute S1012.
[0213] S1012. The network device central processing unit sends an upgrade file to the module central processing unit.
[0214] The central processor of the network device may initiate the upgrade by sending the upgrade file.
[0215] S1014. The module central processing unit stores the upgrade file in the module memory.
[0216] S1016. The module central processing unit returns a storage success to the network device central processing unit.
[0217] S1018. The network device central processor sends a RUN command to the module central processing unit.
[0218] S1020, the module central processing unit reads the upgrade file from the module memory.
[0219] S1021, the module central processing unit parses the upgrade file and determines the target unit to be upgraded in the optical module. When the target unit is the DSP, execute S1022.
[0220] S1022. The module central processing unit sends an upgrade file to the DSP processing unit.
[0221] S1023, the DSP processing unit verifies the upgrade file and returns the verification result. If the verification passes, execute S1024.
[0222] S1024. The module central processing unit sends a RUN command to the DSP processing unit.
[0223] S1026. After the DSP processing unit runs successfully, it returns a successful operation to the module central processing unit.
[0224] S1028. The module central processing unit returns a successful operation to the network device central processing unit.
[0225] S1030. The central processor of the network device sends a submit command to submit the upgrade file.
[0226] S1032. The module central processing unit marks the current operating area as valid.
[0227] S1034. The module central processing unit returns a submission success to the network device central processing unit.
[0228] S1036. The central processing unit of the network device sends a copy command.
[0229] S1038. The module central processing unit copies the upgrade file to the backup area of the module memory.
[0230] S1040. The module central processing unit returns a copy success to the network device central processing unit.
[0231] Figures 8 to 10 An example of upgrading an execution file of a single unit is given below. An example of upgrading a combination of execution files of multiple units (for example, upgrading firmware includes multiple files) is given below.
[0232] See also Fig.11 The flowchart of a method for upgrading an optical module is shown, and the process of combining and upgrading multiple units in the optical module is as follows:
[0233] S1102, the network device central processor, the network device memory, the module central processing unit and the module memory are initialized.
[0234] S1104. The network device central processor sends a query request to the module central processing unit.
[0235] S1106. The module central processing unit returns the manufacturing information of the optical module to the network device central processing unit.
[0236] S1108. The central processor of the network device obtains identification information of the upgrade file from the network device memory.
[0237] S1110, the central processor of the network device compares the manufacturing information of the optical module with the identification information of the upgrade file. When the manufacturing information of the optical module and the identification information of the upgrade file match successfully, execute S1112.
[0238] S1112. The central processing unit of the network device sends an upgrade file.
[0239] S1114, the module central processing unit verifies the upgrade file. If the verification passes, execute S1116.
[0240] For example, the module central processing unit can verify the checksum of the upgrade file. In this embodiment, the module central processing unit can verify the checksum of each upgrade file separately, and verify the checksum of multiple upgrade files as a whole.
[0241] S1116. The module central processing unit stores the upgrade file.
[0242] S1118. The module central processing unit returns a storage success to the network device central processing unit.
[0243] S1120. The network device central processing unit sends a run command to the module central processing unit.
[0244] In this embodiment, multiple processors in the optical module need to be upgraded, and the network device central processor can send multiple operation commands to the module central processing unit, for example, sending operation commands corresponding to multiple processors to be upgraded. In this example, the operation commands may include operation commands of the ITLA processing unit, the DSP processing unit, and the module central processing unit.
[0245] The version information of the module can be determined based on the version information of the ITLA processing unit, the DSP processing unit and the version information of the module central processing unit (specifically, the version information of the executable files currently deployed by the above processors and processing units).
[0246] S1122, the module central processing unit parses the upgrade file and determines the target unit to be upgraded in the optical module. When the target unit includes the module central processing unit, DSP, and ITLA, execute S1123.
[0247] S1123. The module central processing unit identifies a valid executable file in the upgrade file.
[0248] Specifically, the module central processing unit may identify, from the upgrade file, an execution file corresponding to the module central processing unit, an execution file corresponding to the DSP, and an execution file corresponding to the ITLA.
[0249] S1124. The central processor of the network device sends an operation command to the ITLA processing unit and the DSP processing unit.
[0250] S1125. The module central processing unit may read the execution file corresponding to ITLA and the execution file corresponding to DSP from the module memory.
[0251] S1126. The module central processing unit sends execution files to the ITLA processing unit and the DSP processing unit respectively.
[0252] S1128, the ITLA processing unit and the DSP processing unit verify the execution file, and after the verification passes, run the verified execution file through the run command, and after the run is successful, return the run success to the module central processing unit.
[0253] S1130. The module central processing unit reads an execution file corresponding to the module central processing unit from the module memory, and runs the execution file.
[0254] S1132. After the module central processing unit successfully runs the execution file and receives the execution success returned by the ITLA processing unit and the DSP processing unit, it returns the execution success to the network device central processing unit.
[0255] Among them, before the execution file corresponding to the module central processing unit takes effect, the execution file to be effective can be verified first (for example, using the SHA256 algorithm to verify), and then the central processing unit can be reset to make the execution file effective; when other execution files take effect, the central processing unit can first verify the execution file to be effective, and then reload and reset other processors.
[0256] Based on this solution, the network device only needs to identify the configuration file in the upgrade file, and does not need to identify the specific execution file contained in the upgrade file. After the upgrade file is sent to the optical module, the optical module identifies the version information of the upgrade file and performs the upgrade based on the corresponding version of the execution file. The network device handles the upgrade of the upgrade file including one or more execution files in the same way.
[0257] Above Figures 8 to 11 The illustrated embodiment mainly illustrates the upgrade of one optical module, and the present application also supports the upgrade of multiple optical modules.
[0258] See also Fig.12 The flowchart of a method for upgrading an optical module is shown in the figure. The process of upgrading the firmware of multiple modules is as follows:
[0259] S1202. The network device central processor, the network device memory, and the plurality of optical modules are initialized respectively.
[0260] S1203: The central processor of the network device obtains identification information of the upgrade file from the network device memory.
[0261] S1204. The central processor of the network device sends a query request to multiple optical modules.
[0262] S1206. The multiple modules return the manufacturing information of the optical modules to the central processor of the network device respectively.
[0263] S1208, the central processor of the network device compares the manufacturing information of the optical module with the identification information of the upgrade file. When the manufacturing information of the optical module and the identification information of the upgrade file match successfully, execute S1210.
[0264] S1210. The central processor of the network device sends upgrade files that successfully match the manufacturing information of the optical modules to the multiple optical modules respectively to start the upgrade.
[0265] Among them, the network device can use multi-threading to send upgrade files that successfully match the manufacturing information of the optical modules to multiple optical modules based on processing capabilities, thereby improving efficiency.
[0266] S1212. Multiple optical modules return a successful execution to the central processor of the network device respectively.
[0267] In this embodiment, the network device can simultaneously perform serial or parallel operations on the upgrade file identification, matching, and sending of multiple modules according to its capabilities; after the upgrade file is successfully sent, the subsequent upgrade process refers to the description of the relevant content of the aforementioned embodiment. If the network device supports parallel operation, the upgrade file identification, upgrade file transmission, and upgrade process of multiple optical modules can be carried out in parallel, thereby improving the overall upgrade efficiency.
[0268] Based on the above embodiments, the present application also provides a version management solution for executable files.
[0269] See also Fig.13 The flowchart of a method for upgrading an optical module shown in the figure specifically includes the following steps:
[0270] S1302, the network device central processor, the network device memory, the module central processing unit and the module memory are initialized.
[0271] S1304. The network device central processor sends a query request to the module central processing unit.
[0272] S1306. The module central processing unit returns the manufacturing information of the optical module to the network device central processor.
[0273] S1308. The central processor of the network device obtains identification information of the upgrade file from the network device memory.
[0274] S1310, the central processor of the network device compares the manufacturing information of the module with the identification information of the upgrade file. When the manufacturing information of the optical module and the identification information of the upgrade file match successfully, execute S1312.
[0275] S1312. The network device central processor queries the module central processing unit for version information.
[0276] S1314. The module central processing unit queries the version information of the ITLA processing unit and the DSP processing unit.
[0277] S1316. The module central processing unit returns the version information of the optical module according to the version information of the ITLA processing unit and the DSP processing unit.
[0278] The version information of the module can be determined based on the version information of the ITLA processing unit, the DSP processing unit and the version information of the module central processing unit (specifically, the version information of the executable files currently deployed by the above processors and processing units).
[0279] S1318, the central processor of the network device compares the version information of the optical module with the version information of the upgrade file. If the versions are inconsistent, execute S1320.
[0280] S1320. The central processing unit of the network device sends an upgrade file to start the upgrade.
[0281] S1322. The module central processing unit returns a successful operation to the network device central processing unit.
[0282] The module central processing unit can return the execution success to the network device central processor when running the upgrade file and receiving the operation success returned by the ITLA processing unit and the DSP processing unit. It should be noted that the specific implementation of the ITLA processing unit, the DSP processing unit, and the module central processing unit running the execution file to perform the upgrade can be referred to the aforementioned embodiment, which will not be repeated here.
[0283] S1324. The network device central processor may query the module central processing unit for version information.
[0284] S1326. The module central processing unit may return version information of the optical module.
[0285] S1328. The central processor of the network device compares the version information of the optical module with the version information of the upgrade file.
[0286] It should be noted that S1324 to S1328 are used to verify whether the upgrade is successful. If the version information is consistent, it means that the upgrade is successful. The method for upgrading the optical module of this embodiment may not execute the above S1324 to S1328.
[0287] The version information of the optical module may be stored and managed by a central processor of the network device, or may be stored and managed by a processing unit of each optical module, which is not limited in this embodiment.
[0288] Based on the above-mentioned optical module upgrade method, the present application also provides an optical module upgrade device. The optical module upgrade device can be a virtual device. The optical module upgrade device provided by the present application is introduced from the perspective of functional modularization.
[0289] See also Fig.14The structure diagram of an optical module upgrade device shown in FIG. 1400 is used to upgrade the optical module. The optical module includes a module central processing unit and at least one functional unit supporting the upgrade. The device 1400 includes:
[0290] The transceiver unit 1402 is used to receive an upgrade file, wherein the upgrade file includes at least one execution file and version information of the upgrade file, and the version information of the upgrade file is determined according to the version information of at least one execution file in the upgrade file;
[0291] A parsing unit 1404, configured to parse the upgrade file and determine a target unit to be upgraded in the optical module, wherein the target unit includes at least one of the module central processing unit and the functional unit;
[0292] An operating unit 1406, configured to operate an execution file corresponding to the module central processing unit in the at least one execution file when the target unit includes the module central processing unit;
[0293] The transceiver unit 1402 is further configured to send an execution file corresponding to the target unit in the at least one execution file to the target unit when the target unit includes the functional unit.
[0294] The specific implementation of the transceiver unit 1402 can refer to Figure 4 The description of S402 in the embodiment shown and the specific implementation of the parsing unit 1404 can be referred to Figure 4 The description of S404 in the embodiment shown in the figure and the specific implementation of the operation unit 1406 can be found in Figure 4 The description of S406 in the embodiment shown in the figure, and the specific implementation of the transceiver unit 1402 can also refer to Figure 4 The relevant contents of the embodiment S408 are described.
[0295] In some possible implementations, the functional unit includes at least one of a digital signal processor, a light source, a serial circuit, a digital-to-analog converter, and an analog-to-digital converter.
[0296] In some possible implementations, the upgrade file includes a file header, and the file header includes version information of the upgrade file.
[0297] In some possible implementations, the file header also includes version information of the at least one executable file;
[0298] The device 1400 further includes:
[0299] The result checking unit 1408 is used to query the version information of the target unit after the upgrade is completed, compare the version information of the target unit after the upgrade is completed with the version information of the execution file corresponding to the target unit in the file header, and obtain the upgrade result.
[0300] In some possible implementations, the upgrade file includes a configuration file, and the configuration file includes version information of the upgrade file.
[0301] In some possible implementations, the configuration file also includes an identifier and an upgrade sequence of the at least one execution file in the upgrade file.
[0302] In some possible implementations, the upgrade file further includes identification information, and the identification information indicates an optical module to which the upgrade file is adapted;
[0303] The transceiver unit 1402 is also used for:
[0304] Sending manufacturing information of the optical module to a network device;
[0305] The transceiver unit 1402 is specifically used for:
[0306] An upgrade file successfully matching the optical module is received, which is obtained by the network device according to the manufacturing information of the optical module and the identification information.
[0307] In some possible implementations, the upgrade file further includes identification information, and the identification information indicates an optical module to which the upgrade file is adapted;
[0308] The transceiver unit 1402 is also used to: receive the identification information of the upgrade file sent by the network device;
[0309] The device 1400 further includes:
[0310] A matching unit 1410, configured to match the manufacturing information of the optical module with the identification information of the upgrade file, and return a matching result to the network device;
[0311] The transceiver unit 1402 is specifically used for:
[0312] Receive the upgrade file sent by the network device and successfully matched with the optical module.
[0313] In some possible implementations, the manufacturing information includes at least one of a manufacturer name, an organizational unique identifier OUI or a serial number SN, a part number PN, and a module custom identifier.
[0314] In some possible implementations, the apparatus 1400 further includes:
[0315] Verification unit 1412, used to perform data packet level verification, file level integrity verification and / or overall integrity verification on the upgrade file to obtain a verification result;
[0316] The running unit 1406 is configured to execute the step of running the execution file corresponding to the module central processing unit in the at least one execution file when the verification result indicates that the verification has passed;
[0317] The transceiver unit 1402 is configured to send an execution file corresponding to the target unit in the at least one execution file to the target unit when the verification result indicates that the verification has passed.
[0318] In this embodiment, the specific implementation of each unit can refer to the specific implementation process of the optical module side in the aforementioned method embodiment, which will not be repeated here.
[0319] The present application also provides an optical module. Fig.14 The device shown can be deployed in an optical module that performs Fig.14 The program code of the device shown in the figure is used to execute the optical module upgrade method of the above embodiment. Figure 2 As shown in the figure, the optical module includes a module central processing unit and at least one functional unit supporting upgrading, and the functional unit may include but is not limited to a digital signal processor, a light source (such as ITLA), a serial circuit or a digital-to-analog converter, and an analog-to-digital converter. The module central processing unit is used to execute program code, thereby executing the upgrading method of the optical module of the aforementioned embodiment to realize upgrading of the module central processing unit and / or the functional unit in the optical module.
[0320] The embodiment of the present application also provides a computer-readable storage medium. The computer-readable storage medium can be any available medium that can be stored by a computing device or a data storage device such as a data center containing one or more available media. The available medium can be a magnetic medium (e.g., a floppy disk, a hard disk, a tape), an optical medium (e.g., a DVD), or a semiconductor medium (e.g., a solid-state hard disk). The computer-readable storage medium includes instructions that instruct the upgrade method of the optical module of the aforementioned embodiment to be executed.
[0321] The embodiment of the present application also provides a computer program product including instructions. The computer program product may be a software or program product including instructions that can be run on a computing device or stored in any available medium. When the computer program product is run on the optical module, the optical module executes the optical module upgrade method of the aforementioned embodiment.
[0322] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention, rather than to limit it. Although the present invention has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that they can still modify the technical solutions described in the aforementioned embodiments, or make equivalent replacements for some of the technical features therein. However, these modifications or replacements do not cause the essence of the corresponding technical solutions to deviate from the protection scope of the technical solutions of the embodiments of the present invention.
Claims
1. A method for upgrading an optical module, characterized in that: Applied to an optical module, the optical module includes a module central processing unit and at least one functional unit supporting upgrading, the method includes: The module central processing unit receives an upgrade file, wherein the upgrade file includes at least one execution file and version information of the upgrade file, and the version information of the upgrade file is determined according to the version information of at least one execution file in the upgrade file; The module central processing unit parses the upgrade file to determine a target unit to be upgraded in the optical module, wherein the target unit includes at least one of the module central processing unit and the functional unit; When the target unit includes the module central processing unit, the module central processing unit runs the execution file corresponding to the module central processing unit in the at least one execution file; when the target unit includes the functional unit, the module central processing unit sends the execution file corresponding to the target unit in the at least one execution file to the target unit.
2. The method according to claim 1, characterized in that: The functional unit includes at least one of a digital signal processor, a light source, a serial circuit or a digital-to-analog converter, and an analog-to-digital converter.
3. The method according to claim 1 or 2, characterized in that: The upgrade file includes a file header, and the file header includes version information of the upgrade file.
4. The method according to claim 3, characterized in that The file header also includes version information of the at least one executable file; The method further comprises: The module central processing unit queries the version information of the target unit after the upgrade is completed; The module central processing unit compares the version information of the target unit after the upgrade is completed with the version information of the execution file corresponding to the target unit in the file header to obtain the upgrade result.
5. The method according to claim 1 or 2, characterized in that: The upgrade file includes a configuration file, and the configuration file includes version information of the upgrade file.
6. The method according to claim 5, characterized in that The configuration file also includes an identifier of the at least one execution file in the upgrade file and an upgrade sequence.
7. The method according to any one of claims 1 to 6, characterized in that: The upgrade file also includes identification information, where the identification information indicates the optical module to which the upgrade file is adapted; The method further comprises: The module central processing unit sends the manufacturing information of the optical module to the network device; The module central processing unit receives the upgrade file, including: The module central processing unit receives an upgrade file that is successfully matched with the optical module and is obtained by the network device according to the manufacturing information of the optical module and the identification information.
8. The method according to any one of claims 1 to 6, characterized in that: The upgrade file also includes identification information, where the identification information indicates the optical module to which the upgrade file is adapted; The method further comprises: The module central processing unit receives the identification information of the upgrade file sent by the network device; The module central processing unit matches the manufacturing information of the optical module with the identification information of the upgrade file, and returns the matching result to the network device; The module central processing unit receives the upgrade file, including: The module central processing unit receives the upgrade file sent by the network device and successfully matched with the optical module.
9. The method according to claim 7 or 8, characterized in that: The manufacturing information includes at least one of the manufacturer name, the organizational unique identifier OUI or the serial number SN, the part number PN, and the module custom identification.
10. The method according to any one of claims 1 to 9, characterized in that: The method further comprises: The module central processing unit performs a data packet level check, a file level integrity check and / or an overall integrity check on the upgrade file to obtain a check result; When the verification result indicates that the verification has passed, the module central processing unit executes the step of running the execution file corresponding to the module central processing unit in the at least one execution file, and / or executes the step of sending the execution file corresponding to the target unit in the at least one execution file to the target unit.
11. An upgrade device for an optical module, characterized in that: The device is used to upgrade an optical module, the optical module includes a module central processing unit and at least one functional unit supporting the upgrade, and the device includes: A transceiver unit, configured to receive an upgrade file, wherein the upgrade file includes at least one execution file and version information of the upgrade file, wherein the version information of the upgrade file is determined according to version information of at least one execution file in the upgrade file; A parsing unit, used for parsing the upgrade file, and determining a target unit to be upgraded in the optical module, wherein the target unit includes at least one of the module central processing unit and the functional unit; an operating unit, configured to operate the execution file corresponding to the module central processing unit in the at least one execution file when the target unit includes the module central processing unit; The transceiver unit is further configured to send an execution file corresponding to the target unit in the at least one execution file to the target unit when the target unit includes the functional unit.
12. The device according to claim 11, characterized in that The functional unit includes at least one of a digital signal processor, a light source, a serial circuit or a digital-to-analog converter, and an analog-to-digital converter.
13. The device according to claim 11 or 12, characterized in that The upgrade file includes a file header, and the file header includes version information of the upgrade file.
14. The device according to claim 13, characterized in that The file header also includes version information of the at least one executable file; The device also includes: The result checking unit is used to query the version information of the target unit after the upgrade is completed, compare the version information of the target unit after the upgrade is completed with the version information of the execution file corresponding to the target unit in the file header, and obtain the upgrade result.
15. The device according to claim 11 or 12, characterized in that The upgrade file includes a configuration file, and the configuration file includes version information of the upgrade file.
16. The device according to claim 15, characterized in that The configuration file also includes an identifier of the at least one execution file in the upgrade file and an upgrade sequence.
17. The device according to any one of claims 11 to 16, characterized in that The upgrade file also includes identification information, where the identification information indicates the optical module to which the upgrade file is adapted; The transceiver unit is also used for: Sending manufacturing information of the optical module to a network device; The transceiver unit is specifically used for: An upgrade file successfully matching the optical module is received, which is obtained by the network device according to the manufacturing information of the optical module and the identification information.
18. The device according to any one of claims 11 to 16, characterized in that The upgrade file also includes identification information, where the identification information indicates the optical module to which the upgrade file is adapted; The transceiver unit is also used to: receive the identification information of the upgrade file sent by the network device; The device also includes: A matching unit, used to match the manufacturing information of the optical module with the identification information of the upgrade file, and return a matching result to the network device; The transceiver unit is specifically used for: Receive the upgrade file sent by the network device and successfully matched with the optical module.
19. The device according to claim 17 or 18, characterized in that The manufacturing information includes at least one of the manufacturer name, the organizational unique identifier OUI or the serial number SN, the part number PN, and the module custom identification.
20. The device according to any one of claims 11 to 19, characterized in that The device also includes: A verification unit, configured to perform a data packet level verification, a file level integrity verification and / or an overall integrity verification on the upgrade file to obtain a verification result; The running unit is configured to execute the step of running the execution file corresponding to the module central processing unit in the at least one execution file when the verification result indicates that the verification has passed; The transceiver unit is used for sending an execution file corresponding to the target unit in the at least one execution file to the target unit when the verification result indicates that the verification has passed.
21. An optical module, characterized in that: The optical module comprises a module central processing unit and at least one functional unit supporting upgrading, wherein the module central processing unit is used to execute the method according to any one of claims 1 to 10.
22. A computer-readable storage medium, characterized in that: The method comprises computer-readable instructions; the computer-readable instructions are used to implement the method according to any one of claims 1 to 10.
23. A computer program product, characterized in that The method comprises computer-readable instructions; the computer-readable instructions are used to implement the method according to any one of claims 1 to 10.
Citation Information
Cited By
Upgrading method for optical module and related apparatus
EP4787153A1
Upgrading method for optical module and related apparatus
WO2025066195A1