Frequency coding method and device, storage medium and electronic device
By adopting the target BIT representation, using the 32BIT encoding format to extend the low-frequency part of the L band, the problem that 16BIT encoding cannot cover the C+L band is solved, and high-precision frequency representation and multi-band support are achieved.
Patent Information
- Application Number
- CN202310810069.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2023-06-30
- Publication Date
- 2024-12-31
- Estimated Expiration
- 2043-06-30
AI Technical Summary
The existing 16BIT encoding method cannot cover all bands of the C+L band, and the decimal part accuracy is not enough to represent a high-precision frequency grid.
Using the target BIT representation, the low frequency part of the L-band is expanded using a bit number greater than 16BIT and at least 7 consecutive BITs. The center wavelength frequency value is encoded through the 32BIT encoding format, divided into rounded value and difference value parts, and in the 20th To 23 bits indicate the band type.
It realizes encoding coverage of all bands of the C+L band, improves the accuracy of frequency representation to 1/64GHz, and supports encoding of multiple band types.
Smart Images

Figure CN119233408A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of communications, and in particular, to a frequency coding method, device, storage medium and electronic device. Background Art
[0002] With the enrichment of 400G solutions and industrial chains, 400G will begin to be commercialized on a large scale. The improvement of single-wave transmission rate requires the use of higher baud rates, resulting in an increase in the spectral width occupied by a single channel. 400G Phase Shift Modulation 16 Quadrature Amplitude Modulation (400GPS-16QAM) based on 90GBaud requires 100GHz bandwidth per channel, and 400GPM-QPSK based on 130GBaud requires 150GHz bandwidth per channel. Due to the increase in bandwidth occupied by each channel, the spectrum bandwidth of the system needs to be improved synchronously. The current C-band supports a maximum bandwidth of 6T. After expansion to the L-band, it can support a maximum bandwidth of 12T. Compared with the traditional C-band, the C+L band introduces the L-band. Due to the introduction of the L-band and the change in networking mode, the software needs to increase the management of the L-band and support changes in the abstraction of the resource model, which affects the interface changes, resource division, and label management related to the wavelength.
[0003] The existing center wavelength frequency is encoded by 16BIT representation, which can cover the high frequency parts of coarse wave, C band (frequency 190.675~196.675THz), and L band (frequency 184.325~190.875THz). However, there are certain problems with the current 16BIT encoding format: First, since the integer part of the 16BIT encoding format is represented by 7 bits, a total of 128 numbers are represented, and the integer part cannot cover all bands of the C+L band. Secondly, the decimal part of the 16BIT encoding method is only 2 bits, and the maximum accuracy is 0.25GHZ, which cannot represent the frequency of the 3.125GHZ grid. As the grid accuracy increases in the future, this encoding method will not be able to represent it. In addition, it cannot support the U band and S band that may be added in the future.
[0004] In view of the problem in the related art that the existing 16GBIT encoding method cannot cover all bands of the C+L band, no effective solution has been proposed yet.
[0005] Therefore, it is necessary to improve the related technology to overcome the above-mentioned defects in the related technology. Summary of the invention
[0006] The embodiments of the present application provide a frequency encoding method, device, storage medium and electronic device to at least solve the problem that the existing 16GBIT encoding method cannot cover all bands of the C+L band.
[0007] According to one aspect of an embodiment of the present application, a frequency encoding method is provided, comprising: obtaining a center wavelength frequency value to be encoded; encoding the center wavelength frequency value through a target BIT representation, wherein the number of bits used by the target BIT representation is greater than 16 BITs, and the target BIT representation uses at least 7 consecutive BITs to extend the low-frequency part of the L band.
[0008] In an exemplary embodiment, encoding the center wavelength frequency value through a target BIT representation includes: determining a frequency value to be encoded of the center wavelength frequency value according to the center wavelength frequency value and a target frequency value, wherein the target frequency value is a target frequency value selected from the center wavelength frequency values; encoding the frequency value to be encoded through the target BIT representation.
[0009] In an exemplary embodiment, encoding the frequency value to be encoded by the target BIT representation method includes: when the number of bits adopted by the target BIT representation method is 32BIT, determining the rounded value of the frequency value to be encoded, and encoding the rounded value by 7 BITs of bits 0 to 6, or 7 BITs of bits 24 to 30 in the 32BITs; and determining the difference between the frequency value to be encoded and the rounded value, and encoding the difference by 13 BITs of bits 7 to 19 of the target BIT representation method.
[0010] In an exemplary embodiment, encoding the frequency value to be encoded by the target BIT representation method includes: determining the band type to which the center wavelength frequency value belongs; when the number of bits used by the target BIT representation method is 32BIT, representing the band type by 4 BITs from the 20th to the 23rd bits of the 32BIT.
[0011] In an exemplary embodiment, the rounded value is encoded by 7 BITs of bits 0 to 6, or 7 BITs of bits 24 to 30 in the 32BIT, including: when the center wavelength frequency value belongs to the low-frequency part of the L band, the rounded value is encoded by 7 BITs of bits 24 to 30 of the 32BIT; when the center wavelength frequency value does not belong to the low-frequency part of the L band, the rounded value is encoded by 7 BITs of bits 0 to 6 of the 32BIT.
[0012] In an exemplary embodiment, encoding the difference through 13 BITs of bits 7 to 19 of the target BIT representation includes: determining a first part, a second part, and a third part corresponding to the difference, wherein the sum of the first part, the second part, and the third part is equal to the difference, the first part is greater than the target value, and the second part and the third part are both less than the target value; encoding the first part through 4 BITs of bits 7 to 10 included in the 13 BITs of bits 7 to 19, encoding the second part through 3 BITs of bits 11 to 13 included in the 13 BITs of bits 7 to 19, and encoding the third part through 2 BITs of bits 14 to 15 and 4 BITs of bits 16 to 19 included in the 13 BITs of bits 7 to 19.
[0013] In an exemplary embodiment, the step value group corresponding to the 4 BITs of bits 7 to 10 includes, from large to small: a first value, a second value, a third value, and a fourth value; the step value of the 3 BITs of bits 11 to 13 is a fifth value, which is smaller than the fourth value; the step value of the 2 BITs of bits 14 to 15 is a sixth value, which is smaller than the fifth value; the step value of the 4 BITs of bits 16 to 19 is a seventh value, which is smaller than the sixth value.
[0014] In an exemplary embodiment, the first part is encoded by 4 BITs of bits 7 to 10 included in the 13 BITs of bits 7 to 19, including: comparing the difference with the value in the step value group; setting the bit position corresponding to the first maximum value in the step value group that is less than or equal to the difference to 1; determining whether a first remainder is greater than or equal to the value in the step value group, wherein the first remainder is the remainder of the difference and the first maximum value; when the first remainder is greater than or equal to the value in the step value group, setting the bit position corresponding to the second maximum value in the step value group to 1.
[0015] In an exemplary embodiment, after the bit position corresponding to the second maximum value in the step value group is set to 1, the method further includes: when the second remainder is greater than or equal to the value in the step value group, updating the first remainder to the second remainder, wherein the second remainder is the remainder of the first remainder and the second maximum value.
[0016] In an exemplary embodiment, after determining whether the first remainder is greater than the numerical value in the step value group, the method further includes: when the first remainder is less than the numerical value in the step value group, continuing to encode the first remainder by using 3 BITs of the 11th to 13th bits, 2 BITs of the 14th to 15th bits, and 4 BITs of the 16th to 19th bits of the target BIT representation.
[0017] In an exemplary embodiment, the first remainder is further encoded by using 3 BITs at bits 11 to 13, 2 BITs at bits 14 to 15, and 4 BITs at bits 16 to 19 of the target BIT representation, including: encoding the integer part of the first remainder based on the fifth value and the 3 BITs at bits 11 to 13; encoding the decimal part of the first remainder based on the sixth value, 2 BITs at bits 14 to 15, and the seventh value, 4 BITs at bits 16 to 19.
[0018] According to another aspect of an embodiment of the present application, a frequency decoding method is provided, including: obtaining a center wavelength code value to be decoded; decoding the center wavelength code value based on a target BIT representation, wherein the number of bits used by the target BIT representation is greater than 16 BITs, and the target BIT representation uses at least 7 consecutive BITs to extend the low-frequency part of the L band.
[0019] According to another aspect of an embodiment of the present application, a frequency encoding device is also provided, including: a first acquisition module, used to obtain a center wavelength frequency value to be encoded; an encoding module, used to encode the center wavelength frequency value through a target BIT representation, wherein the number of bits used by the target BIT representation is greater than 16 BITs, and the target BIT representation uses at least 7 consecutive BITs to expand the low-frequency part of the L band.
[0020] According to another aspect of an embodiment of the present application, a frequency decoding device is also provided, including: a second acquisition module, used to obtain a center wavelength coding value to be decoded; a decoding module, used to decode the center wavelength coding value based on a target BIT representation, wherein the number of bits used by the target BIT representation is greater than 16 BITs, and the target BIT representation uses at least 7 consecutive BITs to extend the low-frequency part of the L band.
[0021] According to another aspect of the embodiments of the present application, a computer-readable storage medium is provided, in which a computer program is stored, wherein the computer program is configured to execute the above-mentioned frequency coding method when running.
[0022] According to another aspect of the embodiments of the present application, an electronic device is provided, including a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor executes the frequency coding method through the computer program.
[0023] Through the present application, the center wavelength frequency value to be encoded is obtained; the center wavelength frequency value is encoded through a target BIT representation method, wherein the number of bits used by the target BIT representation method is greater than 16 BITs, and the target BIT representation method uses at least 7 consecutive BITs to extend the low-frequency part of the L band. In other words, by adopting: a target BIT representation method with a number of bits greater than 16 BITs and at least 7 consecutive BITs for extending the low-frequency part of the L band, the center wavelength frequency is encoded, which solves the technical problem that the existing 16GBIT encoding method cannot cover all bands of the C+L band. BRIEF DESCRIPTION OF THE DRAWINGS
[0024] The drawings described herein are used to provide a further understanding of the present application and constitute a part of the present application. The exemplary embodiments of the present application and their descriptions are used to explain the present application and do not constitute an improper limitation on the present application. In the drawings:
[0025] Figure 1 It is a hardware structure block diagram of a computer terminal of the frequency encoding method of an embodiment of the present application;
[0026] Figure 2 is a flow chart (I) of a frequency encoding method according to an embodiment of the present application;
[0027] Figure 3 is a schematic diagram of a target BIT representation method of a frequency encoding method according to an embodiment of the present application;
[0028] Figure 4 is a flow chart (I) of a frequency decoding method according to an embodiment of the present application;
[0029] Figure 5 is a flow chart (II) of a frequency encoding method according to an embodiment of the present application;
[0030] Figure 6 is a flow chart (II) of a frequency decoding method according to an embodiment of the present application;
[0031] Figure 7 is a schematic diagram of the encoding process of Embodiment 1 of the frequency decoding method according to the embodiment of the present application;
[0032] Figure 8 is a schematic diagram of a decoding process according to Embodiment 1 of a frequency decoding method of an embodiment of the present application;
[0033] Fig. 9is a schematic diagram of the encoding process of Embodiment 2 of the frequency decoding method according to the embodiment of the present application;
[0034] Fig.10 is a schematic diagram of a decoding process according to Embodiment 2 of a frequency decoding method of an embodiment of the present application;
[0035] Fig.11 is a schematic diagram of the encoding process of Embodiment 3 of the frequency decoding method according to the embodiment of the present application;
[0036] Fig.12 is a schematic diagram of a decoding process according to Embodiment 3 of the frequency decoding method of the embodiment of the present application;
[0037] Fig.13 is a structural block diagram of a frequency encoding device according to an embodiment of the present application;
[0038] Fig.14 It is a structural block diagram of a frequency decoding device according to an embodiment of the present application. DETAILED DESCRIPTION
[0039] In order to enable those skilled in the art to better understand the solution of the present application, the technical solution in the embodiments of the present application will be clearly and completely described below in conjunction with the drawings in the embodiments of the present application. Obviously, the described embodiments are only part of the embodiments of the present application, not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in this field without creative work should fall within the scope of protection of the present application.
[0040] It should be noted that the terms "first", "second", etc. in the specification and claims of the present application and the above-mentioned drawings are used to distinguish similar objects, and are not necessarily used to describe a specific order or sequence. It should be understood that the data used in this way can be interchangeable where appropriate, so that the embodiments of the present application described herein can be implemented in an order other than those illustrated or described herein. In addition, the terms "including" and "having" and any of their variations are intended to cover non-exclusive inclusions, for example, a process, method, system, product or device comprising a series of steps or units is not necessarily limited to those steps or units clearly listed, but may include other steps or units that are not clearly listed or inherent to these processes, methods, products or devices.
[0041] The method embodiments provided in the embodiments of the present application can be executed in a computer terminal or a similar computing device. Taking running on a computer terminal as an example, Figure 1 : is a hardware structure block diagram of a computer terminal of the frequency encoding method of an embodiment of the present application. Figure 1 As shown, the computer terminal may include one or more ( Figure 1Only one is shown in the figure) processor 102 (processor 102 may include but is not limited to a microprocessor (Microprocessor Unit, referred to as MPU) or a programmable logic device (Programmable logic device, referred to as PLD)) and a memory 104 for storing data. In an exemplary embodiment, the computer terminal may also include a transmission device 106 and an input / output device 108 for communication functions. It can be understood by those skilled in the art that Figure 1 The structure shown is only for illustration and does not limit the structure of the above-mentioned computer terminal. Figure 1 More or fewer components as shown, or with Figure 1 Equivalent functions or comparisons shown Figure 1 A different configuration with more features is shown.
[0042] The memory 104 can be used to store computer programs, for example, software programs and modules of application software, such as the computer program corresponding to the frequency coding method in the embodiment of the present application. The processor 102 executes various functional applications and data processing by running the computer program stored in the memory 104, that is, to implement the above method. The memory 104 may include a high-speed random access memory, and may also include a non-volatile memory, such as one or more magnetic storage devices, flash memory, or other non-volatile solid-state memory. In some examples, the memory 104 may further include a memory remotely arranged relative to the processor 102, and these remote memories may be connected to the computer terminal via a network. Examples of the above-mentioned network include, but are not limited to, the Internet, an intranet, a local area network, a mobile communication network, and combinations thereof.
[0043] The transmission device 106 is used to receive or send data via a network. The specific example of the above network may include a wireless network provided by a communication provider of a computer terminal. In one example, the transmission device 106 includes a network adapter (Network Interface Controller, referred to as NIC), which can be connected to other network devices through a base station so as to communicate with the Internet. In one example, the transmission device 106 can be a radio frequency (RF) module, which is used to communicate with the Internet wirelessly.
[0044] Figure 2 is a flow chart (I) of a frequency encoding method according to an embodiment of the present application, such as Figure 2 As shown, the steps of the method include:
[0045] Step S202, obtaining the center wavelength frequency value to be encoded;
[0046] Step S204: Encode the center wavelength frequency value by using a target BIT representation method, wherein the number of bits used by the target BIT representation method is greater than 16 BITs, and the target BIT representation method uses at least 7 consecutive BITs to extend the low frequency part of the L band.
[0047] The embodiment of the present application obtains the center wavelength frequency value to be encoded through the above steps; the center wavelength frequency value is encoded through the target BIT representation, wherein the number of bits used by the target BIT representation is greater than 16 BITs, and the target BIT representation uses at least 7 consecutive BITs to extend the low-frequency part of the L band. In other words, by adopting: the number of bits is greater than 16 BITs, and there are at least 7 consecutive BITs for extending the low-frequency part of the L band, the center wavelength frequency is encoded, which solves the technical problem that the existing 16GBIT encoding method cannot cover all bands of the C+L band. The technical effect of encoding all bands of the C+L band is achieved.
[0048] In an exemplary embodiment, encoding the center wavelength frequency value through a target BIT representation includes: determining a frequency value to be encoded of the center wavelength frequency value according to the center wavelength frequency value and a target frequency value, wherein the target frequency value is a target frequency value selected from the center wavelength frequency values; encoding the frequency value to be encoded through the target BIT representation.
[0049] It can be understood that, in order to facilitate encoding of the center wavelength frequency value, a target frequency value can be selected from the center wavelength frequency value, and then: the frequency value to be encoded = (center wavelength frequency value-target frequency value)*10. In general, the same target frequency value can be selected for the center wavelength frequency values belonging to the same band, for example: for the center wavelength frequency value belonging to the C band (frequency 190.9~196.675THz), 190 can be selected as the target frequency value; for the center wavelength frequency value belonging to the L band (frequency 184.325~190.875THz), 180 can be selected as the target frequency value; the part of the C band that repeats with the L band (frequency 190.675~190.875THz) can also select 180 as the target frequency value; for the center wavelength frequency value belonging to the S band, 195 can be selected as the target frequency value. It should be noted that the unit of the target frequency value is the same as the unit of the center wavelength frequency value.
[0050] In an exemplary embodiment, encoding the frequency value to be encoded by the target BIT representation includes: when the number of bits adopted by the target BIT representation is 32BIT, determining the rounded value of the frequency value to be encoded, and encoding the rounded value by 7 BITs of bits 0 to 6, or bits 24 to 30 in the 32BIT; and determining the difference between the frequency value to be encoded and the rounded value, and encoding the difference by 13 BITs of bits 7 to 19 of the target BIT representation.
[0051] It can be understood that the target BIT representation method provided in the embodiment of the present application divides the frequency value to be encoded into two parts: the first part: the rounded value of the frequency value to be encoded, and the second part: the difference remaining after the frequency value to be encoded is rounded. Then, by encoding the frequency value to be encoded in parts, the encoding of the frequency value to be encoded can be made more accurate.
[0052] In an exemplary embodiment, the rounded value is encoded by 7 BITs of bits 0 to 6, or 7 BITs of bits 24 to 30 in the 32BIT, including: when the center wavelength frequency value belongs to the low-frequency part of the L band, the rounded value is encoded by 7 BITs of bits 24 to 30 of the 32BIT; when the center wavelength frequency value does not belong to the low-frequency part of the L band, the rounded value is encoded by 7 BITs of bits 0 to 6 of the 32BIT.
[0053] Optionally, the target BIT representation provided in the embodiment of the present application includes a number of bits greater than 16 BITs. In a preferred embodiment, a target BIT representation using a number of bits of 32 BITs is provided, as follows: Figure 3 As shown. Then, the rounded value can be encoded using 7 BITs of the 0th to 6th bits of the target BIT representation, or 7 BITs of the extended 24th to 30th bits. Specifically, according to the band to which the central wavelength frequency value belongs, it is determined whether the rounded value corresponding to the central wavelength frequency value is encoded to the 0th to 6th bits or the 24th to 30th bits. In a preferred embodiment, for the central wavelength frequency value of the low-frequency part belonging to the L-band, the 24th to 30th bits can be used for encoding; for the central wavelength frequency value of the low-frequency part that does not belong to the L-band, such as the C-band, the high-frequency part of the L-band, the S-band, etc., the 0th to 6th bits can be used for encoding.
[0054] In an exemplary embodiment, encoding the frequency value to be encoded by the target BIT representation method includes: determining the band type to which the center wavelength frequency value belongs; when the number of bits used by the target BIT representation method is 32BIT, representing the band type by 4 BITs from the 20th to the 23rd bits of the 32BIT.
[0055] That is, the target BIT representation described in the present application can represent multiple bands including but not limited to those shown in Table 1 below, and the representation scheme is: the band type is represented by at least 4 consecutive BITs in the target BIT representation. Specifically, when the target BIT representation is 32BIT, the band type is represented by 4 BITs of the 20th to 23rd bits of the 32BIT, and then in the case of binary-based encoding, the values of the 20th to 23rd bits are 0 to 15, which can represent 16 types of bands. The correspondence between the specific encoding and the band can be universally set as needed. For example, the C and L band types can be defined as 0, that is, the 20th to 23rd bits are represented as 0000b, that is, the 20th to 23rd bits are not encoded, which essentially means that the default value 0 indicates that the center wavelength frequency value belongs to the C and L bands; the S band type can be defined as 1, and the extended 20th to 23rd bits are filled with 1, that is, 0001b.
[0056] Table 1: Common bands
[0057]
[0058]
[0059] In an exemplary embodiment, encoding the difference through 13 BITs of bits 7 to 19 of the target BIT representation includes: determining a first part, a second part, and a third part corresponding to the difference, wherein the sum of the first part, the second part, and the third part is equal to the difference, the first part is greater than the target value, and the second part and the third part are both less than the target value; encoding the first part through 4 BITs of bits 7 to 10 included in the 13 BITs of bits 7 to 19, encoding the second part through 3 BITs of bits 11 to 13 included in the 13 BITs of bits 7 to 19, and encoding the third part through 2 BITs of bits 14 to 15 and 4 BITs of bits 16 to 19 included in the 13 BITs of bits 7 to 19.
[0060] In an exemplary embodiment, the step value group corresponding to the 4 BITs of bits 7 to 10 includes, from large to small: a first value, a second value, a third value, and a fourth value; the step value of the 3 BITs of bits 11 to 13 is a fifth value, which is smaller than the fourth value; the step value of the 2 BITs of bits 14 to 15 is a sixth value, which is smaller than the fifth value; the step value of the 4 BITs of bits 16 to 19 is a seventh value, which is smaller than the sixth value.
[0061] It can be understood that the difference can be further divided into three parts for encoding. The first part is larger than the second part, and the second part is larger than the third part, wherein:
[0062] The first part is the part greater than the target value, which is encoded in the 7th to 10th bits. The target value is preferably 6.25. The step values corresponding to the 7th to 10th bits are preferably as follows: 50G can be selected as the first value, 25G can be selected as the second value, 12.5G can be selected as the third value, and 6.25G can be selected as the fourth value. Then, the target value can be the same as the fourth value.
[0063] The second part is the integer part corresponding to the remaining part after the first part of the difference is encoded, which is encoded at the 11th to 13th bits, and the corresponding step value (fifth value) is preferably 1;
[0064] The third part is the decimal part corresponding to the remaining part after the first part of the difference is encoded, which is encoded in the 14th to 15th bits and the extended 16th to 19th bits. The corresponding step values are preferably as follows: the sixth value is preferably 1 / 4, and the seventh value is preferably 1 / 64. The extended 16th to 19th bits have a more precise step value, which can make the encoding accuracy of the target BIT representation reach 1 / 64. It should be noted that in the 32BIT target BIT representation, the encoding accuracy is extended by 4 BITs from the 16th to 19th bits. In the target representation greater than 16BIT, the encoding accuracy can be selected to be extended by at least 4 BITs.
[0065] In an exemplary embodiment, the first part is encoded by 4 BITs of bits 7 to 10 included in the 13 BITs of bits 7 to 19, including: comparing the difference with the value in the step value group; setting the bit position corresponding to the first maximum value in the step value group that is less than or equal to the difference to 1; determining whether a first remainder is greater than or equal to the value in the step value group, wherein the first remainder is the remainder of the difference and the first maximum value; when the first remainder is greater than or equal to the value in the step value group, setting the bit position corresponding to the second maximum value in the step value group to 1.
[0066] In an exemplary embodiment, after the bit position corresponding to the second maximum value in the step value group is set to 1, the method further includes: when the second remainder is greater than or equal to the value in the step value group, updating the first remainder to the second remainder, wherein the second remainder is the remainder of the first remainder and the second maximum value.
[0067] It should be noted that the first remainder is regarded as the existing remainder in the entire encoding process of bits 7 to 10. In the case where the second remainder finally obtained is smaller than the value in the step value group, the first remainder still needs to be updated to the second remainder.
[0068] It can be understood that, for the difference, the encoding is performed from the 7th bit to the 19th bit. The encoding scheme for the difference at the 7th to 10th bit is as follows 1)-3):
[0069] 1) Compare the difference value with the values in the step value group (first value, second value, third value, fourth value). When the difference value is less than any one of the values (i.e., the first maximum value does not exist), the first part of the difference value does not exist, and the second and third parts are directly encoded, and the second and third parts are equal to the difference value. When the difference value is greater than at least one of the values (i.e., the first maximum value exists), the bit position corresponding to the value greater than the first maximum value in the step value group is set to 0, and the bit position corresponding to the first maximum value is set to 1. For example, if the difference value is greater than the second value, the 8th bit position corresponding to the second value is set to 1, and the 7th bit position before the 8th bit is set to 0; if the difference value is greater than the fourth value, the 10th bit position corresponding to the fourth value is set to 1, and the 7th to 9th bit positions before the 10th bit are set to 0;
[0070] 2) Calculate the first remainder of the difference and the first maximum value, and continue to determine whether there is a second maximum value less than the first remainder in the step value group. If so, set the bit position corresponding to the second maximum value to 1, and the bit position between the first maximum value and the second maximum value to 0. If not, enter the calculation of the second and third parts. For example: if the first maximum value corresponds to the 8th bit (set to 1), and the second maximum value corresponds to the 10th bit, then set the 10th bit to 1, and the 9th bit between the 8th and 10th bits to 0.
[0071] 3) Determine a second remainder of the first remainder and the second maximum value, and when the second remainder is greater than or equal to a value in the step value group, update the first remainder to the second remainder.
[0072] For the above scheme, an example is given:
[0073] Assuming that the difference is 46.875 GHz, which is less than 50 GHz (the first value), the 7th bit position is 0 and the first remainder is 46.875 GHz;
[0074] If the first remainder is greater than 25 GHz (the second value), the 8th bit position is 1 and the second remainder is 21.875 GHz;
[0075] Determine that the second remainder is greater than 12.5 GHz, update the first remainder to the second remainder, that is, the existing remainder is 12.5 GHz, and then the 9th bit position is 1, and the new second remainder is 9.375 GHz;
[0076] If the new second remainder is greater than 6.25 GHz, the first remainder is updated to the new second remainder, that is, the existing remainder is 6.25 GHz, and the 10th bit position is 1, and the current second remainder is 3.125 GHz;
[0077] The current second remainder is smaller than any value in the step value group, and 3.125 GHz is updated to the first remainder as the final first remainder (ie, the sum of the second and third parts to be encoded), and the encoding of bits 7 to 10 is completed.
[0078] In an exemplary embodiment, after determining whether the first remainder is greater than the numerical value in the step value group, the method further includes: when the first remainder is less than the numerical value in the step value group, continuing to encode the first remainder by using 3 BITs of the 11th to 13th bits, 2 BITs of the 14th to 15th bits, and 4 BITs of the 16th to 19th bits of the target BIT representation.
[0079] In an exemplary embodiment, the first remainder is further encoded by using 3 BITs at bits 11 to 13, 2 BITs at bits 14 to 15, and 4 BITs at bits 16 to 19 of the target BIT representation, including: encoding the integer part of the first remainder based on the fifth value and the 3 BITs at bits 11 to 13; encoding the decimal part of the first remainder based on the sixth value, 2 BITs at bits 14 to 15, and the seventh value, 4 BITs at bits 16 to 19.
[0080] Exemplarily, when the final first remainder is 3.125 GHz, the values of the 11th to 13th bits are the integer part 3 of the remainder, that is, 011b; the remaining uncoded decimal part is 0.125 GHz, and according to the step value represented by the 14th to 15th bits, which is 1 / 4 GHz, the values of the 14th to 15th bits are 0, that is, 00b, and the remainder is 0.125 GHz; according to the step value represented by the 16th to 19th bits, which is 1 / 64 GHz, the values of the 16th to 19th bits are 8, that is, 1000b.
[0081] Figure 4 is a flow chart (I) of a frequency decoding method according to an embodiment of the present application, such as Figure 4 As shown, the steps of the method include:
[0082] Step S402, obtaining the center wavelength code value to be decoded;
[0083] Step S404: decoding the central wavelength code value based on a target BIT representation method, wherein the number of bits used by the target BIT representation method is greater than 16 BITs, and the target BIT representation method uses at least 7 consecutive BITs to extend the low-frequency part of the L band.
[0084] The embodiment of the present application obtains the center wavelength code value to be decoded through the above steps; the center wavelength code value is decoded based on the target BIT representation, wherein the number of bits used by the target BIT representation is greater than 16 BITs, and the target BIT representation uses at least 7 consecutive BITs to extend the low-frequency part of the L band. In other words, by adopting: a target BIT representation with a number of bits greater than 16 BITs and at least 7 consecutive BITs for extending the low-frequency part of the L band, the center wavelength code value is decoded, which solves the technical problem that the existing 16GBIT decoding method cannot cover all bands of the C+L band. The technical effect of decoding the center wavelength code value corresponding to all bands of the C+L band is achieved.
[0085] Next, the frequency encoding method is further described in conjunction with the following embodiments.
[0086] In view of the shortcomings of the existing 16BIT encoding and decoding method, the embodiment of the present application proposes a 32BIT encoding and decoding method. In the extended high 16BIT, 7 bits are selected to solve the problem of insufficient numbers, and 4 bits are selected to increase the decimal precision, and the precision is increased from 1 / 4 to 1 / 64. The remaining bits are used as reserved fields, which can support up to 16 types of application type encoding, and can represent other types such as U band and S band.
[0087] Specifically, the process of converting the center wavelength frequency value into 32BIT encoding is as follows: Figure 5As shown, the detailed encoding format is as follows:
[0088] Step S501: input the center wavelength frequency value.
[0089] Step S502: Determine the band range.
[0090] Wherein, step S502 further includes:
[0091] Step S5021: For the center frequency of the C band (frequency 190.9~196.675THz), the rounded value of the frequency is calculated by the formula [(freq-190)*10] and saved to 0~6 bits, where freq is the center frequency value in THz.
[0092] Step S5022: For the high frequency part of the L band (frequency 186.9 ~ 190.875THz), the frequency rounding value is calculated by the formula [(freq-180)*10] and saved to 0 ~ 6 bits. The part of the C band that overlaps with the L band (frequency 190.675 ~ 190.875THz) is also calculated according to the formula [(freq-180)*10].
[0093] Step S5023: Expand 24 to 30 bits to represent the extended integer part, and complete the integer value that cannot be represented in the 16BIT encoding method for the L-band low frequency, that is, the integer part encoding value 43 to 68 of the L-band (frequency 184.325 to 186.9 THz).
[0094] It should be noted that, 1) in the embodiments of the present application, “~” means “to”, and 2) bit is equivalent to bit position, for example, 0~6bit means the 0th to 6th bits.
[0095] Step S503: 07bit (equivalent to the 7th bit in the above embodiment, also equivalent to Figure 5 Bit 7 in the calculation is the difference between the actual wavelength and the integer represented by bits 0 to 6. If it is greater than or equal to 50 GHz, the bit is set to 1. Otherwise, the bit is 0. If there is a remainder after the calculation, proceed to the next step of calculation.
[0096] Step S504: 08bit (equivalent to the 8th bit in the above embodiment, also equivalent to Figure 5 bit8 in the calculation), if the remainder is greater than or equal to 25GHz, the bit is set to 1, otherwise the bit is 0. If there is a remainder after the calculation, proceed to the next step;
[0097] Step S505: 09bit (equivalent to the 9th bit in the above embodiment, also equivalent to Figure 5bit9 in the calculation), if the remainder is greater than or equal to 12.5GHz, the bit is set to 1, otherwise the bit is 0. If there is a remainder after the calculation, proceed to the next step;
[0098] Step S506: 10bit (equivalent to the 10th bit in the above embodiment, also equivalent to Figure 5 bit10 in the calculation), if the remainder is greater than or equal to 6.25GHz, the bit is set to 1, otherwise the bit is 0. If there is a remainder after the calculation, proceed to the next step;
[0099] Step S507: 11-13 bits, with values of 0-7, store the integer part of the remainder less than 6.25 GHz.
[0100] Step S508: 14-15 bits take values of 0-3, and each step represents 1 / 4 GHz; in the upper 16 bits, the extended 16-19 bits take values of 0-15, and each step represents 1 / 64 GHz, so the highest accuracy after expansion can be increased to 1 / 64 GHz.
[0101] Step S509: The extended 20-23 bits are used as the band type, with values ranging from 0 to 15, which can represent 16 types of bands. The default value 0 is used as the C and L bands, and the other 1 to 15 can be defined as the U band, S band, etc. The extended 31 bits in the 32BIT encoding are reserved bits, and the default value is 0.
[0102] Further, by converting the center wavelength frequency value into a 32BIT decoding process as follows Figure 6 As shown, the detailed decoding format is as follows:
[0103] Step S601: Input the 32-bit code value of the center frequency.
[0104] Step S602: first parse the value of the extended integer part 24 to 30 bits. If the value is not 0, go to step S6041, take the value as the decoding of the integer part, and calculate the integer part value after the center frequency is multiplied by 10 according to the x / 10+180 method; if the 24 to 30 bit value is 0, go to step S603.
[0105] Step S603: Take the value of 0 to 6 bits as the encoding value of the integer part. If the encoding value is less than 69, go to step S6042 and calculate the integer value of the center frequency according to the method of x / 10+190. Otherwise, go to step S6043 and calculate according to the method of x / 10+180.
[0106] Step S604: Calculate the positive part, including the above steps S6041-S6043.
[0107] Step S605: If 07bit (equivalent to Figure 6 If the bit7 in the output is 1, the center frequency value will increase by 50 GHz.
[0108] Step S606: If 08bit (equivalent to Figure 6 If the bit8 in the DAC is 1, the center frequency value will increase by 25 GHz.
[0109] Step S607: If 09bit (equivalent to Figure 6 If the bit 9 in the output is 1, the center frequency value will be increased by 12.5 GHz.
[0110] Step S608: If 10 bits (equivalent to Figure 6 If the bit 10 in the output is 1, the center frequency value will increase by 6.25 GHz.
[0111] Step S609: Obtain the values of bits 11 to 13, with each step length being 1 GHz, and add them to the center frequency value.
[0112] Step S610: Get the values of bit 14 to 15, with each step length being 1 / 4 GHz, and add them to the center frequency value.
[0113] Step S611: Get the values of bit 16 to 19, each step is 1 / 64GHz, and add them to the center frequency value. The remaining bits are reserved bytes, and the decoding calculation is completed.
[0114] In order to make the objectives, technical solutions and advantages of the present invention more clearly understood, the embodiments of the present application will be described in detail below with reference to the accompanying drawings.
[0115] Example 1: C-band center frequency 32BIT encoding and decoding
[0116] For the C-band center frequency, based on the method of the embodiment of the present application, the encoding and decoding of the 193.974375THz frequency is taken as an example:
[0117] Specifically, in this embodiment, it can be combined with Figure 7 The coding calculation process of the C-band 193.984375THz frequency is explained, and the specific steps are as follows:
[0118] Step S701: Since the center frequency is in the C band, the integer part code value 39 is obtained by calculating the value according to (freq-190)*10, that is, the value of 0 to 6 bits is 0100111b.
[0119] Step S702: after the unit conversion, the remainder value is 74.375 GHz, which is greater than 50 GHz, so the 7-bit value is 1 and the remainder value is 24.375 GHz.
[0120] Step S703: After step S702, if the residual value is less than 25 GHz, the 8-bit value is 0 and the residual value is still 24.375 GHz.
[0121] Step S704: After step S703, the residual value is greater than 12.5 GHz, the 9-bit value is 1, and the residual value is 11.875 GHz.
[0122] Step S705: After step S704, the residual value is greater than 6.25 GHz, the 10-bit value is 1, and the residual value is 5.625 GHz.
[0123] Step S706: After step S705, the remainder is 5.625 GHz, and the values of bits 11 to 13 are the rounded value 5 of the remainder, that is, 101b, and the remainder is 0.625 GHz.
[0124] Step S707: After step S706, the residual value is 0.625 GHz. According to the step length of 14 to 15 bits being 1 / 4 GHz, the value of 14 to 15 bits is 2, that is, 10b, and the residual value is 0.125 GHz.
[0125] Step S708: After step S707, the remainder is 0.125 GHz. According to the calculation that each step length represented by 16 to 19 bits is 1 / 64 GHz, the value of 16 to 19 bits is 8, that is, 1000b.
[0126] Step S709: The remaining 20-23 bits and 31 bits are reserved and default to 0, and the 24-30 bits of the extended integer part are also 0. The encoding calculation is completed, and the final calculated encoding value is 0x8AEA7.
[0127] Specifically, in this embodiment, it can be combined with Figure 8 The decoding calculation process of the coded value 0x8AEA7 in 32BIT representation is explained. The specific steps are as follows:
[0128] Step S801: If the value of the 24-30 bit of the extended integer part is 0, the wavelength does not belong to the low frequency range of the L band, and the 0-6 bit value 39 is parsed. If it is less than 69, the frequency value is restored according to the x / 10+190 method of the C band, and the value of this part is solved to be 193.9 THz.
[0129] Step S802: The 7-bit value of the frequency code is 1, and 50 GHz needs to be accumulated.
[0130] Step S803: The 8-bit value of the frequency code is 0, and there is no need to accumulate 25 GHz.
[0131] Step S804: The 9-bit value of the frequency code is 1, and 12.5 GHz needs to be accumulated.
[0132] Step S805: The 10-bit value of the frequency code is 1, and 6.25 GHz needs to be accumulated.
[0133] Step S806: The value of bit 11 to bit 13 of the frequency code is 5, and needs to be accumulated to 5*1 GHz.
[0134] Step S807: The value of bit 14 to bit 15 of the frequency code is 2, and needs to be accumulated to 2*1 / 4 GHz.
[0135] Step S808: The value of 16-19 bits of the frequency code is 8, and needs to be accumulated to 8*1 / 64GHz.
[0136] Step S809: Decoding is completed, and the accumulated frequency value is calculated to be 193.974375 THz.
[0137] Example 2: L-band center frequency 32BIT encoding and decoding
[0138] For the L-band center frequency, based on the method of the embodiment of the present application, the encoding and decoding of the 184.546875THz frequency is taken as an example:
[0139] Specifically, in this embodiment, it can be combined with Fig. 9 The coding calculation process of the L-band 184.546875THz frequency is described as follows:
[0140] Step S901: Since the center frequency is in the low frequency range of the L band (frequency 184.325~186.9THz), the encoding value 45 of the integer part is obtained according to [(freq-180)*10], that is, the value of the extended integer part 24~30 bits is 0101101b, and the value of 0~6 bits is 0.
[0141] Step S902: after the unit conversion, the remainder value is 46.875 GHz, which is less than 50 GHz, so the 7-bit value is 0 and the remainder value is 46.875 GHz.
[0142] Step S903: After step S902, if the residual value is greater than 25 GHz, the 8-bit value is 1 and the residual value is still 21.875 GHz.
[0143] Step S904: After step S903, if the residual value is greater than 12.5 GHz, the 9-bit value is 1 and the residual value is 9.375 GHz.
[0144] Step S905: After step S904, if the residual value is greater than 6.25 GHz, the 10-bit value is 1 and the residual value is 3.125 GHz.
[0145] Step S906: After step S905, the remainder is 3.125 GHz, and the values of bits 11 to 13 are the rounded value 3 of the remainder, that is, 011b, and the remainder is 0.125 GHz.
[0146] Step S907: After step S906, the residual value is 0.125 GHz. According to the step length of 14 to 15 bits being 1 / 4 GHz, the values of 14 to 15 bits are 0, that is, 00b, and the residual value is 0.125 GHz.
[0147] Step S908: After step S907, the remainder is 0.125 GHz. According to the calculation that each step length represented by 16 to 19 bits is 1 / 64 GHz, the value of 16 to 19 bits is 8, that is, 1000b.
[0148] Step S909: The remaining 20 to 23 bits and 31 bits are reserved and default to 0. The encoding calculation is completed, and the final calculated encoding value is 0x2D081F00.
[0149] Specifically, in this embodiment, it can be combined with Fig.10 The decoding calculation process of the coded value 0x2D081F00 in 32BIT representation is explained. The specific steps are as follows:
[0150] Step S1001: The value of the 24-30 bits of the extended integer part is 45, so the wavelength belongs to the low frequency range of the L band. The frequency value is restored according to the x / 10+180 method of the L band, and the value of this part is solved to be 184.5 THz.
[0151] Step S1002: The 7-bit value of the frequency code is 0, and 50 GHz needs to be accumulated.
[0152] Step S1003: the 8-bit value of the frequency code is 1, and there is no need to accumulate 25 GHz.
[0153] Step S1004: The 9-bit value of the frequency code is 1, and 12.5 GHz needs to be accumulated.
[0154] Step S1005: The 10-bit value of the frequency code is 1, and 6.25 GHz needs to be accumulated.
[0155] Step S1006: The value of bit 11 to bit 13 of the frequency code is 3, and needs to be accumulated to 3*1 GHz.
[0156] Step S1007: The 14-15 bit values of the frequency code are 0 and do not need to be accumulated.
[0157] Step S1008: The value of 16-19 bits of the frequency code is 8, and needs to be accumulated to 8*1 / 64GHz.
[0158] Step S1009: Decoding is completed, and the accumulated frequency value is calculated to be 184.546875 THz.
[0159] Example 3: S-band center frequency encoding
[0160] For the S-band center frequency, based on the method of the embodiment of the present application, it can be extended to represent, taking the encoding and decoding of the 198.546875THz frequency as an example:
[0161] Specifically, in this embodiment, it can be combined with Fig.11 The coding calculation process of the S-band 198.546875THz frequency is explained, and the specific steps are as follows:
[0162] Step S1101: define the S-band type as 1, and fill the extended bits 20 to 23 with 1, i.e. 0001b.
[0163] Step S1102: define the integer part of the S-band type to be 35 by calculating [(freq-195)*10], then the integer part 0 to 6 bits is 0100011b, and the extended integer part 24 to 31 bits is filled with 0.
[0164] Step S1103: After the unit conversion, the remainder value is 46.875 GHz, which is less than 50 GHz. Then the 7-bit value is 0, and the remainder value is 46.875 GHz.
[0165] Step S1104: After step S1103, if the residual value is greater than 25 GHz, the 8-bit value is 1 and the residual value is still 21.875 GHz.
[0166] Step S1105: After step S1104, the residual value is greater than 12.5 GHz, then the 9-bit value is 1, and the residual value is 9.375 GHz.
[0167] Step S1106: After step S1105, the residual value is greater than 6.25 GHz, the 10-bit value is 1, and the residual value is 3.125 GHz.
[0168] Step S1107: After step S1106, the remainder is 3.125 GHz, and the values of bits 11 to 13 are the rounded value 3 of the remainder, that is, 011b, and the remainder is 0.125 GHz.
[0169] Step S1108: After step S1107, the residual value is 0.125 GHz. Since each step length represented by 14 to 15 bits is 1 / 4 GHz, the values of 14 to 15 bits are 0, that is, 00b, and the residual value is 0.125 GHz.
[0170] Step S1109: After step S1108, the remainder is 0.125 GHz. According to the calculation that each step length represented by 16 to 19 bits is 1 / 64 GHz, the value of 16 to 19 bits is 8, that is, 1000b.
[0171] Step S1110: bit 31 is reserved and defaults to 0. The encoding calculation is completed, and the final calculated encoding value is 0x181F23.
[0172] Specifically, in this embodiment, it can be combined with Fig.12 The decoding calculation process of the coded value 0x181F23 in 32BIT representation is explained. The specific steps are as follows:
[0173] Step S1201: If the value of bit 20 to 23 of the parsing band type is 1, the range of the integer part is processed according to the S band.
[0174] Step S1202: The value of the integer part 0 to 6 bits is parsed to be 35, and the frequency value is restored according to the formula x / 10+195 of the S band, and the value of this part is solved to be 198.5 THz.
[0175] Step S1203: The 7-bit value of the frequency code is 0, and 50 GHz needs to be accumulated.
[0176] Step S1204: the 8-bit value of the frequency code is 1, and there is no need to accumulate 25 GHz.
[0177] Step S1205: The 9-bit value of the frequency code is 1, and 12.5 GHz needs to be accumulated.
[0178] Step S1206: The 10-bit value of the frequency code is 1, and 6.25 GHz needs to be accumulated.
[0179] Step S1207: The value of bit 11 to bit 13 of the frequency code is 3, and needs to be accumulated to 3*1 GHz.
[0180] Step S1208: The 14-15 bit values of the frequency code are 0 and do not need to be accumulated.
[0181] Step S1209: The value of 16-19 bits of the frequency code is 8, and needs to be accumulated to 8*1 / 64GHz.
[0182] Step S1210: Decoding is completed, and the accumulated frequency value is calculated to be 198.546875 THz.
[0183] It should be noted that the present application may have many other embodiments. Without departing from the spirit and essence of the present invention, technicians familiar with the field can make various corresponding changes and modifications based on the present application, but these corresponding changes and modifications should all fall within the scope of protection of the present application.
[0184] Furthermore, in the optical communication system, the center frequency value corresponding to the wavelength used by the optical path can be accurately transmitted within and between network elements of each device through a unified encoding and decoding method. By using the method in this application, the entire grid range of the C band and the L band can be covered, and the grid accuracy can be up to 1 / 64GHz, and by deforming the extended reserved field, it can be easily compatible with other band types that may be used in the future.
[0185] In actual engineering, it is necessary to query and configure the wavelength of the optical path, and the management and control layer of the equipment accurately transmits the center frequency value. The transmission of the wavelength label in the optical label function configuration can also use this coding to transmit wavelength information. The method of this application supports the unified coding representation of multiple bands and the representation of the center frequency with high grid accuracy.
[0186] In this embodiment, a frequency encoding device is also provided, which is used to implement the above-mentioned embodiments and preferred embodiments, and the descriptions that have been made will not be repeated. As used below, the term "module" can implement a combination of software and / or hardware of a predetermined function. Although the equipment described in the following embodiments is preferably implemented in software, the implementation of hardware, or a combination of software and hardware is also possible and conceived.
[0187] Fig.13 is a structural block diagram of a frequency encoding device according to an embodiment of the present application. Fig.13 As shown, the frequency encoding device includes:
[0188] A first acquisition module 1302 is used to obtain a central wavelength frequency value to be encoded;
[0189] The encoding module 1304 is used to encode the central wavelength frequency value through a target BIT representation method, wherein the number of bits used by the target BIT representation method is greater than 16 BITs, and the target BIT representation method uses at least 7 consecutive BITs to extend the low frequency part of the L band.
[0190] The embodiment of the present application obtains the center wavelength frequency value to be encoded through the above module; the center wavelength frequency value is encoded through the target BIT representation, wherein the number of bits used by the target BIT representation is greater than 16 BIT, and the target BIT representation uses at least 7 consecutive BITs to extend the low-frequency part of the L band. In other words, by adopting: the number of bits is greater than 16 BIT, and there are at least 7 consecutive BITs for extending the low-frequency part of the L band, the center wavelength frequency is encoded, which solves the technical problem that the existing 16GBIT encoding method cannot cover all bands of the C+L band. The technical effect of encoding all bands of the C+L band is achieved.
[0191] In an exemplary embodiment, the encoding module 1304 is further used to determine the frequency value to be encoded of the center wavelength frequency value based on the center wavelength frequency value and the target frequency value, wherein the target frequency value is a target frequency value selected from the center wavelength frequency values; and encode the frequency value to be encoded using the target BIT representation.
[0192] In an exemplary embodiment, the encoding module 1304 is also used to determine the rounded value of the frequency value to be encoded when the number of bits used by the target BIT representation is 32 BITs, and encode the rounded value using 7 BITs of bits 0 to 6 in the 32 BITs, or 7 BITs of bits 24 to 30; and determine the difference between the frequency value to be encoded and the rounded value, and encode the difference using 13 BITs of bits 7 to 19 of the target BIT representation.
[0193] In an exemplary embodiment, the encoding module 1304 is further used to determine the band type to which the central wavelength frequency value belongs; when the number of bits used in the target BIT representation is 32 BITs, the band type is represented by 4 BITs from the 20th to the 23rd bits of the 32 BITs.
[0194] In an exemplary embodiment, the encoding module 1304 is also used to encode the rounded value through 7 BITs of bits 24 to 30 of the 32BIT when the center wavelength frequency value belongs to the low-frequency part of the L band; and to encode the rounded value through 7 BITs of bits 0 to 6 of the 32BIT when the center wavelength frequency value does not belong to the low-frequency part of the L band.
[0195] In an exemplary embodiment, the encoding module 1304 is also used to determine the first part, the second part, and the third part corresponding to the difference, wherein the sum of the first part, the second part and the third part is equal to the difference, the first part is greater than the target value, and the second part and the third part are both less than the target value; the first part is encoded by 4 BITs of bits 7 to 10 included in the 13 BITs of bits 7 to 19, the second part is encoded by 3 BITs of bits 11 to 13 included in the 13 BITs of bits 7 to 19, and the third part is encoded by 2 BITs of bits 14 to 15 and 4 BITs of bits 16 to 19 included in the 13 BITs of bits 7 to 19.
[0196] In an exemplary embodiment, the step value group corresponding to the 4 BITs of bits 7 to 10 includes, from large to small: a first value, a second value, a third value, and a fourth value; the step value of the 3 BITs of bits 11 to 13 is a fifth value, which is smaller than the fourth value; the step value of the 2 BITs of bits 14 to 15 is a sixth value, which is smaller than the fifth value; the step value of the 4 BITs of bits 16 to 19 is a seventh value, which is smaller than the sixth value.
[0197] In an exemplary embodiment, the encoding module 1304 is also used to compare the difference with the numerical value in the step value group; set the bit position corresponding to the first maximum value in the step value group that is less than or equal to the difference to 1; determine whether the first remainder is greater than or equal to the numerical value in the step value group, wherein the first remainder is the remainder of the difference and the first maximum value; when the first remainder is greater than or equal to the numerical value in the step value group, set the bit position corresponding to the second maximum value in the step value group to 1.
[0198] In an exemplary embodiment, the encoding module 1304 is further used to update the first remainder to the second remainder when the second remainder is greater than or equal to a value in the step value group, wherein the second remainder is the remainder of the first remainder and the second maximum value.
[0199] In an exemplary embodiment, the encoding module 1304 is also used to continue encoding the first remainder by using 3 BITs of the 11th to 13th bits, 2 BITs of the 14th to 15th bits, and 4 BITs of the 16th to 19th bits of the target BIT representation when the first remainder is smaller than the value in the step value group.
[0200] In an exemplary embodiment, the encoding module 1304 is further used to encode the integer part of the first remainder based on the fifth value and the 3 BITs of the 11th to 13th bits; and to encode the decimal part of the first remainder based on the sixth value, the 2 BITs of the 14th to 15th bits, and the 4 BITs of the seventh value, the 16th to 19th bits.
[0201] Fig.14 is a structural block diagram of a frequency decoding device according to an embodiment of the present application. Fig.14 As shown, the frequency decoding device comprises:
[0202] The second acquisition module 1402 is used to obtain the central wavelength code value to be decoded;
[0203] The decoding module 1404 is used to decode the central wavelength code value based on a target BIT representation method, wherein the number of bits used by the target BIT representation method is greater than 16 BITs, and the target BIT representation method uses at least 7 consecutive BITs to extend the low-frequency part of the L band.
[0204] The embodiment of the present application obtains the center wavelength code value to be decoded through the above steps; the center wavelength code value is decoded based on the target BIT representation, wherein the number of bits used by the target BIT representation is greater than 16 BITs, and the target BIT representation uses at least 7 consecutive BITs to extend the low-frequency part of the L band. In other words, by adopting: a target BIT representation with a number of bits greater than 16 BITs and at least 7 consecutive BITs for extending the low-frequency part of the L band, the center wavelength code value is decoded, which solves the technical problem that the existing 16GBIT decoding method cannot cover all bands of the C+L band. The technical effect of decoding the center wavelength code value corresponding to all bands of the C+L band is achieved.
[0205] Through the description of the above implementation methods, those skilled in the art can clearly understand that the method according to the above embodiment can be implemented by means of software plus a necessary general hardware platform, and of course by hardware, but in many cases the former is a better implementation method. Based on such an understanding, the technical solution of the present application, or the part that contributes to the prior art, can be embodied in the form of a software product, which is stored in a readable storage medium (such as ROM / RAM, a disk, or an optical disk), and includes a number of instructions for a terminal device (which can be a mobile phone, a computer, a server, or a network device, etc.) to execute the methods of each embodiment of the present application.
[0206] In an exemplary embodiment, the computer-readable storage medium may include, but is not limited to, various media that can store computer programs, such as a USB flash drive, a read-only memory (ROM), a random access memory (RAM), a mobile hard disk, a magnetic disk or an optical disk.
[0207] For specific examples in this embodiment, reference may be made to the examples described in the above embodiments and exemplary implementation modes, and this embodiment will not be described in detail herein.
[0208] An embodiment of the present application further provides an electronic device, including a memory and a processor, wherein a computer program is stored in the memory, and the processor is configured to run the computer program to execute the steps in any one of the above method embodiments.
[0209] Optionally, in this embodiment, the processor may be configured to perform the following steps through a computer program:
[0210] S1, obtaining the central wavelength frequency value to be encoded;
[0211] S2, encoding the center wavelength frequency value by a target BIT representation method, wherein the number of bits used by the target BIT representation method is greater than 16 BITs, and the target BIT representation method uses at least 7 consecutive BITs to extend the low frequency part of the L band.
[0212] In an exemplary embodiment, the electronic device may further include a transmission device and an input / output device, wherein the transmission device is connected to the processor, and the input / output device is connected to the processor.
[0213] Optionally, in this embodiment, the electronic device can also be configured to execute the above step S1 through a computer program to obtain the center wavelength frequency value to be encoded; S2, encode the center wavelength frequency value through a target BIT representation, wherein the number of bits used by the target BIT representation is greater than 16 BITs, and the target BIT representation uses at least 7 consecutive BITs to extend the low-frequency part of the L band.
[0214] For specific examples in this embodiment, reference may be made to the examples described in the above embodiments and exemplary implementation modes, and this embodiment will not be described in detail herein.
[0215] Obviously, those skilled in the art should understand that the above modules or steps of the present application can be implemented by a general computing device, they can be concentrated on a single computing device, or distributed on a network composed of multiple computing devices, they can be implemented by a program code executable by a computing device, so that they can be stored in a storage device and executed by the computing device, and in some cases, the steps shown or described can be executed in a different order from that herein, or they can be made into individual integrated circuit modules, or multiple modules or steps therein can be made into a single integrated circuit module for implementation. Thus, the present application is not limited to any specific combination of hardware and software.
[0216] The above description is only the preferred embodiment of the present application and is not intended to limit the present application. For those skilled in the art, the present application may have various modifications and variations. Any modification, equivalent replacement, improvement, etc. made within the principles of the present application shall be included in the protection scope of the present application.
Claims
1. A frequency encoding method, characterized in that: include: Obtaining the central wavelength frequency value to be encoded; The center wavelength frequency value is encoded by a target BIT representation method, wherein the number of bits used by the target BIT representation method is greater than 16 BITs, and the target BIT representation method uses at least 7 consecutive BITs to extend the low frequency part of the L band.
2. The frequency encoding method according to claim 1, characterized in that: The center wavelength frequency value is encoded by a target BIT representation, including: Determine a frequency value to be encoded of the center wavelength frequency value according to the center wavelength frequency value and a target frequency value, wherein the target frequency value is a target frequency value selected from the center wavelength frequency values; The frequency value to be encoded is encoded using the target BIT representation method.
3. The frequency encoding method according to claim 2, characterized in that: Encoding the frequency value to be encoded by using the target BIT representation method includes: In a case where the number of bits adopted by the target BIT representation is 32 BITs, determining a rounded value of the frequency value to be encoded, and encoding the rounded value by using 7 BITs of bits 0 to 6 or 7 BITs of bits 24 to 30 in the 32 BITs; and The difference between the frequency value to be encoded and the rounded value is determined, and the difference is encoded using 13 BITs of the 7th to 19th bits of the target BIT representation.
4. The frequency encoding method according to claim 2, characterized in that: Encoding the frequency value to be encoded by using the target BIT representation method includes: Determine the type of band to which the central wavelength frequency value belongs; When the number of bits used by the target BIT representation method is 32 BITs, the band type is represented by 4 BITs from the 20th to the 23rd bits of the 32 BITs.
5. The frequency encoding method according to claim 3, characterized in that: The rounded value is encoded by using 7 bits from bit 0 to bit 6 in the 32 bits, or 7 bits from bit 24 to bit 30, including: In the case where the center wavelength frequency value belongs to the low frequency part of the L band, the rounded value is encoded by 7 BITs of the 24th to 30th bits of the 32 BITs; In the case that the center wavelength frequency value does not belong to the low frequency part of the L band, the rounded value is encoded by 7 BITs of the 0th to 6th bits of the 32 BITs.
6. The frequency encoding method according to claim 3, characterized in that: The difference is encoded by 13 BITs of the 7th to 19th bits of the target BIT representation, including: Determine a first part, a second part, and a third part corresponding to the difference, wherein the sum of the first part, the second part, and the third part is equal to the difference, the first part is greater than a target value, and the second part and the third part are both less than the target value; The first part is encoded by 4 BITs of bits 7 to 10 included in the 13 BITs of bits 7 to 19, the second part is encoded by 3 BITs of bits 11 to 13 included in the 13 BITs of bits 7 to 19, and the third part is encoded by 2 BITs of bits 14 to 15 and 4 BITs of bits 16 to 19 included in the 13 BITs of bits 7 to 19.
7. The frequency encoding method according to claim 6, characterized in that: The step value groups corresponding to the 4 BITs of bits 7 to 10 include, from large to small: a first value, a second value, a third value, and a fourth value. The step value of the 3 BITs of bits 11 to 13 is a fifth value, which is smaller than the fourth value. The step value of the 2 BITs of bits 14 to 15 is a sixth value, which is smaller than the fifth value. The step value of the 4 BITs of bits 16 to 19 is a seventh value, which is smaller than the sixth value.
8. The frequency encoding method according to claim 7, characterized in that: The first part is encoded by 4 BITs of bits 7 to 10 included in the 13 BITs of bits 7 to 19, including: comparing the difference value with the values in the step value group; Set the bit position corresponding to the first maximum value in the step value group that is less than or equal to the difference to 1; Determine whether a first remainder is greater than or equal to a value in the step value group, wherein the first remainder is a remainder of the difference value and the first maximum value; When the first remainder is greater than or equal to a value in the step value group, the bit position corresponding to the second maximum value in the step value group is set to 1.
9. The frequency encoding method according to claim 8, characterized in that: After setting the bit position corresponding to the second maximum value in the step value group to 1, the method further includes: When the second remainder is greater than or equal to a value in the step value group, the first remainder is updated to the second remainder, wherein the second remainder is the remainder of the first remainder and the second maximum value.
10. The frequency encoding method according to claim 8, characterized in that: After determining whether the first remainder is greater than a value in the step value group, the method further includes: When the first remainder is smaller than the value in the step value group, the first remainder is further encoded by 3 BITs of the 11th to 13th bits, 2 BITs of the 14th to 15th bits, and 4 BITs of the 16th to 19th bits of the target BIT representation.
11. The frequency encoding method according to claim 10, characterized in that: The first remainder is further encoded by using 3 bits of the 11th to 13th bits, 2 bits of the 14th to 15th bits, and 4 bits of the 16th to 19th bits of the target BIT representation, including: Encode the integer part of the first remainder based on the fifth value and the 3 BITs of the 11th to 13th bits; Based on the sixth value, 2 BITs of the 14th to 15th bits, the seventh value, 4 BITs of the 16th to 19th bits encode the decimal part of the first remainder.
12. A frequency decoding method, characterized in that: include: Obtain the center wavelength code value to be decoded; The central wavelength code value is decoded based on a target BIT representation method, wherein the number of bits used by the target BIT representation method is greater than 16 BITs, and the target BIT representation method uses at least 7 consecutive BITs to extend the low-frequency part of the L band.
13. A frequency encoding device, characterized in that: include: A first acquisition module, used to acquire a central wavelength frequency value to be encoded; The encoding module is used to encode the central wavelength frequency value through a target BIT representation method, wherein the number of bits used by the target BIT representation method is greater than 16 BITs, and the target BIT representation method uses at least 7 consecutive BITs to extend the low-frequency part of the L band.
14. A frequency decoding device, characterized in that: include: A second acquisition module is used to acquire a central wavelength code value to be decoded; A decoding module is used to decode the central wavelength code value based on a target BIT representation method, wherein the number of bits used by the target BIT representation method is greater than 16 BITs, and the target BIT representation method uses at least 7 consecutive BITs to extend the low-frequency part of the L band.
15. A computer-readable storage medium, characterized in that: The storage medium stores a computer program, wherein the computer program is configured to execute the method according to any one of claims 1 to 12 when executed.
16. An electronic device, characterized in that: The method comprises a memory and a processor, wherein the memory stores a computer program, and the processor is configured to execute the method according to any one of claims 1 to 12 through the computer program.
Citation Information
Patent Citations
Wavelength label transmission method and device
CN102624479A
Encoding method and processing method of wavelength labels and nodes for flexible grid optical network
CN102857837A
Intensive optical fiber coding method based on continuous light intensity modulation and fiber bragg grating
CN116318414A
