OAM code block sorting method, device, equipment, and storage medium

By determining the number of messages to be sent and sorting them based on the enabling information and sequence number information of the OAM code block, the problem of extended transmission time caused by a large number of beats occupied by sorting in the prior art is solved, and faster transmission is achieved.

CN116614206BActive Publication Date: 2025-09-23XEL TECH INC
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202310609177.0
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2023-05-26
Publication Date
2025-09-23
Estimated Expiration
2043-05-26

AI Technical Summary

Technical Problem

The existing OAM code block sorting method takes up a large number of beats, resulting in a long transmission delay.

Method used

By obtaining the enable information and sequence number information of the OAM code block, the number of messages to be sent before each OAM code block is determined, and sorting is performed based on this number, reducing the judgment logic and shortening the transmission delay.

Benefits of technology

The number of beats occupied in the sorting process is reduced, the transmission delay is shortened, and the scope of application of the sorting method is expanded.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN116614206B_ABST
    Figure CN116614206B_ABST
Patent Text Reader

Abstract

The present application provides an OAM code block sorting method, apparatus, device, and storage medium; wherein, the OAM code block sorting method includes: obtaining multiple first OAM code blocks; wherein the first OAM code blocks include enabling information and first sequence number information, the enabling information is used to indicate whether the first OAM code blocks have information to be sent, and the first sequence number information is used to indicate the storage order of the first OAM code blocks; based on the enabling information and the first sequence number information of each first OAM code block, determining the number of second OAM code blocks before each first OAM code block; wherein the second OAM code block is an OAM code block that has information to be sent among the multiple first OAM code blocks; in this way, after determining the number of second OAM code blocks before each first OAM code block, the second OAM code blocks can be sorted, so that the judgment logic is less, the number of occupied beats can be reduced, and the transmission delay can be shortened.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present disclosure relates to the field of communication technology, and in particular to an OAM code block sorting method, apparatus, device, and storage medium. Background Art

[0002] Flexible Ethernet (FlexE) technology is a carrier-grade network interface technology that decouples the media access control (MAC) layer from the physical (PHY) layer by introducing an Ethernet shim layer. The Ethernet frames of a FlexE client's original data stream are segmented into 64 / 66-byte coded blocks. Each block is then dispatched through the Ethernet shim layer to multiple time slots on one or more PHYs within a FlexE group for transmission over transport technologies such as the Metropolitan Transport Network (MTN). MTN has added channel quality monitoring to the transmission of client service data streams to monitor the service quality of the pipe carrying the client service, such as bit error rate, latency, and service drops.

[0003] During message transmission, OAM blocks are typically cached in random access memory (RAM) and sorted. This allows subsequent processing to schedule the blocks and insert them into the gaps between service messages. Currently, OAM blocks are sorted using bubble sort, selection sort, or insertion sort, but these methods consume a large number of steps and result in longer transmission delays. Summary of the Invention

[0004] In order to solve the above technical problems, the present disclosure provides an OAM code block sorting method and apparatus, device, and storage medium, which have the effect of reducing the number of occupied beats and shortening the transmission delay.

[0005] The technical solutions disclosed in this disclosure are as follows:

[0006] In a first aspect, the present disclosure provides an OAM code block sorting method, comprising:

[0007] Acquire multiple first OAM code blocks; wherein the first OAM code block includes enable information and first sequence number information, the enable information is used to indicate whether the first OAM code block has information to be sent, and the first sequence number information is used to indicate the storage order of the first OAM code block;

[0008] Determining the number of second OAM code blocks preceding each first OAM code block based on the enabling information and the first sequence number information of each first OAM code block; wherein the second OAM code block is an OAM code block having information to be sent among the plurality of first OAM code blocks;

[0009] The second OAM code blocks are ordered based on the number of second OAM code blocks preceding each first OAM code block.

[0010] In some embodiments, determining the number of second OAM code blocks preceding each first OAM code block based on the enabling information and the first sequence number information of each first OAM code block includes:

[0011] Based on the enabling information of each first OAM code block, determining that there is at least one second OAM code block containing information to be sent in the plurality of first OAM code blocks;

[0012] The number of second OAM code blocks preceding each first OAM code block is determined based on the first sequence number information of each first OAM code block and at least one second OAM code block.

[0013] In some embodiments, determining the number of second OAM code blocks preceding each first OAM code block based on the enabling information and the first sequence number information of each first OAM code block includes:

[0014] Determining the number of first OAM code blocks preceding each first OAM code block based on the first sequence number information of each first OAM code block;

[0015] Based on the enabling information of each first OAM code block, it is determined that a second OAM code block containing information to be sent exists in the first OAM code block preceding each first OAM code block, thereby determining the number of second OAM code blocks preceding each first OAM code block.

[0016] In some embodiments, ordering the second OAM code blocks based on the number of second OAM code blocks preceding each first OAM code block comprises:

[0017] Determining, based on the enabling information of each first OAM code block, whether each first OAM code block is a second OAM code block;

[0018] In a case where the first OAM code block is a second OAM code block, the second OAM code blocks are sorted based on the number of second OAM code blocks preceding each second OAM code block.

[0019] In some embodiments, ordering the second OAM code blocks based on the number of second OAM code blocks preceding each first OAM code block comprises:

[0020] Determining second sequence number information of each second OAM code block according to a preset sorting rule and the number of second OAM code blocks before each first OAM code block;

[0021] The second OAM code blocks are sorted based on the second sequence number information of each second OAM code block.

[0022] In some embodiments, the preset sorting rule includes that when the first OAM code block is the second OAM code block, the fewer the second OAM code blocks before the first OAM code block, the closer the position corresponding to the second sequence number information of the second OAM code block is to the front.

[0023] In some embodiments, after sorting the second OAM code blocks based on the enabling information and the first sequence number information of each first OAM code block, the method further includes:

[0024] Based on the number of the plurality of first OAM code blocks, padding processing is performed on the sorted second OAM code blocks.

[0025] In a second aspect, the present disclosure provides an OAM code block sorting device, comprising:

[0026] An acquisition module, configured to acquire a plurality of first OAM code blocks; wherein the first OAM code blocks include enable information and first sequence number information, the enable information being used to indicate whether the first OAM code blocks have information to be sent, and the first sequence number information being used to indicate a storage order of the first OAM code blocks;

[0027] a processing module, configured to determine, based on the enabling information and the first sequence number information of each of the first OAM code blocks, the number of second OAM code blocks preceding each of the first OAM code blocks; wherein the second OAM code block is an OAM code block containing the information to be sent among the plurality of first OAM code blocks;

[0028] The sorting module is configured to sort the second OAM code blocks based on the number of the second OAM code blocks preceding each of the first OAM code blocks.

[0029] In a third aspect, the present disclosure provides an electronic device comprising: a memory and a processor, the memory being used to store a computer program; the processor being used to enable a message information processing chip to implement the steps of any one of the methods provided in the first aspect when executing the computer program.

[0030] In a fourth aspect, the present invention provides a computer-readable storage medium, comprising: a computer program stored on the computer-readable storage medium, and the computer program is executed by a processor to perform the steps of any one of the methods provided in the first aspect.

[0031] In a fifth aspect, the present invention provides a computer program product, which, when executed on a computer, enables the computer to execute any one of the message information processing methods provided in the first aspect.

[0032] An embodiment of the present application provides an OAM code block sorting method, apparatus, device, and storage medium; wherein, the OAM code block sorting method includes: obtaining multiple first OAM code blocks; wherein, the first OAM code block includes enabling information and first sequence number information, the enabling information is used to indicate whether the first OAM code block has information to be sent, and the first sequence number information is used to indicate the storage order of the first OAM code blocks; based on the enabling information and the first sequence number information of each first OAM code block, determining the number of second OAM code blocks before each first OAM code block; wherein, the second OAM code block is an OAM code block that has information to be sent among the multiple first OAM code blocks; in this way, after determining the number of second OAM code blocks before each first OAM code block, the second OAM code blocks can be sorted, so that the judgment logic is less, the number of occupied beats can be reduced, and the transmission delay can be shortened; thereby expanding the scope of application of the present OAM code block sorting method. BRIEF DESCRIPTION OF THE DRAWINGS

[0033] Figure 1 A schematic diagram of an application scenario of an OAM code block provided in an embodiment of the present application;

[0034] Figure 2 A flowchart of an OAM code block sorting method provided in an embodiment of the present application;

[0035] Figure 3 A flowchart of another OAM code block sorting method provided in an embodiment of the present application;

[0036] Figure 4 A schematic diagram of multiple OAM code blocks (first OAM code block) cached in RAM provided in an embodiment of the present application;

[0037] Figure 5 A flowchart of another OAM code block sorting method provided in an embodiment of the present application;

[0038] Figure 6 A flowchart of another OAM code block sorting method provided in an embodiment of the present application;

[0039] Figure 7 Schematic diagram of position changes of the OAM code blocks (second OAM code blocks) during sorting provided in an embodiment of the present application;

[0040] Figure 8 A flowchart of another OAM code block sorting method provided in an embodiment of the present application;

[0041] Figure 9 A schematic diagram of the positions of the OAM code blocks (second OAM code blocks) before and after sorting provided in an embodiment of the present application;

[0042] Figure 10 A flowchart of another OAM code block sorting method provided in an embodiment of the present application;

[0043] Figure 11 This is a timing diagram of the OAM code block transmission provided in an embodiment of the present application;

[0044] Figure 12 A flowchart of another OAM code block sorting method provided in an embodiment of the present application;

[0045] Figure 13 A schematic diagram of the structure of an OAM code block sorting device provided in an embodiment of the present application;

[0046] Figure 14 A schematic diagram of the physical structure of an electronic device provided in an embodiment of the present application. DETAILED DESCRIPTION

[0047] In order to make the purpose, technical solutions and advantages of this application clearer, some technical terms are first explained before describing the technical solutions of the embodiments of this application.

[0048] Flexible Ethernet (FlexE): is an interface technology that implements service isolation and network slicing in the bearer network and can be used for network operation, management and maintenance.

[0049] IDLE: refers to the gap between service packets on the link.

[0050] Operation Administration Maintenance (OAM) code block: OAM messages are sliced ​​into code blocks for insertion into the IDLE on the link.

[0051] The technical solutions in this application will be described clearly and completely below in conjunction with the accompanying drawings in this application.

[0052] OAM messages in FlexE have multiple block types; each block plays a crucial role in maintaining network connectivity on a link. During network operation, management, and maintenance, multiple OAM messages may be configured, and each OAM block may be sliced ​​into multiple OAM blocks. Each OAM block is then inserted into the IDLE for transmission. OAM block types include bas, aps, cs, cv, dm, dmm, and dmr. Each OAM message type can be sliced ​​into a single block (one OAM block) or multiple blocks (multiple OAM blocks). Each block is cached in RAM, and upon detecting a gap in the link, the corresponding OAM block is inserted into the gap.

[0053] Reference Figure 1 For example, assume that an OAM message is sliced ​​into multiple OAM code blocks: code block 1 (A1), code block 2 (A2), code block 3 (A3), code block 4 (A4), code block 5 (A5), code block 6 (A6), code block 7 (A7), and code block 8 (A8). When an IDLE is detected in a service message, the corresponding OAM code block (e.g., any one of A1, A2, A3, A4, A5, A6, A7, and A8) from the multiple OAM code blocks is inserted into the IDLE of the service message through the synchronization channel (SCH). This allows the service message to carry the OAM message and be transmitted to the target network.

[0054] Currently, when inserting OAM code blocks into gaps, there is a problem of sorting the OAM code blocks. For example, code blocks carrying corresponding message information (such as serial number information) are sorted to facilitate subsequent scheduling. Existing sorting methods include bubble sort, selection sort, and insertion-exclusion sort. However, existing sorting methods occupy a large number of logical beats, which will lead to a large number of logical levels; for example, bubble sort requires a large amount of judgment logic to process, which will occupy a large number of beats. As a result, in some application scenarios, this will cause timing fan-out, that is, one signal is used by multiple signals, which will cause timing problems for the signal.

[0055] In order to solve the above-mentioned problems, the present application provides an OAM code block sorting method, which can first determine the number of second OAM code blocks before each first OAM code block, and then sort the second OAM code blocks according to the number of second OAM code blocks before each first OAM code block; compared with the sorting methods in the prior art (such as bubble sort), this method has less judgment logic, can reduce the number of occupied beats, and shorten the transmission delay; thereby expanding the scope of application of the present OAM code block sorting method.

[0056] See also Figure 2, an embodiment of the present application provides an OAM code block sorting method, including S201-S203.

[0057] S201. Acquire multiple first OAM code blocks.

[0058] The first OAM code block includes enabling information and first sequence number information. The enabling information is used to indicate whether the first OAM code block has information to be sent, and the first sequence number information is used to indicate the storage order of the first OAM code block.

[0059] In some embodiments, since the RAM may contain values ​​(there is message information to be sorted or multiple first OAM code blocks), it may also be empty (there is no message information to be sorted or multiple first OAM code blocks). Therefore, before executing S201, it is necessary to detect whether there is an IDLE in the link and whether there is message information to be sorted or multiple first OAM code blocks in the RAM. If there is an IDLE in the link and there is message information to be sorted or multiple first OAM code blocks in the RAM, the value in the RAM is retrieved. It should be noted that multiple first OAM code blocks can be obtained directly from the RAM; or the message information to be sorted can be obtained from the RAM first, and then the message information to be sorted can be sliced ​​to obtain multiple first OAM code blocks. The embodiments of the present application are not limited to this, and the following will be explained by taking the example of directly obtaining multiple first OAM code blocks from the RAM.

[0060] In some embodiments, whether there is information to be sent in the first OAM code block can be determined based on whether there is enabling information in the first OAM code block. Whether there is information to be sent in the first OAM code block can also be determined based on the meaning corresponding to the enabling information in the first OAM code block. The embodiments of the present application are not limited to this. In the following embodiments, the determination of whether there is information to be sent in the first OAM code block based on whether there is enabling information in the first OAM code block is used as an example for illustrative description.

[0061] Exemplarily, if there is enabling information (en) in the first OAM code block, the first OAM code block can be represented by 1, that is, there is information to be sent (message information to be sent) in the first OAM code block. If there is no enabling information in the first OAM code block, the first OAM code block can be represented by 0, that is, there is no information to be sent (message information to be sent) in the first OAM code block. For example, suppose the message information to be sorted is 00101101. Slicing the message information to be sorted, the 8 first OAM code blocks obtained are: A1, A2, A4, A7. Among them, A1, A2, A4 and A7 are all 0 (no information to be sent), and A3, A5, A6 and A8 are all 1 (information to be sent).

[0062] In some embodiments, there are multiple types of message information (OAM messages) to be sorted; different types of first OAM code blocks have different first sequence number information.

[0063] For example, if the eight first OAM code blocks obtained by executing S201 are obtained based on slicing of the message information to be sorted of type bas, the first sequence numbers corresponding to the eight first OAM code blocks are A1, A2, A3, A4, A5, A6, A7, and A8, respectively. If the six first OAM code blocks obtained by executing S201 are obtained based on slicing of the message information to be sorted of type aps, the first sequence numbers corresponding to the six first OAM code blocks are B1, B2, B3, B4, B5, and B6, respectively.

[0064] It should be noted that each time S201 is executed, multiple first OAM code blocks of the same type will be obtained. If multiple first OAM code blocks of different types are obtained, S202 and S203 will be executed separately for the multiple first OAM code blocks of each type.

[0065] Exemplarily, if S201 is executed to obtain A1 (code block 1), A2 (code block 2), A3 (code block 3), A4 (code block 4), A5 (code block 5), A6 (code block 6), A7 (code block 7) and A8 (code block 8), and at the same time, B1 (code block a), B2 (code block b), B3 (code block c), B4 (code block d), B5 (code block e) and B6 (code block f) are also obtained; then S202 and S203S are executed twice: S202 and S203 are executed once based on A1, A2, A3, A4, A5, A6, A7 and A8; and S202 and S203 are executed again based on B1, B2, B3, B4, B5 and B6.

[0066] The embodiment of the present application does not limit the number of types of the first OAM code blocks obtained. In the following embodiment, an example will be given in which the multiple first OAM code blocks obtained by executing S201 are all of the same type.

[0067] S202: Determine the number of second OAM code blocks preceding each first OAM code block based on the enabling information and first sequence number information of each first OAM code block.

[0068] The second OAM code block is an OAM code block containing information to be sent among the multiple first OAM code blocks.

[0069] In some embodiments, based on the enable information of each first OAM code block, it can be determined whether there is information to be sent in each first OAM code block; if there is information to be sent in the first OAM code block, the first OAM code block is determined to be a second OAM code block; in this way, at least one second OAM code block can be determined from multiple first OAM code blocks. After determining at least one second OAM code block, the position of each second OAM code block is determined based on the first sequence number information of each first OAM code block, thereby determining the number of second OAM code blocks preceding each first OAM code block. It is also possible to determine the number of third OAM code blocks preceding each first OAM code block that do not have information to be sent based on the enable information and first sequence number information of each first OAM code block; then, based on the number of third OAM code blocks preceding each first OAM code block, the second OAM code blocks that contain information to be sent in the first OAM code block are sorted. This embodiment of the present application is not limited to this. The following embodiment will exemplify the sorting of second OAM code blocks based on the number of second OAM code blocks preceding each first OAM code block.

[0070] See also Figure 3 In some embodiments, S202 may include S2021a-S2022a.

[0071] S2021a: Based on the enabling information of each first OAM code block, determine, among the multiple first OAM code blocks, that there is at least one second OAM code block with information to be sent.

[0072] In some embodiments, it is possible to determine whether each first OAM code block has enable information (determine whether each first OAM code block is 1 or 0) to determine whether at least one second OAM code block has information to be sent among the multiple first OAM code blocks.

[0073] For example, referring to Figure 4 , suppose that among the 8 first OAM code blocks A1, A2, A3, A4, A5, A6, A7 and A8: A1, A3, A5 and A6 are 0, and A2, A4, A7 and A8 are 1; in this way, it can be determined that A2, A4, A7 and A8 are all second OAM code blocks.

[0074] S2022a: Determine the number of second OAM code blocks preceding each first OAM code block based on the first sequence number information of each first OAM code block and at least one second OAM code block.

[0075] In some embodiments, the relative position of each second OAM code block to the first OAM code block is determined based on the first sequence number information of each first OAM code block, thereby determining the number of second OAM code blocks before each first OAM code block.

[0076] For example, continue to refer to Figure 4 , since A1 is located before A2, and A1 is 0 (not the second OAM code block). Therefore, the number of second OAM code blocks before A2 is 0. Since A1 and A2 are both located before A3, and A1 is 0 (A1 is not the second OAM code block), and A2 is 1 (A2 is the second OAM code block). Therefore, the number of second OAM code blocks before A3 is 1. Similarly, the number of second OAM code blocks before A4 is 1; the number of second OAM code blocks before A5 is 2; the number of second OAM code blocks before A6 is 2; the number of second OAM code blocks before A7 is 2; and the number of second OAM code blocks before A8 is 3.

[0077] In some embodiments, the number of first OAM code blocks before each first OAM code block can be determined based on the first serial number information of each first OAM code block; then, based on the enabling information in each first OAM code block, the second OAM code block can be determined from the first OAM code block before each first OAM code block, thereby determining the number of second OAM code blocks before each first OAM code block.

[0078] See also Figure 5 In some embodiments, S202 may include S2021b-S2022b.

[0079] S2021b: Determine the number of first OAM code blocks before each first OAM code block based on the first sequence number information of each first OAM code block.

[0080] In some embodiments, the relative positions between the plurality of first OAM code blocks are determined based on the first sequence number information of each first OAM code block, thereby determining the number of first OAM code blocks preceding each first OAM code block.

[0081] For example, referring to Figure 4 Since A1 is the first OAM code block, the number of first OAM code blocks before A1 is 0. Since A1 is before A2, the number of first OAM code blocks before A2 is 1. Similarly, the number of first OAM code blocks before A4 is 3; the number of first OAM code blocks before A5 is 4; the number of first OAM code blocks before A6 is 5; the number of first OAM code blocks before A7 is 6; and the number of first OAM code blocks before A8 is 7.

[0082] S2022b: Based on the enabling information of each first OAM code block, determine whether a second OAM code block containing information to be sent exists in the first OAM code block preceding each first OAM code block, thereby determining the number of second OAM code blocks preceding each first OAM code block.

[0083] In some embodiments, the number of first OAM code blocks containing enabling information is determined in the first OAM code block preceding each first OAM code block, thereby determining the number of second OAM code blocks preceding each first OAM code block.

[0084] For example, continue to refer to Figure 4 Since there is one second OAM code block (A2) in the two first OAM code blocks (A1 and A2) before A3, the number of second OAM code blocks before A3 is 1. Similarly, the number of second OAM code blocks before A4 is 1; the number of second OAM code blocks before A5 is 2; the number of second OAM code blocks before A6 is 2; the number of second OAM code blocks before A7 is 2; and the number of second OAM code blocks before A8 is 3.

[0085] S203 : Sort the second OAM code blocks based on the number of second OAM code blocks before each first OAM code block.

[0086] In some embodiments, the second OAM code blocks are sorted based on the number of second OAM code blocks before each first OAM code block so that during the service message transmission process, the second OAM code blocks can be preferentially inserted into the IDLE of the service message transmission link, thereby shortening the delay.

[0087] See also Figure 6 In some embodiments, S203 may include S2031-S2032.

[0088] S2031 : Determine, based on the enabling information of each first OAM code block, whether each first OAM code block is a second OAM code block.

[0089] In some embodiments, based on the enable information of each first OAM code block, it is determined whether each first OAM code block has information to be sent. If the first OAM code block has information to be sent, the first OAM code block is determined to be a second OAM code block. If the first OAM code block does not have information to be sent, the first OAM code block is determined to be a third OAM code block.

[0090] S2032: When the first OAM code block is a second OAM code block, sort the second OAM code blocks based on the number of second OAM code blocks preceding each second OAM code block.

[0091] In some embodiments, when the first OAM code block is the second OAM code block, the second OAM code blocks are sorted based on the number of second OAM code blocks before each second OAM code block to ensure that there is no third OAM code block before the second OAM code block.

[0092] In some embodiments, the number of the second OAM code blocks may be one or more. When the number of the second OAM code blocks is more than one, the plurality of second OAM code blocks may be sequentially moved based on the number of second OAM code blocks preceding each second OAM code block to complete the sorting of the second OAM code blocks.

[0093] For example, referring to Figure 7 Since A2 is 1 (A2 is the second OAM code block) and the number of second OAM code blocks before A2 is 0, A2 is moved to A1. Since A4 is 1 (A4 is the second OAM code block) and the number of second OAM code blocks before A4 is 1, that is, there is a second OAM code block (A2) before A4, A4 is moved to A2, making A4 adjacent to A2, which has been moved to A1. Similarly, after sorting the second OAM code blocks A7 and A8, A7 will be moved to A3, and A8 will be moved to A4.

[0094] In some embodiments, when there are multiple second OAM code blocks, multiple second OAM code blocks may be simultaneously moved based on the number of second OAM code blocks before each second OAM code block to complete the sorting of the second OAM code blocks.

[0095] For example, continue to refer to Figure 7 , move A2, A4, A7, and A8 simultaneously, and make the number of second OAM code blocks before A2 0, the number of second OAM code blocks before A4 1, the number of second OAM code blocks before A7 2, and the number of second OAM code blocks before A8 3. At this time, A2 moves to A1, A4 moves to A2, A7 moves to A3, and A8 moves to A4.

[0096] In some embodiments, when the first OAM code block is the third OAM code block, the third OAM code block is not sorted.

[0097] See also Figure 8 In some embodiments, S2032 may include S801-S802.

[0098] S801: Determine second sequence number information of each second OAM code block according to a preset sorting rule and the number of second OAM code blocks before each first OAM code block.

[0099] In some embodiments, the preset sorting rule includes that when the first OAM code block is the second OAM code block, the fewer the second OAM code blocks before the first OAM code block, the closer the position corresponding to the second sequence number information of the second OAM code block is to the front.

[0100] In some embodiments, the preset sorting rule may be determined based on a column truth table.

[0101] For example, assume that the eight first OAM code blocks are A1, A2, A3, A4, A5, A6, A7, and A8, and the eight output second OAM code blocks are Q1, Q2, Q3, Q4, Q5, Q6, Q7, and Q8, respectively. The truth table corresponding to Q1 is shown in Table 1-1.

[0102] A1 A2 A3 A4 A5 A6 A7 A8 Q1 1 x x x x x x x A1 x 1 x x x x x x (!A1)A2 x x 1 x x x x x (!A1!A2)A3 x x x 1 x x x x (!A1!A2!A3)A4 x x x x 1 x x x (!A1!A2!A3!A4)A5 x x x x x 1 x x (!A1!A2!A3!A4!A5)A6 x x x x x x 1 x (!A1!A2!A3!A4!A5!A6)A7 x x x x x x x 1 (!A1!A2!A3!A4!A5!A6!A7)A8

[0103] Table 1-1

[0104] The truth table corresponding to Q2 is shown in Table 1-2.

[0105] A2 A3 A4 A5 A6 A7 A8 Q2 1 x x x x x x A2 x 1 x x x x x (!A2)A3 x x 1 x x x x (!A2!A3)A4 x x x 1 x x x (!A2!A3!A4)A5 x x x x 1 x x (!A2!A3!A4!A5)A6 x x x x x 1 x (!A2!A3!A4!A5!A6)A7 x x x x x x 1 (!A2!A3!A4!A5!A6!A7)A8

[0106] Table 1-2

[0107] The truth tables of Q3-Q8 can be found in the corresponding truth tables of Q1 and Q2 respectively, and will not be repeated here.

[0108] Among them, based on the truth tables corresponding to Q1-Q8, the conclusion can be drawn (preset sorting rules): If any one of A1-A8 needs to be moved to Q1, the first OAM code block at Q1 cannot have information to be sent; that is, the number of 1s before Q1 is 0 (the number of second OAM code blocks before Q1 is 0); if any one of A1-A8 needs to be moved to Q2, the first OAM code block at Q1 needs to have information to be sent, and the first OAM code block at Q2 cannot have information to be sent; that is, the number of 1s before Q2 is 1 (the number of second OAM code blocks before Q2 is 1). By the same token, if any one of A1-A8 needs to be moved to Q3, the number of 1s before Q3 is 2 (the number of second OAM code blocks before Q3 is 2); if any one of A1-A8 needs to be moved to Q4, the number of 1s before Q4 is 3 (the number of second OAM code blocks before Q4 is 3); if any one of A1-A8 needs to be moved to Q5, the number of 1s before Q6 is 4 (the number of second OAM code blocks before Q5 is 4); if any one of A1-A8 needs to be moved to Q6, the number of 1s before Q3 is 5 (the number of second OAM code blocks before Q6 is 5); if any one of A1-A8 needs to be moved to Q7, the number of 1s before Q7 is 6 (the number of second OAM code blocks before Q7 is 6); if any one of A1-A8 needs to be moved to Q8, the number of 1s before Q8 is 7 (the number of second OAM code blocks before Q8 is 7).

[0109] In some embodiments, based on the number of second OAM code blocks preceding each first OAM code block, the second sequence number information corresponding to each second OAM code block is determined from a preset sorting rule.

[0110] For example, since the number of second OAM code blocks before A2 is 0, the second serial number information corresponding to A2 is Q1; the number of second OAM code blocks before A4 is 1, therefore, the second serial number information corresponding to A4 is Q2; the number of second OAM code blocks before A7 is 2, therefore, the second serial number information corresponding to A7 is Q3; the number of second OAM code blocks before A8 is 3, therefore, the second serial number information corresponding to A8 is Q8.

[0111] S802 : Sort the second OAM code blocks based on the second sequence number information of each second OAM code block.

[0112] In some embodiments, based on the second sequence number information of each second OAM code block, each second sequence number information is moved to a position corresponding to the second sequence number information to complete the sorting of the second OAM code blocks.

[0113] For example, referring to Figure 9 , move A2 to Q1, move A4 to Q2, move A7 to Q3, and move A8 to Q4.

[0114] based on Figure 2 , refer to Figure 10 In some embodiments, the OAM code block sorting method provided in the embodiment of the present application may further include S204 after S203.

[0115] S204: Perform padding processing on the sorted second OAM code blocks based on the number of the multiple first OAM code blocks.

[0116] In some embodiments, after the second OAM code blocks are sorted, the last second OAM code block is padded with 0s based on the number of the first OAM code blocks, wherein the number of 0s used for the padding process is the same as the number of the third OAM code blocks.

[0117] For example, referring to Figure 9 Since the number of the second OAM code blocks is 4 and the number of the first OAM code blocks is 8, 4 zeros are used to pad after Q4 (A8).

[0118] In some embodiments, Figure 11 This is a timing diagram of the OAM code block transmission provided in the embodiment of the present application; see Figure 11, assuming that the OAM message is 01010011. When no sorting is performed, the type fields corresponding to the multiple OAM code blocks (multiple first OAM code blocks) corresponding to the OAM message are: 4'd1, 4'd2, 4'd3, 4'd4, 4'd5, 4'd6, 4'd7, 4'd8; at this time, two beats are required to complete the output. After sorting, the OAM message is 11110000. At this time, the type fields corresponding to the multiple OAM code blocks (second OAM code blocks) output are: 4'd2, 4'd4, 4'd7, 4'd8, 4'd0, 4'd0, 4'd0, 4'd0; at this time, one beat is required to complete the output. In this way, the number of occupied beats can be reduced and the transmission delay can be shortened.

[0119] See also Figure 12 In some embodiments, the OAM code block sorting method may further include S1201-S1207.

[0120] S1201: Specify a flag bit (first OAM code block) / new flag bit from multiple flag bits, where the flag bit is also called bit_flag.

[0121] S1202: Determine the flag bit and the enabled number on the left side of the flag bit (determine whether the first OAM code block is the second OAM code block, and determine the number of second OAM code blocks before the first OAM code block).

[0122] S1203: Based on the flag bit and the number of enabled bits to the left of the flag bit, the flag bit is matched with an array in a preset bit variable (preset sorting rule) to determine the target sequence number (second sequence number information) corresponding to the flag bit. The bit variable is also called flag_bit.

[0123] S1204: Determine whether the match is successful. If so, execute S1205; if not, do not sort the flag bit and execute S1201.

[0124] S1205 : Sort the flag bit to the target position based on the target sequence number to obtain the sorted flag bit.

[0125] For example, assume that the flag bit designated by S1201 is A7, and there are 3 enables on the left side of A7. If it matches the array with flag_bit equal to 3, and the match is successful, A7 is sorted to the position of A3 to obtain the sorted flag bit A7.

[0126] S1206: Determine whether all the flags have been sorted. If so, execute S1207; if not, execute S1201.

[0127] S1207: Concatenate the sorted flag bits and fill them with 0 based on the number of flag bits (perform bit filling processing).

[0128] It is understandable that in the OAM code block sorting method provided in the embodiment of the present application, after determining whether the first OAM code block is the second OAM code block, the second sequence number information (target sequence number) of the second OAM code block (first OAM code block) can be determined based on the number of second OAM code blocks preceding each first OAM code block. In this way, the judgment logic is relatively simple, that is, the number of beats occupied is relatively small, which can shorten the delay of calling service messages (transmission).

[0129] Based on the same inventive concept, the embodiment of the present application also provides an OAM code block sorting device for implementing the above-mentioned OAM code block sorting method. The implementation solution provided by the device is similar to the implementation solution described in the above-mentioned method. Therefore, the specific limitations of the one or more OAM code block sorting device embodiments provided below can refer to the limitations of the message information processing method above, and will not be repeated here. Specifically, see Figure 13 , an embodiment of the present application provides an OAM code block sorting device, comprising:

[0130] An acquisition module 1310 is configured to acquire a plurality of first OAM code blocks, wherein the first OAM code blocks include enable information and first sequence number information, the enable information being used to indicate whether the first OAM code blocks have information to be sent, and the first sequence number information being used to indicate a storage order of the first OAM code blocks;

[0131] a processing module 1320, configured to determine, based on the enabling information and the first sequence number information of each of the first OAM code blocks, the number of second OAM code blocks preceding each of the first OAM code blocks; wherein the second OAM code block is an OAM code block containing the information to be sent among the plurality of first OAM code blocks;

[0132] The sorting module 1330 is configured to sort the second OAM code blocks based on the number of second OAM code blocks preceding each of the first OAM code blocks.

[0133] In some embodiments, the processing module 1320 is further used to determine, based on the enabling information of each first OAM code block, that there is at least one second OAM code block with information to be sent in multiple first OAM code blocks; and determine the number of second OAM code blocks before each first OAM code block based on the first sequence number information of each first OAM code block and at least one second OAM code block.

[0134] In some embodiments, the processing module 1320 is further used to determine the number of first OAM code blocks before each first OAM code block based on the first sequence number information of each first OAM code block; based on the enable information of each first OAM code block, determine that there is a second OAM code block with information to be sent in the first OAM code block before each first OAM code block, thereby determining the number of second OAM code blocks before each first OAM code block.

[0135] In some embodiments, the processing module 1320 is further configured to determine whether each first OAM code block is a second OAM code block based on the enabling information of each first OAM code block;

[0136] The sorting module 1330 is further configured to sort the second OAM code blocks based on the number of second OAM code blocks preceding each second OAM code block when the first OAM code block is the second OAM code block.

[0137] In some embodiments, the sorting module 1330 is further configured to determine the second sequence number information of each second OAM code block according to a preset sorting rule and the number of second OAM code blocks before each first OAM code block; and sort the second OAM code blocks based on the second sequence number information of each second OAM code block.

[0138] In some embodiments, the processing module 1320 is further configured to perform padding processing on the sorted second OAM code blocks based on the number of the first OAM code blocks.

[0139] Regarding the specific limitations and beneficial effects that can be achieved by the OAM code block sorting device, please refer to the above limitations on the message information processing method, which will not be repeated here.

[0140] like Figure 14 As shown, an electronic device provided in an embodiment of the present application may include: a processor (processor) 1410, a communication interface (Communications Interface) 1420, a memory (memory) 1430 and a communication bus 1440, wherein the processor 1410, the communication interface 1420, and the memory 1430 communicate with each other through the communication bus 1440. The processor 1410 can call the logic instructions in the memory 1430 to execute the above methods.

[0141] In addition, the logic instructions in the above-mentioned memory 1430 can be implemented in the form of a software functional unit and can be stored in a computer-readable storage medium when sold or used as an independent product. Based on this understanding, the technical solution of the present invention, or the part that contributes to the prior art, or the part of the technical solution, can be embodied in the form of a software product. The computer software product is stored in a storage medium and includes several instructions for enabling a computer device (which can be a personal computer, server, or network device, etc.) to execute all or part of the steps of the switchgear mechanical condition monitoring method described in each embodiment of the present invention. The aforementioned storage medium includes: a U disk, a mobile hard disk, a read-only memory (ROM), a random access memory (RAM), a magnetic disk or an optical disk, and other media that can store program code.

[0142] In another aspect, the present invention further provides a non-transitory computer-readable storage medium having a computer program stored thereon, which is configured to execute the above methods when executed by a processor.

[0143] The device embodiments described above are merely illustrative. The units described as separate components may or may not be physically separate, and the components shown as units may or may not be physical units, i.e., they may be located in one location or distributed across multiple network units. Some or all of the modules may be selected based on actual needs to achieve the objectives of the present embodiment. Persons of ordinary skill in the art will be able to understand and implement the present invention without inventive effort.

[0144] Through the description of the above embodiments, those skilled in the art can clearly understand that each embodiment can be implemented by means of software plus a necessary general hardware platform, or of course, by hardware. Based on this understanding, the essence of the above technical solution or the part that contributes to the existing technology can be embodied in the form of a software product. The computer software product can be stored in a computer-readable storage medium, such as ROM / RAM, a magnetic disk, an optical disk, etc., and includes a number of instructions for enabling a computer device (which can be a personal computer, a server, or a network device, etc.) to execute the methods described in each embodiment or certain parts of the embodiments.

[0145] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention, rather than to limit it. Although the present invention has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that they can still modify the technical solutions described in the aforementioned embodiments, or make equivalent replacements for some of the technical features therein. However, these modifications or replacements do not deviate the essence of the corresponding technical solutions from the spirit and scope of the technical solutions of the various embodiments of the present invention.

Claims

1. A method for sorting OAM code blocks, characterized in that: include: Acquire multiple first OAM code blocks; wherein the first OAM code blocks include enable information and first sequence number information, the enable information is used to indicate whether the first OAM code blocks have information to be sent, and the first sequence number information is used to indicate the storage order of the first OAM code blocks; Determining, based on the enabling information and the first sequence number information of each of the first OAM code blocks, the number of second OAM code blocks preceding each of the first OAM code blocks; wherein the second OAM code block is an OAM code block containing the information to be sent among the plurality of first OAM code blocks; sorting the second OAM code blocks based on the number of second OAM code blocks preceding each of the first OAM code blocks; The sorting of the second OAM code blocks based on the number of the second OAM code blocks preceding each of the first OAM code blocks includes: Determining, based on the enabling information of each of the first OAM code blocks, whether each of the first OAM code blocks is the second OAM code block; In a case where the first OAM code blocks are the second OAM code blocks, the second OAM code blocks are sorted based on the number of second OAM code blocks preceding each second OAM code block.

2. The method according to claim 1, characterized in that The determining, based on the enabling information and the first sequence number information of each first OAM code block, the number of second OAM code blocks preceding each first OAM code block includes: Based on the enabling information of each of the first OAM code blocks, determining that there is at least one second OAM code block with information to be sent in the plurality of first OAM code blocks; The number of second OAM code blocks preceding each of the first OAM code blocks is determined based on the first sequence number information of each of the first OAM code blocks and the at least one second OAM code block.

3. The method according to claim 1, characterized in that The determining, based on the enabling information and the first sequence number information of each first OAM code block, the number of second OAM code blocks preceding each first OAM code block includes: Determining, based on the first sequence number information of each first OAM code block, the number of first OAM code blocks preceding each first OAM code block; Based on the enabling information of each first OAM code block, it is determined that there is a second OAM code block containing information to be sent in the first OAM code block preceding each first OAM code block, thereby determining the number of second OAM code blocks preceding each first OAM code block.

4. The method according to claim 1, wherein The sorting of the second OAM code blocks based on the number of the second OAM code blocks preceding each of the first OAM code blocks includes: Determining second sequence number information of each second OAM code block according to a preset sorting rule and the number of second OAM code blocks before each first OAM code block; The second OAM code blocks are sorted based on the second sequence number information of each second OAM code block.

5. The method according to claim 4, characterized in that The preset sorting rule includes that when the first OAM code block is the second OAM code block, the fewer the number of second OAM code blocks before the first OAM code block, the closer the position corresponding to the second sequence number information of the second OAM code block is to the front.

6. The method according to any one of claims 1 to 5, characterized in that After sorting the second OAM code blocks based on the enabling information and the first sequence number information of each first OAM code block, the method further includes: Based on the number of the multiple first OAM code blocks, padding processing is performed on the sorted second OAM code blocks.

7. An OAM code block sorting device, characterized in that: include: An acquisition module, configured to acquire a plurality of first OAM code blocks; wherein the first OAM code blocks include enable information and first sequence number information, the enable information being used to indicate whether the first OAM code blocks have information to be sent, and the first sequence number information being used to indicate a storage order of the first OAM code blocks; a processing module, configured to determine, based on the enabling information and the first sequence number information of each of the first OAM code blocks, the number of second OAM code blocks preceding each of the first OAM code blocks; wherein the second OAM code block is an OAM code block containing the information to be sent among the plurality of first OAM code blocks; a sorting module, configured to sort the second OAM code blocks based on the number of second OAM code blocks preceding each of the first OAM code blocks; The sorting module is further configured to determine, based on the enabling information of each first OAM code block, whether each first OAM code block is the second OAM code block; and if the first OAM code block is the second OAM code block, sort the second OAM code blocks based on the number of second OAM code blocks before each second OAM code block.

8. An electronic device, characterized in that: The method comprises a memory and a processor, wherein the memory stores a computer program, and is characterized in that when the processor executes the computer program, the steps of the method according to any one of claims 1 to 6 are implemented.

9. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the steps of the method according to any one of claims 1 to 6 are implemented.

Citation Information

Patent Citations

  • Flexible Ethernet lane management method and apparatus

    CN106612220A

  • Data transmission method and device, network equipment and storage medium

    CN110266612A