Method and device for acquiring brand information of optical module
By obtaining the code file of the optical module and using pre-configured correspondences or machine learning models to determine compatible brand information, the problem of unclear compatible brand information caused by optical module identification damage or code modification is solved, realizing fast and accurate brand information acquisition and improving work efficiency.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- FS COM LTD
- Filing Date
- 2023-03-17
- Publication Date
- 2026-04-28
AI Technical Summary
In network deployment, damage to or alteration of optical module identification can prevent users from accurately understanding their compatible brand information, leading to low work efficiency.
By obtaining the code file of the optical module, the compatible brand information of the optical module is determined using a pre-configured correspondence or machine learning model, and the terminal device is controlled to output this information.
Users can obtain compatible brand information for optical modules more quickly, which improves the efficiency of inserting optical modules into compatible switch ports and enhances work efficiency.
Smart Images

Figure CN116319330B_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of optical fiber communication technology, and in particular to a method and apparatus for obtaining optical module compatibility brand information. Background Technology
[0002] Optical light is widely used in the communications industry due to its excellent transmission performance. To enable the conversion between optical and electrical signals, optical modules were developed. Optical modules are typically connected to switches, which come from many brands, such as Cisco, Huawei, HP, and ZTE. Different brands of switches may have different definitions for their encoding areas. When using switches from different brands, users need to purchase optical modules with specific encodings that are compatible with the corresponding switches.
[0003] Network deployments require a large number of optical modules. If the identification markings on an optical module are damaged, or if the module has undergone code modification, users may not be able to accurately determine its compatible brand information. If users are unaware of the compatible brand information, they can only determine it by repeatedly testing it on switches, which is time-consuming and impacts work efficiency. Summary of the Invention
[0004] This application provides a method and apparatus for obtaining compatible brand information of optical modules. The method determines and controls the terminal device to output compatible brand information according to the code file, which enables users to obtain the compatible brand information of optical modules more conveniently and quickly.
[0005] To address the aforementioned issues, in a first aspect, embodiments of this application provide a method for obtaining compatible brand information of an optical module. The method includes: obtaining a code file of the optical module; determining compatible brand information of the optical module based on the code file, wherein the compatible brand information is the brand information of a switch that the optical module is compatible with; and sending first information to a terminal device, wherein the first information includes the compatible brand information, and the first information is used to instruct the terminal device to output the compatible brand information.
[0006] In conjunction with the first aspect, in some implementations of the first aspect, determining the compatible brand information of the optical module based on the code file includes: determining the compatible brand information corresponding to the code file based on a first correspondence between a pre-configured plurality of code files and a plurality of compatible brand information.
[0007] In conjunction with the first aspect, in some implementations of the first aspect, determining the compatible brand information of the optical module based on the code file includes: inputting the code file into a pre-trained machine learning model to obtain the compatible brand information output by the machine learning model.
[0008] In conjunction with the first aspect, in some implementations of the first aspect, determining the compatible brand information corresponding to the code file based on a first correspondence between a pre-configured plurality of code files and a plurality of compatible brand information includes: reading the model information of the optical module stored in the code file; determining at least one code file and at least one compatible brand information corresponding to the model information in the first correspondence, wherein the at least one code file and the at least one compatible brand information correspond one-to-one; and determining the compatible brand information corresponding to the code file based on the at least one code file and the at least one compatible brand information.
[0009] In conjunction with the first aspect, in some implementations of the first aspect, after reading the model information of the optical module stored in the code file, the method further includes: determining a feature region corresponding to the model information according to a second correspondence between a pre-configured plurality of model information and a plurality of feature regions, wherein the feature region is the location of data reflecting the compatible brand information in the code file; determining the compatible brand information corresponding to the code file according to the at least one code file and the at least one compatible brand information includes: comparing the data of the code file and the target code file in the feature region, wherein the target code file is any one of the at least one code file; if the data of the code file and the target code file are the same in the feature region, then the compatible brand information is the compatible brand information corresponding to the target code file among the at least one compatible brand information.
[0010] According to the method for obtaining compatible brand information of optical modules provided in the embodiments of this application, when the user cannot determine the compatible brand information of the optical module, the user can obtain the compatible brand information of the optical module more conveniently and quickly by determining the compatible brand information of the optical module based on the code file and by controlling the terminal device to output the compatible brand information of the optical module, thereby enabling the user to insert the optical module into a compatible switch port in a timely manner and improve the user's work efficiency.
[0011] Secondly, this application also provides an apparatus for obtaining optical module compatibility brand information, the apparatus comprising: an acquisition module for acquiring a code file of an optical module; a processing module for determining the compatibility brand information of the optical module based on the code file, wherein the compatibility brand information is the brand information of a switch that the optical module is compatible with; and a sending module for sending first information to a terminal device, wherein the first information includes the compatibility brand information, and the first information is used to instruct the terminal device to output the compatibility brand information.
[0012] In conjunction with the second aspect, in some implementations of the second aspect, the processing module is specifically used to: determine the compatible brand information corresponding to the code file based on a first correspondence between a pre-configured plurality of code files and a plurality of compatible brand information.
[0013] In conjunction with the second aspect, in some implementations of the second aspect, the processing module is specifically used to: input the code file into a pre-trained machine learning model to obtain the compatible brand information output by the machine learning model.
[0014] In conjunction with the second aspect, in some implementations of the second aspect, the processing module is specifically used to: read the model information of the optical module stored in the code file; determine at least one code file and at least one compatible brand information corresponding to the model information in the first correspondence relationship, wherein the at least one code file and the at least one compatible brand information correspond one-to-one; and determine the compatible brand information corresponding to the code file based on the at least one code file and the at least one compatible brand information.
[0015] In conjunction with the second aspect, in some implementations of the second aspect, after reading the model information of the optical module stored in the code file, the processing module is further configured to: determine the feature region corresponding to the model information according to a second correspondence between multiple pre-configured model information and multiple feature regions, wherein the feature region is the location of the data reflecting compatible brand information in the code file; specifically, the processing module is configured to: compare the data in the feature region of the code file and the target code file, wherein the target code file is any one of the at least one code file; if the data in the feature region of the code file and the target code file are the same, then the compatible brand information is the compatible brand information corresponding to the target code file among the at least one compatible brand information.
[0016] Thirdly, this application also provides a system for obtaining compatible brand information of optical modules. The system includes a reader, a server, and a terminal device. The reader is used to read the code file of the optical module and send the code file to the server via the terminal device. The server is used to determine the compatible brand information of the optical module based on the code file, wherein the compatible brand information is the brand information of switches that the optical module is compatible with, and to send first information to the terminal device, wherein the first information includes the compatible brand information and is used to instruct the terminal device to output the compatible brand information. The terminal device is used to output the compatible brand information.
[0017] Fourthly, this application also provides an apparatus for obtaining optical module compatibility brand information, including at least one processor, the at least one processor being coupled to a memory to read and execute instructions in the memory to implement the method provided in any of the possible designs in the first aspect above.
[0018] Optionally, the device also includes the memory.
[0019] Fifthly, this application also provides a computer-readable storage medium storing a computer program that, when run on a computer, causes the computer to perform the method provided in any of the possible designs in the first aspect.
[0020] In a sixth aspect, embodiments of this application also provide a computer program product containing instructions that, when run on a computer, cause the computer to perform the method provided in any of the possible designs in the first aspect. Attached Figure Description
[0021] To more clearly illustrate the technical solutions in the embodiments of this application or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are some embodiments of this application. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0022] Figure 1 This is a schematic diagram of the storage content of the optical module at storage area A0h.
[0023] Figure 2 This is a schematic diagram of the storage content of the optical module in storage area A2h.
[0024] Figure 3 This is a schematic diagram of a system for obtaining optical module compatibility brand information provided in an embodiment of this application.
[0025] Figure 4 This is a schematic flowchart illustrating the method for obtaining optical module compatibility brand information provided in the embodiments of this application.
[0026] Figure 5 This is a schematic flowchart illustrating the specific process of the method for obtaining optical module compatibility brand information provided in the embodiments of this application.
[0027] Figure 6 This is a schematic block diagram of a device for obtaining optical module compatibility brand information provided in an embodiment of this application.
[0028] Figure 7 This is a structural block diagram of a device for obtaining compatible brand information of optical modules, as provided in an embodiment of this application. Detailed Implementation
[0029] The technical solutions of this application will now be described with reference to the accompanying drawings. Obviously, the described embodiments are only a part of the embodiments of this application, and not all of them.
[0030] In the following description, specific details such as particular system architectures and techniques are set forth for illustrative purposes and not for limitation, in order to provide a thorough understanding of the embodiments of this application. However, those skilled in the art will understand that this application may also be implemented in other embodiments without these specific details. In other instances, detailed descriptions of well-known systems, apparatuses, circuits, and methods have been omitted so as not to obscure the description of this application with unnecessary detail.
[0031] The term "comprising" in this document indicates the presence of the described feature, whole, step, operation, element, and / or component, but does not exclude the presence or addition of one or more other features, wholes, steps, operations, elements, components, and / or collections thereof. The terms "comprising," "including," "having," and variations thereof mean "including but not limited to," unless otherwise specifically emphasized.
[0032] In this article, the term "and / or" is merely a description of the relationship between related objects, indicating that three relationships can exist. For example, A and / or B can represent: A existing alone, A and B existing simultaneously, or B existing alone. Additionally, the character " / " in this article generally indicates that the preceding and following related objects have an "or" relationship.
[0033] In the description of this application, it should be understood that the terms "first" and "second" are used for descriptive purposes only and should not be construed as indicating or implying relative importance or implicitly specifying the number of indicated technical features. Therefore, a feature defined as "first" or "second" may explicitly or implicitly include one or more of the stated features. In the description of this application, "at least one" means one or more, and "more" means two or more, unless otherwise explicitly specified.
[0034] Optical modules, as a crucial component of fiber optic communication, are optoelectronic devices that perform photoelectric and electro-optic conversion during optical signal transmission. The storage area of an optical module stores data such as the optical module identifier, supplier, and real-time monitoring data from digital diagnostic monitoring (DDM) according to the multi-source agreement (MSA) specification. For example, ... Figure 1 The data shown, such as interface type, transmission distance, vendor name, and checksum algorithm, are as follows: Figure 2 The alarm thresholds and external calibration constants for monitored quantities such as temperature, voltage, bias current, transmit power, and receive power are shown in the figure.
[0035] Optical modules connected to switches enable the conversion between optical and electrical signals. Many brands of switches are available on the market. Due to differences in hardware or speed, different brands of switches have compatibility requirements for the optical modules they connect to. If the optical module's encoding does not meet the switch's requirements, the module may malfunction or generate device alarms. For example, Cisco switches perform checksum verification in the optical module's storage area. If the optical module used does not conform to Cisco's encoding rules, the switch will by default close the port, preventing the optical module from functioning properly.
[0036] Therefore, users typically purchase optical modules with specific coding based on the brand and model of the switch. However, in actual use, users may encounter many different optical modules. If the identification markings on the optical modules are damaged, or if the coding files are rewritten, users may be unable to ascertain the compatible brand information, impacting their work efficiency. For example, it could affect the efficiency of deploying network environments.
[0037] In view of this, embodiments of this application provide a method for obtaining optical module compatibility brand information. The device for obtaining optical module compatibility brand information determines the compatibility brand information of the optical module according to the code file and controls the terminal device to output the compatibility brand information, which enables users to obtain the compatibility brand information of the optical module more conveniently and quickly, thereby timely inserting the optical module into a compatible switch port and improving work efficiency.
[0038] The method for obtaining optical module compatibility brand information provided in this application embodiment can be applied to, for example... Figure 3 The system 300 shown obtains optical module compatibility brand information. For example... Figure 3 As shown, the system 300 may include a reader 310, a terminal device 320, and a server 330.
[0039] The reader 310 is communicatively connected to the terminal device 320, and the terminal device 320 is communicatively connected to the server 330. For example, communication can be achieved via Ethernet, Wi-Fi, Bluetooth, or a data cable.
[0040] Reader 310 is used to read the code file of the optical module and to send the code file of the optical module to server 330 via terminal device 320. Server 330 is used to determine the compatible brand information of the optical module based on the code file and to control terminal device 320 to output the compatible brand information of the optical module. The compatible brand information refers to the brand information of the switches that the optical module is compatible with. For example, server 330 can be a cloud server, etc.
[0041] Terminal device 320 is used to output compatible brand information for the optical module. For example, terminal device 320 can be a mobile phone, tablet, smartwatch, laptop, computer, or other device.
[0042] This application does not limit the method by which the terminal device 320 outputs compatible brand information. For example, the terminal device 320 can output the compatible brand information of the optical module through a display device. As another example, the terminal device 320 can output the compatible brand information of the optical module through a speaker, enabling the user to obtain the compatible brand information of the optical module.
[0043] According to the system for obtaining compatible brand information of optical modules provided in the embodiments of this application, when the user cannot determine the compatible brand information of the optical module, the server 330 determines the compatible brand information of the optical module based on the code file of the optical module read by the reader 310, and the server 330 controls the terminal device 320 to output the compatible brand information, which enables the user to obtain the compatible brand information of the optical module, thereby timely inserting the optical module into the port of a compatible switch and improving the user's work efficiency.
[0044] The following combination Figure 4 This application describes a method 400 for obtaining optical module compatibility brand information according to an embodiment. This method 400 can be executed by a device for obtaining optical module compatibility brand information. The device for obtaining optical module compatibility brand information can be the server 330 described above. Figure 4 As shown, the method 400 may include steps 410, 420 and 430.
[0045] Step 410: Obtain the code file of the optical module.
[0046] For example, the reader can read the optical module's code file from the optical module's memory via an inter-integrated circuit (IIC) interface. The reader can send the optical module's code file to a device that obtains the optical module's compatibility brand information via a terminal device. For example, the reader can be the reader 310 described above, and the terminal device can be the terminal device 320 described above.
[0047] Step 420: Determine the compatible brand information of the optical module based on the code file.
[0048] Specifically, after receiving the code file from the optical module in the reader, the device determines the compatible brand information of the optical module based on the code file. This application does not limit the method of determining the compatible brand information based on the code file.
[0049] For example, one implementation of step 420 can be: determining the compatible brand information of the optical module based on a pre-trained machine learning model.
[0050] Specifically, code files for commonly available optical modules and corresponding compatible brand information are collected to construct a sample database. The samples can be the code files for optical modules and their corresponding compatible brand information. The sample database is divided into a training dataset and a test dataset. A machine learning model is trained using samples from the training dataset (with the code files as input variables and the corresponding compatible brand information as output variables). The accuracy of the trained machine learning model is verified using samples from the test set. The machine learning model that achieves the required accuracy (greater than a preset threshold) is considered a pre-trained machine learning model. The acquired code files are then input into the pre-trained machine learning model, and the output of this model is the compatible brand information for the optical modules.
[0051] For example, another implementation of step 420 can be: determining the compatible brand information corresponding to the obtained code file based on the first correspondence between the pre-configured multiple code files and multiple compatible brand information.
[0052] Specifically, code files for commonly available optical modules and corresponding compatible brand information are collected, and a primary correspondence between multiple code files and multiple compatible brand information is established and stored. For example, the primary correspondence can be shown in Table 1.
[0053] Table 1
[0054] code file Compatible brand information Code file 1 Brand A Code file 2 Brand B Code file 3 Brand C …… …… code file n Brand B
[0055] For example, the implementation method for determining the compatible brand information corresponding to the acquired code file based on the first correspondence relationship can be as follows: compare the data of the code file with the data of the target code file. If the data of the acquired code file is the same as the data of the target code file, then the compatible brand information of the optical module is the compatible brand information corresponding to the target code file from a plurality of pre-configured compatible brand information. The target code file is any one of the plurality of pre-configured code files.
[0056] For example, after obtaining the code file, the server can use any one of the multiple code files in Table 1 as the target code file. That is, the target code file can be one of code file 1, code file 2, code file 3, ..., code file n shown in Table 1. Then, the data in the code file is compared with the data in the target code file. If the data in the obtained code file is the same as the data in the target code file, the compatible brand information is the compatible brand information corresponding to the target code file from the multiple compatible brand information lists in Table 1. For example, if the data in the obtained code file is the same as the data in code file 1 in Table 1, then the compatible brand information of the optical module is the compatible brand information corresponding to code file 1 in Table 1. That is, the compatible brand information of the obtained code file is brand A.
[0057] Step 430: Send the first information to the terminal device.
[0058] The first information includes compatible brand information, and the first information is used to instruct the terminal device to output compatible brand information.
[0059] Optionally, the terminal device may include a display device, and the device for obtaining optical module compatibility brand information may control the display device to display the compatibility brand information, so that the user can obtain the compatibility brand information of the optical module.
[0060] Optionally, the terminal device may include a speaker, and the means of acquiring optical module compatibility brand information may control the speaker to voice-broadcast the compatibility brand information, enabling the user to obtain the compatible brands of the optical module.
[0061] According to the method 400 for obtaining compatible brand information of optical modules provided in the embodiments of this application, when the user cannot determine the compatible brand information of the optical module, the method determines the compatible brand information of the optical module according to the code file and sends the first information to the terminal device to make the terminal device output the compatible brand information. This enables the user to obtain the compatible brand of the optical module more conveniently and quickly, so as to insert the optical module into the compatible switch port in a timely manner and improve the user's work efficiency.
[0062] In some embodiments, to improve the efficiency of obtaining optical module compatibility brand information, such as Figure 5 As shown, the step of determining the compatible brand information corresponding to the obtained code file based on the first correspondence can also be implemented as follows: steps 510 to 530.
[0063] Step 510: Read the model information of the optical module stored in the code file.
[0064] Specifically, different part numbers (PN) of optical modules may correspond to different code files and different compatible brand information. For example, the part number information of an optical module may include one of the following: small form-factor pluggable (SFP), SFP+, SFP28, 10-gigabit small form-factor pluggable (XFP), quad small form-factor pluggable (QSFP), QSFP+, QSFP28, quad small form-factor pluggable-double density (QSFP-DD), and 120Gb / s extended-capability form-factor pluggable module (CXP).
[0065] Step 520: Determine at least one code file and at least one compatible brand information corresponding to the model information in the first correspondence relationship.
[0066] Among them, at least one code file and at least one compatible brand information correspond one-to-one. The at least one code file can be one or more code files from a set of pre-configured code files, and the at least one compatible brand information can be one or more compatible brand information from a set of pre-configured compatible brand information.
[0067] For example, the first correspondence may also include the correspondence between multiple model information and multiple code files. For example, the first correspondence may be as shown in Table 2.
[0068] Table 2
[0069]
[0070] For example, if the model information is SFP, then according to Table 2, at least one code file can be identified, including code file 1, code file 2 and code file 5, and at least one compatible brand information includes brand A, brand B and brand E.
[0071] Step 530: Determine the compatible brand information corresponding to the code file based on at least one code file and at least one compatible brand information.
[0072] For example, step 530 can be implemented by comparing the data in the code file with the data in the target code file. If the data in the obtained code file is the same as the data in the target code file, then the compatible brand information of the optical module is the compatible brand information corresponding to the target code file. Here, the target code file is one of at least one of the code files mentioned above.
[0073] For example, after reading the model information stored in the code file, any one of the pre-configured code files corresponding to the model information can be used as the target code file. For example, if the model information is QSFP28, then the target code file is any one of code files 3, 4, and 6 shown in Table 2. Then, the data in the obtained code file is compared with the data in the target code file. If the data in the obtained code file is the same as the data in the target code file, then the compatible brand information of the optical module is the compatible brand information corresponding to the target code file. For example, if the data in the obtained code file is the same as the data in code file 5 in Table 2, then the compatible brand information of the optical module is brand E.
[0074] In this embodiment, at least one code file corresponding to the model information and at least one compatible brand information are first determined in the first correspondence relationship. Then, the compatible brand information corresponding to the obtained code file is determined based on the at least one code file and at least one compatible brand information. This can narrow down the range of code files corresponding to the obtained code file in the first correspondence relationship, thereby shortening the time for the device to determine the code file corresponding to the code file in the pre-configured multiple code files, and enabling the device to determine the compatible brand information of the optical module more quickly.
[0075] Furthermore, in some embodiments, to further improve the efficiency of obtaining optical module compatibility brand information, after step 510, the method 400 for obtaining optical module compatibility brand information may further include determining the feature region corresponding to the model information based on a second correspondence between multiple pre-configured model information and multiple feature regions. In this case, step 530 can be implemented by comparing the data in the feature regions of the code file and the target code file; if the data in the feature regions of the obtained code file and the target code file are the same, then the compatibility brand information is at least one of the compatibility brand information corresponding to the target code file.
[0076] The characteristic region refers to the location of data reflecting compatible brand information in the acquired code file. For example, the location of data in the code file that changes with variables such as time, temperature, and operating conditions is defined as the changing region, while the area in the optical module's storage region other than the changing regions is defined as the unchanging region. By comparing the data in the unchanging regions of the code files of commonly available optical modules of the same model with known compatible brand information, the locations corresponding to the different data can be used as the characteristic regions of that optical module model.
[0077] For example, if the code file is a 384-byte code file, and the data between bytes 128 and 256 in the code files of optical modules of the same model but different compatible brands is inconsistent, then bytes 128 to 256 can be used as the characteristic area of the code file of that model of optical module.
[0078] For example, the second correspondence can be shown in Table 3.
[0079] Table 3
[0080] Model Information Feature region SFP 128 bytes - 256 bytes SFP+ 221 bytes - 287 bytes QSFP 125 bytes - 298 bytes …… ……
[0081] For example, if the model information of the obtained optical module code file is SFP, then according to Table 3, the characteristic area of the code file can be determined to be 128 bytes to 256 bytes. According to Table 2, the target code file can be any one of code file 1, code file 2, or code file 5 shown in Table 2. Then, the data between 128 bytes and 256 bytes of the code file and the target code file are compared. If the obtained code file has the same data between 128 bytes and 256 bytes as code file 1 shown in Table 2, then according to Table 2, the compatible brand information of the optical module can be determined to be brand A.
[0082] In this embodiment, at least one code file and at least one compatible brand information corresponding to the model information in the first correspondence relationship are first determined, and the feature area of the code file corresponding to the model information in the second correspondence relationship is determined. Then, the compatible brand information of the optical module is determined based on the data of the code file obtained by comparison with the target code file in the feature area. This can further shorten the time for the device to determine the corresponding code file between the code file and the pre-configured multiple code files, enabling the device to determine the compatible brand information of the optical module more quickly and accurately.
[0083] To achieve the above embodiments, this application also provides a device 600 for obtaining optical module compatibility brand information. For example... Figure 6 As shown, the device may include an acquisition module 610, a processing module 620, and a sending module 630.
[0084] The acquisition module 610 is used to acquire the code file of the optical module. The processing module 620 is used to determine the compatible brand information of the optical module based on the code file. The compatible brand information refers to the brand information of the switches that the optical module is compatible with. The sending module 630 is used to send first information to the terminal device. The first information includes the compatible brand information and is used to instruct the terminal device to output the compatible brand information.
[0085] Optionally, the processing module 620 is specifically used to: determine the compatible brand information corresponding to the obtained code file based on the first correspondence between the pre-configured multiple code files and multiple compatible brand information.
[0086] Optionally, the processing module 620 is specifically used to: input the code file into a pre-trained machine learning model to obtain compatible brand information output by the machine learning model.
[0087] Optionally, the processing module 620 is specifically used for: reading the model information of the optical module stored in the code file; determining at least one code file and at least one compatible brand information corresponding to the model information in the first correspondence relationship, wherein at least one code file and at least one compatible brand information correspond one-to-one; and determining the compatible brand information corresponding to the obtained code file based on at least one code file and at least one compatible brand information.
[0088] Optionally, after reading the optical module model information stored in the code file, the processing module 620 is further configured to: determine the feature region corresponding to the model information based on a second correspondence between multiple pre-configured model information and multiple feature regions, wherein the feature region is the location of the data reflecting the compatible brand information in the acquired code file. Specifically, the processing module 620 is configured to: compare the data in the feature region between the code file and the target code file, wherein the target code file is any one of at least one code file; if the data in the feature region of the acquired code file and the target code file are the same, then the compatible brand information is the compatible brand information corresponding to the target code file among at least one compatible brand information.
[0089] For example, the "modules" in device 600 can be implemented in hardware, software, or by hardware executing corresponding software. For instance, the acquisition module 610 can be implemented by… Figure 7 The communication interface 730 or processor 710 in the illustrated device 700 is implemented. The processing module 620 can be implemented by... Figure 7 The communication processor 710 in the illustrated device 700 is implemented. The transmitting module 630 can be implemented by... Figure 7 The communication interface 730 or processor 710 in the illustrated device 700 are implemented.
[0090] This application also provides a device 700 for obtaining optical module compatibility brand information. For example... Figure 7 As shown, the device 700 includes a processor 710, a memory 720, and a communication interface 730. The memory 720 stores instructions, and the processor 710 executes these instructions. When an instruction is executed, the processor 710 performs the method provided in the above-described method embodiments. The processor 710 also controls the communication interface 730 to communicate with the outside world.
[0091] It should be understood that in the embodiments of this application, the processor can be a central processing unit (CPU), or it can be other general-purpose processors, digital signal processors (DSPs), application-specific integrated circuits (ASICs), field-programmable gate arrays (FPGAs), or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. The general-purpose processor can be a microprocessor or any conventional processor.
[0092] It should also be understood that the memory in the embodiments of this application can be volatile memory or non-volatile memory, or may include both volatile and non-volatile memory. The non-volatile memory can be read-only memory (ROM), programmable read-only memory (PROM), erasable programmable read-only memory (EPROM), electrically erasable programmable read-only memory (EEPROM), or flash memory. The volatile memory can be random access memory (RAM), which is used as an external cache. By way of example, but not limitation, many forms of random access memory (RAM) are available, such as static RAM (SRAM), dynamic RAM (DRAM), synchronous DRAM (SDRAM), double data rate synchronous DRAM (DDR SDRAM), enhanced synchronous DRAM (ESDRAM), synchronous linked DRAM (SLDRAM), and direct rambus RAM (DR RAM).
[0093] This application also provides a computer-readable storage medium including a computer program that, when run on a computer, causes the computer to perform the methods provided in the above-described method embodiments.
[0094] This application also provides a chip system including a processor for calling and running a computer program from a memory, causing a device equipped with the chip system to perform the methods provided in the above-described method embodiments.
[0095] This application also provides a computer program product containing instructions that, when run on a computer, cause the computer to execute the method provided in the above-described method embodiments.
[0096] Those skilled in the art will recognize that the units and algorithm steps of the various examples described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, or a combination of computer software and electronic hardware. Whether these functions are implemented in hardware or software depends on the specific application and design constraints of the technical solution. Those skilled in the art can use different methods to implement the described functions for each specific application, but such implementation should not be considered beyond the scope of this application.
[0097] Those skilled in the art will understand that, for the sake of convenience and brevity, the specific working processes of the systems, devices, and units described above can be referred to the corresponding processes in the foregoing method embodiments, and will not be repeated here.
[0098] In the several embodiments provided in this application, it should be understood that the disclosed systems, apparatuses, and methods can be implemented in other ways. For example, the apparatus embodiments described above are merely illustrative; for instance, the division of units is only a logical functional division, and in actual implementation, there may be other division methods. For example, multiple units or components may be combined or integrated into another system, or some features may be ignored or not executed. Furthermore, the coupling or direct coupling or communication connection shown or discussed may be through some interfaces; the indirect coupling or communication connection between apparatuses or units may be electrical, mechanical, or other forms.
[0099] The units described as separate components may or may not be physically separate. The components shown as units may or may not be physical units; that is, they may be located in one place or distributed across multiple network units. Some or all of the units can be selected to achieve the purpose of this embodiment according to actual needs.
[0100] In addition, the functional units in the various embodiments of this application can be integrated into one processing unit, or each unit can exist physically separately, or two or more units can be integrated into one unit.
[0101] If the aforementioned functions are implemented as software functional units and sold or used as independent products, they can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of this application, in essence, or the part that contributes to the prior art, or a portion of the technical solution, can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) to execute all or part of the steps of the methods described in the various embodiments of this application. The aforementioned storage medium includes various media capable of storing program code, such as USB flash drives, portable hard drives, read-only memory (ROM), random access memory (RAM), magnetic disks, or optical disks.
[0102] The above description is merely a specific embodiment of this application, but the scope of protection of this application is not limited thereto. Any variations or substitutions that can be easily conceived by those skilled in the art within the scope of the technology disclosed in this application should be included within the scope of protection of this application. Therefore, the scope of protection of this application should be determined by the scope of the claims.
Claims
1. A method for obtaining compatible brand information of optical modules, characterized in that, include: Obtain the code file of the optical module; The compatible brand information of the optical module is determined based on the code file, wherein the compatible brand information is the brand information of the switches that the optical module can be compatible with; Send first information to the terminal device, the first information including the compatible brand information, and the first information is used to instruct the terminal device to output the compatible brand information; The step of determining the compatible brand information of the optical module based on the code file includes: The compatible brand information corresponding to the code file is determined based on the first correspondence between multiple pre-configured code files and multiple compatible brand information. The step of determining the compatible brand information corresponding to the code file based on a first correspondence between multiple pre-configured code files and multiple compatible brand information includes: Read the model information of the optical module stored in the code file, and take any one of the pre-configured code files corresponding to the model information as the target code file; By comparing the data in the acquired code file with the data in the target code file, at least one code file and at least one compatible brand information corresponding to the model information in the first correspondence relationship are determined, and the at least one code file and the at least one compatible brand information correspond one-to-one; The compatible brand information corresponding to the code file is determined based on the at least one code file and the at least one compatible brand information.
2. The method according to claim 1, characterized in that, The step of determining the compatible brand information of the optical module based on the code file includes: The code file is input into a pre-trained machine learning model to obtain the compatible brand information output by the machine learning model.
3. The method according to claim 1, characterized in that, After reading the model information of the optical module stored in the code file, the method further includes: The feature region corresponding to the model information is determined based on the second correspondence between multiple pre-configured model information and multiple feature regions. The feature region is the location of the data reflecting the compatible brand information in the code file. The step of determining the compatible brand information corresponding to the code file based on the at least one code file and the at least one compatible brand information includes: Compare the data of the code file and the target code file in the feature region, wherein the target code file is any one of the at least one code file; If the code file and the target code file have the same data in the feature region, then the compatible brand information is the compatible brand information corresponding to the target code file among the at least one compatible brand information.
4. A device for acquiring compatible brand information of optical modules, characterized in that, include: The acquisition module is used to acquire the code file of the optical module; The processing module is used to determine the compatible brand information of the optical module based on the code file, wherein the compatible brand information is the brand information of the switches that the optical module can be compatible with; A sending module is used to send first information to a terminal device, the first information including the compatible brand information, and the first information is used to instruct the terminal device to output the compatible brand information; The processing module is specifically used for: The compatible brand information corresponding to the code file is determined based on the first correspondence between multiple pre-configured code files and multiple compatible brand information. The processing module is specifically used for: Read the model information of the optical module stored in the code file, and take any one of the pre-configured code files corresponding to the model information as the target code file; By comparing the data in the acquired code file with the data in the target code file, at least one code file and at least one compatible brand information corresponding to the model information in the first correspondence relationship are determined, and the at least one code file and the at least one compatible brand information correspond one-to-one; The compatible brand information corresponding to the code file is determined based on the at least one code file and the at least one compatible brand information.
5. The apparatus according to claim 4, characterized in that, The processing module is specifically used for: The code file is input into a pre-trained machine learning model to obtain the compatible brand information output by the machine learning model.
6. The apparatus according to claim 4, characterized in that, After reading the model information of the optical module stored in the code file, the processing module is further configured to: The feature region corresponding to the model information is determined based on the second correspondence between multiple pre-configured model information and multiple feature regions. The feature region is the location of the data reflecting the compatible brand information in the code file. The processing module is specifically used for: Compare the data of the code file and the target code file in the feature region, wherein the target code file is any one of the at least one code file; If the code file and the target code file have the same data in the feature region, then the compatible brand information is the compatible brand information corresponding to the target code file among the at least one compatible brand information.
7. A device for acquiring brand compatibility information of optical modules, characterized in that, It includes at least one processor, the at least one processor being coupled to a memory, reading and executing instructions in the memory to implement the method as described in any one of claims 1 to 3.
8. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores a computer program that, when run on a computer, causes the computer to perform the method as described in any one of claims 1 to 3.
Citation Information
Patent Citations
Method and apparatus for identifying type of optical module
CN106936653A
Optical module code changing method and device, equipment and storage medium
CN115460161A