Upgrading method for optical module and related apparatus
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 analyzes the version information internally to achieve unified upgrade of the corresponding units, solving the cumbersome upgrade process caused by multiple upgradeable firmware units in the optical module, and improving the upgrade efficiency.
Patent Information
- Application Number
- PCT/CN2024/094466
- Authority / Receiving Office
- WO · WO
- Patent Type
- Applications
- Current Assignee / Owner
- Priority Date
- 2023-09-28
- Filing Date
- 2024-05-21
- Publication Date
- 2025-04-03
AI Technical Summary
The multiple upgradeable firmware units in the optical module cause cumbersome upgrade process and affect the upgrade efficiency.
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 analyzes the version information internally to achieve unified upgrade of the corresponding units, simplifying the upgrade process and improving efficiency.
The upgrade process of optical modules is simplified, the upgrade efficiency is improved, the demand for equipment-side identification units is reduced, and a unified upgrade of multiple units is achieved.
Smart Images

Figure CN2024094466_03042025_PF_FP_ABST
Abstract
Description
An optical module upgrade method and related device
[0001] This application claims priority to the Chinese patent application filed with the State Intellectual Property Office on September 28, 2023, with application number 202311290426.0 and invention name “A method for upgrading an optical module and related devices”, the entire contents of which are incorporated by reference into this application. Technical Field
[0002] The present application relates to the field of software management technology, and in particular to an optical module upgrade method, device, optical module, computer-readable storage medium, and computer program product. Background Art
[0003] With the continuous advancement of optical communication technology, more and more manufacturers have launched optical modules. Optical modules are optoelectronic devices that perform electrical-to-optical and photoelectric conversion in optical communications. They typically include various optical components, functional circuits, and optical interfaces. Optical devices are composed of two parts: a transmitter and a receiver. During optical communication data transmission, the transmitter in the optical module converts electrical signals into optical signals. After transmission through optical fiber, the receiver converts the optical signals back into electrical signals. Optical modules can be configured into network devices, for example, by plugging them into the network device, thus forming an optical network device.
[0004] Considering security requirements or functional enhancements, optical modules can also deploy computer programs, such as firmware and components, to provide security protection or functional enhancements. As optical modules become more complex, optical module firmware upgrades have become an indispensable function.
[0005] However, an optical module can include multiple units with upgradeable firmware, such as the module's central processing unit, light source, analog-to-digital converter, and digital-to-analog converter. The network device must identify the unit in the optical module that corresponds to the firmware upgrade and then send the firmware upgrade to the corresponding unit. This makes the upgrade process more cumbersome and affects upgrade efficiency.
[0006] Summary of the Invention
[0007] The present application provides an upgrade method for an optical module, which 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, 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, there is no need to identify the units in the optical module corresponding to each execution 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.
[0008] In a first aspect, the present application provides a method for upgrading 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 that supports the upgrade. The functional unit may refer to a hardware unit that has or implements a corresponding function.
[0009] Specifically, the module central processing unit receives an upgrade file, which includes at least one executable 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 executable file in the upgrade file. The module central processing unit then parses the upgrade file and determines the target unit to be upgraded in the optical module. The target unit includes at least one of the module central processing unit and a functional unit. When the target unit includes the module central processing unit, the module central processing unit runs the executable file corresponding to the module central processing unit in the at least one executable file. When the target unit includes a functional unit, the module central processing unit sends the executable file corresponding to the target unit in the at least one executable file to the target unit.
[0010] This method maps the version information of the executable file in the upgrade file to the version information of the upgrade file unique to the device, facilitating standardized management of optical modules on the device side. When upgrading an optical module, the device side does not need to identify the units in the optical module corresponding to each executable file. Instead, it uniformly upgrades different units in the optical module based on the upgrade file, simplifying the upgrade process and improving upgrade efficiency. When firmware upgrades are required for multiple units in the optical module, there is no need to trigger the upgrade process multiple times, further improving upgrade efficiency.
[0011] 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. This method supports upgrading any one or any combination of the module central processing unit, digital signal processor, light source, serial circuit or digital-to-analog converter, and analog-to-digital converter in the optical module, meeting service needs. Furthermore, when upgrading multiple units, the network device can trigger the upgrade all at once, improving upgrade efficiency.
[0012] In some possible implementations, the upgrade file includes a file header that includes version information for the upgrade file. This method packages the executable file into an upgrade file and records the upgrade file version information in the file header. This allows the upgrade file to be presented as a unique upgrade file for the network device. The network device can implement standardized upgrade management based on this unique upgrade file.
[0013] In some possible implementations, the file header also includes version information of at least one executable file. The module central processing unit may also query the version information of the target unit after the upgrade is complete. The module central processing unit compares the version information of the target unit after the upgrade is complete 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 complete and the version information of the executable file corresponding to the target unit in the file header are consistent, the upgrade is successful. If the version information of at least one target unit after the upgrade is inconsistent with the version information in the file header, the upgrade is unsuccessful.
[0014] This method checks the upgrade results by comparing the target unit's actual version information with the expected version information after the upgrade is complete. This allows for timely identification of upgrade issues and timely resolution of upgrade failures, mitigating risk and ensuring reliability. Furthermore, the accuracy of upgrades for individual executable files can be verified based on their version information. If upgrade issues arise, they can be quickly located and resolved.
[0015] In some possible implementations, the upgrade file includes a configuration file. The configuration file includes version information for the upgrade file. This method forms an upgrade file by combining the configuration file and the execution file, eliminating the need for packaging and allowing for flexible combination based on demand, resulting in high usability.
[0016] 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, specifying the upgrade order in the configuration file ensures that the corresponding target units are upgraded in order, avoiding upgrade errors and improving upgrade efficiency.
[0017] In some possible implementations, the upgrade file also includes identification information indicating the optical module to which the upgrade file is compatible. For example, the identification information may be the manufacturing information of the optical module to which the upgrade file is compatible. The module central processing unit may send the manufacturing information of the optical module to the network device. Accordingly, the network device may perform a match based on 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 based on the manufacturing information and identification information of the optical module.
[0018] In this method, the network device can identify the optical module corresponding to the upgrade file through a universal identification rule, thereby realizing automatic upgrade management of the optical module. Furthermore, the network device can also identify the supported upgrade version through the upgrade file, thereby realizing the upgrade of the optical module of the specified version.
[0019] In some possible implementations, the upgrade file also includes identification information. The identification information indicates the optical module to which the upgrade file is compatible. 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 a 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.
[0020] 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.
[0021] In some possible implementations, the manufacturing information includes at least one of the manufacturer's name, an organizationally unique identifier (OUI), a serial number (SN), a part number (PN), and a custom module identifier. This manufacturing information can be used to identify the optical module. Therefore, an upgrade file containing or indicating the manufacturing information of the compatible optical module can automatically match the optical module with the upgrade file, thereby enabling automated upgrade management of the optical module.
[0022] 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 integrity verification on a single execution file through the checksum of the execution file to ensure integrity. The module central processing unit can perform 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 execution file corresponding to the module central processing unit in at least one execution 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 execution file corresponding to the target unit in at least one execution file to the target unit.
[0023] This method verifies the correctness and accuracy of upgrade files at varying granularity levels, thereby ensuring upgrade reliability. Furthermore, this method also verifies the legitimacy of upgrade files, ensuring the correctness of upgrade files running on optical modules and further ensuring upgrade reliability.
[0024] In a second aspect, the present application provides an optical module upgrade device. The device is used to upgrade an optical module, wherein the optical module includes a module central processing unit and at least one functional unit supporting the upgrade, and the device includes:
[0025] a transceiver unit, configured to receive an upgrade file, wherein the upgrade file includes at least one executable file and version information of the upgrade file, wherein the version information of the upgrade file is determined based on the version information of at least one executable file in the upgrade file;
[0026] a parsing unit, 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;
[0027] An execution unit, configured to execute 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;
[0028] The transceiver unit is further configured to, when the target unit includes the functional unit, send an execution file corresponding to the target unit in the at least one execution file to the target unit.
[0029] 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.
[0030] In some possible implementations, the upgrade file includes a file header, and the file header includes version information of the upgrade file.
[0031] In some possible implementations, the file header further includes version information of the at least one executable file;
[0032] The device further comprises:
[0033] 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.
[0034] In some possible implementations, the upgrade file includes a configuration file, and the configuration file includes version information of the upgrade file.
[0035] In some possible implementations, the configuration file further includes an identifier and an upgrade sequence of the at least one executable file in the upgrade file.
[0036] In some possible implementations, the upgrade file further includes identification information, where the identification information indicates an optical module to which the upgrade file is adapted;
[0037] The transceiver unit is further configured to:
[0038] Sending manufacturing information of the optical module to a network device;
[0039] The transceiver unit is specifically used for:
[0040] 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.
[0041] In some possible implementations, the upgrade file further includes identification information, where the identification information indicates an optical module to which the upgrade file is adapted;
[0042] The transceiver unit is further configured to: receive identification information of the upgrade file sent by the network device;
[0043] The device further comprises:
[0044] a matching unit, 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;
[0045] The transceiver unit is specifically used for:
[0046] Receive the upgrade file sent by the network device and successfully matched with the optical module.
[0047] 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.
[0048] In some possible implementations, the apparatus further includes:
[0049] 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;
[0050] 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;
[0051] The transceiver unit 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.
[0052] 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 configured to execute instructions stored in the module memory to cause the optical module to perform the optical module upgrade method described in the first aspect or any implementation of the first aspect.
[0053] 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 implementation of the first aspect.
[0054] In a fifth aspect, the present application provides a computer program product comprising instructions, which, when run 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.
[0055] Based on the implementation methods provided in the above aspects, this application can also be further combined to provide more implementation methods. BRIEF DESCRIPTION OF THE DRAWINGS
[0056] In order to more clearly illustrate the technical methods of the embodiments of the present application, the following briefly introduces the drawings required for use in the embodiments.
[0057] FIG1 is a schematic diagram of the architecture of an optical module upgrade system provided in an embodiment of the present application;
[0058] FIG2 is a schematic diagram of a process for upgrading the firmware of an optical module configured in a network device according to an embodiment of the present application;
[0059] FIG3 is a schematic diagram of a process for upgrading the firmware of an optical module configured in a network device according to an embodiment of the present application;
[0060] FIG4 is a flow chart of a method for upgrading an optical module provided in an embodiment of the present application;
[0061] FIG5 is a schematic diagram of the format of an upgrade file provided in an embodiment of the present application;
[0062] FIG6 is a schematic diagram of the format of another upgrade file provided in an embodiment of the present application;
[0063] FIG7 is a flow chart of a method for upgrading an optical module provided in an embodiment of the present application;
[0064] FIG8 is an interactive flow chart of a method for upgrading an optical module provided in an embodiment of the present application;
[0065] FIG9 is an interactive flow chart of a method for upgrading an optical module provided in an embodiment of the present application;
[0066] FIG10 is an interactive flow chart of a method for upgrading an optical module provided in an embodiment of the present application;
[0067] FIG11 is an interactive flow chart of a method for upgrading an optical module provided in an embodiment of the present application;
[0068] FIG12 is an interactive flow chart of a method for upgrading an optical module provided in an embodiment of the present application;
[0069] FIG13 is an interactive flow chart of a method for upgrading an optical module provided in an embodiment of the present application;
[0070] FIG14 is a schematic structural diagram of an optical module upgrade device provided in an embodiment of the present application. DETAILED DESCRIPTION
[0071] The terms "first" and "second" in the embodiments of this application are used for descriptive purposes only and should not be understood to indicate or imply relative importance or implicitly specify the number of technical features indicated. Therefore, features specified as "first" or "second" may explicitly or implicitly include one or more of the features.
[0072] First, some technical terms involved in the embodiments of this application are introduced.
[0073] An executable file, also known as an executable file, is a file that can run on hardware (e.g., general-purpose hardware or specialized hardware). An executable file typically contains instructions encoded in binary format and is sometimes referred to as a binary file or instruction file. Typical examples of executable files include, but are not limited to, firmware and components.
[0074] Executable files can be executed on optical modules to implement specific functions to meet security requirements or enhance functionality. An optical module can be hardware configured into a network device and can be either pluggable or non-pluggable. A network device is the parent device of an optical module and is typically a switch or router. Furthermore, network devices can be categorized as either with or without a single board, depending on whether they include a single board. In the field of optical communications, a single board can include a wavelength division multiplexing (WDM) board.
[0075] In order to achieve 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, which further reduces the upgrade efficiency.
[0076] 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.
[0077] This method maps the version information of the executable file in the upgrade file to the upgrade file version information unique to the device, facilitating standardized management of optical modules on the device side. When upgrading an optical module, the device side does not need to identify the units in the optical module corresponding to each executable file. The optical module internally parses the upgrade file and upgrades the corresponding units in the optical module, simplifying the upgrade process and improving upgrade efficiency. When firmware upgrades are required for multiple units in the optical module, there is no need to trigger the upgrade process multiple times, further improving upgrade efficiency.
[0078] 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.
[0079] 1 shows an architecture diagram of an optical module upgrade system. The system 10 includes at least one network device 100 and a network management device 200. The network management device can be a terminal with a network management application deployed. One network management device can be used to control multiple network devices.
[0080] Network devices 100 can be categorized into different types based on whether or not they have boards. As shown in Figure 1 , network device 100 can be configured directly with one or more optical modules (e.g., optical module 1, optical module 2, ..., optical module N), or it can 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 modules 1 through P).
[0081] In this system 10, the network devices 100 at the same site (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 based on the version information of at least one execution file in the upgrade file. Based on this, the module central processing unit 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 the 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 the at least one execution file to the target unit, so that the target unit runs the execution file corresponding to the target unit in the 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. The network device 100 only needs to send the upgrade file to the corresponding optical module without identifying 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.
[0082] In addition, 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. 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.
[0083] The network device 100 can send the upgrade file to the optical module that has 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 the 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 will identify whether the identification information of the upgrade file matches the manufacturing information of the optical module successfully, and return 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 the automatic upgrade of the optical module.
[0084] The following is an example of upgrading an optical module. As shown in Figure 2, the network management device transfers the upgrade file (for example, it can be 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. In the example of Figure 2, 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 the upgrade function. 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 data to be saved through an external memory. The present application can support the upgrade of units with two storage mechanisms.
[0085] 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 in which the identification information successfully matches the manufacturing information of the optical module. It should be noted that the matching process can be executed 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.
[0086] Furthermore, the network device can also obtain the version information of the optical module (for example, the version number determined based on 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 successful matching executable file to the optical module. The set conditions can be set according to business needs. In some examples, the set condition can 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 can 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 can be that the version information of the module is version A or version B.
[0087] The solution of this application is also applicable to scenarios where a network device has multiple boards, and each board has multiple optical modules. As shown in Figure 3, the board includes a board central processor and memory. The network management device transfers the upgrade file to the network device-side memory. The 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 it can choose to first store the upgrade file in the board-side memory and then transfer the required upgrade file to the optical module after identifying the requirements.
[0088] 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 .
[0089] First, referring to the flowchart of a method for upgrading an optical module shown in FIG4 , the method is applied to an optical module, wherein the optical module includes a module central processing unit and at least one functional unit supporting the upgrade, the functional unit including but 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 may be an ITLA. The method includes the following steps:
[0090] S402: The module central processing unit receives the upgrade file.
[0091] 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 the version number displayed externally by the entire upgrade file. The version information of the upgrade file can 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.
[0092] 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's central processing unit and an executable file corresponding to the DSP. Among them, the version information (such as the version number) of the executable file corresponding to the module's central processing unit 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 externally presenting them as a unique version number, it can be ensured that the version information of the upgrade file of the optical module is unique from the perspective of the device.
[0093] 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 the version information of at least one executable file. For example, if the executable file includes an executable file corresponding to the module central processing unit and an executable file corresponding to the DSP, the file header can also include the version information of the module central processing unit and the version information of the DSP. The version information of the executable file can be used to verify whether the upgrade is successful after the upgrade is completed. For example, if the version information of the corresponding unit is consistent with the version information of the executable file in the file header after the upgrade is completed, it means that the upgrade is successful.
[0094] Furthermore, the upgrade file header also includes identification information for the upgrade file. This identification information indicates the manufacturing information of the optical module to which the upgrade file is compatible. For example, the identification information may include at least one of the manufacturer's name, organizational unique identifier (OUI), serial number (SN), part number (PN), and module custom identifier of the optical module to which the upgrade file is compatible. This allows the upgrade file to be sent to the optical module that successfully matches the upgrade file.
[0095] For ease of understanding, the present application also provides an example of an upgrade file. Referring to the format diagram of an upgrade file shown in Figure 5, in this example, the upgrade file includes the execution file corresponding to the module central processing unit, the execution file corresponding to the DSP, and the microcode (a patch file running on the DSP, a type of execution file), and 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.
[0096] It should be noted that the upgrade file may also include other executable files (other firmware), and accordingly, the upgrade file header may also include version information of other executable files. In this embodiment, the file header can be combined with any one or more executable files, and the order of the file header information can be changed based on the specific design exchange.
[0097] In other possible implementations, at least one executable file in the upgrade file can be independent, and the version information of the upgrade file can be configured in a configuration file. The configuration file can also be referred to as an upgrade management configuration file. This configuration file is also independent of the executable file. The configuration file supports the upgrade of a single executable file or the upgrade of multiple executable files in combination.
[0098] Furthermore, the configuration file may also include the identifier of at least one executable file included in the upgrade file and the upgrade order. The identifier of the executable file may include, but is not limited to, the name of the executable file. In other words, the configuration file may also include the name of the executable file corresponding to the unit to be upgraded in the optical module and the upgrade order. The upgrade order can be user-configured; if not configured by the user, the upgrade order may be a default order.
[0099] For ease of understanding, this application also provides another example of an upgrade file. Referring to the format diagram of an upgrade file shown in Figure 6, in this example, the upgrade file includes an executable file corresponding to the module central processing unit, an executable file corresponding to the DSP, a microcode (a patch file running on the DSP, a type of executable file) and a configuration file. Different from the upgrade file in Figure 5, the executable files in the upgrade file in Figure 6 are not packaged. The version information of the upgrade file is configured in the configuration file, that is, the only version information reflected to the outside by the combination of the executable files. The configuration file also includes the name of the executable file 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, and the number and order of files that need to be deployed or upgraded can be controlled by managing the configuration file.
[0100] Furthermore, the configuration file may also include identification information for the upgrade file. The identification information indicates the manufacturing information of the optical module to which the upgrade file is adapted. For example, the identification information may include at least one of the manufacturer's name, organizational unique identifier (OUI), serial number (SN), part number (PN), and module custom identifier of the optical module to which the upgrade file is adapted.
[0101] 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 file with the manufacturing information and version information of the optical module, upgrade files from different manufacturers and different solutions can be implemented. The unified process on the device side facilitates the standardized management of optical modules by network devices, thus reducing the reliability risks caused by manual management as well as labor and time costs.
[0102] 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.
[0103] First, the matching of the manufacturing information of an optical module and the identification information of an upgrade file is used as an example for explanation.
[0104] In some possible implementations, the module central processing unit may send the manufacturing information of the optical module to the network device. The network device may then compare the manufacturing information of the optical module with the identification information of the upgrade file to achieve a match between the manufacturing information and the identification information. For example, if the manufacturing information of the optical module and the identification information of the upgrade file are consistent, 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.
[0105] In other possible implementations, the module central processing unit may receive identification information of the upgrade file sent by the network device, match the manufacturing information of the optical module with the identification information of the upgrade file, and return 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.
[0106] Furthermore, the optical module or network device can also match the version information of the optical module with the version information of the upgrade file. When the upgrade file is used to upgrade an optical module of a specified version, the optical module or network device can also match the version information of the optical module (determined based on the version information of the currently deployed executable 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.
[0107] For ease of understanding, the following is explained with reference to an example. 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. 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 a successful version information match 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 a 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.
[0108] S404: The module central processing unit parses the upgrade file and determines the target unit to be upgraded in the optical module. If the target unit includes the module central processing unit, S406 is executed; if the target unit includes the functional unit, S408 is executed.
[0109] Specifically, the module central processing unit can parse the file header or configuration file of the upgrade file to obtain version information of the upgrade file, and can determine the target unit to be upgraded in the optical module 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 the upgrade file can be reverse-mapped to obtain the version information of each execution file, and then determine the unit corresponding to each execution file. The unit corresponding to each execution file is the target unit to be upgraded in the optical module.
[0110] The following example illustrates this. In this example, the upgrade file's version information is C203-D317. The module's central processing unit parses the upgrade file's version information to obtain the executable file's version information, C203 and D317. C represents the CPU and D represents the DSP. Based on this information, it can be determined that the target units include the module's central processing unit and the DSP.
[0111] 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.
[0112] S406. The module central processing unit runs at least one execution file corresponding to the module central processing unit.
[0113] S408. The module central processing unit sends the at least one execution file corresponding to the target unit to the target unit.
[0114] 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.
[0115] When the execution files are uniformly managed through the configuration file, 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.
[0116] Furthermore, the module's central processing unit can verify the upgrade file. For example, the module's central processing unit can perform packet-level verification, file-level integrity verification, and overall integrity verification on the upgrade file. Accordingly, the verification result can include at least one of the file-level integrity verification result, the overall integrity verification result, or the packet-level verification result (also known as the range verification result). Integrity verification can be implemented using a checksum. A checksum is a form of redundancy check, a simple method that uses error detection to check the integrity of data transmitted across space (such as a communication link) or time (such as computer storage). Typical examples of checksums include cyclic redundancy checks (CRC), message-digest algorithms (MD5), or secure hash algorithms (SHA). For example, the checksum can be the cumulative number of transmitted bits. When the transmission is complete, the recipient can use this value to determine whether all data has been received. If the values match, the transmission is complete. Packet-level verification can be a consistency check (accuracy check) of the data packets. In specific implementations, consistency verification can be performed by comparing hash values. In addition, network devices can also implement self-verification of upgrade files based on checksums, thereby ensuring the correctness and integrity of upgrade files.
[0117] 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.
[0118] In some possible implementations, the module's central processing unit can also return a verification result to the network device. When the verification result indicates that the verification has passed, the network device can send a run command to the module. This run command (e.g., a RUN command) is used to run the upgrade file (the executable file in the upgrade file). This can reduce the possibility of errors during the upgrade file transmission causing the optical module to become unavailable or the network device to be repeatedly retried, thereby improving reliability and reducing security risks caused by incomplete or erroneous upgrade file transmission.
[0119] Considering that optical modules can include different processors, each of which can use different instruction architectures, resulting in different execution instructions used by different processors to deploy or upgrade executable files such as firmware, the network device can also query the module for upgrade capabilities and receive a response from the module, which includes the execution command for the upgrade. Accordingly, the network device can send the corresponding execution command when triggering the deployment or upgrade of the executable file.
[0120] 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 it can continue to run after the optical module is reset. Upon receiving the commit command, the optical module can mark the current running area (the area currently running the executable file) as valid, thereby implementing the commit. Once the marking is complete, the optical module can return a successful commit to the network device.
[0121] Taking into account the possibility of failure of the optical module, this application also supports copying upgrade files to facilitate subsequent fault recovery. The optical module can set the current operating area and the backup area. The optical module can be deployed or upgraded not only in the current operating area, but also in the backup area. Specifically, the optical module can receive a copy command sent by the 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.
[0122] Based on the above description, this method maps the version information of the execution file in the upgrade file to the upgrade file version information that is unique to the device side, which facilitates the normalized management of the optical modules on the device side. When the device side upgrades the optical modules configured therein, it does not need to identify the units in the optical modules corresponding to the execution files. Instead, it parses the upgrade file inside the optical module and uniformly upgrades 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, this 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 to which the upgrade file is adapted, identifying the optical module corresponding to the upgrade file, and sending the upgrade file to the corresponding optical module to achieve automated deployment or upgrade. This method automatically manages all optical modules configured on the network device through the above process, greatly reducing the management cost of deploying or upgrading the optical modules.
[0123] Next, referring to the flowchart of a method for upgrading an optical module shown in FIG7 , the method is applied to a network device and includes the following steps:
[0124] S702: The network device receives the upgrade file sent by the network management device.
[0125] The upgrade file includes at least one executable file and version information of the upgrade file. The version information of the upgrade file is determined based on the version information of at least one executable file in the upgrade file. Furthermore, the upgrade file may also include identification information indicating the manufacturing information of the optical module to which the upgrade file is adapted.
[0126] Upgrade files can support multiple formats. For example, the executable files in the upgrade file can be packaged, and the upgrade file version information can be recorded in the file header of the packaged file. For specific implementation, please refer to the relevant content description of Figure 5. For another example, the executable files in the upgrade file can be centrally managed through the configuration file. For specific implementation, please refer to the relevant content description of Figure 6.
[0127] S704: The network device determines the optical module that successfully matches the upgrade file.
[0128] Matching the upgrade file to the optical module can be performed on the network device side or on the optical module side. The following describes each scenario.
[0129] 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. 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. The network device then compares 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. Furthermore, the network device can also compare version information to determine the optical module that successfully matches the upgrade file. For example, the network device can obtain version information of the upgrade file, which includes a specified version. The network device can also obtain 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 successfully match.
[0130] 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.
[0131] S706: The network device sends the upgrade file to the optical module.
[0132] Specifically, based on the matching results, the network device can send the upgrade file to the optical module that successfully matches the upgrade file. 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 can send 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 can send an upgrade file to each optical module whose identification information is consistent with the manufacturing information of the optical module, and whose specified version in the version information is consistent with the version information of the optical module.
[0133] 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 the optical modules. When the network device upgrades the optical modules configured for it, it does not need to identify the units in the optical modules corresponding to each execution file. Instead, it uniformly upgrades 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 to achieve automated deployment or upgrade.
[0134] Considering that an 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, a network device can upgrade a single upgradeable unit or a combination of different upgradeable units. The following examples illustrate different upgrade scenarios.
[0135] Referring to the interactive flow chart of an optical module upgrade method shown in FIG8 , the process of upgrading the module central processing unit in the optical module is as follows:
[0136] S802: The network device central processor, the network device memory, the module central processing unit, and the module memory are initialized.
[0137] Initialization may include, but is not limited to, power-on or power-on self-test (POST). POST, also known as power-on self-test, refers to the self-test logic executed when the computer is turned on. After power-on or POST, subsequent processes can be executed.
[0138] S804: The network device central processing unit sends a query request to the module central processing unit.
[0139] S806: The module central processing unit returns the manufacturing information of the optical module to the network device central processor.
[0140] The query request is used to query the module's manufacturing information, also known as module authentication information. The module's central processing unit can respond to the query request by calling a corresponding interface or instruction to query the module's manufacturing information and return the manufacturing information to the network device's central processor.
[0141] S808. The central processing unit of the network device obtains identification information of the upgrade file from the network device memory.
[0142] 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 manufacturing information of the optical module to which the upgrade file is adapted, including but not limited to the manufacturer name (such as the manufacturer name), the organizational unique identifier, or at least one of the serial number (SN), the part number (PN), and the module custom identifier of the adapted optical module.
[0143] The network management device may send 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.
[0144] S810: The central processing unit of the network device compares the manufacturing information of the optical module with the identification information of the upgrade file. If the manufacturing information of the optical module and the identification information of the upgrade file match successfully, S812 is executed.
[0145] S812: The network device central processor queries the module central processing unit for upgrade capabilities.
[0146] S814. The module central processing unit returns the upgrade capability to the network device central processor.
[0147] When the upgrade capability indicates that the central processing unit supports upgrading, the upgrade capability includes a running instruction (also called a RUN command) for upgrading.
[0148] S816. The central processing unit of the network device obtains the file header.
[0149] S818. The central processing unit of the network device obtains the upgrade file.
[0150] S820. The network device central processing unit sends the file header to the module central processing unit.
[0151] The network device central processing unit initiates the upgrade by sending a file header to the module central processing unit.
[0152] S822: The module central processing unit determines whether the file header is legal. If so, execute S824.
[0153] S824. The module central processing unit stores the file header in the module memory.
[0154] S826. The module central processing unit returns a message indicating that the file header reception is complete to the network device central processing unit.
[0155] S828. The network device central processing unit sends a data packet of the upgrade file to the module central processing unit.
[0156] S830. The module central processing unit stores the received data packet in the module memory.
[0157] S832: The module central processing unit returns a message indicating that the current data packet has been received to the network device central processor.
[0158] S834, the network device central processing unit 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 so, execute S836.
[0159] S836. The central processing unit of the network device sends a transmission completion command.
[0160] S838: The module central processing unit verifies the execution file, obtains a verification result, and returns the verification result to the network device central processing unit. If the verification result indicates that the verification has passed, S839 and S840 are executed.
[0161] S839: The module central processing unit parses the upgrade file and determines the target unit to be upgraded in the optical module. If the target unit is the module central processing unit, execute S842.
[0162] In this embodiment, the upgrade file is used to upgrade the module central processing unit. The module central processing unit parses the version information of the upgrade file to determine that the target unit is the module central processing unit, so S842 can be executed.
[0163] S840. The network device central processing unit sends a RUN command to the module central processing unit.
[0164] S842. The module central processing unit obtains the verified upgrade file from the module memory.
[0165] S844. After the module central processing unit successfully executes the upgrade file, it returns a successful execution message.
[0166] The module central processing unit may use a RUN command in an instruction set architecture supported by the module central processing unit to run the verified upgrade file to implement an upgrade of the module central processing unit.
[0167] S846. The central processing unit of the network device sends a submit command.
[0168] The submit command may be a commit command, which is used to submit an execution file.
[0169] S848, the module central processing unit marks the current operating area as valid.
[0170] S850: The module central processing unit returns a message indicating that the submission was successful.
[0171] S852: The central processing unit of the network device sends a copy command.
[0172] The copy command is used to copy upgrade files (such as new version upgrade files) to the backup area.
[0173] S854. The module central processing unit copies the upgrade file to the backup area of the module memory.
[0174] S856: The module central processing unit returns a message indicating that the copy was successful.
[0175] It should be noted that S802, S804, S812 to S826, S832 to S838, and S840 to S856 are optional steps of the embodiment of the present application. The upgrade method of the optical module of the present application may also not execute the above-mentioned S802, S804, S812 to S826, S832 to S838, and S840 to S856.
[0176] FIG8 illustrates an example of upgrading the central processing unit of a module alone. The following illustrates an example of upgrading other functional units (such as DSP) in an optical module alone.
[0177] Referring to FIG9 , which shows an interactive flow chart of a method for upgrading an optical module, in this example, the DSP includes a DSP processing unit and a DSP memory. The process for upgrading the DSP in the optical module is as follows:
[0178] S901. Initialize the network device central processor, network device memory, module central processing unit, module memory, DSP processing unit, and DSP memory.
[0179] S902: The network device central processing unit sends a query request to the module central processing unit.
[0180] S904: The module central processing unit returns the manufacturing information of the optical module to the network device central processor.
[0181] S906: The central processing unit of the network device obtains identification information of the upgrade file from the network device memory.
[0182] S908: The central processing unit of the network device compares the manufacturing information of the module with the identification information of the upgrade file. If the manufacturing information of the module and the identification information of the upgrade file match successfully, S910 is executed.
[0183] S910. The network device central processing unit sends an upgrade file to the module central processing unit.
[0184] The central processing unit of the network device may initiate the upgrade by sending an upgrade file.
[0185] S911: The module central processing unit parses the upgrade file and determines the target unit to be upgraded in the optical module. If the target unit includes a DSP, S912 is executed.
[0186] 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 upgrade file version information. 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.
[0187] S912: The module central processing unit sends the upgrade file to the DSP processing unit.
[0188] S914. The DSP processing unit stores the upgrade file in the DSP memory.
[0189] S916. The DSP processing unit returns a storage success message to the module central processing unit.
[0190] S918. The module central processing unit returns a storage success message to the network device central processing unit.
[0191] S920. The network device central processing unit sends a RUN command to the module central processing unit.
[0192] S922: The module central processing unit sends a RUN command to the DSP processing unit.
[0193] S924: The DSP processing unit obtains the verified upgrade file from the DSP memory.
[0194] S926. After the DSP processing unit successfully runs, it returns a message of successful running to the module central processing unit.
[0195] S928. The module central processing unit returns a successful operation to the network device central processing unit.
[0196] S930: The central processing unit of the network device sends a submit command to submit the upgrade file.
[0197] S932: The module central processing unit sends a submit command to the DSP processing unit.
[0198] S934. The DSP processing unit marks the current operating area as valid.
[0199] S936. The DSP processing unit returns a submission success to the module central processing unit.
[0200] S938. The module central processing unit returns a submission success to the network device central processing unit.
[0201] S940: The central processing unit of the network device sends a copy command.
[0202] S942: The module central processing unit sends a copy command to the DSP processing unit.
[0203] S944. The DSP processing unit copies the upgrade file to the backup area of the DSP memory.
[0204] S946: The DSP processing unit returns a message indicating that the copy was successful to the module central processing unit.
[0205] S948. The module central processing unit returns a message indicating that the copy is successful to the network device central processing unit.
[0206] Figure 9 illustrates the direct interaction between the network device's central processing unit and the module's central processing unit, assuming the network device lacks a single-board configuration. If the network device also has a single-board configuration, the single-board can transparently transmit network device commands directly to the optical module, acting as an intermediate forwarder to complete the upgrade process. Alternatively, the single-board can save the upgrade file sent by the network device and then initiate the upgrade process itself, completing the entire upgrade interaction.
[0207] It should be noted that the specific implementation of several steps in the embodiment of Figure 9 can refer to the relevant content description of the aforementioned embodiment and will not be repeated here. In addition, some steps in the embodiment of Figure 9 are optional steps, and the upgrade method of the optical module of the embodiment of the present application may not perform the optional steps.
[0208] 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).
[0209] Referring to the interactive flow chart of another optical module upgrade method shown in FIG10 , the process of upgrading the firmware of the DSP in the optical module is as follows:
[0210] S1002: The network device central processor, the network device memory, the module central processing unit, and the module memory are initialized.
[0211] S1004. The network device central processing unit sends a query request to the module central processing unit.
[0212] S1006. The module central processing unit returns the manufacturing information of the optical module to the network device central processor.
[0213] S1008. The central processing unit of the network device obtains identification information of the upgrade file from the network device memory.
[0214] S1010: The central processing unit of the network device compares the manufacturing information of the module with the identification information of the upgrade file. If the manufacturing information of the module and the identification information of the upgrade file match successfully, S1012 is executed.
[0215] S1012. The network device central processing unit sends the upgrade file to the module central processing unit.
[0216] The central processing unit of the network device may initiate the upgrade by sending an upgrade file.
[0217] S1014. The module central processing unit stores the upgrade file in the module memory.
[0218] S1016. The module central processing unit returns a storage success message to the network device central processing unit.
[0219] S1018. The network device central processing unit sends a RUN command to the module central processing unit.
[0220] S1020: The module central processing unit reads the upgrade file from the module memory.
[0221] S1021: The module central processing unit parses the upgrade file and determines the target unit to be upgraded in the optical module. If the target unit is the DSP, execute S1022.
[0222] S1022: The module central processing unit sends the upgrade file to the DSP processing unit.
[0223] S1023: The DSP processing unit verifies the upgrade file and returns the verification result. If the verification passes, S1024 is executed.
[0224] S1024. The module central processing unit sends a RUN command to the DSP processing unit.
[0225] S1026. After the DSP processing unit successfully runs, it returns a message of successful running to the module central processing unit.
[0226] S1028. The module central processing unit returns a successful operation to the network device central processing unit.
[0227] S1030: The central processing unit of the network device sends a submit command to submit the upgrade file.
[0228] S1032. The module central processing unit marks the current operating area as valid.
[0229] S1034. The module central processing unit returns a submission success to the network device central processing unit.
[0230] S1036. The central processing unit of the network device sends a copy command.
[0231] S1038. The module central processing unit copies the upgrade file to the backup area of the module memory.
[0232] S1040. The module central processing unit returns a copy success message to the network device central processing unit.
[0233] 8 to 10 illustrate an example of upgrading an execution file of a single unit. The following illustrates an example of upgrading a combination of execution files of multiple units (for example, upgrading firmware including multiple files).
[0234] Referring to the flowchart of a method for upgrading an optical module shown in FIG11 , the process of combining and upgrading multiple units in an optical module is as follows:
[0235] S1102: The network device central processor, the network device memory, the module central processing unit, and the module memory are initialized.
[0236] S1104. The network device central processing unit sends a query request to the module central processing unit.
[0237] S1106 : The module central processing unit returns the manufacturing information of the optical module to the network device central processing unit.
[0238] S1108. The central processing unit of the network device obtains identification information of the upgrade file from the network device memory.
[0239] S1110: The central processing unit of the network device compares the manufacturing information of the optical module with the identification information of the upgrade file. If the manufacturing information of the optical module and the identification information of the upgrade file match successfully, S1112 is executed.
[0240] S1112. The central processing unit of the network device sends the upgrade file.
[0241] S1114: The module's central processing unit verifies the upgrade file. If the verification passes, execute S1116.
[0242] 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.
[0243] S1116. The module central processing unit stores the upgrade file.
[0244] S1118. The module central processing unit returns a storage success message to the network device central processing unit.
[0245] S1120. The network device central processing unit sends a run command to the module central processing unit.
[0246] In this embodiment, multiple processors in an optical module need to be upgraded. The network device central processor can send multiple run commands to the module central processing unit, for example, run commands corresponding to the multiple processors to be upgraded. In this example, the run commands can include run commands for the ITLA processing unit, the DSP processing unit, and the module central processing unit.
[0247] 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).
[0248] S1122: The module central processing unit parses the upgrade file and determines the target unit to be upgraded in the optical module. If the target unit includes the module central processing unit, DSP, and ITLA, execute S1123.
[0249] S1123. The module central processing unit identifies a valid executable file in the upgrade file.
[0250] Specifically, the module central processing unit may identify 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 from the upgrade file.
[0251] S1124. The central processor of the network device sends an operation command to the ITLA processing unit and the DSP processing unit.
[0252] S1125 , the module central processing unit may read the execution file corresponding to the ITLA and the execution file corresponding to the DSP from the module memory.
[0253] S1126. The module central processing unit sends the execution file to the ITLA processing unit and the DSP processing unit respectively.
[0254] S1128, the ITLA processing unit and the DSP processing unit verify the execution file, and run the verified execution file through the run command after the verification passes. After the execution is successful, a success message is returned to the module central processing unit.
[0255] 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.
[0256] 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.
[0257] Among them, before the execution file corresponding to the module central processing unit is run and takes effect, the execution file to be taken effect can be verified first (for example, using the SHA256 algorithm to verify), and then the central processing unit can be reset to take effect. When other execution files are run and take effect, the central processing unit can first verify the execution file to be taken effect, and then reload and reset other processors.
[0258] In this solution, the network device only needs to identify the configuration files within the upgrade file, not the specific executable files contained within. After the upgrade file is sent to the optical module, the module identifies the upgrade file version information and performs the upgrade based on the corresponding executable file version. The network device handles upgrades in the same manner regardless of whether the upgrade file includes one or more executable files.
[0259] The embodiments shown in FIG. 8 to FIG. 11 above mainly illustrate the upgrade of one optical module. The present application also supports the upgrade of multiple optical modules.
[0260] Referring to the flowchart of a method for upgrading an optical module shown in FIG12 , the process of upgrading the firmware of multiple modules is as follows:
[0261] S1202: The network device central processor, the network device memory, and the plurality of optical modules are initialized respectively.
[0262] S1203: The central processing unit of the network device obtains identification information of the upgrade file from the network device memory.
[0263] S1204. The central processing unit of the network device sends a query request to multiple optical modules.
[0264] S1206. The multiple modules return the manufacturing information of the optical modules to the central processor of the network device respectively.
[0265] S1208: The central processing unit of the network device compares the manufacturing information of the optical module with the identification information of the upgrade file. If the manufacturing information of the optical module and the identification information of the upgrade file match successfully, S1210 is executed.
[0266] S1210. The central processing unit of the network device sends an upgrade file that successfully matches the manufacturing information of the optical modules to each of the multiple optical modules to start the upgrade.
[0267] 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.
[0268] S1212. Multiple optical modules return a successful execution to the central processor of the network device.
[0269] In this embodiment, the network device can simultaneously perform upgrade file identification, matching, and transmission for multiple modules, either serially or in parallel, depending on its capabilities. After the upgrade file is successfully transmitted, the subsequent upgrade process is described in the previous embodiment. If the network device supports parallel processing, upgrade file identification, upgrade file transmission, and upgrade processes for multiple optical modules can be performed in parallel, thereby improving overall upgrade efficiency.
[0270] Based on the above embodiments, the present application also provides a version management solution for executable files.
[0271] Referring to the flowchart of a method for upgrading an optical module shown in FIG13 , the method specifically includes the following steps:
[0272] S1302: The network device central processor, the network device memory, the module central processing unit, and the module memory are initialized.
[0273] S1304. The network device central processing unit sends a query request to the module central processing unit.
[0274] S1306. The module central processing unit returns the manufacturing information of the optical module to the network device central processor.
[0275] S1308. The central processing unit of the network device obtains identification information of the upgrade file from the network device memory.
[0276] S1310: The central processing unit of the network device compares the manufacturing information of the optical module with the identification information of the upgrade file. If the manufacturing information of the optical module and the identification information of the upgrade file match successfully, S1312 is executed.
[0277] S1312. The network device central processing unit queries the module central processing unit for version information.
[0278] S1314. The module central processing unit queries the version information of the ITLA processing unit and the DSP processing unit.
[0279] 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.
[0280] 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).
[0281] S1318: The central processing unit 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.
[0282] S1320. The central processing unit of the network device sends the upgrade file to start the upgrade.
[0283] S1322. The module central processing unit returns a successful operation to the network device central processing unit.
[0284] The module central processing unit can return a successful execution to the network device central processor upon executing the upgrade file and receiving a successful execution return from the ITLA processing unit and the DSP processing unit. It should be noted that the specific implementation of the embodiment in which the ITLA processing unit, the DSP processing unit, and the module central processing unit execute the execution file to perform the upgrade can be found in the aforementioned embodiment and will not be further described here.
[0285] S1324. The network device central processor may query the module central processing unit for version information.
[0286] S1326: The module central processing unit may return version information of the optical module.
[0287] S1328. The central processing unit of the network device compares the version information of the optical module with the version information of the upgrade file.
[0288] 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 upgrade method of the optical module of this embodiment can also be executed without performing the above S1324 to S1328.
[0289] The version information of the optical module may be stored and managed by the central processor of the network device, or may be stored and managed by the processing unit of each optical module, which is not limited in this embodiment.
[0290] Based on the aforementioned optical module upgrade method, this application also provides an optical module upgrade device. The optical module upgrade device can be a virtual device. The following describes the optical module upgrade device provided in this application from the perspective of functional modularization.
[0291] 14 shows a schematic diagram of a structure of an optical module upgrade device. The device 1400 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. The device 1400 includes:
[0292] The transceiver unit 1402 is configured to receive an upgrade file, wherein the upgrade file includes at least one executable file and version information of the upgrade file, wherein the version information of the upgrade file is determined based on the version information of at least one executable file in the upgrade file;
[0293] The parsing unit 1404 is 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;
[0294] An execution unit 1406 is configured to execute 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;
[0295] The transceiver unit 1402 is further configured to, when the target unit includes the functional unit, send an execution file corresponding to the target unit in the at least one execution file to the target unit.
[0296] Among them, the specific implementation of the transceiver unit 1402 can refer to the relevant content description of S402 in the embodiment shown in Figure 4, the specific implementation of the parsing unit 1404 can refer to the relevant content description of S404 in the embodiment shown in Figure 4, the specific implementation of the running unit 1406 can refer to the relevant content description of S406 in the embodiment shown in Figure 4, and the specific implementation of the transceiver unit 1402 can also refer to the relevant content description of S408 in the embodiment shown in Figure 4.
[0297] 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.
[0298] In some possible implementations, the upgrade file includes a file header, and the file header includes version information of the upgrade file.
[0299] In some possible implementations, the file header further includes version information of the at least one executable file;
[0300] The apparatus 1400 further includes:
[0301] 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.
[0302] In some possible implementations, the upgrade file includes a configuration file, and the configuration file includes version information of the upgrade file.
[0303] In some possible implementations, the configuration file further includes an identifier and an upgrade sequence of the at least one executable file in the upgrade file.
[0304] In some possible implementations, the upgrade file further includes identification information, where the identification information indicates an optical module to which the upgrade file is adapted;
[0305] The transceiver unit 1402 is further configured to:
[0306] Sending manufacturing information of the optical module to a network device;
[0307] The transceiver unit 1402 is specifically configured to:
[0308] 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.
[0309] In some possible implementations, the upgrade file further includes identification information, where the identification information indicates an optical module to which the upgrade file is adapted;
[0310] The transceiver unit 1402 is further configured to: receive identification information of the upgrade file sent by the network device;
[0311] The apparatus 1400 further includes:
[0312] 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;
[0313] The transceiver unit 1402 is specifically configured to:
[0314] Receive the upgrade file sent by the network device and successfully matched with the optical module.
[0315] 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.
[0316] In some possible implementations, the apparatus 1400 further includes:
[0317] Verification unit 1412, configured to perform data packet level verification, file level integrity verification, and / or overall integrity verification on the upgrade file to obtain a verification result;
[0318] 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;
[0319] 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.
[0320] 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.
[0321] The present application also provides an optical module. The device shown in Figure 14 can be deployed in an optical module, and the optical module executes the program code of the device shown in Figure 14, thereby executing the upgrade method of the optical module of the aforementioned embodiment. As shown in Figure 2 or Figure 3, the optical module includes a module central processing unit and at least one functional unit that supports 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, an analog-to-digital converter. The module central processing unit is used to execute the program code, thereby executing the upgrade method of the optical module of the aforementioned embodiment to achieve the upgrade of the module central processing unit and / or the functional unit in the optical module.
[0322] 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 that contains one or more available media. The available medium can be a magnetic medium (e.g., a floppy disk, a hard disk, a magnetic tape), an optical medium (e.g., a DVD), or a semiconductor medium (e.g., a solid-state drive). The computer-readable storage medium includes instructions that instruct the execution of the optical module upgrade method of the aforementioned embodiment.
[0323] The present application also provides a computer program product containing instructions. The computer program product can be software or a program product containing instructions that can be run on a computing device or stored in any available medium. When the computer program product is run on an optical module, the optical module executes the optical module upgrade method of the aforementioned embodiment.
[0324] 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 deviate the essence of the corresponding technical solutions from the protection scope of the technical solutions of the various 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 is passed, the module central processing unit executes the operation corresponding to the at least one execution file. The step of executing the execution file corresponding to the central processing unit of the module, and / or 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 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; 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 used to execute the running of the at least one execution file corresponding to the The steps of the execution file corresponding to the module central processing unit; 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
Patent Citations
Upgrading method of optical module and related device
CN119718363A
A method and system for updating firmware, upper computer and optical module
CN104579719A
Firmware upgrading method and apparatus for optical module
CN106598632A
Optical module firmware rollback online upgrading method based on traditional partition
CN112230967A
Optical module program upgrading method, device and equipment and readable storage medium
CN113641378A