Data transmission method, device, equipment, system and medium

By mapping the response message generated by the first OTN device with the changes in stored data, the problem of low efficiency in long-distance transmission of OTN devices is solved, and more efficient and reliable data transmission is achieved.

CN121643976APending Publication Date: 2026-03-10HUAWEI TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-09-05
Publication Date
2026-03-10

AI Technical Summary

Technical Problem

During long-distance transmission between OTN devices, the transmission time of service data and response messages is too long, resulting in low transmission efficiency of OTN devices.

Method used

The first OTN device generates a response message based on its own storage space occupancy information, instructing the sending device whether to continue sending service data, thereby reducing the waiting time of the sending device. It also maps service data to OTN frames by storing data changes, thus improving transmission efficiency and reliability.

Benefits of technology

By generating response messages locally, the waiting time of the sending device is shortened, the transmission efficiency of the OTN device is improved, and the possibility of data loss is reduced through precise mapping, thereby improving the reliability of data transmission.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121643976A_ABST
    Figure CN121643976A_ABST
Patent Text Reader

Abstract

The invention discloses a data transmission method, device, equipment, system and medium, and belongs to the technical field of optical communication. The method comprises the following steps: a first OTN device receives service data sent by a sending device; storing the service data in a first storage space of the first OTN device, wherein the first storage space is used for storing the service data sent by the sending device to a receiving device; generating a first response message according to the occupation information of the first storage space, the first response message being used for indicating whether the sending device continues to send service data; and sending the first response message to the sending device. The method is beneficial for improving the transmission efficiency of the OTN equipment.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of optical communication technology, and in particular to a data transmission method, apparatus, device, system and medium. Background Technology

[0002] With the rapid development of communication technology, optical transport network (OTN) has become the mainstream technology for transport networks due to its advantages such as flexible scheduling and management of high-capacity services. OTN can be applied to backbone networks, metropolitan area core networks, aggregation networks, and access networks.

[0003] In related technologies, the process of a transmitting device sending service data to a receiving device via OTN typically includes the following steps: the transmitting device first sends the service data to a first OTN device; the first OTN device maps the received service data into an OTN frame and then sends the OTN frame to a second OTN device; the second OTN device demaps the received OTN frame to obtain the service data and then sends the service data to the receiving device.

[0004] In some scenarios, such as when OTN is used for data center (DC) interconnection, after receiving service data, the receiving device sends an acknowledgment message to the sending device. This acknowledgment message indicates that the receiving device has received the service data. Only after receiving this acknowledgment message will the sending device continue to send service data to the first OTN device.

[0005] When the transmission distance between the first OTN device and the second OTN device is large, it takes a long time for the service data to be transmitted to the receiving device and for the response message to be transmitted from the receiving device to the sending device. As a result, the first OTN device cannot receive the service data from the sending device in a timely manner, resulting in a low actual transmission efficiency of the first OTN device. Summary of the Invention

[0006] This application provides a data transmission method, apparatus, device, system, and medium that helps improve the transmission efficiency of OTN devices.

[0007] Firstly, this application provides a data transmission method. This data transmission method is performed by a first OTN device. The method includes: the first OTN device receiving service data sent by a transmitting device; storing the service data in a first storage space of the first OTN device, the first storage space being used to store the service data sent by the transmitting device to the receiving device; generating a first response message based on the occupancy information of the first storage space, the first response message being used to indicate whether the transmitting device should send service data to the first OTN device; and sending the first response message to the transmitting device.

[0008] In this application, the first OTN device generates a first response message based on the occupancy information of its first storage space and sends the first response message to the sending device. The sending device can then determine whether to continue sending service data to the first OTN device based on the first response message. Since the first response message is generated by the first OTN device, rather than being generated by the receiving device after the service data is transmitted through the OTN and then transmitted through the OTN to the first OTN device, the waiting time of the sending device is greatly shortened, which helps to improve the transmission efficiency of the first OTN device.

[0009] Optionally, the occupancy information of the first storage space includes the amount of data stored in the first storage space, the size of the free space in the first storage space, or the size of the non-free space in the first storage space.

[0010] When the occupancy information of the first storage space includes the amount of data stored in the first storage space, the first response message can be generated in the following manner:

[0011] In some examples, when the amount of data stored in the first storage space is less than a threshold, a first response message is generated to instruct the sending device to send service data to the first OTN device. The fact that the amount of data stored in the first storage space is less than the threshold indicates that the amount of data stored in the first storage space is relatively small. Sending this first response message to the sending device prompts the sending device to send service data to the first OTN device as quickly as possible, ensuring that the first OTN device has sufficient data to send and thus improving its transmission efficiency.

[0012] In other examples, when the amount of data stored in the first storage space is greater than or equal to a threshold, a first response message is generated to instruct the transmitting device not to continue sending service data to the first OTN device. The fact that the amount of data stored in the first storage space is greater than or equal to the threshold indicates that the amount of data stored in the first storage space is relatively large, and the first OTN device can guarantee high transmission efficiency. Therefore, the first response message can instruct the transmitting device to pause sending service data.

[0013] Optionally, the method further includes: receiving a second response message, the second response message being sent by a receiving device, the second response message being used to indicate whether the receiving device has received the service data; and discarding the second response message. In related technologies, the receiving device generates a second response message based on the reception status of the service data and feeds the second response message back to the sending device through a second OTN device and a first OTN device. In this application, since the first OTN device has already achieved the same function as the second response message through the first response message, the first OTN device can directly discard the second response message without affecting the normal transmission of data.

[0014] Secondly, a data transmission method is also provided. This data transmission method is performed by a transmitting device. The method includes the transmitting device sending service data to a first OTN device; receiving a first response message sent by the first OTN device, the first response message indicating whether the transmitting device should continue sending service data to the first OTN device, the first response message being generated by the first OTN device based on the occupancy information of a first storage space of the first OTN device, the first storage space being used to store the service data sent by the transmitting device to a receiving device, and the first OTN device being used to send the service data to the receiving device through a second OTN device.

[0015] In this application, the first OTN device generates a first response message based on the occupancy information of the first storage space in the first OTN device, and sends the first response message to the sending device. The sending device can then determine whether to continue sending service data to the first OTN device based on the first response message. Since the first response message is generated by the first OTN device, rather than being generated by the receiving device after the service data is transmitted through OTN and then transmitted through OTN to the first OTN device, the waiting time of the sending device is greatly shortened, which helps to improve the transmission efficiency of the first OTN device.

[0016] Optionally, the method further includes: receiving a second response message, the second response message being sent by a receiving device, the second response message being used to indicate whether the receiving device has received the service data; and discarding the second response message. Since the first OTN device has sent a first response message to the sending device in advance, the sending device can send the service data normally according to the first response message, so when it receives the second response message from the receiving device, it can directly discard the second response message.

[0017] Optionally, in the first and second aspects, the service data includes multiple messages. In some examples, at least one of the multiple messages carries a sequence-keeping flag, and the first acknowledgment message is associated with one of the messages carrying the sequence-keeping flag in the service data. The first OTN device generates a first acknowledgment message for each message carrying the sequence-keeping flag received. Correspondingly, the transmitting device receives a first acknowledgment message for each message carrying the sequence-keeping flag sent. In other examples, multiple messages in the multiple messages carry sequence-keeping flags, and the first acknowledgment message is associated with N consecutive messages carrying the sequence-keeping flag in the service data, where N is an integer greater than 1 and N is less than the number of messages carrying the sequence-keeping flag in the service data. The first OTN device generates a first acknowledgment message for each N messages carrying the sequence-keeping flag received. Correspondingly, the transmitting device receives a first acknowledgment message for each N messages carrying the sequence-keeping flag sent.

[0018] In one possible implementation, each message carries a sequence order (SO) flag. In another possible implementation, some messages carry the SO flag. For example, certain types of messages carry the SO flag.

[0019] Thirdly, a data transmission method is also provided. This data transmission method is executed by a first OTN device. The method includes: receiving service data sent by a transmitting device; storing the received service data in a first storage space of the first OTN device, the first storage space being used to store the service data sent by the transmitting device to the receiving device; receiving indication information sent by a second OTN device, the second OTN device including a second storage space, the second storage space being used to store the service data sent by the transmitting device to the receiving device, the indication information being used to reflect the amount of change in the stored data in the second storage space within a target period; mapping the service data in the first storage space to a first OTN frame according to the amount of change in the stored data; and sending the first OTN frame to the second OTN device.

[0020] In this application, the first OTN device determines the amount of change in stored data in the second storage space of the second OTN device within a target period based on received instruction information, and maps the service data in its own first storage space to a first OTN frame based on this amount of change. This amount of change in stored data reflects the data transmission status between the second OTN device and the receiving device. Mapping service data to the first OTN frame based on this amount of change reduces the possibility of data loss during data transmission between the transmitting and receiving devices, thus improving the reliability of data transmission.

[0021] In a first possible implementation, mapping the service data in the first storage space to the first OTN frame based on the amount of storage data change includes: determining a target data amount based on the amount of data stored in the first storage space and the container size of the first OTN frame; determining a mapping data amount based on the amount of storage data change and the target data amount; and mapping the service data in the first storage space to the first OTN frame according to the mapping data amount.

[0022] In this embodiment, the target data volume is determined based on the amount of data stored in the first storage space and the container size of the first OTN frame, that is, it is determined by combining the current actual data to be sent and the sending capacity of the first OTN frame. Then, the target data volume is adjusted by using the change in stored data, which can determine a more suitable mapping data volume.

[0023] In a second possible implementation, mapping the service data in the first storage space to the first OTN frame based on the amount of storage data change includes: using the amount of service data carried in a historical OTN frame as the target data amount, wherein the historical OTN frame is the most recently received OTN frame when the second OTN device sends the indication information; determining the mapping data amount based on the amount of storage data change and the target data amount; and mapping the service data in the first storage space to the first OTN frame according to the mapping data amount.

[0024] In this implementation, the amount of service data in the historical OTN frame closest to the time of sending the instruction information is taken as the target data amount, and the amount of storage data change is used to adjust the target data amount to determine the mapping data amount, which is beneficial to accurately control the change of the amount of storage data in the second storage space.

[0025] Optionally, in the first and second possible implementations, determining the mapped data amount based on the amount of change in the stored data and the target data amount includes: when the amount of change in the stored data is greater than 0, using the difference between the target data amount and the amount of change in the stored data as the mapped data amount.

[0026] When the change in stored data is greater than 0, it indicates that the amount of data in the second storage space has increased, and the rate at which the second OTN device sends data to the receiving device is less than the rate at which the first OTN device sends data to the second OTN device. In this case, reducing the amount of mapped data can prevent service data from becoming congested at the second OTN device, thus reducing the possibility of data loss.

[0027] Optionally, in the first and second possible implementations, when the change in stored data is less than or equal to 0, the mapped data amount is determined based on the amount of data stored in the first storage space and the container size of the first OTN frame. When the change in stored data is less than or equal to 0, it indicates that the amount of data in the second storage space decreases or remains unchanged, and the rate at which the second OTN device sends data to the receiving device is greater than or equal to the rate at which the first OTN device sends data to the second OTN device. In this case, determining the mapped data amount based on the amount of data stored in the first storage space and the container size of the first OTN frame, and sending service data normally, helps to avoid a decrease in the data transmission rate between the second OTN device and the receiving device due to insufficient service data received by the second OTN device.

[0028] Optionally, the service data can be mapped into the first OTN frame using a general mapping procedure (GMP) or an idle mapping procedure (IMP), etc.

[0029] Optionally, the service data includes multiple code block groups, and each code block group includes multiple code blocks. The code blocks in each code block group belong to a message.

[0030] In some examples, each code block is a 66-byte code block. For the GMP mapping method, the first OTN device maps service data into the first OTN frame in 66-byte code blocks using the SD algorithm. This ensures that the mapped code block size is the same as the code block size in the service data, which improves the processing efficiency of the first OTN device and facilitates rate adaptation between the bit rate of the service data and the data transmission rate of the OTN frame.

[0031] Optionally, each code block group includes a start code block and an end code block. When using IMP to map service data into the first OTN frame, mapping the service data into the first OTN frame according to the mapped data volume includes: determining the number of free code blocks based on the mapped data volume and the container size; filling the space between the end code block of the first code block group and the start code block of the second code block group with free code blocks according to the number of free code blocks, wherein the first code block group and the second code block group are two adjacent code block groups in the service data; and mapping the filled service data into the first OTN frame. By filling with I code blocks, the bit rate of the service data can be rate-adapted to the data transmission rate of the OTN frame.

[0032] Optionally, the method further includes: carrying data volume information in the overhead area of ​​the first OTN frame, the data volume information indicating the amount of service data carried in the first OTN frame. By carrying this data volume information in the overhead area of ​​the first OTN frame, the second OTN device can quickly determine the amount of service data carried in the first OTN frame, so as to further determine the amount of data stored in the second storage space, and generate indication information based on the amount of data stored in the second storage space.

[0033] Optionally, receiving the indication information sent by the second OTN device includes: receiving a second OTN frame sent by the second OTN device, wherein the indication information is carried in the overhead region of the second OTN frame. In this way, the second OTN device can obtain the indication information from the overhead region of the second OTN frame.

[0034] Fourthly, a data transmission method is also provided. This data transmission method is performed by a second OTN device. The data transmission method includes: sending indication information to a first OTN device, the second OTN device including a second storage space for storing service data sent by a transmitting device to a receiving device, the indication information reflecting the amount of change in the stored data in the second storage space within a target period; and receiving a first OTN frame sent by the first OTN frame, the amount of service data carried in the first OTN frame being determined based on the amount of change in the stored data.

[0035] In one possible implementation of the third or fourth aspect, the indication information is used to indicate the amount of data stored in the second storage space of the second OTN device.

[0036] In another possible implementation of the third or fourth aspect, the indication information is used to indicate the amount of change in stored data in the second storage space within the target period. When the indication information directly indicates the amount of change in stored data, since the range of changes in stored data in the second storage space within the target period is limited, fewer bits can be used to indicate the amount of change in stored data. Therefore, this implementation is beneficial for saving transmission resources.

[0037] Optionally, in the third or fourth aspect, the length of the target period is equal to the length of the first OTN frame, or the length of a subframe of the first OTN frame. In implementation, the length of the target period can be determined based on the actual transmission of service data.

[0038] Fifthly, a data transmission device is also provided. This data transmission device includes: a receiving module, a storage module, a first transmitting module, a generating module, and a second transmitting module. The receiving module receives service data transmitted by a transmitting device; the storage module stores the service data in a first storage space of a first OTN device, the first storage space being used to store the service data transmitted by the transmitting device to the receiving device; the first transmitting module transmits the service data to the receiving device through a second OTN device; the generating module generates a first response message based on the occupancy of the first storage space, the first response message indicating whether the transmitting device should continue transmitting service data; and the second transmitting module transmits the first response message to the transmitting device.

[0039] Optionally, the occupancy information of the first storage space includes the amount of data stored in the first storage space. The generation module is used to generate a first response message in the following ways: when the amount of data stored in the first storage space is less than a threshold, a first response message is generated to instruct the sending device to continue sending service data; or, when the amount of data stored in the first storage space is greater than or equal to the threshold, a first response message is generated to instruct the sending device to suspend sending service data.

[0040] In one possible implementation, the receiving module is further configured to receive a second response message, which is sent by the receiving device and is used to indicate whether the receiving device has received the service data; the data transmission apparatus further includes a discarding module, which is used to discard the second response message.

[0041] In another possible implementation, the receiving module is further configured to receive a second response message, which is sent by the receiving device and is used to indicate whether the receiving device has received the service data; the second sending module is further configured to send the second response message to the sending device.

[0042] Sixthly, a data transmission apparatus is also provided, comprising a transmitting module and a receiving module. The transmitting module is used to transmit service data to a first OTN device; the receiving module is used to receive a first response message sent by the first OTN device, the first response message being used to indicate whether the transmitting device should continue to transmit service data to the first OTN device, the first response message being generated by the first OTN device based on the occupancy information of a first storage space of the first OTN device, the first storage space being used to store the service data transmitted by the transmitting device to the receiving device, and the first OTN device being used to transmit the service data to the receiving device through a second OTN device.

[0043] Optionally, the receiving module is further configured to receive a second response message, which is sent by the receiving device and is used to indicate whether the receiving device has received the service data; the data transmission device further includes a discarding module for discarding the second response message.

[0044] In a seventh aspect, a data transmission apparatus is also provided. This data transmission apparatus includes: a first receiving module, a storage module, a second receiving module, a mapping module, and a transmitting module. The first receiving module is used to receive service data transmitted by a transmitting device; the storage module is used to store the received service data in a first storage space of a first OTN device, the first storage space being used to store the service data transmitted by the transmitting device to the receiving device; the second receiving module is used to receive indication information transmitted by a second OTN device, the second OTN device including a second storage space, the second storage space being used to store the service data transmitted by the transmitting device to the receiving device, the indication information being used to reflect the amount of change in the stored data in the second storage space within a target period; the mapping module is used to map the service data in the first storage space to a first OTN frame according to the amount of change in the stored data; the transmitting module is used to transmit the first OTN frame to the second OTN device.

[0045] Optionally, the mapping module includes a first determining submodule, a second determining submodule, and a mapping submodule. The first determining submodule is used to determine the target data volume based on the amount of data stored in the first storage space and the container size of the first OTN frame, or to use the amount of service data carried in a historical OTN frame as the target data volume, wherein the historical OTN frame is the most recently received OTN frame when the second OTN device sends the indication information; the second determining submodule is used to determine the mapping data volume based on the amount of change in the stored data and the target data volume; the mapping submodule is used to map the service data in the first storage space to the first OTN frame according to the mapping data volume.

[0046] Optionally, the second determining submodule is used to take the difference between the target data amount and the storage data change amount as the mapped data amount when the change amount of the stored data is greater than 0.

[0047] Optionally, the service data includes multiple code block groups, each code block group belonging to a message. Each code block group includes a start code block and an end code block. The mapping submodule is used to determine the number of free code blocks based on the amount of mapped data and the container size; fill the space between the end code block of the first code block group and the start code block of the second code block group with free code blocks based on the number of free code blocks, wherein the first code block group and the second code block group are two adjacent code block groups in the service data; and map the filled service data into the first OTN frame.

[0048] Optionally, the mapping module is further configured to carry data volume information in the overhead area of ​​the first OTN frame, the data volume information being used to indicate the amount of service data carried in the first OTN frame.

[0049] Optionally, the second receiving module is used to receive a second OTN frame sent by the second OTN device, wherein the indication information is carried in the overhead area of ​​the second OTN frame.

[0050] Eighthly, a data transmission apparatus is also provided. This data transmission apparatus includes a transmitting module and a receiving module. The transmitting module is used to transmit indication information to the first OTN device, the indication information reflecting the change in stored data in a second storage space within a target period, the second storage space being used to store service data transmitted from the transmitting device to the receiving device. The receiving module is used to receive a first OTN frame transmitted by the first OTN frame, the amount of service data carried in the first OTN frame being determined based on the change in stored data.

[0051] Optionally, the sending module is used to send a second OTN frame to the first OTN device, wherein the indication information is carried in the overhead area of ​​the second OTN frame.

[0052] In a ninth aspect, a computer device is also provided, including a processor and a memory, wherein the memory stores program code; the processor is configured to read and execute the program code stored in the memory to implement the data transmission method provided in any one of the first to fourth aspects.

[0053] Optionally, the processor may be one or more, and the processor may be a multi-core processor, and the memory may be one or more.

[0054] Optionally, the memory may be integrated with the processor, or the memory may be separated from the processor.

[0055] In the specific implementation process, the memory can be a non-transitory memory, such as read-only memory (ROM), which can be integrated with the processor on the same chip or set on different chips. This application does not limit the type of memory or the way the memory and processor are set.

[0056] In a tenth aspect, a computer-readable storage medium is also provided, wherein a software program is stored therein, and the software program, when read and executed by one or more processors, can implement the data transmission method provided in any of the first to fourth aspects.

[0057] Eleventhly, a computer program (product) is provided, the computer program (product) comprising: computer program code, wherein when the computer program code is run by a computer device, the computer device executes the data transmission method provided in any one of the first to fourth aspects described above.

[0058] In a twelfth aspect, a chip is provided, the chip including a processor and a communication interface. The processor is configured to execute instructions to cause the chip to perform the data transmission method provided in any of the first to fourth aspects.

[0059] In a thirteenth aspect, a communication system is provided, including a first OTN device and a transmitting device, wherein the first OTN device is used to implement any data transmission method provided in the first aspect, and the transmitting device is used to implement any data transmission method provided in the second aspect.

[0060] In a fourteenth aspect, a communication system is provided, including a first OTN device and a second OTN device, wherein the first OTN device is used to implement any data transmission method provided in the third aspect, and the second OTN device is used to implement any data transmission method provided in the fourth aspect. Attached Figure Description

[0061] Figure 1 This is a schematic diagram of the structure of an optical communication system provided in an embodiment of this application;

[0062] Figure 2 This is a schematic diagram of the structure of an OTN device provided in an embodiment of this application;

[0063] Figure 3 This is a flowchart illustrating a data transmission method provided in an embodiment of this application;

[0064] Figure 4 This is a schematic diagram illustrating the process of determining the amount of mapped data in a data transmission method provided in this application embodiment;

[0065] Figure 5 This is a schematic diagram of the structure of a first OTN frame provided in an embodiment of this application;

[0066] Figure 6 This is a schematic diagram of a data transmission method provided in an embodiment of this application;

[0067] Figure 7 This is a schematic diagram of the structure of a data transmission device provided in an embodiment of this application;

[0068] Figure 8 This is a schematic diagram of another data transmission device provided in an embodiment of this application;

[0069] Figure 9 This is a schematic diagram of another data transmission device provided in an embodiment of this application;

[0070] Figure 10 This is a schematic diagram of another data transmission device provided in an embodiment of this application;

[0071] Figure 11 This is a schematic diagram of the structure of a computer device provided in an embodiment of this application. Detailed Implementation

[0072] To make the objectives, technical solutions, and advantages of this application clearer, the embodiments of this application will be described in further detail below with reference to the accompanying drawings.

[0073] Figure 1 This is a schematic diagram of the structure of an optical communication system provided in an embodiment of this application. For example... Figure 1 As shown, the optical communication system includes an OTN, transmitting equipment, and receiving equipment. The OTN comprises multiple OTN devices, which are connected by optical fibers. These multiple OTN devices can be networked in different topologies, such as linear, ring, or mesh, according to actual needs.

[0074] like Figure 1 As shown, the OTN includes a first OTN device and a second OTN device. The first OTN device is connected to the transmitting device, and the second OTN device is connected to the receiving device. Figure 1 The ellipse in the image only represents the range of OTN and does not represent the networking method between OTN devices.

[0075] For example, the transmitting device can be a network device or a server, such as a server in a data center (DC); the receiving device can be a network device or a server, such as a server in a data center (DC). Here, the network device can be a switch, a router, etc.

[0076] It should be noted that OTN device A can be connected to one or more transmitting devices, and this application embodiment does not impose any limitation on this. Similarly, OTN device B can be connected to one or more receiving devices, and this application embodiment does not impose any limitation on this. Furthermore, the terms "transmitting device" and "receiving device" are relative. For example, at a first moment, the first device is the transmitting device and the second device is the receiving device; while at a second moment, the first device is the receiving device and the second device is the transmitting device. The transmitting device can be referred to as the source device, and the receiving device can be referred to as the destination device.

[0077] Depending on the specific needs, an OTN device may possess different functions. Generally speaking, OTN devices are categorized into optical layer devices, electrical layer devices, and hybrid optoelectronic devices. Optical layer devices refer to those capable of processing optical layer signals, such as optical amplifiers (OA) and optical add-drop multiplexers (OADMs). OAs, also known as optical line amplifiers (OLAs), are primarily used to amplify optical signals to support longer transmission distances while maintaining specific optical signal performance. OADMs are used to spatially transform optical signals, allowing them to be output from different output ports (sometimes referred to as directions). Electrical layer devices refer to those capable of processing electrical layer signals, such as devices capable of processing OTN signals. Hybrid optoelectronic devices refer to devices capable of processing both optical and electrical layer signals. It should be noted that, depending on specific integration requirements, a single OTN device can integrate multiple different functions. The technical solutions provided in this application are applicable to OTN devices with different forms and integration levels that include electrical layer functions.

[0078] Figure 2 This is a schematic diagram of the structure of an OTN device provided in an embodiment of this application. For example, Figure 1 The OTN device 200 can be either OTN device A or OTN device B. For example, OTN device 200 includes a tributary board 201, a cross-connect board 202, a line board 203, an optical layer processing board (not shown in the figure), and a system control and communication board 204. Depending on actual needs, the type and number of boards included in an OTN device may vary. For example, an OTN device acting as a core node may not have a tributary board 201. Alternatively, an OTN device acting as an edge node may have multiple tributary boards 201, or may not have an optical cross-connect board 202. Furthermore, an OTN device that only supports electrical layer functions may not have an optical layer processing board.

[0079] Tributary board 201, cross-connect board 202, and line board 203 are used to process the electrical layer signals of OTN. Tributary board 201 is used to receive and transmit various customer services, such as SDH services, packet services, Ethernet services, and fronthaul services. Further, tributary board 201 can be divided into customer-side optical modules and signal processors. The customer-side optical modules can be optical transceivers used to receive and / or transmit service data. The signal processor is used to perform mapping and demapping processing of service data to data frames. Cross-connect board 202 is used to switch data frames, completing the exchange of one or more types of data frames. Line board 203 mainly implements the processing of line-side data frames. Specifically, line board 203 can be divided into line-side optical modules and signal processors. The line-side optical modules can be line-side optical transceivers used to receive and / or transmit data frames. The signal processor is used to perform multiplexing and demultiplexing, or mapping and demapping processing of line-side data frames. System control and communication board 204 is used to implement system control. Specifically, information can be collected from different boards via the backplane, or control commands can be sent to the corresponding boards. It should be noted that, unless otherwise specified, a specific component (e.g., a signal processor) can be one or more, and this application does not impose any limitations. It should also be noted that this application does not impose any limitations on the type of boards included in the device, or on the functional design and number of the boards. It should be noted that, in a specific implementation, the two boards mentioned above may also be designed as a single board. Furthermore, the network device may also include a backup power supply, heat dissipation devices (including but not limited to fans), etc.

[0080] Figure 3 This is a flowchart illustrating a data transmission method provided in an embodiment of this application. For example... Figure 3 As shown, the method includes the following steps.

[0081] In step 301, the transmitting device sends service data to the first OTN device.

[0082] Accordingly, the first OTN device receives service data sent by the transmitting device. This service data needs to be transmitted to the receiving device via OTN.

[0083] In some examples, business data comprises multiple messages. These messages include operation request messages and data messages. Operation request messages indicate the type of operation request, which may include, but is not limited to, read, write, send, or receive. Data messages carry the data corresponding to the operation request messages.

[0084] In other examples, business data includes data packets but excludes operation request packets.

[0085] Optionally, the service data carries an SO tag. In some examples, the service data includes one or more packets (e.g., Ethernet packets), each carrying an SO tag. For example, the SO tag can be the packet priority level. For instance, assuming the service data includes 5 packets with priority levels 1-5, the first OTN device will send these 5 packets in descending order of priority.

[0086] It should be noted that in other embodiments, some messages may carry the SO tag. For example, some types of messages carry the SO tag, while other types of messages do not. For instance, service data includes data packets and operation request messages; the data packets carry the SO tag, while the operation request messages do not. As another example, service data includes data packets and operation request messages; the operation request messages carry an order-preserving tag, while the data packets do not carry the SO tag.

[0087] Furthermore, in cases where some messages carry the SO tag, messages carrying the SO tag can also be configured in other ways, and this application does not impose any restrictions on this.

[0088] This application embodiment does not limit the service type of the service data. For example, the service type of the service data can be packet (PKT) service, or constant bit rate (CRB) service, etc.

[0089] In step 302, the first OTN device stores the received service data in its local first storage space.

[0090] The first storage space is used to store service data sent from the transmitting device to the receiving device. That is, the first OTN device stores the received service data in the first storage space and then sends it to the receiving device via OTN.

[0091] For example, the first storage space can be the entire storage space of a memory, or a portion of the storage space of a memory. When the first storage space is a portion of the storage space of a memory, its storage addresses can be contiguous or non-contiguous. Optionally, the memory can be a cache, etc. Here, the cache includes, but is not limited to, first-in-first-out (FIFO) memory.

[0092] In step 303, the first OTN device determines the amount of mapped data based on the amount of first stored data in the first storage space.

[0093] Optionally, when the first stored data volume is greater than or equal to a set value, the mapped data volume is equal to the set value, which is less than or equal to the container size of the first OTN frame. When the first stored data volume is less than the set value, the mapped data volume is equal to the first stored data volume.

[0094] In this application embodiment, an OTN frame refers to the data frame structure used by an OTN device, and can also be called an OTN transmission frame. OTN frames are used to carry various service data and provide rich management and monitoring functions. An OTN frame can be a flexible optical service unit (OSUframe), which can also be simply referred to as an OSU frame. Alternatively, an OTN frame can be an optical data unit k (ODUk) frame, an ODUc n frame, an ODUframe, or an optical channel transport unit k (OTUk) frame, an OTUc n frame, or a flexible OTN (FlexO) frame, or a fine-grained flexible optical data unit (fgODUframe) frame, etc. The difference between ODU frames and OTU frames lies in the following: an OTU frame includes both the ODU frame and the OTU overhead; 'k' represents different rate levels, for example, k=1 represents 2.5Gbps, k=4 represents 100Gbps; and 'Cn' represents a variable rate, specifically a positive integer multiple of 100Gbps. Unless otherwise specified, an ODU frame refers to any one of ODUk, ODUCN, or ODUframe, and an OTU frame refers to any one of OTUk, OTUCN, or FlexO. It should be noted that as OTN technology develops, new types of OTN frames may be defined, which will also apply to this application.

[0095] OTN frames can be carrier containers with different rates. That is, the container size of an OTN frame corresponds to its rate level, such as 2.5Gbps or 100Gbps.

[0096] In step 304, the first OTN device maps the service data in the first storage space to the first OTN frame according to the amount of mapped data.

[0097] In step 304, the first OTN device retrieves part or all of the service data from the first storage space as data to be transmitted, and maps the retrieved data to be transmitted into the first OTN frame. The amount of the retrieved data to be transmitted is the amount of the mapped data.

[0098] The data to be sent consists of multiple code blocks. These code blocks are divided into multiple code block groups, and each code block group belongs to a message. For example... Figure 5 As shown, in each code block group, the first code block is the start (S) code block, the last code block is the (T) code block, and the middle code blocks are data (D) code blocks. The first OTN device maps service data to the payload area of ​​the first OTN frame in units of code blocks. In the embodiment of this application, the code block is a 66B (bit) code block.

[0099] Optionally, the mapping method includes, but is not limited to, GMP (e.g., ETH PKT over ODUf lex via GMP) or IMP (e.g., ETH PKT over ODUf lex via IMP).

[0100] When the mapping method is GMP, the first OTN device maps the data to be sent into the payload area of ​​the first OTN frame according to the amount of mapped data using the SD (sigma-de lta) algorithm.

[0101] like Figure 5 As shown in part (a), the first OTN frame is an ODU frame. The first OTN device uses the SD algorithm to determine whether each code block position in the payload area is fill data or service data, and then maps each code block to the payload area. Here, FS represents fill code block.

[0102] In one possible implementation, the service data includes multiple 66B code blocks. The first OTN device directly maps the service data into the first OTN frame in units of 66B code blocks. In this way, the size of the mapped code block is the same as the size of the service data code block, which is beneficial to improving the processing efficiency of the first OTN device and to rate adaptation between the bit rate of the service data and the data transmission rate of the OTN frame.

[0103] It should be noted that in other embodiments, the first OTN device can convert the 66B code block into a larger code block (e.g., 16 bytes (i.e., 128 bits)) and then map the converted code block into the payload area of ​​the OTN frame.

[0104] When the mapping method is IMP, the first OTN device can determine the number of idle (I) code blocks based on the amount of mapped data and the container size of the first OTN frame. The number of I code blocks represents the total number of I code blocks that will be filled in the first OTN frame later. Based on the determined number of I code blocks, I code blocks are filled between the T code blocks of the first code block group and the S code blocks of the second code block group. The first code block group and the second code block group are two adjacent code block groups in the service data. The service data after filling with I code blocks is mapped into the first OTN frame.

[0105] In some examples, the container size and the amount of mapped data of the first OTN frame can both be represented by the number of 66B code blocks. In this case, the number of I code blocks is equal to the difference between the container size and the amount of mapped data of the first OTN frame.

[0106] Optionally, the number of I code blocks used to fill different code block groups can be all the same, all different, or partially the same and partially different. For example, as Figure 5 As shown in part (b), three I blocks are inserted between the first T block and the adjacent S block, and two I blocks are inserted between a certain T block and the adjacent S block.

[0107] Based on the number of I code blocks, I code blocks can be filled between the T code blocks of the first code block group and the S code blocks of the second code block group in the following way: determine the filling scheme based on the number of I code blocks, which includes multiple quantities to be filled, each representing the number of I code blocks to be filled between each code block group; fill the I code blocks between each code block group according to the determined filling scheme.

[0108] This application does not impose any restrictions on the filling scheme, as long as the sum of the quantities to be filled is equal to the number of I-code blocks.

[0109] In some examples, the quotient of the number of I-blocks divided by X is determined as the reference padding quantity, where X equals the number of block groups. If the number of I-blocks is divisible by X, then the number of I-blocks padded after each block group is the reference padding quantity. If the number of I-blocks is not divisible by X, and the quotient of the number of I-blocks divided by X is m with a remainder of n, then Xn block groups are selected and padded with the reference padding quantity of I-blocks (i.e., m I-blocks are padded). The number of I-blocks padded after the remaining n block groups is the sum of the reference padding quantity and 1 (i.e., m+1 I-blocks are padded). The selected Xn block groups can be the first Xn block groups, the last Xn block groups, or any Xn block groups in the block groups corresponding to the first OTN frame.

[0110] For example, assuming the number of I code blocks is 150 and X equals 50, then each code block group is followed by 3 I code blocks. As another example, assuming the number of I code blocks is 100 and X equals 60, with m being 1 and n being 40, then 20 code block groups are followed by 1 I code block, and 40 code block groups are followed by 2 I code blocks.

[0111] By filling in I-code blocks, the bit rate of the service data can be adapted to the data transmission rate of the OTN frame.

[0112] In step 304, the first OTN device also carries data volume information in the overhead area of ​​the first OTN frame. This data volume information is used to indicate the amount of service data carried in the first OTN frame, that is, it is used to indicate the amount of mapped data. For example... Figure 5 As shown, the overhead region of the ODN frame carries the data volume information Cm.

[0113] In this embodiment of the application, each OTN frame contains a mapping overhead byte in its overhead area, and the data volume information can be carried in the mapping overhead byte.

[0114] When the mapping method is IMP, the second OTN device can directly identify whether each code block is an I code block or a non-I code block (i.e., the aforementioned S code block, D code block, and T code block) when demapping the received first OTN frame. I code blocks are discarded directly, while non-I code blocks are placed in the second storage space to await transmission to the receiving device. Therefore, in related technologies, it is not necessary to carry data volume information in the overhead area of ​​the first OTN frame for the second OTN device to process the data in the first OTN frame normally. However, by carrying this data volume information in the overhead area of ​​the first OTN frame, the embodiment of this application facilitates the second OTN device to quickly determine the amount of service data carried in the first OTN frame, thereby further determining the amount of data stored in the second storage space, and generating indication information based on the amount of data stored in the second storage space (see below for details).

[0115] In S305, the first OTN device sends a first OTN frame to the second OTN device.

[0116] Correspondingly, the second OTN device receives the first OTN frame.

[0117] This can be achieved using 303-305, whereby the first OTN device sends service data to the receiving device through the second OTN device.

[0118] In step 306, the first OTN device generates a first response message based on the occupancy information of the first storage space.

[0119] The first response message is used to indicate whether the sending device should continue sending service data.

[0120] Optionally, the occupancy information of the first storage space includes the amount of data stored in the first storage space, the size of the free space in the first storage space, or the size of the non-free space in the first storage space.

[0121] In one possible implementation, the occupancy information of the first storage space includes the amount of data stored in the first storage space. 306 includes: when the amount of data stored in the first storage space is less than a threshold, generating a first response message to instruct the transmitting device to continue transmitting service data; or, when the amount of data stored in the first storage space is greater than or equal to the threshold, generating a first response message to instruct the transmitting device to suspend transmitting service data.

[0122] In another possible implementation, the occupancy information of the first storage space includes the amount of data stored in the first storage space. 306 includes: generating a first response message to instruct the transmitting device to continue transmitting service data when the ratio of the amount of data stored in the first storage space to the capacity of the first storage space is less than a threshold; or, generating a first response message to instruct the transmitting device to suspend transmitting service data when the ratio of the amount of data stored in the first storage space to the capacity of the first storage space is greater than or equal to the threshold.

[0123] If the amount of data stored in the first storage space is less than a threshold, or the ratio of the amount of data stored in the first storage space to its capacity is less than a threshold, it indicates that the amount of data stored in the first storage space is small. Sending this first response message to the sending device can prompt the sending device to send service data to the first OTN device as soon as possible, ensuring that the first OTN device has sufficient data to send and thus improving its transmission efficiency. If the amount of data stored in the first storage space is greater than or equal to a threshold, or the ratio of the amount of data stored in the first storage space to its capacity is greater than or equal to a threshold, it indicates that the amount of data stored in the first storage space is large. The first OTN device can guarantee high transmission efficiency, and therefore, the first response message can be used to instruct the sending device to pause sending service data.

[0124] In another possible implementation, the occupancy information of the first storage space includes the size of the free space in the first storage space. Here, the free space is the space where no data is stored. 306 includes: when the size of the free space in the first storage space is greater than a threshold, generating a first response message to instruct the transmitting device to continue transmitting service data; or, when the size of the free space in the first storage space is less than or equal to the threshold, generating a first response message to instruct the transmitting device to suspend transmitting service data.

[0125] In another possible implementation, the occupancy information of the first storage space includes the size of the used space of the first storage space. Here, the used space includes space where data has already been stored. 306 includes: when the size of the used space of the first storage space is greater than a threshold, generating a first response message to instruct the transmitting device to continue transmitting service data; or, when the size of the used space of the first storage space is greater than or equal to the threshold, generating a first response message to instruct the transmitting device to suspend transmitting service data.

[0126] If the free space in the first storage space is greater than a threshold, and the used space in the first storage space is also greater than a threshold, it indicates that the amount of data stored in the first storage space is relatively small. Sending the first response message to the sending device can prompt the sending device to send service data to the first OTN device as soon as possible, ensuring that the first OTN device has sufficient data to send and thus improving its transmission efficiency. If the free space in the first storage space is less than or equal to a threshold, and the used space in the first storage space is greater than or equal to a threshold, it indicates that the amount of data stored in the first storage space is relatively large. The first OTN device can guarantee high transmission efficiency, and therefore, the first response message can be used to instruct the sending device to pause sending service data.

[0127] It should be noted that the threshold values ​​in different implementations can be the same or different, and can be set according to actual needs.

[0128] For example, the amount of data stored in the first storage space may be the amount of business data sent by the sending device to the same receiving device stored in the first storage space.

[0129] In implementation, the first response message can carry different values ​​to instruct the sending device to continue sending service data or to suspend sending service data. For example, when the first response message carries a first value, it is used to instruct the sending device to continue sending service data; when the first response message carries a second value, it is used to instruct the sending device to suspend sending service data. For example, the first value is 1 and the second value is 0; or, the first value is 0 and the second value is 1.

[0130] In this embodiment, the threshold can be configured according to actual conditions, such as the service traffic supported by the first OTN device and the device capabilities of the first OTN device.

[0131] Optionally, the first response message can be associated with N packets carrying sequence markers in the service data. That is, the first OTN device generates a first response message after receiving N packets carrying sequence markers. Here, N is a positive integer and N is less than the number of packets carrying sequence markers in the service data. In some examples, N equals 1, so the first OTN device generates a first response message after receiving one packet carrying a sequence marker. When each packet carries a sequence marker, the first OTN device generates a first response message for each packet received.

[0132] In step 307, the first OTN device sends a first response message to the transmitting device.

[0133] Accordingly, the sending device receives the first response message.

[0134] When the transmitting device receives a first response message instructing it to continue transmitting service data, it continues to transmit service data to the first OTN device; when the transmitting device receives a first response message instructing it to suspend transmitting service data, it suspends transmitting service data.

[0135] In this embodiment, the first response message is generated by the first OTN device and is used to simulate the second response message sent by the receiving device after receiving service data. Therefore, it can adopt the same format as the second response message. In this way, the processing logic of the sending device does not need to be changed, and data transmission can be performed according to the original processing logic.

[0136] It should be noted that the execution order of 305 and 307 is not restricted in the embodiments of this application. 305 can be executed first and then 307, or 307 can be executed first and then 305, or both 305 and 307 can be executed simultaneously.

[0137] In 308, the second OTN device obtains service data from the first OTN frame.

[0138] The second OTN device demaps the first OTN frame to obtain the service data in the first OTN frame, and stores the service data in its local second storage space, waiting to send it to the receiving device.

[0139] In step 309, the second OTN device sends service data to the receiving device.

[0140] Accordingly, the receiving device receives the service data.

[0141] In step 310, the receiving device sends a second response message to the second OTN device.

[0142] The second response message is used to indicate that the receiving device has received the service data.

[0143] Optionally, N packets carrying the SO tag are associated with a second acknowledgment message. That is, the receiving device generates and sends a second acknowledgment message for every N packets carrying the SO tag. The frequency at which the receiving device sends the second acknowledgment message can be the same as the frequency at which the first OTN device sends the first acknowledgment message. For example, if the receiving device sends a second acknowledgment message for every packet carrying the SO tag it receives, then the first OTN device sends a first acknowledgment message for every packet carrying the SO tag it receives.

[0144] Optionally, when the second response message carries a first value, it is used to indicate that the receiving device has received service data; when the first response message carries a second value, it is used to indicate that the receiving device has not received service data (i.e., the receiving device has not received at least a portion of the associated N messages carrying SO tags). For example, the first value is 1 and the second value is 0; or, the first value is 0 and the second value is 1.

[0145] In step 311, the second OTN device sends the second response message to the first OTN device.

[0146] In step 312, the first OTN device sends the second response message to the transmitting device.

[0147] Accordingly, the transmitting device receives the second response message.

[0148] In 313, the sending device discards the second response message.

[0149] Since the first OTN device has already sent a first response message to the sending device, and this first response message serves the same purpose as the second response message, the sending device can discard the second response message without affecting normal data transmission. In this implementation, the first OTN device processes the second response message in the same way as in related technologies, requiring no modification to the relevant processing logic of the first OTN device, making it easy to implement.

[0150] It should be noted that, in another implementation, steps 312-313 can be replaced by the following steps: the first OTN device discards the second response message. Since the first OTN device has already achieved the same effect as the second response message through the first response message, it can directly discard the second response message without affecting normal data transmission. In this implementation, the processing logic of the sending device is the same as in related technologies, making it easy to implement.

[0151] In related technologies, the first OTN device needs to send a second response message to the sending device after receiving the second response message from the receiving device, and then the sending device sends service data to the first OTN device based on the second response message. However, in this embodiment, the first OTN device does not need to wait for the second response message from the receiving device. It determines whether to send a first response message to the sending device based on the occupancy information of its local first storage space. This allows the sending device to utilize idle resources to send more service data to the first OTN device, reducing the waiting time of the first OTN device and improving transmission efficiency.

[0152] This application's embodiments are particularly applicable to situations where the transmission distance between the first OTN device and the second OTN device is relatively large. For example, assuming the transmission distance between the first OTN device and the second OTN device is 100km, and the transmission time of an OTN frame between the first OTN device and the second OTN device is 500μs. For the OTN4 frame structure, there are approximately 500 frames of online data. It is evident that waiting for a second acknowledgment message from the receiving device will result in low transmission efficiency for the first OTN device.

[0153] Typically, scenarios where a sending device needs to wait for an acknowledgment message after sending service data to a receiving device before continuing to send service data include, but are not limited to, remote direct memory access (RDMA) scenarios. The following example, using an RDMA scenario where the sending device sends a write request and corresponding data to the receiving device, illustrates the data transmission method provided in this application.

[0154] 1) When the first OTN device receives a write request message from the sending device, it generates a corresponding first response message pACK=1 (instructing the sending device to continue sending service data) based on the local node's cache status (i.e., the amount of data stored in the first storage space) and sends the first response message to the sending device; the sending device continues to send service data to the first OTN device based on the first response message.

[0155] 2) The first OTN device simultaneously maps the received write request message and data message from the sending device to an ODU frame and sends it to the second OTN device. See the relevant description above for the specific mapping process.

[0156] 3) The second OTN device receives the ODU frame, demaps the write request message and data message according to the mapping information, and places them in the demapping buffer (i.e., the second storage space).

[0157] 4) The second OTN device sends the cached service messages (write request messages and data messages) to the receiving device.

[0158] 5) After receiving the write request message, the receiving device completes the corresponding write operation and sends a second response message back to the second OTN device. The second OTN device then sends the second response message to the first OTN device.

[0159] The second OTN device can adjust the amount of service messages sent appropriately based on the second response message received from the receiving device.

[0160] Optionally, in the above implementation, the first OTN device determines the mapping data amount only based on the first amount of stored data in the first storage space and the size of the container corresponding to the first OTN device in the first OTN frame. In another implementation, the first OTN device determines the mapping data amount not only based on the first amount of stored data in the first storage space and the size of the container corresponding to the first OTN device in the first OTN frame, but also based on the change in stored data in the second storage space of the second OTN device. In this case, step 303 can be replaced by steps 401 and 402 (see...). Figure 4 ).

[0161] In step 401, the second OTN device sends an instruction message to the first OTN device.

[0162] The second OTN device includes a second storage space for storing service data sent by the transmitting device to the receiving device.

[0163] For example, the second storage space can be the entire storage space of a memory, or a portion of the storage space of a memory. When the second storage space is a portion of the storage space of a memory, its storage addresses can be contiguous or non-contiguous. Optionally, the memory is a cache. Here, the cache includes, but is not limited to, FIFO memory, etc.

[0164] This indication information reflects the change in stored data in the second storage space within the target period. Optionally, the target period can be the frame period or subframe period of an OTN frame. The subframe period is one-Nth of the frame period, where N is a positive integer greater than 1. For example, N equals 2 or 4. In implementation, the length of the target period can be determined based on the actual transmission of service data. For example, when service traffic is high, the amount of data congested at the second OTN device can easily become excessive, so the target period can be set shorter, for example, to the length of a subframe of the first OTN frame. Conversely, when service traffic is low, the target period can be set longer, for example, to the length of the first OTN frame.

[0165] In one possible implementation, the indication information directly indicates the amount of change in the stored data. For example, the second OTN device determines the amount of change in the stored data in the second storage space before or after the service data in the first OTN frame is stored in the second storage space, and generates indication information based on this amount of change. When the indication information directly indicates the amount of change in the stored data, since the range of changes in the stored data in the second storage space is limited within the target period, fewer bits can be used to indicate the amount of change in the stored data. Therefore, this implementation is beneficial for saving transmission resources.

[0166] In another possible implementation, the indication information indirectly indicates the amount of change in stored data. For example, the second OTN device determines the amount of data stored in the second storage space before or after the service data in the first OTN frame is stored in the second storage space, and generates indication information based on the amount of data. The first OTN device can then calculate the amount of change in stored data in the second storage space based on the amount of data in two consecutive indication messages.

[0167] Optionally, the indication information may also include the identifier of the first OTN frame, such as the number of the first OTN frame.

[0168] Accordingly, the first OTN device receives the indication information.

[0169] Step 401 may include: the second OTN device sending a second OTN frame, in which indication information is carried. Optionally, the indication information may be carried in the overhead area of ​​the second OTN frame. In this way, the second OTN device can obtain the indication information from the overhead area of ​​the second OTN frame. Alternatively, the indication information may be carried at a predetermined position in the payload area of ​​the second OTN frame, so that the second OTN device can obtain the indication information from that predetermined position.

[0170] In step 402, the first OTN device determines the amount of mapped data based on the amount of change in the stored data of the second OTN device.

[0171] By using 402 and 304, the service data in the first storage space can be mapped to the first OTN frame according to the amount of change in the stored data.

[0172] In one possible implementation, 402 includes: a first OTN device determining a target data amount based on a first amount of stored data in a first storage space and the container size of an OTU frame; then, the first OTN determines a mapped data amount based on the change in stored data and the target data amount. For example, when the change in stored data is greater than 0, the mapped data amount is equal to the difference between the target data amount and the change in stored data. The method for determining the target data amount is the same as the method for determining the mapped data amount in 303.

[0173] When the change in stored data is greater than 0, it indicates that the amount of data in the second storage space has increased, and the rate at which the second OTN device sends data to the receiving device is less than the rate at which the first OTN device sends data to the second OTN device. In this case, reducing the amount of mapped data can prevent service data from becoming congested at the second OTN device, thus reducing the possibility of data loss.

[0174] In another possible implementation, 402 includes: when the amount of change in stored data is less than or equal to 0, determining the amount of mapped data based on the amount of first stored data in the first storage space and the container size of the OTU frame. The method for determining the amount of mapped data is the same as that for determining the amount of mapped data in 303.

[0175] When the change in stored data is less than or equal to 0, it indicates that the amount of data in the second storage space has decreased or remained unchanged, and the rate at which the second OTN device sends data to the receiving device is greater than or equal to the rate at which the first OTN device sends data to the second OTN device. In this case, determining the mapped data amount based on the amount of stored data in the first storage space and the container size of the OTU frame helps avoid a decrease in the data transmission rate between the second OTN device and the receiving device due to insufficient service data received by the second OTN device.

[0176] In this embodiment, the target data volume is determined based on the amount of data stored in the first storage space and the container size of the first OTN frame. That is, the target data volume is determined by combining the actual data transmission requirements and the transmission capacity of the first OTN frame. Then, the target data volume is adjusted by the change in stored data, which can determine a more suitable mapping data volume.

[0177] The following is combined Figure 6 The data transmission method provided in the embodiments of this application will be described by way of example. Figure 6 As shown, the method includes:

[0178] 1) The first OTN device generates the actual amount of data to be sent, Cm, in real time based on the OTN frame.

[0179] 2) Taking the j-th OTN frame as an example, before sending the j-th OTN frame in the sending direction, the instruction information sent by the second OTN device is received, that is, the notification [B(i)], where i represents the number of the OTN frame in the sending direction, and [B(i)] represents the amount of data stored in the second storage space before or after the second OTN device writes the service data in the i-th OTN frame into the second storage space of the second OTN device.

[0180] 3) The first OTN device continuously receives the indication information sent by the second OTN device, that is, the amount of data stored in the second storage space of the second OTN device, and determines the change in stored data RC(i) = B(i) - B(i-1).

[0181] 4) Before transmitting the j-th frame in the transmission direction, adjust the actual amount of data to be transmitted, Cm, according to RC, to obtain the mapped data amount Cm(j) of the j-th OTN frame. The adjustment method is as follows:

[0182] ·If RC(i)>0, Cm(j)=Cm–RC(i);

[0183] Otherwise, Cm(j) = Cm.

[0184] 5) Based on Cm(j), map the corresponding number of service data to the j-th OTN frame and send it.

[0185] For all OTN frames following the j-th OTN frame, the mapping data volume is determined using the above method. Assuming that the storage data change RC is greater than 0, the following table 1 shows the method for determining the mapping data volume.

[0186] Table 1. Algorithm for Adjusting Mapping Data Volume

[0187]

[0188] In another possible implementation, the target data volume can be the service data volume carried in a historical OTN frame, which is the most recently received OTN frame when the second OTN device sends the indication information. For example, in the above example, the most recently received OTN frame when sending the indication information is the i-th OTN frame, and the service data volume carried by the i-th OTN frame is the mapping data volume Cm(i) corresponding to the i-th OTN frame.

[0189] In this implementation, the first OTN device needs to store the mapping data volume corresponding to multiple consecutively transmitted OTN frames, so as to adjust the mapping data volume of the current OTN frame according to the service data volume carried in the historical OTN frames. The first OTN frame can determine the corresponding historical frame based on the identifier of the first OTN frame carried in the indication information.

[0190] When the target data volume can be the service data volume carried in historical OTN frames, in step 4 above, when determining the mapped data volume Cm(j) of the j-th OTN frame based on RC, it can also be replaced by the following method:

[0191] ·If RC(i)>0, Cm(j)=Cm(i)–RC(i);

[0192] Otherwise, Cm(j) = Cm.

[0193] Where Cm(i) represents the amount of service data carried by the first OTN device when sending the i-th OTN frame.

[0194] In this implementation, the amount of service data in the historical OTN frame closest to the time of sending the instruction information is taken as the target data amount, and the amount of storage data change is used to adjust the target data amount to determine the mapping data amount, which is beneficial to accurately control the change of the amount of storage data in the second storage space.

[0195] In this embodiment, the first OTN device determines the amount of data change in the second storage space of the second OTN device within the target period based on the received instruction information, and maps the service data in its first storage space to the first OTN frame based on the amount of data change. This amount of data change reflects the data transmission status between the second OTN device and the receiving device. Mapping the service data to the first OTN frame based on this data change reduces the possibility of data loss during data transmission between the transmitting and receiving devices, thus improving the reliability of data transmission.

[0196] It should be noted that in some examples, when step 303 is replaced by steps 401 and 402, steps 308-309 (i.e., the first OTN device does not generate the first response message based on the amount of data stored in the first storage space) can be removed, and step 313 is replaced by the sending device sending service data to the first OTN device based on the second response message.

[0197] Figure 7 This is a schematic diagram of a data transmission device provided in an embodiment of this application. This device can be implemented through software, hardware, or a combination of both, becoming all or part of the aforementioned first OTN device. For example... Figure 7 As shown, the data transmission device 700 includes: a receiving module 701, a storage module 702, a first transmitting module 703, a generating module 704, and a second transmitting module 705. The receiving module 701 receives service data transmitted by a transmitting device; the storage module 702 stores the service data in a first storage space of a first OTN device, the first storage space being used to store the service data transmitted by the transmitting device to the receiving device; the first transmitting module 703 transmits the service data to the receiving device through a second OTN device; the generating module 704 generates a first response message based on the occupancy information of the first storage space, the first response message indicating whether the transmitting device should continue transmitting service data; and the second transmitting module 705 transmits the first response message to the transmitting device.

[0198] Optionally, the occupancy information of the first storage space includes the amount of data stored in the first storage space. The generation module 704 is used to generate a first response message in the following ways: when the amount of data stored in the first storage space is less than a threshold, a first response message is generated to instruct the sending device to continue sending service data; or, when the amount of data stored in the first storage space is greater than or equal to the threshold, a first response message is generated to instruct the sending device to suspend sending service data.

[0199] In one possible implementation, the receiving module 701 is further configured to receive a second response message, which is sent by the receiving device and is used to indicate whether the receiving device has received the service data; the data transmission device further includes a discarding module 706, which is configured to discard the second response message.

[0200] In another possible implementation, the receiving module 701 is further configured to receive a second response message, which is sent by the receiving device and is used to indicate whether the receiving device has received the service data; the second sending module 705 is further configured to send the second response message to the sending device.

[0201] Figure 8 This is a schematic diagram of a data transmission device provided in an embodiment of this application. This device can be implemented through software, hardware, or a combination of both, becoming all or part of the aforementioned transmitting equipment. For example... Figure 8 As shown, the data transmission device 800 includes a sending module 801 and a receiving module 802. The sending module 801 is used to send service data to a first OTN device; the receiving module 802 is used to receive a first response message sent by the first OTN device. The first response message is used to indicate whether the sending device should continue to send service data to the first OTN device. The first response message is generated by the first OTN device based on the occupancy information of the first storage space of the first OTN device. The first storage space is used to store the service data sent by the sending device to the receiving device. The first OTN device is used to send the service data to the receiving device through a second OTN device.

[0202] Optionally, the receiving module 802 is further configured to receive a second response message, which is sent by the receiving device and is used to indicate whether the receiving device has received the service data; the data transmission device further includes a discarding module for discarding the second response message.

[0203] Figure 9This is a schematic diagram of a data transmission device provided in an embodiment of this application. This device can be implemented through software, hardware, or a combination of both, becoming all or part of the aforementioned first OTN device. For example... Figure 9 As shown, the data transmission device 900 includes: a first receiving module 901, a storage module 902, a second receiving module 903, a mapping module 904, and a sending module 905. The first receiving module 901 receives service data sent by a sending device; the storage module 902 stores the received service data in a first storage space of a first OTN device, the first storage space storing the service data sent by the sending device to the receiving device; the second receiving module 903 receives indication information sent by a second OTN device, the second OTN device including a second storage space storing the service data sent by the sending device to the receiving device, the indication information reflecting the change in stored data in the second storage space within a target period; the mapping module 904 maps the service data in the first storage space to a first OTN frame according to the change in stored data; and the sending module 905 sends the first OTN frame to the second OTN device.

[0204] Optionally, the mapping module 904 includes a first determining submodule 9041, a second determining submodule 9042, and a mapping submodule 9043. The first determining submodule 9041 is used to determine the target data volume based on the amount of data stored in the first storage space and the container size of the first OTN frame, or to use the amount of service data carried in a historical OTN frame as the target data volume, wherein the historical OTN frame is the most recently received OTN frame when the second OTN device sends the indication information; the second determining submodule 9042 is used to determine the mapped data volume based on the amount of change in stored data and the target data volume; the mapping submodule 9043 is used to map the service data in the first storage space to the first OTN frame according to the mapped data volume.

[0205] Optionally, the second determining submodule 9042 is used to take the difference between the target data amount and the storage data change amount as the mapped data amount when the storage data change amount is greater than 0.

[0206] Optionally, the service data includes multiple code block groups, each code block group belonging to a message. Each code block group includes a start code block and an end code block. The mapping submodule 9043 is used to determine the number of free code blocks based on the amount of mapped data and the container size; fill the space between the end code block of the first code block group and the start code block of the second code block group with free code blocks based on the number of free code blocks, wherein the first code block group and the second code block group are two adjacent code block groups in the service data; and map the filled service data into the first OTN frame.

[0207] Optionally, the mapping module 904 is further configured to carry data volume information in the overhead area of ​​the first OTN frame, the data volume information being used to indicate the amount of service data carried in the first OTN frame.

[0208] Optionally, the second receiving module 903 is used to receive a second OTN frame sent by the second OTN device, wherein the indication information is carried in the overhead area of ​​the second OTN frame.

[0209] Figure 10 This is a schematic diagram of a data transmission device provided in an embodiment of this application. This device can be implemented through software, hardware, or a combination of both, becoming all or part of the aforementioned second OTN device. For example... Figure 10 As shown, the data transmission device 1000 includes a transmitting module 1001 and a receiving module 1002. The transmitting module 1001 transmits indication information to the first OTN device, the second OTN device including a second storage space for storing service data transmitted from the transmitting device to the receiving device, the indication information reflecting the change in stored data in the second storage space within a target period; the receiving module 1002 receives a first OTN frame transmitted by the first OTN frame, the amount of service data carried in the first OTN frame being determined based on the change in stored data.

[0210] Optionally, the sending module 1003 is used to send a second OTN frame to the first OTN device, wherein the indication information is carried in the overhead area of ​​the second OTN frame.

[0211] It should be noted that the data transmission device provided in the above embodiments is only illustrated by the division of the above functional modules. In practical applications, the above functions can be assigned to different functional modules as needed, that is, the internal structure of the device can be divided into different functional modules to complete all or part of the functions described above. In addition, the data transmission device and data transmission method embodiments provided in the above embodiments belong to the same concept, and their specific implementation process can be found in the method embodiments, which will not be repeated here.

[0212] The descriptions of the processes corresponding to the above-mentioned figures each have their own emphasis. For parts of a process that are not described in detail, please refer to the relevant descriptions of other processes.

[0213] This application also provides a computer device 1100. For example... Figure 11As shown, computer device 1100 includes: bus 1102, processor 1104, memory 1106, and communication interface 1108. The processor 1104, memory 1106, and communication interface 1108 communicate with each other via bus 1102. Computer device 1100 can be a server or a terminal device. It should be understood that this application does not limit the number of processors and memories in computer device 1100.

[0214] Bus 1102 can be a Peripheral Component Interconnect (PCI) bus or an Extended Industry Standard Architecture (EISA) bus, etc. Buses can be categorized as address buses, data buses, control buses, etc. For ease of representation, Figure 7 The bus 1104 may be represented by a single line, but this does not mean that there is only one bus or one type of bus. The bus 1104 may include a path for transmitting information between various components of the computer device 1100 (e.g., memory 1106, processor 1104, communication interface 1108).

[0215] The processor 1104 may include any one or more processors such as a central processing unit (CPU), a graphics processing unit (GPU), a microprocessor (MP), or a digital signal processor (DSP).

[0216] The memory 1106 may include volatile memory, such as random access memory (RAM). The processor 1104 may also include non-volatile memory, such as read-only memory (ROM), flash memory, hard disk drive (HDD), or solid-state drive (SSD).

[0217] The memory 1106 stores executable program code, and the processor 1104 executes the executable program code to implement the functions of the aforementioned modules, thereby realizing the data transmission method. That is, the memory 1106 stores program code for executing the data transmission method.

[0218] The communication interface 1108 uses transceiver modules such as, but not limited to, network interface cards and transceivers to enable communication between the computer device 1100 and other devices or communication networks.

[0219] This application also provides a computer program product containing instructions. The computer program product may be a software or program product containing instructions, capable of running on a computer device or stored on any usable medium. When the computer program product is run on at least one computer device, it causes the at least one computer device to perform the aforementioned data transmission method.

[0220] This application also provides a computer-readable storage medium. The computer-readable storage medium can be any available medium that a computer device can store, or a data storage device such as a data center containing one or more available media. The available medium can be a magnetic medium (e.g., floppy disk, hard disk, magnetic tape), an optical medium (e.g., DVD), or a semiconductor medium (e.g., solid-state drive). The computer-readable storage medium includes instructions that instruct a computer device to perform the aforementioned data transmission method.

[0221] This application also provides a chip. The chip includes a processor and a communication interface, the communication interface being connected to the processor; the processor is used to execute instructions to cause the chip to perform the aforementioned data transmission method.

[0222] Unless otherwise defined, the technical or scientific terms used herein shall have the ordinary meaning as understood by one of ordinary skill in the art to which this application pertains. The terms “first,” “second,” “third,” and similar terms used in this patent application specification and claims do not indicate any order, quantity, or importance, but are merely used to distinguish different components. Similarly, the terms “an” or “a” and similar terms do not indicate a quantity limitation, but rather indicate the presence of at least one. The terms “comprising” or “including” and similar terms mean that the elements or objects preceding “comprising” or “including” encompass the elements or objects listed following “comprising” or “including” and their equivalents, and do not exclude other elements or objects. The “multiple” mentioned in the embodiments of this application refers to two or more. A and / or B indicate three possibilities: A; B; and A and B.

[0223] The above is merely one embodiment of this application and is not intended to limit this application. Any modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of this application should be included within the protection scope of this application.

Claims

1. A data transmission method, characterized by, The method comprises: a first optical transport network (OTN) device receiving service data sent by a sending device; storing the service data in a first storage space of the first OTN device, the first storage space being used to store service data sent by the sending device to a receiving device; sending the service data to the receiving device through a second OTN device; generating a first response message according to occupancy information of the first storage space, the first response message being used to indicate whether the sending device continues to send service data; sending the first response message to the sending device.

2. The method of claim 1, wherein, The occupancy information of the first storage space comprises an amount of data stored in the first storage space. The generating of the first response message according to the amount of data stored in the first storage space comprises: when the amount of data stored in the first storage space is less than a threshold value, generating the first response message used to indicate that the sending device continues to send service data; or when the amount of data stored in the first storage space is greater than or equal to the threshold value, generating the first response message used to indicate that the sending device suspends sending service data. The service data comprises a plurality of packets, at least one packet of the plurality of packets carrying a sequence preservation mark, and the first response message is associated with one packet of the service data carrying the sequence preservation mark; or a plurality of packets of the plurality of packets carry sequence preservation marks, and the first response message is associated with consecutive N packets of the service data carrying the sequence preservation marks, where N is an integer greater than 1 and less than the number of packets of the service data carrying the sequence preservation marks.

3. The method according to claim 1 or 2, characterized in that, The method further comprises: receiving a second response message sent by a receiving device, the second response message being used to indicate whether the receiving device receives the service data; and 4. The method according to any one of claims 1 to 3, characterized in that, discarding the second response message. The method comprises: a sending device sending service data to a first OTN device; 5. A data transmission method, characterized by, receiving a first response message sent by the first OTN device, the first response message being used to indicate whether the sending device continues to send service data to the first OTN device, the first response message being generated by the first OTN device according to occupancy information of a first storage space of the first OTN device, the first storage space being used to store service data sent by the sending device to a receiving device, and the first OTN device being used to send the service data to the receiving device through a second OTN device. The service data comprises a plurality of packets, at least one packet of the plurality of packets carrying a sequence preservation mark, and the first response message is associated with one packet of the service data carrying the sequence preservation mark; or a plurality of packets of the plurality of packets carry sequence preservation marks, and the first response message is associated with consecutive N packets of the service data carrying the sequence preservation marks, where N is an integer greater than 1 and less than the number of packets of the service data carrying the sequence preservation marks. The method further comprises:

6. The method of claim 5, wherein, receiving a second response message sent by a receiving device, the second response message being used to indicate whether the receiving device receives the service data; and ​ 7. The method according to claim 5 or 6, characterized in that, ​ ​ Discard the second response message.

8. A data transmission method, characterized by, Comprise: A first optical transport network (OTN) device receives service data sent by a sending device; Store the received service data in a first storage space of the first OTN device, the first storage space being used to store service data sent by the sending device to a receiving device; Receive indication information sent by a second OTN device, the second OTN device comprising a second storage space used to store service data sent by the sending device to the receiving device, the indication information being used to reflect a storage data change amount in the second storage space within a target period; Map the service data in the first storage space into a first OTN frame according to the storage data change amount; Send the first OTN frame to the second OTN device.

9. The method of claim 8, wherein, The mapping of the service data in the first storage space into a first OTN frame according to the storage data change amount comprises: Determine a target data amount according to a data amount stored in the first storage space and a container size of the first OTN frame, or take a service data amount carried in a historical OTN frame as the target data amount, the historical OTN frame being an OTN frame received most recently by the second OTN device when the indication information is sent; Determine a mapping data amount according to the storage data change amount and the target data amount; Map the service data in the first storage space into a first OTN frame according to the mapping data amount.

10. The method of claim 9, wherein, The determination of the mapping data amount according to the storage data change amount and the target data amount comprises: When the storage data change amount is greater than 0, take a difference between the target data amount and the storage data change amount as the mapping data amount.

11. The method according to claim 9 or 10, characterized in that, The service data comprises a plurality of code block groups, each of the plurality of code block groups comprising a start code block and an end code block; The mapping of the service data into a first OTN frame according to the mapping data amount comprises: Determine a number of idle code blocks according to the mapping data amount and the container size; Fill idle code blocks between an end code block of a first code block group and a start code block of a second code block group according to the number of idle code blocks, the first code block group and the second code block group being two adjacent code block groups in the service data; Map the filled service data into the first OTN frame.

12. The method according to any one of claims 9 to 11, characterized in that, The method further comprises: Carry data amount information in an overhead area of the first OTN frame, the data amount information being used to indicate a service data amount carried in the first OTN frame.

13. The method according to any one of claims 8 to 12, characterized in that, The indication information is used to indicate a data amount stored in a second storage space of the second OTN device.

14. The method according to any one of claims 8 to 13, characterized in that, The receiving of the indication information sent by the second OTN device comprises: Receive a second OTN frame sent by the second OTN device, the indication information being carried in an overhead area of the second OTN frame.

15. The method according to any one of claims 8 to 14, characterized in that, A length of the target period is equal to a length of a first OTN frame, or a length of a subframe of a first OTN frame.

16. A data transmission method, characterized by, Comprise: The second OTN device sends indication information to the first OTN device, the second OTN device comprises a second storage space, the second storage space is used for storing service data sent by a sending device to a receiving device, and the indication information is used for reflecting a storage data change amount in the second storage space in a target period. The first OTN device receives a first OTN frame sent by the sending device, and the service data amount carried in the first OTN frame is determined according to the storage data change amount.

17. The method of claim 16, wherein, The overhead area of the first OTN frame carries data amount information, and the data amount information is used for indicating the service data amount carried in the first OTN frame.

18. The method of claim 16 or 17, wherein, The indication information is used for indicating a data amount stored in the second storage space of the second OTN device.

19. The method according to any one of claims 16 to 18, characterized in that, The indication information is sent to the first OTN device by the following steps: The second OTN device sends a second OTN frame to the first OTN device, and the indication information is carried in the overhead area of the second OTN frame.

20. The method according to any one of claims 16 to 19, characterized in that, The length of the target period is equal to the length of the first OTN frame, or the length of a subframe of the first OTN frame.

21. A data transmission apparatus, characterized by comprising: The method comprises the following steps: A receiving module is configured to receive service data sent by a sending device; A storage module is configured to store the service data in a first storage space of a first OTN device, the first storage space is used for storing service data sent by the sending device to a receiving device; A first sending module is configured to send the service data to the receiving device through a second OTN device; A generating module is configured to generate a first response message according to occupation information of the first storage space, the first response message is used for indicating whether the sending device continues to send service data; A second sending module is configured to send the first response message to the sending device.

22. A data transmission apparatus, characterized by comprising: The method comprises the following steps: A sending module is configured to send service data to a first OTN device; A receiving module is configured to receive a first response message sent by the first OTN device, the first response message is used for indicating whether a sending device continues to send service data to the first OTN device, the first response message is generated by the first OTN device according to occupation information of a first storage space of the first OTN device, the first storage space is used for storing service data sent by the sending device to a receiving device, and the first OTN device is used for sending the service data to the receiving device through a second OTN device.

23. A data transmission apparatus, characterized by comprising: The method comprises the following steps: A first receiving module is configured to receive service data sent by a sending device; A storage module is configured to store the received service data in a first storage space of a first OTN device, the first storage space is used for storing service data sent by the sending device to a receiving device; A second receiving module is configured to receive indication information sent by a second OTN device, the second OTN device comprises a second storage space, the second storage space is used for storing service data sent by the sending device to the receiving device, and the indication information is used for reflecting a storage data change amount in the second storage space in a target period. mapping the service data in the first storage space into a first OTN frame according to the storage data change amount; sending the first OTN frame to the second OTN device.

24. A data transmission apparatus, characterized by comprising: comprising: sending module, configured to send indication information to the first OTN device, the indication information being used to reflect a storage data change amount in a target period in a second storage space used to store service data sent by a sending device to a receiving device; receiving module, configured to receive a first OTN frame sent by the first OTN frame, and the service data amount carried in the first OTN frame is determined according to the storage data change amount.

25. A computer device, comprising: comprising a processor and a memory, wherein the memory stores program code; the processor is configured to read and execute the program code stored in the memory to implement the method of any one of claims 1 to 4, or implement the method of any one of claims 5 to 7, or implement the method of any one of claims 8 to 15, or implement the method of any one of claims 16 to 20.

26. A computer-readable storage medium, characterized in that, The computer readable storage medium stores a software program, and the software program, when read and executed by one or more processors, can implement the method of any one of claims 1 to 4, or implement the method of any one of claims 5 to 7, or implement the method of any one of claims 8 to 15, or implement the method of any one of claims 16 to 20.

27. A communication system, characterized by comprising: a sending device and a first OTN device, the sending device is configured to send service data to the first OTN device; the first OTN device is configured to receive the service data; store the service data in a first storage space of the first OTN device, the first storage space being used to store service data sent by the sending device to a receiving device; send the service data to the receiving device through a second OTN device; generate a first response message according to occupancy information of the first storage space, the first response message being used to indicate whether the sending device continues to send service data; and send the first response message to the sending device; the sending device is further configured to receive the first response message.

28. A communication system, characterized by comprising: a first OTN device and a second OTN device, the first OTN device is configured to receive service data sent by a sending device; store the received service data in a first storage space of the first OTN device, the first storage space being used to store service data sent by the sending device to a receiving device; the second OTN device is configured to send indication information to the first OTN device, the second OTN device comprising a second storage space, the second storage space being used to store service data sent by the sending device to the receiving device, and the indication information being used to reflect a storage data change amount in a target period in the second storage space; The first OTN device is further configured to receive the indication information; map service data in the first storage space into a first OTN frame according to the storage data variation; and send the first OTN frame to the second OTN device. The second OTN device is further configured to receive the first OTN frame.