Time slot allocation method and device, storage medium and electronic device

By sending and receiving network overhead frames between flexible Ethernet devices and dynamically searching and allocating time slots, the problem of low accuracy of manual configuration time slots is solved, and accurate and consistent time slot allocation of flexible Ethernet devices is achieved.

CN116437453BActive Publication Date: 2025-08-08SUZHOU CENTEC COMM CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202111663236.X
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2021-12-30
Publication Date
2025-08-08
Estimated Expiration
2041-12-30

AI Technical Summary

Technical Problem

In the prior art, the time slot allocation process of flexible Ethernet devices is low due to the dependence of manual configuration, especially when the operator lacks professional and technical capabilities, it is easy to cause inconsistent time slot allocation.

Method used

By sending and receiving network overhead frames between the first network device and the second network device, the respective time slot allocation information is obtained, and the time slot is dynamically searched and allocated according to the identification and bandwidth of the newly added client to ensure the accuracy of time slot allocation.

Benefits of technology

Dynamic slot allocation for new clients is realized, the accuracy and consistency of slot allocation is improved, and the problem of low accuracy occurs during manual time slot configuration is avoided.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN116437453B_ABST
    Figure CN116437453B_ABST
Patent Text Reader

Abstract

The present invention discloses a time slot allocation method and device, a storage medium, and an electronic device, wherein the method comprises: receiving a first network overhead frame sent from a first network device to a second network device, and obtaining a second network overhead frame sent from the second network device to the first network device; obtaining a first identifier of a newly added first client on the first network device and a first bandwidth configured for the first client; searching, based on the first identifier of the first client, for a time slot allocated to the first client in a second time slot subset indicated by second time slot allocation information, to obtain a first search result; and allocating a corresponding time slot to the first client in the first network device based on the first search result and the first bandwidth. The above technical solution solves the problem of low accuracy in the manual configuration of time slots for flexible Ethernet devices in related technologies.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of communication technology, and in particular to a time slot allocation method and device, a storage medium, and an electronic device. Background Art

[0002] Flexible Ethernet technology, a low-cost, highly reliable, and dynamically configurable interface technology achieved by decoupling the Ethernet MAC and PHY layers, has become a crucial interface technology for implementing service isolation and network slicing in 5G bearer networks. To ensure proper communication between flexible Ethernet devices at both ends, how to negotiate and allocate time slots between them has become a key research topic.

[0003] In the existing technology, the time slots and the specific locations of the time slots are manually configured on the flexible Ethernet devices at both ends, usually relying on the operator's operating level. However, if the operator's professional technical ability is insufficient, inconsistent time slot allocation may easily occur on the flexible Ethernet devices at both ends, resulting in a technical problem of low time slot allocation accuracy.

[0004] To address the above issues, no effective solutions have been proposed so far. Summary of the Invention

[0005] Embodiments of the present invention provide a time slot allocation method and device, a storage medium, and an electronic device to at least solve the problem of low accuracy in the process of manually configuring the time slots of flexible Ethernet devices in the related art.

[0006] According to one aspect of an embodiment of the present invention, a time slot allocation method is provided, comprising: sending a first network overhead frame from a first network device to a second network device, and obtaining a second network overhead frame sent by the second network device to the first network device, wherein the first network overhead frame carries first time slot allocation information, the first time slot allocation information indicates a first time slot subset allocated by the first network device in a target time slot set and an identifier of a client to which the first time slot subset is allocated, and the second network overhead frame carries second time slot allocation information, the second time slot allocation information indicates a second time slot subset allocated by the second network device in the target time slot set and an identifier of a client to which the second time slot subset is allocated; obtaining a first identifier of a first client newly added on the first network device and a first bandwidth configured for the first client; searching for a time slot allocated to the first client in the second time slot subset indicated by the second time slot allocation information according to the first identifier of the first client, and obtaining a first search result; and allocating a corresponding time slot to the first client in the first network device according to the first search result and the first bandwidth.

[0007] Optionally, the above-mentioned allocating a corresponding time slot to the first client in the first network device based on the first search result and the first bandwidth includes: when the first search result indicates that the second network device is found in the second time slot subset and has been allocated to the first client and the third time slot subset has not yet been allocated in the first network device, obtaining the second bandwidth allowed to be configured by the first network device on the third time slot subset; and allocating a corresponding time slot to the first client in the first network device based on a bandwidth comparison relationship between the first bandwidth and the second bandwidth.

[0008] Optionally, the above-mentioned allocating corresponding time slots to the first client in the first network device based on the bandwidth comparison relationship between the first bandwidth and the second bandwidth includes at least one of the following: when the first bandwidth is equal to the second bandwidth, allocating the third time slot subset to the first client in the first network device in the first network device; when the first bandwidth is less than the second bandwidth, allocating the first part of the time slots in the third time slot subset to the first client in the first network device in the first network device, wherein the bandwidth allowed to be configured by the first network device on the first part of the time slots is the first bandwidth; when the first bandwidth is greater than the second bandwidth, allocating the third time slot subset and the second part of the time slots to the first client in the first network device in the first network device, wherein the second part of the time slots are part or all of the time slots in the target time slot set that are not allocated in both the first network device and the second network device, and the total bandwidth allowed to be configured by the first network device on the third time slot subset and the second part of the time slots is the first bandwidth.

[0009] Optionally, the allocating, in the first network device, part of the time slots in the third time slot subset to the first client in the first network device includes: allocating, in the first network device, part of the time slots ranked higher in the third time slot subset to the first client in the first network device in ascending order of time slot numbers.

[0010] Optionally, the above-mentioned time slot allocation method also includes: when the first part of the time slots in the third time slot subset is allocated to the first client in the first network device in the first network device, sending a first prompt message, wherein the first prompt message is used to indicate that the time slots allocated by the first network device and the second network device to the first client are inconsistent; and / or when the third time slot subset and the second part of the time slots are allocated to the first client in the first network device in the first network device, sending a second prompt message, wherein the second prompt message is used to indicate that the time slots allocated by the first network device and the second network device to the first client are inconsistent.

[0011] Optionally, the above-mentioned allocating a corresponding time slot to the first client in the first network device based on the first search result and the first bandwidth includes: when the first search result indicates that the time slot allocated to the first client is not found in the second time slot subset, obtaining a fourth time slot subset that is not allocated to the first network device and the second network device in the target time slot set; obtaining a third bandwidth that is allowed to be configured on the first network device on the fourth time slot subset; and allocating a corresponding time slot to the first client in the first network device based on a bandwidth comparison relationship between the first bandwidth and the third bandwidth.

[0012] Optionally, the above-mentioned allocating corresponding time slots to the first client in the first network device based on the bandwidth comparison relationship between the first bandwidth and the third bandwidth includes at least one of the following: when the first bandwidth is equal to the third bandwidth, allocating the fourth time slot subset to the first client in the first network device in the first network device; when the first bandwidth is less than the third bandwidth, allocating the third part of the time slots in the fourth time slot subset to the first client in the first network device in the first network device, wherein the bandwidth allowed to be configured by the first network device on the third part of the time slots is the first bandwidth.

[0013] Optionally, the above-mentioned time slot allocation method also includes: when the third part of the time slots in the fourth time slot subset is allocated to the first client in the first network device in the first network device, sending a third prompt information, wherein the third prompt information is used to indicate that the time slots allocated to the first client by the first network device and the second network device are inconsistent; or when the first bandwidth is greater than the third bandwidth, sending an alarm information, wherein the alarm information is used to indicate that the time slot cannot be configured for the first client in the first network device.

[0014] Optionally, after allocating the corresponding time slot for the first client in the first network device according to the first search result and the first bandwidth, the method further includes: obtaining a third network overhead frame and the first bandwidth sent from the first network device to the second network device, wherein the third network overhead frame carries third time slot allocation information, the third time slot allocation information represents the fifth time slot subset allocated by the first network device in the target time slot set and the identifier of the client to which the fifth time slot subset is allocated, the identifier of the client to which the fifth time slot subset is allocated includes the first identifier of the first client, and the fifth time slot subset includes the corresponding time slot allocated by the first network device to the first client; according to the first identifier of the first client, searching the second time slot subset for the time slot allocated to the first client to obtain a second search result; and determining the time slot allocated to the first client in the second network device according to the second search result and the first bandwidth.

[0015] Optionally, the above-mentioned determination of the time slots allocated to the first client in the second network device based on the bandwidth comparison relationship between the first bandwidth and the fourth bandwidth includes at least one of the following: when the first bandwidth is equal to the fourth bandwidth, determining the allocated third time slot subset as the time slots allocated to the first client in the second network device; when the first bandwidth is less than the fourth bandwidth, determining the third portion of time slots in the allocated third time slot subset as the time slots allocated to the first client in the second network device, wherein the bandwidth allowed to be configured on the third portion of time slots by the second network device is the first bandwidth; when the first bandwidth is greater than the fourth bandwidth, allocating the fourth portion of time slots in the second network device to the first client in the second network device, and determining the allocated third time slot subset and the fourth portion of time slots in the second network device as the time slots allocated to the first client, wherein the fourth portion of time slots is part or all of the time slots in the target time slot set that are determined based on the first time slot allocation information and the second time slot allocation information and are not allocated in both the first network device and the second network device, and the total bandwidth allowed to be configured on the second network device for the third portion of time slots is the first bandwidth.

[0016] Optionally, the above-mentioned determining the time slot allocated to the first client in the second network device based on the second search result and the first bandwidth includes: when the second search result indicates that the time slot allocated to the first client is not found in the second time slot subset, obtaining a fourth time slot subset determined according to the first time slot allocation information and the second time slot allocation information, in which the target time slot set is not allocated in both the first network device and the second network device; obtaining a fifth bandwidth allowed to be configured on the second network device on the fourth time slot subset; and determining the time slot allocated to the first client in the second network device based on a bandwidth comparison relationship between the first bandwidth and the fifth bandwidth.

[0017] Optionally, the above-mentioned determining the time slots allocated to the first client in the second network device based on the bandwidth comparison relationship between the first bandwidth and the fifth bandwidth includes: when the first bandwidth is equal to the fifth bandwidth, allocating the fourth time slot subset to the first client in the second network device in the second network device, wherein the fourth time slot subset is determined to be the time slots allocated to the first client in the second network device; when the first bandwidth is less than the fifth bandwidth, allocating the fifth part of the time slots in the fourth time slot subset to the first client in the second network device in the second network device, wherein the bandwidth allowed to be configured by the second network device on the fifth part of the time slots is the first bandwidth, and the fifth part of the time slots is determined to be the time slots allocated to the first client in the second network device.

[0018] According to another aspect of the present invention, a time slot allocation device is also provided, including: a first processing unit, configured to send a first network overhead frame from a first network device to a second network device, and obtain a second network overhead frame sent by the second network device to the first network device, wherein the first network overhead frame carries first time slot allocation information, the first time slot allocation information indicates a first time slot subset allocated by the first network device in a target time slot set and an identifier of a client to which the first time slot subset is allocated, and the second network overhead frame carries second time slot allocation information, the second time slot allocation information indicates a second time slot subset allocated by the second network device in the target time slot set and an identifier of a client to which the second time slot subset is allocated; an acquisition unit, configured to obtain a first identifier of a first client newly added on the first network device and a first bandwidth configured for the first client; a search unit, configured to search for a time slot allocated to the first client in the second time slot subset represented by the second time slot allocation information according to the first identifier of the first client, and obtain a first search result; and an allocation unit, configured to allocate a corresponding time slot to the first client in the first network device according to the first search result and the first bandwidth.

[0019] According to the embodiment of the present invention, a first network overhead frame is sent from a first network device to a second network device, and a second network overhead frame sent by the second network device to the first network device is obtained; a first identifier of a newly added first client and a first bandwidth configured for the first client are obtained on the first network device; based on the first identifier of the first client, a time slot allocated to the first client is searched in a second time slot subset represented by the second time slot allocation information to obtain a first search result; and based on the first search result and the first bandwidth, a corresponding time slot is allocated to the first client in the first network device. In other words, by using the first identifier of the newly added first client on the first network device, a time slot allocated to the first client on the second network device is searched to obtain a first search result, and then based on the first search result and the first bandwidth configured for the first client in the first network device, a corresponding time slot is allocated to the first client in the first network device. This achieves the effect of dynamically allocating time slots to newly added clients, solves the problem of low accuracy in manually configuring time slots, and improves the accuracy of time slot allocation. BRIEF DESCRIPTION OF THE DRAWINGS

[0020] The drawings described herein are used to provide a further understanding of the present invention and constitute a part of this application. The exemplary embodiments of the present invention and their descriptions are used to explain the present invention and do not constitute an improper limitation of the present invention. In the drawings:

[0021] Figure 1 is a schematic diagram of an application scenario environment of an optional time slot allocation method according to an embodiment of the present invention;

[0022] Figure 2is a flow chart of an optional time slot allocation method according to an embodiment of the present invention;

[0023] Figure 3 is an optional flowchart of dynamically allocating time slots for a first client in a first network device according to an embodiment of the present invention;

[0024] Figure 4 is an optional flowchart of dynamically allocating time slots for a first client in a second network device according to an embodiment of the present invention;

[0025] Figure 5 is an overall flow chart of an optional time slot allocation method according to an embodiment of the present invention;

[0026] Figure 6 is a structural block diagram of a time slot allocation device according to an embodiment of the present invention. DETAILED DESCRIPTION

[0027] In order to enable those skilled in the art to better understand the solutions of the present invention, the technical solutions in the embodiments of the present invention will be clearly and completely described below in conjunction with the drawings in the embodiments of the present invention. Obviously, the embodiments described are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without making creative efforts should fall within the scope of protection of the present invention.

[0028] It should be noted that the terms "first", "second", etc. in the description and claims of the present invention 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 numbers used in this way can be interchanged where appropriate, so that the embodiments of the present invention described herein can be implemented in an order other than those illustrated or described herein. In addition, the terms "including" and "having" and any variations thereof are intended to cover non-exclusive inclusions. For example, a process, method, system, product or device that includes 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.

[0029] According to one aspect of an embodiment of the present invention, a time slot allocation method is provided. Optionally, as an optional implementation, the time slot allocation method can be applied to, but is not limited to, Figure 1 The time slot allocation system in the hardware environment shown in FIG. The time slot allocation system may include but is not limited to a first client 100, a first network device 102, a network 104, a server 106, a database 108 and a second network device 110. The first network device 102 runs a target client (such as Figure 1 The first client 100 shown). The above-mentioned first network device 102 includes a human-computer interaction screen, a processor and a memory. The human-computer interaction interface is used to transmit the time slot allocation of the first client; it is also used to provide a human-computer interaction interface to receive data interaction operations for flexibly allocating time slots for external network devices at both ends. The processor is used to generate interaction instructions in response to the above-mentioned data interaction operations and send the interaction instructions to the server 106. The memory is used to store relevant attribute data, such as the time slot allocation collection of the first network device end, the ID information of the newly added first client, etc. The above-mentioned second network device 110 also includes a data interaction interface, a processor and a memory.

[0030] The specific process is as follows: Step S102: Send a first network overhead frame and obtain a second network overhead frame. Then, in step S104, obtain a first identifier and a first bandwidth of a newly added first client, where the first identifier is the ID number of the first client and the first bandwidth is the bandwidth configured for the first client in the first network device. Server 106 then executes steps S110-S116 to obtain a first search result based on the first identifier. Based on the first search result and the first bandwidth, the server allocates a corresponding time slot for the first client in the first network device.

[0031] As another optional implementation, when the second network device 110 has relatively strong computing and processing capabilities, the above steps S110-S116 may also be completed by the second network device 110. This is an example and is not limited in this embodiment.

[0032] In this embodiment, a time slot allocation method is provided. Figure 2 4 is a flow chart of a time slot allocation method according to an embodiment of the present invention, the flow chart comprising the following steps:

[0033] Step S202: Send a first network overhead frame from the first network device to the second network device, and obtain a second network overhead frame sent by the second network device to the first network device, wherein the first network overhead frame carries first time slot allocation information, the first time slot allocation information indicates a first time slot subset allocated by the first network device in a target time slot set and an identifier of a client to which the first time slot subset is allocated, and the second network overhead frame carries second time slot allocation information, the second time slot allocation information indicates a second time slot subset allocated by the second network device in the target time slot set and an identifier of a client to which the second time slot subset is allocated;

[0034] Step S204: Acquire a first identifier of a newly added first client and a first bandwidth configured for the first client on the first network device;

[0035] Step S206: searching, according to the first identifier of the first client, for a time slot allocated to the first client in the second time slot subset indicated by the second time slot allocation information, to obtain a first search result;

[0036] Step S208: Allocate a corresponding time slot for the first client in the first network device according to the first search result and the first bandwidth.

[0037] In this embodiment, to ensure that clients between the first network device and the second network device can communicate normally, data is always exchanged between the first network device and the second network device at predetermined time intervals. That is, data is always sent and received between the two network devices. Specifically, as shown in Tables 1 and 2 below, assuming that both the first network device and the second network device include time slots 0 to 4, the time slot allocation of the first network device is shown in Table 1, and the time slot allocation of the second network device is shown in Table 2.

[0038] Table 1

[0039] Slot0 Slot1 Slot2 Slot3 Slot4 0x0001 0x0000 0x0000 0x0000 0x0000

[0040] Table 2

[0041] Slot0 Slot1 Slot2 Slot3 Slot4 0x0000 0x0002 0x0002 0x0000 0x0000

[0042] Among them, 0x0001 represents that the client with client ID 1 occupies the time slot; 0x0002 represents that the client with client ID 2 occupies the time slot; 0x0000 represents an idle time slot that is not occupied by any client.

[0043] It should be noted that in this embodiment, the number of time slots on the first network device and the second network device and the client ID assigned to each time slot are not limited. In order to facilitate the explanation of the technical solution of this application, the number of time slots of the network devices at both ends is 5, and a detailed explanation is given on how to implement the dynamic time slot allocation scheme of the network devices at both ends when adding or deleting clients.

[0044] In step S202, the first network overhead frame includes but is not limited to the time slot set of slots 0 to 4 shown in Table 1. It can be seen that the first time slot subset allocated in the first time slot allocation information carried in the time slot set is {slot0}, and the ID of the client allocated to time slot 0 is 1. The second network overhead frame includes but is not limited to the time slot set of slots 0 to 4 shown in Table 2. It can be seen that the first time slot subset allocated in the second time slot allocation information carried in the time slot set is {slot1, slot2}, and the ID of the client allocated to time slots 1 and 2 is 2.

[0045] When communicating between a first network device and a second network device, the first network device sends a first network overhead frame as shown in Table 1 to the second network device, and the first network device receives a second network overhead frame as shown in Table 2 sent to it by the second network device at a predetermined time interval. When a new first client is added to the first network device and the ID number of the first client is 2, a first bandwidth such as 5G, 10G, etc. is pre-configured for the first client; then, based on the ID number 2 of the first client, a search is made in the second time slot allocation information to determine whether there is a time slot occupied by the client with ID 2, and a first search result is obtained. For example, the first search result in this embodiment is that there are time slots slot 1 and slot 2 occupied by the client with ID number 2 in the second network device. Based on the first search result and the first bandwidth pre-configured for the first client that has not been added to the first network device, a corresponding time slot is allocated to the first client in the first network device.

[0046] Through the above-described embodiment provided by this application, the first identifier of a newly added first client on a first network device is used to search for the time slot allocated to the first client on a second network device, obtaining a first search result. Then, based on the first search result and the first bandwidth configured for the first client on the first network device, a corresponding time slot is allocated to the first client on the first network device. This achieves the effect of dynamically allocating time slots to newly added clients, solves the problem of low accuracy that occurs during manual time slot configuration, and improves the accuracy of time slot allocation.

[0047] In an optional embodiment, allocating a corresponding time slot to the first client in the first network device according to the first search result and the first bandwidth includes:

[0048] When the first search result indicates that the second network device is found to be allocated to the first client in the second time slot subset and the third time slot subset has not been allocated in the first network device, obtaining a second bandwidth that is allowed to be configured by the first network device on the third time slot subset;

[0049] According to a bandwidth comparison relationship between the first bandwidth and the second bandwidth, a corresponding time slot is allocated to the first client in the first network device.

[0050] In this embodiment, the first network overhead frame and the second network overhead frame in Table 1 and Table 2 are still used as examples for explanation. Based on the ID number of the first client (e.g., ID is 2), the third time slot subset allocated to the first client in the second network device is found to be {slot1, slot2}, and when time slots slot1 and slot2 have not yet been allocated in the first network device, assuming that the bandwidth allowed to be configured in time slots slot1 and slot2 of the first network device is 10G, then by comparing the size relationship between the first bandwidth and the second bandwidth, dynamic time slot allocation can be implemented for the first client in the first network device.

[0051] As an optional implementation manner, allocating a corresponding time slot for the first client in the first network device according to a bandwidth comparison relationship between the first bandwidth and the second bandwidth includes at least one of the following:

[0052] When the first bandwidth is equal to the second bandwidth, allocating a third subset of time slots in the first network device to the first client in the first network device;

[0053] When the first bandwidth is less than the second bandwidth, allocating, in the first network device, a first portion of time slots in the third time slot subset to the first client in the first network device, wherein the bandwidth allowed to be configured by the first network device in the first portion of time slots is the first bandwidth;

[0054] When the first bandwidth is greater than the second bandwidth, the third subset of time slots and the second portion of time slots are allocated in the first network device to the first client in the first network device, wherein the second portion of time slots is part or all of the time slots in the target time slot set that are not allocated in the first network device and the second network device, and the total bandwidth allowed to be configured by the first network device on the third subset of time slots and the second portion of time slots is the first bandwidth.

[0055] Specifically, if Figure 3 The steps S304-S308 shown include the following three situations:

[0056] (1) When the bandwidth pre-configured for the newly added first device in the first network device is equal to the second bandwidth permitted to be configured by the first network device in the third time slot subset {slot1, slot2}, for example, the first bandwidth pre-configured for the first network device is 10G. And the time slot granularity of the first network device is 5G, then the second bandwidth permitted to be configured by the first network device in the third time slot subset {slot1, slot2} is 2*5G=10G, where the time slot granularity represents the bandwidth permitted to be configured in each time slot in the first network device.

[0057] At this time, the result of allocating time slots for the first client in the first network device is as shown in Table 3 below:

[0058] Table 3

[0059] Slot0 Slot1 Slot2 Slot3 Slot4 0x0001 0x0002 0x0002 0x0000 0x0000

[0060] It can be seen from Table 3 that when the first bandwidth is equal to the second bandwidth, the time slots allocated to the first client in the first network device are slot 1 and slot 2 respectively, and according to the time slot granularity of 5G, the bandwidth configured for slot 1 and slot 2 is 5G respectively, that is, slot 1 and slot 2 jointly bear the 10G bandwidth pre-configured for the first client.

[0061] (2) If Figure 3 In step S306-2, when the bandwidth pre-configured for the newly added first device end in the first network device is less than the second bandwidth allowed to be configured by the first network device on the third time slot subset {slot1, slot2}, for example, the first bandwidth pre-configured for the first network device is 5G, and the time slot granularity of the first network device is 5G.

[0062] At this time, the result of allocating time slots for the first client in the first network device is as shown in Table 4 below:

[0063] Table 4

[0064] Slot0 Slot1 Slot2 Slot3 Slot4 0x0001 0x0002 0x0000 0x0000 0x0000

[0065] As can be seen from Table 4, when the first bandwidth is smaller than the second bandwidth, since the time slot granularity of the first network device is 5G, it is only necessary to allocate time slot 1 to the pre-configured 5G bandwidth of the first client to meet the time slot allocation requirement for the first client.

[0066] (3) If Figure 3 In step S306-3, when the bandwidth pre-configured for the newly added first device end in the first network device is greater than the second bandwidth allowed to be configured by the first network device on the third time slot subset {slot1, slot2}, for example, the first bandwidth pre-configured for the first network device is 15G, and the time slot granularity of the first network device is 5G, then the second bandwidth allowed to be configured by the first network device on the third time slot subset {slot1, slot2} is 2*5G=10G.

[0067] At this time, the result of allocating time slots for the first client in the first network device is as shown in Table 5 below:

[0068] Table 5

[0069] Slot0 Slot1 Slot2 Slot3 Slot4 0x0001 0x0002 0x0002 0x0002 0x0000

[0070] As can be seen from Table 5, when the first bandwidth is greater than the second bandwidth, since the time slot granularity on the first network device is 5G, the third time slot subset {slot1, slot2} in the first network device can only accommodate 10G bandwidth. However, the pre-configured bandwidth for the newly added first customer in the first network device is 15G, so additional time slots need to be allocated to configure the remaining 5G bandwidth. For example, as shown in Table 5, some time slots (such as time slot 3) are selected from the time slot set {slot3, slot4} allocated to both the first network device and the second network device to accommodate the remaining 5G bandwidth.

[0071] Through the above-described embodiments provided by this application, when the first search result indicates that a client ID identical to the first client ID exists in a configured time slot in the second network device, time slot allocation can be achieved for the first client in the first network device simply by comparing the first bandwidth pre-configured in the first network device for the newly added first device end with the second bandwidth allowed to be configured by the first network device in the third time slot subset. This improves the efficiency of time slot allocation, avoids the low accuracy problem that occurs during manual time slot allocation, and improves the accuracy of time slot allocation.

[0072] In an optional embodiment, allocating, in the first network device, some of the time slots in the third time slot subset to the first client in the first network device includes:

[0073] In the order of time slot numbers from small to large, some of the time slots ranked first in the third time slot subset are allocated in the first network device to the first client in the first network device.

[0074] For the second situation in the above embodiment, when the bandwidth pre-configured for the newly added first device end in the first network device is less than the second bandwidth allowed to be configured by the first network device on the third time slot subset {slot1, slot2}, assuming that the first bandwidth is 5G and the second bandwidth is 10G, it is only necessary to select some time slots from the third time slot subset {slot1, slot2} to complete the configuration of the 5G bandwidth of the first client.

[0075] Furthermore, the time slot Slot1 with the earlier time slot number in the third time slot subset {Slot1, Slot2} is preferentially allocated to the first client in the first network device. It is understandable that whether Slot1 or Slot2 in the third time slot subset is selected, the 5G bandwidth configuration requirements for the first client can be met. However, in order to make the time slot allocation strategy in the embodiment of the present application more convenient to implement, in this embodiment, it is set to prioritize the allocation of the earlier time slot number to the first client in the order of the time slot number, thereby improving the consistency of the time slot allocation strategy and enhancing the versatility of the time slot allocation method.

[0076] As an optional implementation scheme, the above-mentioned time slot allocation method further includes:

[0077] When the first network device allocates a first portion of time slots in the third time slot subset to the first client in the first network device, sending first prompt information, wherein the first prompt information is used to indicate that the time slots allocated by the first network device and the second network device to the first client are inconsistent; and / or

[0078] When the first network device allocates the third time slot subset and the second part of the time slots to the first client in the first network device, second prompt information is sent, wherein the second prompt information is used to indicate that the time slots allocated by the first network device and the second network device to the first client are inconsistent.

[0079] In the embodiments as shown in Tables 1 to 5 above, when the first bandwidth (such as 5G) pre-configured for the newly added first device end in the first network device is smaller than the second bandwidth (such as 10G) allowed to be configured by the first network device on the third time slot subset {slot1, slot2}, the time slot allocated to the first client in the first network device is {slot1}, as shown in Table 4; and the time slot allocated to the first client in the second network device is {slot1, slot2}, as shown in Table 2; at this time, the system will send a prompt message that the time slots allocated to the first client at both ends are inconsistent, which is recorded as the first prompt message.

[0080] Based on the same principle, when the first bandwidth (such as 15G) pre-configured for the newly added first device end in the first network device is greater than the second bandwidth (such as 10G) allowed to be configured by the first network device on the third time slot subset {slot1, slot2}, the time slots allocated to the first client in the first network device are {slot1, slot2, slot3}, as shown in Table 4; and the time slots allocated to the first client in the second network device are {slot1, slot2}, as shown in Table 2; at this time, the system will send a prompt message that the time slots allocated to the first client by both ends are inconsistent, which is recorded as the second prompt message.

[0081] Through the above-mentioned embodiment provided by the present application, after the time slot of the first client is allocated, the time slot of the first client in the first network device and the second network device will also be checked. When the time slot allocation at both ends is inconsistent, an alarm prompt of inconsistent time slot allocation is issued, which is beneficial to ensure the consistency of time slot allocation at both ends when the number of clients in the network devices at both ends changes.

[0082] As an optional implementation scheme, allocating a corresponding time slot to the first client in the first network device according to the first search result and the first bandwidth includes:

[0083] When the first search result indicates that no time slot allocated to the first client is found in the second time slot subset, a fourth time slot subset that is not allocated to the first network device and the second network device in the target time slot set is obtained; a third bandwidth that is allowed to be configured on the first network device on the fourth time slot subset is obtained; and based on a bandwidth comparison relationship between the first bandwidth and the third bandwidth, a corresponding time slot is allocated to the first client in the first network device.

[0084] In this embodiment, when no time slot allocated to the first client is found from the second time slot subset of the second network device, for example, the second time slot subset shown in Table 6 below:

[0085] Table 6

[0086] Slot0 Slot1 Slot2 Slot3 Slot4 0x0001 0x0001 0x0001 0x0000 0x0000

[0087] According to the time slot allocation on the first network device at the current moment in Table 1 and the time slot allocation of the second time slot subset in Table 6, it can be obtained that the fourth time slot subset that is not allocated to the first network device and the second network device in the target time slot set is {slot3, slot4}.

[0088] Furthermore, based on the 5G timeslot granularity of the first network device, the third bandwidth allowed to be configured by the first network device in the fourth timeslot subset is the number of timeslots multiplied by the timeslot granularity, or 2*5G=10G. Based on the comparison between the first bandwidth configured for the first client on the first network device and the third bandwidth, the first network device allocates the corresponding timeslot to the first client.

[0089] As an optional implementation manner, allocating a corresponding time slot to the first client in the first network device based on the bandwidth comparison relationship between the first bandwidth and the third bandwidth includes at least one of the following:

[0090] When the first bandwidth is equal to the third bandwidth, allocating a fourth subset of time slots in the first network device to the first client in the first network device;

[0091] When the first bandwidth is smaller than the third bandwidth, the first network device allocates a third portion of time slots in the fourth time slot subset to the first client in the first network device, wherein the bandwidth allowed to be configured by the first network device in the third portion of time slots is the first bandwidth.

[0092] Specifically, if Figure 3 As shown, in steps S310-S314, when the first bandwidth configured for the first client on the first network device is 10G, and the common idle time slot set (i.e., the fourth time slot subset) of the first network device and the second network device is {slot3, slot4}, and the time slot granularity of the first network device is 5G, the fourth time slot subset {slot3, slot4} in the first network device is directly allocated to the first client, meeting the 10G allocation requirement of the first bandwidth pre-configured for the first client. The allocated time slots of the first network device are shown in Table 7 below:

[0093] Table 7

[0094] Slot0 Slot1 Slot2 Slot3 Slot4 0x0001 0x0000 0x0000 0x0002 0x0002

[0095] When the first bandwidth configured for the first client on the first network device is 5G, and the common idle time slot set (i.e., the fourth time slot subset) of the first network device and the second network device is {slot3, slot4}, and the time slot granularity of the first network device is 5G, only some time slots need to be selected from the fourth time slot subset {slot3, slot4} to be allocated to the first client, for example, only slot3. The allocated time slots of the first network device are shown in Table 8 below:

[0096] Table 8

[0097] Slot0 Slot1 Slot2 Slot3 Slot4 0x0001 0x0000 0x0000 0x0002 0x0000

[0098] It should be noted that when the first bandwidth configured for the first client on the first network device is 5G, if only from the perspective of satisfying the 5G bandwidth of the first client, only slot 4 in the fourth time slot subset {slot3, slot4} can be selected and allocated to the first client. The time slot of the first network device after allocation will not be described in detail here.

[0099] Furthermore, when the first bandwidth configured for the first client on the first network device is 25G, and the common idle time slot set (i.e., the fourth time slot subset) of the first network device and the second network device is {slot3, slot4}, and the time slot granularity of the first network device is 5G, since the bandwidth that needs to be configured for the first client in the first network device is 25G, and the remaining configurable bandwidth in the first network device is only 10G in the common idle time slot {slot3, slot4}, the system will send a prompt message that the bandwidth exceeds the configurable threshold, and will not allocate time slots to the first client in the first network device.

[0100] Through the above-described embodiments provided by this application, when the first search result indicates that there is no client ID identical to the first client ID number in the configured time slot in the second network device, time slot allocation can be achieved for the first client in the first network device simply by comparing the first bandwidth pre-configured for the newly added first device in the first network device with the third bandwidth allowed to be configured in the fourth time slot subset. Different time slot allocation strategies are formulated for different search results, thereby improving the applicability of the time slot allocation method and enhancing the accuracy of time slot allocation.

[0101] As an optional implementation scheme, the above-mentioned time slot allocation method further includes:

[0102] When the first network device allocates a third portion of time slots in the fourth time slot subset to the first client in the first network device, sending third prompt information, wherein the third prompt information is used to indicate that the time slots allocated by the first network device and the second network device to the first client are inconsistent; or

[0103] When the first bandwidth is greater than the third bandwidth, an alarm message is sent, wherein the alarm message is used to indicate that a time slot cannot be configured for the first client in the first network device.

[0104] In the above embodiment, when the first bandwidth is less than the third bandwidth, only time slot slot 3 in the fourth time slot subset {slot3, slot4} is allocated to the first client, as shown in Table 8 above; and the time slot allocated to the first client in the second network device is {slot1, slot2}, as shown in Table 2; at this time, the system will send a prompt message indicating that the time slots allocated to the first client by both ends are inconsistent, which is recorded as the third prompt message.

[0105] Based on the same principle, if the first bandwidth configured for the first client on the first network device is greater than the third bandwidth, the system will send a warning message indicating that the bandwidth has exceeded the configurable threshold and will not allocate a time slot to the first client on the first network device. This allows for timely notification if time slot allocations on the two network devices are inconsistent, allowing for the reallocation of time slots on both ends of the network device, thereby improving communication stability between the first and second network devices.

[0106] As an optional implementation scheme, after allocating a corresponding time slot to the first client in the first network device according to the first search result and the first bandwidth, the method further includes:

[0107] Obtaining a third network overhead frame and the first bandwidth sent from the first network device to the second network device, wherein the third network overhead frame carries third time slot allocation information, the third time slot allocation information indicating a fifth time slot subset allocated by the first network device in the target time slot set and an identifier of a client to which the fifth time slot subset is allocated, the identifier of the client to which the fifth time slot subset is allocated including the first identifier of the first client, and the fifth time slot subset including a time slot corresponding to the time slot allocated by the first network device to the first client;

[0108] According to the first identifier of the first client, searching the second time slot subset for a time slot allocated to the first client to obtain a second search result;

[0109] A time slot allocated to the first client is determined in the second network device according to the second search result and the first bandwidth.

[0110] It should be noted that after the first network device completes time slot allocation for the newly added first client, in order to maintain consistency between the time slot allocations for the first client on the first and second network devices, a time slot allocation must be performed again for the first client on the second network device according to the same time slot allocation strategy. However, since the time slots on the first network device change before and after the time slots are allocated to the first client, the third network overhead frame sent by the first network device to the second network in this embodiment is actually the result of an update to the first network overhead frame.

[0111] Specifically, in this embodiment, the third time slot allocation information indicates the fifth time slot subset allocated by the first network device in the target time slot set and the identifier of the client to which the fifth time slot subset is allocated. For example, in Table 3 of the above embodiment, the time slot subset {slot1, slot2, slot3} allocated by the first network device in the target time slot set {slot1, slot2, slot3, slot4, slot5} is recorded as the fifth time slot subset, and the client identifiers allocated to the fifth time slot subset include two ID identifiers, 1 and 2. The time slots allocated by the first network device to the first client are slot1 and slot2. Similarly, in Table 4 of the above embodiment, the fifth time slot subset allocated by the first network device in the target time slot set {slot1, slot2, slot3, slot4, slot5} is {slot1, slot2}, and the client identifiers allocated to the fifth time slot subset include two ID identifiers, 1 and 2, and the time slot allocated by the first network device to the first client is slot1.

[0112] It can be understood that, since in the aforementioned embodiments, time slots are allocated to the first client only in the first network device, and no time slot allocation operation is performed in the second network device, in this embodiment, the target time slot set of the second network device still remains in the state shown in Table 2 above.

[0113] Furthermore, the second subset of time slots allocated to the second network device in the target time slot set is still {slot1, slot2}. Based on the first identifier, the time slots allocated to the first client are found in the second subset of time slots as {slot1, slot2}, which is recorded as a second search result. Based on the second search result and the first bandwidth, the time slot allocated to the first client is determined in the second network device.

[0114] As an optional implementation scheme, determining the time slot allocated to the first client in the second network device based on the second search result and the first bandwidth includes:

[0115] When the second search result indicates that the third time slot subset allocated to the first client is found in the second time slot subset, obtaining a fourth bandwidth that the second network device is allowed to configure on the third time slot subset;

[0116] A time slot allocated to the first client is determined in the second network device according to a bandwidth comparison relationship between the first bandwidth and the fourth bandwidth.

[0117] Specifically, if Figure 4In step S402, the second search result is first determined to determine whether a third time slot subset allocated to the first client exists. For example, the third time slot subset allocated to the first client is also {slot1, slot2}, as found in the second time slot subset {slot1, slot2} in Table 2. Based on the time slot granularity of the second network device (assuming it is 5G) and the number of time slots allocated to the first client, 2, the fourth bandwidth allowed to be configured by the second network device on the third time slot subset is the number of time slots multiplied by the time slot granularity, i.e., 2*5G=10G.

[0118] It can be understood that, in this embodiment, the time slot granularity of the second network device is not limited. That is to say, the time slot granularity of the second network device can be equal to the time slot granularity of the first network device, or it can be larger or smaller than the time slot granularity of the first network device. The method for allocating time slots for the first client performed on the first network device or the second network device in each embodiment of the present application is based on the principle that the time slots configured by the network devices at both ends for the first client are consistent in position and bandwidth in the entire overhead frame (referring to the overall overhead frame of the first network device after configuration and the overall overhead frame of the second network device after configuration). In order to facilitate the understanding of the technical solution of the present application, in each embodiment of the present application, examples are given with the same time slot granularity of the first network device and the second network device.

[0119] Furthermore, by comparing the first bandwidth and the fourth bandwidth, it is possible to allocate a time slot for the first client in the second network device according to the comparison result.

[0120] By adopting the above technical solution, if the third time slot subset allocated to the first client is found in the second search result, the time slot allocated to the first client on the second network device can be determined based on the first bandwidth configured for the first client on the first network device and the fourth bandwidth allowed to be configured on the second network device for the third time slot subset. This improves the efficiency of time slot allocation, ensures that the table of changes in the number of clients on the network devices at both ends is kept, and can dynamically allocate time slots to the clients at both ends based on the changes in the status of the time slots on the network devices at both ends. This improves the accuracy of time slot allocation and enhances the stability of communication between network devices.

[0121] As an optional implementation scheme, the determining, in the second network device, of the time slot allocated to the first client based on the bandwidth comparison relationship between the first bandwidth and the fourth bandwidth includes at least one of the following:

[0122] When the first bandwidth is equal to the fourth bandwidth, determining the allocated third time slot subset as the time slot allocated to the first client in the second network device;

[0123] When the first bandwidth is less than the fourth bandwidth, determining, in the second network device, a third portion of time slots in the allocated third time slot subset as time slots allocated to the first client, wherein the bandwidth allowed to be configured by the second network device in the third portion of time slots is the first bandwidth;

[0124] When the first bandwidth is greater than the fourth bandwidth, the fourth portion of time slots in the second network device is allocated to the first client in the second network device, and the allocated third time slot subset and the fourth portion of time slots are determined in the second network device as time slots allocated to the first client, wherein the fourth portion of time slots is part or all of the time slots in the target time slot set that are not allocated in both the first network device and the second network device, determined based on the first time slot allocation information and the second time slot allocation information, and the total bandwidth allowed to be configured by the second network device on the third time slot subset and the fourth portion of time slots is the first bandwidth.

[0125] Specifically, if Figure 4 As shown, in steps S406-S408, there are three situations:

[0126] (1) If Figure 4 In step S406-1, when the bandwidth pre-configured for the newly added first device in the first network device is equal to the fourth bandwidth allowed to be configured by the second network device in the third time slot subset {slot1, slot2}, for example, the first bandwidth pre-configured for the first network device is 10G. And the time slot granularity of the second network device is 5G, then the fourth bandwidth allowed to be configured by the second network device in the third time slot subset {slot1, slot2} is 2*5G=10G, where the time slot granularity represents the bandwidth allowed to be configured in each time slot in the first network device.

[0127] At this time, the third time slot subset {slot1, slot2} allocated in the second network device can be directly determined as the time slot for the first client, without the need to re-execute the time slot allocation operation. Furthermore, the target time slot set on the second network device still maintains the time slot configuration state as shown in Table 2 above.

[0128] (2) If Figure 4 In step S406-2, when the first bandwidth pre-configured for the newly added first device end in the first network device is smaller than the fourth bandwidth allowed to be configured by the second network device on the third time slot subset {slot1, slot2}, for example, the first bandwidth pre-configured for the first client on the first network device is 5G, and the time slot granularity of the first network device and the second network device is both 5G.

[0129] At this point, since the first bandwidth pre-configured for the first client on the first network device is 5G, and the fourth bandwidth in the third time slot subset allocated on the second device is 10G, some of the time slots in the third time slot subset on the second network device can be directly determined as the time slots for the first client and recorded as the third partial time slots. There is no need to reallocate time slots for the first client on the second network device. Furthermore, the time slot allocation status of the target time slot set on the second network device remains as shown in Table 2 above.

[0130] It should be noted that in order to maintain the same time slot allocation principle as the first client on the first network device, the above-mentioned third part of time slots in this embodiment gives priority to slot 1 with a front time slot number in the third time slot subset to maintain consistency in time slot allocation of the network devices at both ends.

[0131] (3) If Figure 4 In step S406-3, when the first bandwidth pre-configured for the newly added first device end in the first network device is greater than the fourth bandwidth allowed to be configured on the second network device on the third time slot subset {slot1, slot2}, for example, the first bandwidth pre-configured for the first network device is 15G, and the time slot granularity of the first network device and the second network device is 5G, then the fourth bandwidth allowed to be configured on the second network device on the third time slot subset {slot1, slot2} is 2*5G=10G.

[0132] However, since the time slot allocation subset of the first client on the first network device is {slot1, slot2, slot3} as shown in Table 5 above, in addition to determining the allocated third time slot subset in the second network device as the time slot of the first client, it is also necessary to select some time slots from the target time slot set of the second network device as shown in Table 2 above and allocate them to the first client in the second network device, and record these some time slots as the fourth some time slots.

[0133] At this time, the result of allocating time slots for the first client in the second network device is as shown in Table 9 below:

[0134] Table 9

[0135] Slot0 Slot1 Slot2 Slot3 Slot4 0x0000 0x0002 0x0002 0x0000 0x0002

[0136] It should be noted that the fourth portion of time slots is determined based on the updated first time slot allocation information (including the target time slot set shown in Table 5) and the second time slot allocation information shown in Table 2. The target time slot set is a subset of the currently shared idle time slots on the first and second network devices, {slot4}. Since the time slot granularity of the second network device is 5G, time slot 4 on the second network device needs to be allocated to the first client. The second network device then uses the third time slot subset (carrying 10G bandwidth) and the fourth portion of time slots (carrying the remaining 5G of the first bandwidth 15G) to jointly allocate 15G bandwidth for the first client on the first network device.

[0137] Through the above-described embodiments provided by this application, when the second search result indicates that a client ID identical to the first client ID number is found in the updated first time slot subset of the first network device, time slot allocation can be achieved for the first client in the second network device simply by comparing the first bandwidth pre-configured for the newly added first device in the first network device with the fourth bandwidth allowed to be configured in the third time slot subset of the second network device. This effectively improves the efficiency of time slot allocation, fully considers the consistency of the time slot allocation of the first client on the first network device and the second network device, and improves the accuracy of time slot allocation.

[0138] As an optional implementation scheme, determining the time slot allocated to the first client in the second network device based on the second search result and the first bandwidth includes:

[0139] When the second search result indicates that no time slot allocated to the first client is found in the second time slot subset, obtaining a fourth time slot subset determined based on the first time slot allocation information and the second time slot allocation information, the target time slot set being unallocated in both the first network device and the second network device; and obtaining a fifth bandwidth allowed to be configured by the second network device on the fourth time slot subset.

[0140] A time slot allocated to the first client is determined in the second network device according to a bandwidth comparison relationship between the first bandwidth and the fifth bandwidth.

[0141] In this embodiment, when the time slot allocated to the first client is not found in the second time slot subset of the second network device, it is necessary to determine the common idle time slot subset of the target time slot set on the first network device and the second network device based on the updated first time slot allocation information (including the updated first time slot subset in Tables 3-5 above) and the second time slot allocation information, which is recorded as the fourth time slot subset.

[0142] According to the time slot granularity of the second network device, the fifth bandwidth allowed to be allocated by the second network device on the fourth time slot subset can be obtained, and according to the size relationship between the first bandwidth and the fifth bandwidth, the time slot allocated to the first client is determined in the second network device.

[0143] As an optional real-time method, the determining, in the second network device, the time slot allocated to the first client based on the bandwidth comparison relationship between the first bandwidth and the fifth bandwidth includes:

[0144] When the first bandwidth is equal to the fifth bandwidth, allocating, in the second network device, a fourth subset of time slots to the first client in the second network device, wherein the fourth subset of time slots is determined to be time slots allocated in the second network device for the first client;

[0145] When the first bandwidth is less than the fifth bandwidth, the fifth portion of time slots in the fourth time slot subset is allocated in the second network device to the first client in the second network device, wherein the bandwidth allowed to be configured by the second network device in the fifth portion of time slots is the first bandwidth, and the fifth portion of time slots is determined to be the time slots allocated to the first client in the second network device.

[0146] Specifically, if Figure 4 In steps S410-S416, when the first bandwidth is equal to the fifth bandwidth, for example, the first bandwidth is 10G, and the time slot granularity of the first network device and the second network device is both 5G, based on the time slot allocation of the first network device shown in Table 3 and the time slot allocation of the second network device shown in Table 2, a common idle time slot subset of the first and second network devices is obtained as {slot3, slot4}, which is recorded as the fourth time slot subset. Time slots Slot3 and Slot4 in the fourth time slot subset are allocated to the first client in the second network device.

[0147] When the first bandwidth is less than the fifth bandwidth, for example, the first bandwidth is 5G, and the time slot granularity of the first network device and the second network device are both 5G, based on the time slot allocation of the first network device shown in Table 4 and the time slot allocation of the second network device shown in Table 2, the shared idle time slot subset of the first and second network devices is {slot3, slot4}, recorded as the fourth time slot subset. Based on the time slot granularity of the second network device, the bandwidth allowed to be configured in the fourth time slot subset of the second network device is 10G, while the bandwidth of the first client in the first network device is 5G. Therefore, only a portion of the time slots in the fourth time slot subset (i.e., the fifth portion of the time slots) need to be allocated to the first client in the second network device.

[0148] It should be noted that the fifth portion of time slots in this embodiment generally refers to slot 3, the first-numbered time slot in the fourth time slot subset. This is intended to maintain the same time slot allocation rules as those in the first network device. This helps maintain consistency in time slot allocation between the first and second network devices even when the number of clients on one end of the network device changes, thereby achieving the technical effect of improving the accuracy of time slot allocation.

[0149] It is understood that, based on the analysis of the various embodiments for allocating time slots for the first client on the first network device described above, in the various embodiments for allocating time slots for the first client on the second network device described above, based on the same principle, when the first bandwidth is less than or greater than the fourth bandwidth, and when the first bandwidth is less than or greater than the fifth bandwidth, the system will send an alarm indicating that the time slots are inconsistent or the bandwidth exceeds a configurable threshold. The specific and similar detailed process for sending the alarm message can be found in the aforementioned time slot allocation scheme for the first network device, and will not be further described here.

[0150] Obviously, the embodiments described above are only part of the embodiments of the present invention, rather than all the embodiments. In order to better understand the above-mentioned time slot allocation method, the above-mentioned process is described below in conjunction with the embodiments, but it is not intended to limit the technical solutions of the embodiments of the present invention. Specifically:

[0151] In an optional embodiment, Figure 5 4 is a flow chart of a time slot allocation method according to a specific embodiment of the present invention, which specifically includes:

[0152] The first network device communicates with the second network device, and both ends operate in FlexE mode.

[0153] Step S502: The first network device sends a FlexE overhead frame to the second network device, and the overhead frame carries usage status of each time slot.

[0154] In step S504, the second network device sends a FlexE overhead frame to the first network device, and the overhead frame carries usage information of each time slot.

[0155] Step S506: A collection of unused timeslots in FlexE overhead frames sent and received by the first network device is obtained. The timeslots in this collection are arranged in ascending order according to the instance order to obtain a sequence A. The number of timeslots N1 in sequence A multiplied by the timeslot granularity M1 is the configurable maximum bandwidth W1.

[0156] Step S508: A collection of unused timeslots in the FlexE overhead frames sent and received by the second network device is obtained. The timeslots in this collection are arranged in ascending order according to the instance order to obtain a sequence B. The number of timeslots N2 in sequence B multiplied by the timeslot granularity M2 is the configurable maximum bandwidth W2.

[0157] Step S510: The first network device adds a client and configures the client ID and bandwidth. The first network device reads the overhead frame information received from the peer end. If the received overhead frame contains the same client ID, the time slots occupied by the client ID are sorted in ascending order by instance, resulting in Sequence C. If the configured bandwidth matches the bandwidth for the same client ID in the received overhead frame, the system dynamically allocates the time slots in Sequence C corresponding to the same client ID in the received overhead frame. If the configured bandwidth is greater than the bandwidth for the same client ID in the received overhead frame, the system dynamically allocates the time slots in Sequence C corresponding to the same client ID in the received overhead frame, supplementing the remaining bandwidth from Sequence A, and issues an alarm log indicating that the time slots for the same client ID are inconsistent. If the configured bandwidth is less than the bandwidth for the same client ID in the received overhead frame, the system dynamically allocates the first time slots in Sequence C corresponding to the same client ID in the received overhead frame based on the bandwidth, and issues an alarm log indicating that the time slots for the same client ID are inconsistent. The first network device reads the overhead frame information received from the other end. If the received overhead frame does not contain the same client ID, and the configured bandwidth is less than or equal to bandwidth W1, the system dynamically allocates the first time slot in the unused time slot collection sequence A according to the bandwidth; when the configured bandwidth is greater than bandwidth W1, an error message is reported that the bandwidth exceeds the configurable value.

[0158] Step S512: The first network device sends a FlexE overhead frame to the second network device, and the overhead frame carries the usage of each time slot; updates the sequence A, the number of time slots N1, the time slot granularity M1, and the bandwidth W1.

[0159] Step S514: The second network device sends a FlexE overhead frame to the first network device, and the overhead frame carries the usage of each time slot; updates the sequence B, the number of time slots N2, the time slot granularity M2, and the bandwidth W2.

[0160] Step S516: Obtain a collection of unused time slots in the FlexE overhead frames sent and received by the first network device to obtain a collection of unused time slots. Arrange the time slots in this collection in ascending order according to the instance order to obtain a sequence A.

[0161] Step S518: Take the unused time slots in the FlexE overhead frames sent and received by the second network device to obtain a set of unused time slots. Arrange the time slots in this set in ascending order according to the instance order to obtain a sequence B.

[0162] Step S520: The second device configures the same client ID and bandwidth. The second network device reads the overhead frame information received from the other end. If the received overhead frame contains the same client ID, the time slots occupied by the client ID are sorted in ascending order by instance, obtaining Sequence D. If the set bandwidth matches the bandwidth for the same client ID in the received overhead frame, the system dynamically allocates the Sequence D time slot corresponding to the same client ID in the received overhead frame. If the set bandwidth is greater than the bandwidth for the same client ID in the received overhead frame, the system dynamically allocates the Sequence D time slot corresponding to the same client ID in the received overhead frame, supplementing the remaining bandwidth from Sequence B, and generating an alarm log indicating that the time slots for the same client ID on both sides are inconsistent. If the set bandwidth is less than the bandwidth for the same client ID in the received overhead frame, the system dynamically allocates the first time slot in Sequence D corresponding to the same client ID in the received overhead frame based on the bandwidth, and generates an alarm log indicating that the time slots for the same client ID on both sides are inconsistent. The second network device reads the overhead frame information received from the other end. If the received overhead frame does not contain the same client ID, and the configured bandwidth is less than or equal to bandwidth W2, the system dynamically allocates the first time slot in the unused time slot collection sequence B according to the bandwidth; when the configured bandwidth is greater than bandwidth W2, an error message is reported that the bandwidth exceeds the configurable value.

[0163] In this solution, the first network device and the second network device are not distinguished between active and standby. Subsequently, the FlexE Groups at both ends perform normal active and standby table switching.

[0164] Through the above-mentioned embodiment provided by the present application, the client identifier of the newly added first client on the first network device is used to search for the time slot allocated to the first client on the second network device, obtaining a first search result. Then, based on the first search result and the first bandwidth configured for the first client on the first network device, a corresponding time slot is allocated to the first client on the first network device. Then, based on the time slot allocated to the first client on the first network device, a corresponding time slot is allocated to the first client on the second network device, thereby achieving the effect of dynamically allocating time slots to the newly added client, solving the problem of low accuracy that occurs during the manual configuration of time slots, and improving the accuracy of time slot allocation.

[0165] Through the description of the above embodiments, those skilled in the art can clearly understand that the method according to the above embodiment can be implemented by means of software plus the necessary general hardware platform, and of course it can also be implemented by hardware, but in many cases the former is a better implementation method. Based on this understanding, the technical solution of the present invention, or the part that contributes to the prior art, can be embodied in the form of a software product, which is stored in a storage medium (such as ROM / RAM, magnetic disk, optical disk), and includes a number of instructions for enabling a terminal device (which can be a mobile phone, computer, server, or network device, etc.) to execute the methods of various embodiments of the present invention.

[0166] In the present embodiment, a time slot allocation device is also provided, which is used to implement the above-mentioned embodiment and preferred embodiment. The details already described will not be repeated here. As used below, the term "module" can implement a combination of software and / or hardware for a predetermined function. Although the equipment described in the following embodiments is preferably implemented with software, the implementation of hardware, or a combination of software and hardware, is also possible and contemplated.

[0167] Figure 6 1 is a structural block diagram of a time slot allocation device according to an embodiment of the present invention, the device comprising:

[0168] The first processing unit 602 is configured to send a first network overhead frame from the first network device to the second network device, and obtain a second network overhead frame sent by the second network device to the first network device, wherein the first network overhead frame carries first time slot allocation information, the first time slot allocation information indicating a first time slot subset allocated by the first network device in the target time slot set and an identifier of a client to which the first time slot subset is allocated, and the second network overhead frame carries second time slot allocation information indicating a second time slot subset allocated by the second network device in the target time slot set and an identifier of a client to which the second time slot subset is allocated;

[0169] An acquiring unit 604 is configured to acquire a first identifier of a first client newly added on the first network device and a first bandwidth configured for the first client;

[0170] A searching unit 606 is configured to search, according to the first identifier of the first client, for a time slot allocated to the first client in the second time slot subset indicated by the second time slot allocation information, to obtain a first search result;

[0171] The allocating unit 608 is configured to allocate a corresponding time slot to the first client in the first network device according to the first search result and the first bandwidth.

[0172] Optionally, the allocating unit 608 further includes:

[0173] a first processing module, configured to, when the first search result indicates that a third time slot subset allocated by the second network device to the first client is found in the second time slot subset and the third time slot subset has not been allocated in the first network device, obtain a second bandwidth that is allowed to be configured by the first network device on the third time slot subset;

[0174] The first allocation module is configured to allocate a corresponding time slot to the first client in the first network device according to a bandwidth comparison relationship between the first bandwidth and the second bandwidth.

[0175] Optionally, the first allocation module further includes at least one of the following:

[0176] a first allocating submodule, configured to allocate, in the first network device, a third subset of time slots to a first client in the first network device when the first bandwidth is equal to the second bandwidth;

[0177] a second allocating submodule, configured to allocate, in the first network device, a first portion of time slots in the third time slot subset to a first client in the first network device when the first bandwidth is less than the second bandwidth, wherein the bandwidth allowed to be configured by the first network device in the first portion of time slots is the first bandwidth;

[0178] A third allocation submodule is configured to allocate, in the first network device, a third subset of time slots and a second portion of time slots to a first client in the first network device when the first bandwidth is greater than the second bandwidth, wherein the second portion of time slots is part or all of the time slots in the target time slot set that are not allocated in both the first network device and the second network device, and the total bandwidth allowed to be configured by the first network device on the third subset of time slots and the second portion of time slots is the first bandwidth.

[0179] Optionally, allocating, in the first network device, some of the time slots in the third time slot subset to the first client in the first network device includes:

[0180] The fourth allocation submodule is configured to allocate, in the first network device, some of the time slots ranked first in the third time slot subset in ascending order of the time slot numbers to the first client in the first network device.

[0181] Optionally, the above-mentioned time slot allocation method further includes:

[0182] A first sending module is configured to send a first prompt message when the first network device allocates a first part of the time slots in the third time slot subset to the first client in the first network device, wherein the first prompt message is used to indicate that the time slots allocated by the first network device and the second network device to the first client are inconsistent; and / or

[0183] The second sending module is used to send a second prompt message when the third time slot subset and the second part of the time slots are allocated to the first client in the first network device in the first network device, wherein the second prompt message is used to indicate that the time slots allocated by the first network device and the second network device to the first client are inconsistent.

[0184] Optionally, allocating a corresponding time slot to the first client in the first network device according to the first search result and the first bandwidth includes:

[0185] A first acquisition module is configured to acquire a fourth subset of time slots that are not allocated to the first network device and the second network device in the target time slot set when the first search result indicates that no time slot allocated to the first client is found in the second subset of time slots;

[0186] A second acquisition module is configured to acquire a third bandwidth that is allowed to be configured by the first network device on the fourth time slot subset;

[0187] The fifth allocation submodule is configured to allocate a corresponding time slot to the first client in the first network device according to a bandwidth comparison relationship between the first bandwidth and the third bandwidth.

[0188] Optionally, allocating a corresponding time slot to the first client in the first network device based on the bandwidth comparison relationship between the first bandwidth and the third bandwidth includes at least one of the following:

[0189] a sixth allocation submodule, configured to allocate, in the first network device, the fourth time slot subset to the first client in the first network device when the first bandwidth is equal to the third bandwidth;

[0190] The seventh allocation submodule is used to allocate, in the first network device, a third portion of time slots in the fourth time slot subset to the first client in the first network device when the first bandwidth is less than the third bandwidth, wherein the bandwidth allowed to be configured by the first network device in the third portion of time slots is the first bandwidth.

[0191] Optionally, the above-mentioned time slot allocation method further includes:

[0192] A third sending module is configured to send third prompt information when the first network device allocates a third portion of time slots in the fourth time slot subset to the first client in the first network device, wherein the third prompt information is used to indicate that the time slots allocated by the first network device and the second network device to the first client are inconsistent; or

[0193] The fourth sending module is configured to send an alarm message when the first bandwidth is greater than the third bandwidth, wherein the alarm message is used to indicate that a time slot cannot be configured for the first client in the first network device.

[0194] Optionally, after allocating a corresponding time slot to the first client in the first network device according to the first search result and the first bandwidth, the method further includes:

[0195] a third acquisition module, configured to acquire a third network overhead frame and the first bandwidth sent from the first network device to the second network device, wherein the third network overhead frame carries third time slot allocation information, the third time slot allocation information indicating a fifth time slot subset allocated by the first network device in the target time slot set and an identifier of a client to which the fifth time slot subset is allocated, the identifier of the client to which the fifth time slot subset is allocated including the first identifier of the first client, and the fifth time slot subset including a time slot corresponding to the time slot allocated by the first network device to the first client;

[0196] A first search module is configured to search, in the second time slot subset, for a time slot allocated to the first client according to the first identifier of the first client, to obtain a second search result;

[0197] The first determining module is configured to determine, in the second network device, a time slot allocated to the first client according to the second search result and the first bandwidth.

[0198] Optionally, determining, in the second network device, a time slot allocated to the first client based on the second search result and the first bandwidth includes:

[0199] a second search module configured to obtain a fourth bandwidth that the second network device is allowed to configure on the third time slot subset when the second search result indicates that the third time slot subset allocated to the first client is found in the second time slot subset;

[0200] The second determining module is configured to determine, in the second network device, a time slot allocated to the first client according to a bandwidth comparison relationship between the first bandwidth and the fourth bandwidth.

[0201] Optionally, the determining, in the second network device, of a time slot allocated to the first client based on the bandwidth comparison relationship between the first bandwidth and the fourth bandwidth includes at least one of the following:

[0202] a third determining module, configured to determine, in the second network device, the allocated third time slot subset as the time slots allocated to the first client when the first bandwidth is equal to the fourth bandwidth;

[0203] a fourth determining module, configured to determine, in the second network device, a third portion of time slots in the allocated third time slot subset as time slots allocated to the first client when the first bandwidth is less than the fourth bandwidth, wherein the bandwidth allowed to be configured by the second network device in the third portion of time slots is the first bandwidth;

[0204] The second processing module is configured to allocate the fourth portion of time slots in the second network device to the first client in the second network device when the first bandwidth is greater than the fourth bandwidth, and determine the allocated third time slot subset and the fourth portion of time slots in the second network device as time slots allocated to the first client, wherein the fourth portion of time slots is part or all of the time slots in the target time slot set that are not allocated in both the first network device and the second network device, determined based on the first time slot allocation information and the second time slot allocation information, and the total bandwidth allowed to be configured by the second network device on the third time slot subset and the fourth portion of time slots is the first bandwidth.

[0205] Optionally, determining, in the second network device, a time slot allocated to the first client based on the second search result and the first bandwidth includes:

[0206] a fourth acquisition module, configured to, when the second search result indicates that no time slot allocated to the first client is found in the second time slot subset, acquire a fourth time slot subset determined according to the first time slot allocation information and the second time slot allocation information, the target time slot set being unallocated in both the first network device and the second network device;

[0207] a fifth obtaining module, configured to obtain a fifth bandwidth that is allowed to be configured by the second network device on the fourth time slot subset;

[0208] The fifth determining module is configured to determine, in the second network device, a time slot allocated to the first client according to a bandwidth comparison relationship between the first bandwidth and the fifth bandwidth.

[0209] Optionally, the determining, in the second network device, a time slot allocated to the first client based on the bandwidth comparison relationship between the first bandwidth and the fifth bandwidth includes:

[0210] a third processing module, configured to allocate, in the second network device, a fourth subset of time slots to the first client in the second network device when the first bandwidth is equal to the fifth bandwidth, wherein the fourth subset of time slots is determined to be time slots allocated to the first client in the second network device;

[0211] The fourth processing module is configured to allocate, in the second network device, a fifth portion of time slots in the fourth time slot subset to the first client in the second network device when the first bandwidth is less than the fifth bandwidth, wherein the bandwidth allowed to be configured by the second network device on the fifth portion of time slots is the first bandwidth, and the fifth portion of time slots is determined to be the time slots allocated to the first client in the second network device.

[0212] An embodiment of the present invention further provides a computer-readable storage medium, in which a computer program is stored. The computer program is configured to execute the steps of any one of the above method embodiments when running.

[0213] Optionally, in this embodiment, the storage medium may be configured to store a computer program for performing the following steps:

[0214] S1. Sending a first network overhead frame from a first network device to a second network device, and obtaining a second network overhead frame sent by the second network device to the first network device, wherein the first network overhead frame carries first time slot allocation information, the first time slot allocation information indicating a first time slot subset allocated by the first network device in a target time slot set and an identifier of a client to which the first time slot subset is allocated, and the second network overhead frame carries second time slot allocation information indicating a second time slot subset allocated by the second network device in the target time slot set and an identifier of a client to which the second time slot subset is allocated;

[0215] S2: Obtain a first identifier of a first client newly added on the first network device and a first bandwidth configured for the first client;

[0216] S3, searching, according to the first identifier of the first client, for a time slot allocated to the first client in the second time slot subset indicated by the second time slot allocation information, to obtain a first search result;

[0217] S4: Allocate a corresponding time slot for the first client in the first network device according to the first search result and the first bandwidth.

[0218] 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.

[0219] 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 here.

[0220] An embodiment of the present invention further provides an electronic device, comprising a memory and a processor, wherein the memory stores a computer program, and the processor is configured to run the computer program to execute the steps in any one of the above method embodiments.

[0221] Optionally, in this embodiment, the processor may be configured to execute the following steps through a computer program:

[0222] S1. Sending a first network overhead frame from a first network device to a second network device, and obtaining a second network overhead frame sent by the second network device to the first network device, wherein the first network overhead frame carries first time slot allocation information, the first time slot allocation information indicating a first time slot subset allocated by the first network device in a target time slot set and an identifier of a client to which the first time slot subset is allocated, and the second network overhead frame carries second time slot allocation information indicating a second time slot subset allocated by the second network device in the target time slot set and an identifier of a client to which the second time slot subset is allocated;

[0223] S2: Obtain a first identifier of a first client newly added on the first network device and a first bandwidth configured for the first client;

[0224] S3, searching, according to the first identifier of the first client, for a time slot allocated to the first client in the second time slot subset indicated by the second time slot allocation information, to obtain a first search result;

[0225] S4: Allocate a corresponding time slot for the first client in the first network device according to the first search result and the first bandwidth.

[0226] 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.

[0227] 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 here.

[0228] Obviously, those skilled in the art will appreciate that the various modules or steps of the present invention described above can be implemented using a general-purpose computing device, can be centralized on a single computing device, or can be distributed across a network of multiple computing devices. They can be implemented using program code executable by the computing device, and thus, can be stored in a storage device and executed by the computing device. In some cases, the steps shown or described herein can be performed in a different order than that shown, or can be fabricated as separate integrated circuit modules, or multiple modules or steps can be fabricated as a single integrated circuit module. Thus, the present invention is not limited to any particular combination of hardware and software.

[0229] The foregoing description is merely a preferred embodiment of the present invention and is not intended to limit the present invention. Those skilled in the art will readily appreciate that various modifications and variations of the present invention are possible. Any modifications, equivalent substitutions, or improvements made within the principles of the present invention are intended to be within the scope of protection of the present invention.

Claims

1. A time slot allocation method, characterized in that: include: Sending a first network overhead frame from a first network device to a second network device, and obtaining a second network overhead frame sent by the second network device to the first network device, wherein the first network overhead frame carries first time slot allocation information, the first time slot allocation information indicating a first time slot subset allocated by the first network device in a target time slot set and an identifier of a client to which the first time slot subset is allocated, and the second network overhead frame carries second time slot allocation information indicating a second time slot subset allocated by the second network device in the target time slot set and an identifier of a client to which the second time slot subset is allocated; Obtaining, on the first network device, a first identifier of a first client newly added and a first bandwidth configured for the first client; searching, according to the first identifier of the first client, for a time slot allocated to the first client in the second time slot subset indicated by the second time slot allocation information, to obtain a first search result; According to the first search result and the first bandwidth, a corresponding time slot is allocated to the first client in the first network device.

2. The method according to claim 1, allocating a corresponding time slot for the first client in the first network device according to the first search result and the first bandwidth, comprising: When the first search result indicates that the second network device has been allocated to the first client in the second time slot subset and the third time slot subset has not been allocated in the first network device, obtaining a second bandwidth that the first network device is allowed to configure on the third time slot subset; According to a bandwidth comparison relationship between the first bandwidth and the second bandwidth, a corresponding time slot is allocated to the first client in the first network device.

3. The method according to claim 2, wherein allocating a corresponding time slot to the first client in the first network device based on the bandwidth comparison relationship between the first bandwidth and the second bandwidth comprises at least one of the following: When the first bandwidth is equal to the second bandwidth, allocating the third subset of time slots to the first client in the first network device in the first network device; When the first bandwidth is less than the second bandwidth, allocating, in the first network device, a first portion of time slots in the third time slot subset to the first client in the first network device, wherein the bandwidth allowed to be configured by the first network device in the first portion of time slots is the first bandwidth; When the first bandwidth is greater than the second bandwidth, the third subset of time slots and the second portion of time slots are allocated to the first client in the first network device in the first network device, wherein the second portion of time slots is part or all of the time slots in the target time slot set that are not allocated in the first network device and the second network device, and the total bandwidth allowed to be configured by the first network device on the third subset of time slots and the second portion of time slots is the first bandwidth.

4. The method according to claim 3, allocating, in the first network device, some of the time slots in the third time slot subset to the first client in the first network device, comprising: In the first network device, the portion of time slots ranked at the top of the third time slot subset is allocated to the first client in the first network device in an ascending order of time slot numbers.

5. The method according to claim 3, further comprising: When the first network device allocates a first portion of the time slots in the third time slot subset to the first client in the first network device, sending first prompt information, wherein the first prompt information is used to indicate that the time slots allocated by the first network device and the second network device to the first client are inconsistent; and / or When the third time slot subset and the second part of the time slots are allocated to the first client in the first network device in the first network device, second prompt information is sent, wherein the second prompt information is used to indicate that the time slots allocated to the first client by the first network device and the second network device are inconsistent.

6. The method according to claim 1, allocating a corresponding time slot for the first client in the first network device according to the first search result and the first bandwidth, comprising: When the first search result indicates that no time slot allocated to the first client is found in the second time slot subset, obtaining a fourth time slot subset that is not allocated to the first network device and the second network device in the target time slot set; Acquire a third bandwidth that the first network device is allowed to configure on the fourth time slot subset; According to a bandwidth comparison relationship between the first bandwidth and the third bandwidth, a corresponding time slot is allocated to the first client in the first network device.

7. The method according to claim 6, wherein allocating a corresponding time slot to the first client in the first network device based on the bandwidth comparison relationship between the first bandwidth and the third bandwidth comprises at least one of the following: When the first bandwidth is equal to the third bandwidth, allocating the fourth subset of time slots to the first client in the first network device in the first network device; In a case where the first bandwidth is smaller than the third bandwidth, a third portion of time slots in the fourth time slot subset is allocated in the first network device to the first client in the first network device, wherein: The bandwidth allowed to be configured by the first network device in the third part of the time slot is the first bandwidth.

8. The method according to claim 7, further comprising: When the first network device allocates a third portion of time slots in the fourth time slot subset to the first client in the first network device, sending third prompt information, wherein the third prompt information is used to indicate that the time slots allocated by the first network device and the second network device to the first client are inconsistent; or In a case where the first bandwidth is greater than the third bandwidth, an alarm message is sent, wherein the alarm message is used to indicate that a time slot cannot be configured for the first client in the first network device.

9. The method according to claim 1, after allocating a corresponding time slot for the first client in the first network device according to the first search result and the first bandwidth, the method further comprises: Obtaining a third network overhead frame and the first bandwidth sent from the first network device to the second network device, wherein the third network overhead frame carries third time slot allocation information, the third time slot allocation information indicating a fifth time slot subset allocated by the first network device in the target time slot set and an identifier of a client to which the fifth time slot subset is allocated, the identifier of the client to which the fifth time slot subset is allocated including the first identifier of the first client, and the fifth time slot subset including a time slot corresponding to the time slot allocated by the first network device to the first client; searching, according to the first identifier of the first client, in the second subset of time slots for a time slot allocated to the first client, to obtain a second search result; A time slot allocated to the first client is determined in the second network device according to the second search result and the first bandwidth.

10. The method according to claim 9, wherein determining, in the second network device, a time slot allocated to the first client based on the second search result and the first bandwidth comprises: When the second search result indicates that a third time slot subset allocated to the first client is found in the second time slot subset, obtaining a fourth bandwidth that the second network device is allowed to configure on the third time slot subset; A time slot allocated to the first client is determined in the second network device according to a bandwidth comparison relationship between the first bandwidth and the fourth bandwidth.

11. The method according to claim 10, wherein determining, in the second network device, a time slot allocated to the first client based on a bandwidth comparison relationship between the first bandwidth and the fourth bandwidth comprises at least one of the following: In a case where the first bandwidth is equal to the fourth bandwidth, determining, in the second network device, the allocated third time slot subset as the time slots allocated to the first client; When the first bandwidth is less than the fourth bandwidth, determining, in the second network device, a third portion of time slots in the allocated third time slot subset as time slots allocated to the first client, wherein the bandwidth allowed to be configured by the second network device in the third portion of time slots is the first bandwidth; When the first bandwidth is greater than the fourth bandwidth, the fourth portion of time slots in the second network device is allocated to the first client in the second network device, and the allocated third time slot subset and the fourth portion of time slots are determined in the second network device as time slots allocated to the first client, wherein the fourth portion of time slots is part or all of the time slots in the target time slot set that are not allocated in the first network device and the second network device, determined based on the first time slot allocation information and the second time slot allocation information, and the total bandwidth allowed to be configured by the second network device on the third time slot subset and the fourth portion of time slots is the first bandwidth.

12. The method according to claim 9, wherein determining, in the second network device, a time slot allocated to the first client based on the second search result and the first bandwidth comprises: When the second search result indicates that no time slot allocated to the first client is found in the second time slot subset, obtaining a fourth time slot subset determined according to the first time slot allocation information and the second time slot allocation information, wherein the target time slot set is not allocated in either the first network device or the second network device; Acquire a fifth bandwidth that the second network device is allowed to configure on the fourth time slot subset; A time slot allocated to the first client is determined in the second network device according to a bandwidth comparison relationship between the first bandwidth and the fifth bandwidth.

13. The method according to claim 12, wherein determining, in the second network device, a time slot allocated to the first client based on a bandwidth comparison relationship between the first bandwidth and the fifth bandwidth comprises: When the first bandwidth is equal to the fifth bandwidth, allocating, in the second network device, the fourth subset of time slots to the first client in the second network device, wherein the fourth subset of time slots is determined to be the time slots allocated to the first client in the second network device; When the first bandwidth is less than the fifth bandwidth, a fifth portion of time slots in the fourth time slot subset is allocated in the second network device to the first client in the second network device, wherein the bandwidth allowed to be configured by the second network device in the fifth portion of time slots is the first bandwidth, and the fifth portion of time slots is determined to be the time slots allocated to the first client in the second network device.

14. A time slot allocation device, characterized in that: include: a first processing unit, configured to send a first network overhead frame from a first network device to a second network device, and obtain a second network overhead frame sent by the second network device to the first network device, wherein the first network overhead frame carries first time slot allocation information, the first time slot allocation information indicating a first time slot subset allocated by the first network device in a target time slot set and an identifier of a client to which the first time slot subset is allocated, and the second network overhead frame carries second time slot allocation information indicating a second time slot subset allocated by the second network device in the target time slot set and an identifier of a client to which the second time slot subset is allocated; An acquiring unit, configured to acquire a first identifier of a first client newly added on the first network device and a first bandwidth configured for the first client; a searching unit, configured to search, according to the first identifier of the first client, for a time slot allocated to the first client in the second time slot subset indicated by the second time slot allocation information, to obtain a first search result; An allocating unit is configured to allocate a corresponding time slot to the first client in the first network device according to the first search result and the first bandwidth.

15. A computer-readable storage medium, characterized in that The computer-readable storage medium includes a stored program, wherein the method according to any one of claims 1 to 13 is executed when the program is executed.

16. An electronic device comprising a memory and a processor, characterized in that: A computer program is stored in the memory, and the processor is configured to execute the method according to any one of claims 1 to 13 through the computer program.

Citation Information

Patent Citations

  • Method and device for transmitting service flow based on flexible Ethernet FlexE

    CN109981208A

  • Protection switching method, network equipment and system

    CN112165427A