Communication method and apparatus, and electronic device, medium and program product
By dynamically adjusting the frame delimiter length at the physical layer, the traffic mismatch problem between communication devices is solved, business traffic synchronization between devices is achieved, and processing delay and chip area are reduced.
Patent Information
- Application Number
- PCT/CN2025/086698
- Authority / Receiving Office
- WO · WO
- Patent Type
- Applications
- Current Assignee / Owner
- Priority Date
- 2024-04-03
- Filing Date
- 2025-04-01
- Publication Date
- 2025-10-09
AI Technical Summary
In the scenario of interconnected communication devices, since each device has an independent local clock system, the traffic between devices does not match, resulting in frame loss of business traffic.
By dynamically adjusting the frame delimiter length of the bit stream at the physical layer and adjusting the frame delimiter length according to the amount of data in the buffer, service traffic synchronization between devices is achieved.
It reduces the processing delay and chip area of business traffic performance synchronization and improves the efficiency of traffic adaptation between devices.
Smart Images

Figure CN2025086698_09102025_PF_FP_ABST
Abstract
Description
Communication method, device, electronic device, medium and program product Technical Field
[0001] The embodiments of the present disclosure generally relate to the field of communication technology. More specifically, the embodiments of the present disclosure relate to a communication method, apparatus, electronic device, computer-readable storage medium, and computer program product for device synchronization. Background Art
[0002] In interconnected communication device scenarios, each device has its own independent local clock system, resulting in performance differences. Even if all devices use the same clock system, differences in operating environments can result in different clock frequencies. This can lead to traffic mismatches between devices. For example, if the sender runs on a device with a higher frequency and the receiver runs on a device with a lower frequency, over time, more and more traffic will accumulate on the receiving device, unable to be processed. This can lead to frame loss. Clearly, measures are needed to prevent this from happening. Traffic adaptation processing must be performed within different communication devices to achieve performance synchronization between them. Summary of the Invention
[0003] To address the problem of service message throughput differences caused by clock source differences between devices, embodiments of the present disclosure provide a communication method, apparatus, electronic device, computer-readable storage medium, and computer program product.
[0004] According to the first aspect of the present disclosure, a communication method is provided. The communication method includes: at a first device, obtaining the amount of data in a cache, the cache including frames to be transmitted to a second device via a bit stream; based on a comparison between the amount of data and at least one threshold, sending adjustment information for the length of a frame delimiter in the bit stream to the second device; and transmitting the bit stream to the second device based on the frame delimiter after the length adjustment. Based on this approach, the device can dynamically adjust the length of the frame delimiter in the sent bit stream (i.e., the size of the overhead) at the physical layer according to the amount of data to be sent in the cache, change the throughput of data transmission, and achieve synchronization of service traffic between devices. The advantage of this solution is that it solves the service synchronization performance problem caused by clock frequency deviation at the physical layer without the link layer and higher layer logic participating in the processing, thereby significantly reducing the processing delay and chip area of service traffic performance synchronization.
[0005] In some embodiments of the first aspect, at least one threshold includes a first threshold and a second threshold, the first threshold being less than the second threshold, wherein the comparison of the data volume with the at least one threshold includes: determining to increase the length of the frame delimiter in response to the data volume being less than or equal to the first threshold; and determining to decrease the length of the frame delimiter in response to the data volume being greater than or equal to the second threshold. Based on this approach, two high and low thresholds are provided to help determine the transmission performance of a device. When the amount of data in the buffer is less than the smaller threshold (the first threshold), it indicates that the first device currently has low transmission performance and the frames to be sent in the buffer may be exhausted. In this case, the length of the frame delimiter can be increased, reducing the throughput of the bitstream transmitted to the second device. When the amount of data in the buffer is greater than the higher threshold (the second threshold), it indicates that the second device currently has high transmission performance and the frames to be sent in the buffer need to be sent as soon as possible, otherwise data will be lost. In this case, the length of the frame delimiter can be reduced, increasing the throughput of the bitstream transmitted to the second device. When the amount of data in the buffer is between the first and second thresholds, it indicates that the traffic between the devices is relatively balanced, and the length of the frame delimiter may not be adjusted.
[0006] In some embodiments of the first aspect, the length of the frame delimiter is adjusted by a step size of a predefined number of bytes. Based on this approach, the transmission performance of the current device can be gradually controlled in a simple manner to achieve service flow performance synchronization between devices.
[0007] In some embodiments of the first aspect, the adjustment information is included in at least one frame delimiter of the bitstream. In this manner, an existing bitstream can be reused to transmit the adjustment information. The adjustment information is included in a control transfer information field of the frame delimiter without requiring an additional control message, thereby saving resources.
[0008] In some embodiments of the first aspect, sending adjustment information about the length of a frame delimiter of a bit stream of the second device to the second device includes sending the adjustment information via each of a plurality of consecutive frame delimiters of the bit stream. Based on this approach, the data transmission party (first device) can increase the reliability of the transmitted information through multiple transmissions, and more reliably indicate the adjustment information about the length of the frame delimiter to the data receiving method (second device). In some implementations, the adjustment information can be encoded to further improve the reliability of the information.
[0009] In some embodiments of the first aspect, the method further comprises: adjusting the length of a frame delimiter following a plurality of consecutive frame delimiters, so as to ensure that after the adjustment information is reliably indicated, the adjusted frame delimiter is used to transmit traffic within the corresponding window.
[0010] In some embodiments of the first aspect, the method further includes: receiving a bit stream for a second device; extracting a frame to be transmitted to the second device based on a frame delimiter in the received bit stream; and storing the extracted frame in a cache. Here, the cache can be a receiving cache of the device. In the scenario of business data forwarding, the first device only needs to perform a low-overhead frame partitioning operation on the received bit stream and monitor the amount of data in the cache to achieve throughput synchronization between the received and transmitted bit streams. The device does not need to perform any data stream link layer and higher layer decoding operations, which significantly reduces processing delay and overhead.
[0011] In some embodiments of the first aspect, the method further includes: generating a frame to be transmitted to the second device; and storing the generated frame in a buffer. Here, the buffer may be a transmit buffer of the device. In a scenario where the first device generates service traffic to the second device (i.e., the service traffic originates from the data link layer or higher), the first device can synchronize the high-level service traffic with the transmitted bit stream by monitoring the amount of data in the transmit buffer.
[0012] In some embodiments of the first aspect, the buffer may include a first-in-first-out (FIFO) buffer. Based on this approach, service traffic related to the second device can be sent in sequence.
[0013] In some embodiments of the first aspect, the adjustment information includes an encoded binary value. Based on this approach, the adjustment information can be indicated to the data receiver in a simple and effective manner.
[0014] In some embodiments of the first aspect, the frame delimiter includes an alignment word marker, which includes a first coded field indicating frame division, a second coded field including adjustment information, and a variable-length null data field. The length of the null data field can be adjusted based on traffic differences between devices to control the total length of the frame delimiter. In this manner, the existing bitstream is reused to transmit the adjustment information without requiring additional control messages, thereby saving resources.
[0015] According to a second aspect of the present disclosure, a communication method is provided. The communication method includes: receiving, at a second device, a bitstream from a first device, the bitstream including a frame and a frame delimiter; receiving, from the first device, adjustment information regarding the length of the frame delimiter in the bitstream; and determining, based on the adjustment information, the adjusted length of the frame delimiter. In this manner, the second device, as a data receiver, can be notified of the frame delimiter length adjustment information, ensuring correct reception of the bitstream from the first device.
[0016] In some embodiments of the second aspect, the method further includes: extracting a frame from the bitstream based on the adjusted length. In this manner, the second device can correctly extract a frame from the received bitstream.
[0017] In some embodiments of the second aspect, the adjustment information comprises an encoded binary value.
[0018] In some embodiments of the second aspect, the adjustment information indicates increasing or decreasing the length of the frame delimiter, and the step size of the length being adjusted is a predefined number of bytes.
[0019] In some embodiments of the second aspect, the adjustment information is included in at least one frame delimiter of the bitstream.
[0020] In some embodiments of the second aspect, determining the adjusted length of the frame delimiter may include: in response to determining that at least a predetermined number of the plurality of consecutive frame delimiters include adjustment information, determining that the length of the frame delimiter is to be adjusted. In this manner, reliability of the adjustment information from the first device may be ensured.
[0021] In some embodiments of the second aspect, determining the adjusted length of the frame delimiter may include: in response to each of the plurality of consecutive frame delimiters including the adjustment information, determining that the length of the frame delimiter is to be adjusted. In this manner, reliability of the adjustment information from the first device may be ensured.
[0022] In some embodiments of the second aspect, determining the adjusted length includes determining that a frame delimiter following a plurality of consecutive frame delimiters has the adjusted length. Based on this, the service traffic is received within the corresponding window using the adjusted frame delimiter.
[0023] In some embodiments of the second aspect, the frame delimiter may include an alignment word marker, the alignment word marker including a first encoding field indicating frame division, a second encoding field including adjustment information, and a variable-length null data field.
[0024] In some embodiments of the second aspect, the method further includes: in response to determining that there is a decoding error in the physical layer data, resetting the communication link between the second device and the first device. Based on this approach, the reliability of the communication system is further improved.
[0025] According to a third aspect of the present disclosure, a communication device is provided. The communication device includes: an acquisition unit configured to acquire an amount of data in a buffer, the buffer including frames to be transmitted to a second device via a bitstream; and a transmission unit configured to send, to the second device, adjustment information for the length of a frame delimiter in the bitstream based on a comparison between the amount of data and at least one threshold value, and the transmission unit is further configured to transmit the bitstream to the second device based on the frame delimiter after the length adjustment.
[0026] According to a fourth aspect of the present disclosure, a communication apparatus is provided. The communication apparatus includes: a receiving unit configured to receive a bit stream including a frame and a frame delimiter from a first device, and receive adjustment information for the length of the frame delimiter from the first device; and a determining unit configured to determine the adjusted length of the frame delimiter based on the adjustment information.
[0027] According to the fifth aspect of the present disclosure, an electronic device is provided, comprising: a processor, the processor comprising multiple processing cores; and a memory; at least one processing core of the multiple processing cores is configured to execute instructions in the memory, so that the electronic device executes the communication method described in the first aspect or the second aspect of the present disclosure.
[0028] According to a sixth aspect of the present disclosure, a computer-readable storage medium is provided, on which one or more computer instructions are stored, wherein the one or more computer instructions are executed by a processor to enable the processor to execute the communication method according to the first aspect or the second aspect of the present disclosure.
[0029] According to a seventh aspect of the present disclosure, a computer program product is provided, comprising machine-executable instructions, which, when executed by a device, cause the device to perform the communication method according to the first aspect or the second aspect of the present disclosure. BRIEF DESCRIPTION OF THE DRAWINGS
[0030] The above and other features, advantages and aspects of the various embodiments disclosed in this application will become more apparent with reference to the following detailed description in conjunction with the accompanying drawings. In the accompanying drawings, the same or similar reference numerals represent the same or similar elements, wherein:
[0031] FIG1 illustrates a schematic diagram of an example environment in which various embodiments of the present disclosure can be implemented;
[0032] FIG2 is a schematic diagram illustrating a structure of a bit stream transmitted between devices according to some embodiments of the present disclosure;
[0033] FIG3 shows a schematic block diagram of a communication system according to some embodiments of the present disclosure;
[0034] FIG4 is a schematic diagram illustrating a process of dynamically adjusting the length of a frame delimiter according to some embodiments of the present disclosure;
[0035] FIG5 shows a schematic flow chart of a communication method according to some embodiments of the present disclosure;
[0036] FIG6 shows a schematic flow chart of another communication method according to some embodiments of the present disclosure;
[0037] FIG7 shows a schematic block diagram of a communication device according to some embodiments of the present disclosure;
[0038] FIG8 shows a schematic block diagram of another communication device according to some embodiments of the present disclosure; and
[0039] FIG9 shows a schematic block diagram of an example device that may be used to implement embodiments of the present disclosure. DETAILED DESCRIPTION
[0040] The following describes embodiments of the present disclosure in more detail with reference to the accompanying drawings. Although certain embodiments of the present disclosure are shown in the accompanying drawings, it should be understood that the present disclosure can be implemented in various forms and should not be construed as limited to the embodiments described herein. Rather, these embodiments are provided to provide a more thorough and complete understanding of the present disclosure. It should be understood that the drawings and embodiments of the present disclosure are for illustrative purposes only and are not intended to limit the scope of protection of the present disclosure.
[0041] In the description of the embodiments of the present disclosure, the term "including" and similar terms should be understood as open inclusion, that is, "including but not limited to." The term "based on" should be understood as "based at least in part on." The term "one embodiment" or "the embodiment" should be understood as "at least one embodiment." The terms "first," "second," etc. may refer to different or the same objects. Other explicit and implicit definitions may also be included below.
[0042] In interconnected communication equipment scenarios, each device's board system has its own independent local clock system. Each device's clock source system is independent, making it difficult to have a single clock source system for the entire network. Even if devices use the same clock frequency, differences in operating environments can result in differences in the final output clock frequency. Therefore, traffic adaptation is required for the same service traffic across different communication devices to ensure service performance is met.
[0043] Some traditional solutions adjust the intervals between messages at the data link layer or above based on the different clock sources of each device. For example, by adjusting the number of idle messages, they can compensate for performance deviations caused by different clock source frequencies. However, this method requires additional encoding and decoding operations on the bit stream. For example, the receiving device needs to decode the frames in the bit stream, identify service messages and idle messages, and re-encode after inserting the idle message. This results in increased processing delays in the device chip and involves the area overhead of multiple physical layer protocol processing.
[0044] In view of this, an embodiment of the present disclosure provides a solution for dynamically adjusting the overhead size of the frame delimiter of the bit stream at the physical layer to solve the problem of differences in business traffic processing between different devices. According to an embodiment of the present disclosure, a cache is added in the device to cache the data frames to be sent. The difference in traffic performance between devices is directly reflected in the size of the data volume in the cache. Therefore, the sending side traffic of the local device can be dynamically adjusted according to the size of the data volume in the cache. If the amount of cached data becomes larger, the length of the frame delimiter (i.e., the sending overhead) is reduced, thereby increasing the throughput of the device's sending bit stream. If the amount of cached data becomes smaller, the length of the frame delimiter can be increased to reduce the throughput of the device's sending bit stream. In this way, the amount of data in the cache can be kept at a relatively reasonable position, thereby achieving synchronization of business traffic between devices.
[0045] Exemplary embodiments of the present disclosure are described in detail below with reference to FIG. 1 to FIG. 9 .
[0046] FIG1 illustrates a schematic diagram of an example environment in which various embodiments of the present disclosure can be implemented. Environment 100 includes device 110, device 120, and device 130. In FIG1 , traffic flows between devices 110, 120, and 130. Device 110 transmits a bit stream 115 comprising traffic to the receiving (Rx) end of device 120. The traffic includes frames addressed to device 130. The Rx end of device 120 receives bit stream 115 and parses it to obtain frames addressed to device 130. Then, via its transmitting (Tx) end, device 120 includes the frames addressed to device 130 in bit stream 125 and transmits the frames to the Rx end of device 130. Here, device 120 fulfills the role of transmitting traffic from device 110 to device 130. As shown in the figure, devices 110, 120, and 130 each have corresponding clock sources 112, 122, and 132. Since there may be a frequency deviation between clock sources 112 and 122 , the speed at which device 120 receives bit stream 115 from device 110 may be different from the speed at which device 120 sends bit stream 125 to device 130 , resulting in asynchrony of traffic between the devices.
[0047] As mentioned above, some traditional methods achieve inter-device traffic flow synchronization by adjusting the number of idle messages within the traffic flow. Their shortcomings will be further illustrated with reference to Figure 1. According to the physical link layer protocol, the bit stream transmitted between devices is a code stream at the physical layer. The receiving device cannot distinguish which code streams are service messages and which are idle, invalid data. Therefore, on the receiving side of device 120, physical layer protocol parsing (e.g., frame segmentation) is required to delimit the physical layer frame boundaries. Physical layer data decoding, such as Reed-Solomon (RS) decoding or other methods, is then performed based on the frame boundaries to recover the data link layer messages. Then, the messages are recovered and parsed at the data link layer to distinguish between service messages, management messages, and idle messages. Based on the recovered messages, the messages are re-encoded at the link layer, sent to the physical layer for encoding, re-sent to the physical link, and then sent to the peer device 130. Because the local clock frequency of device 120 may differ from the local clock frequency of device 110, the Tx end capability of device 120 to send service messages differs from that of device 110. Device 120 can adjust the number of idle messages it sends based on its message processing capabilities at the link layer. If the frequency of device 120's local clock 122 is greater than the frequency of device 110's local clock 112, this means that device 120's service message throughput is greater than that of device 110. In addition to sending service messages from device 110, device 120 must also send additional idle messages to fill the gap. If the frequency of device 120's local clock 122 is less than the frequency of device 110's local clock 112, this means that device 120's service message throughput is lower than that of device 110. Device 120 must reduce the number of idle messages between service messages to ensure that service messages from device 110 are sent to device 130 as expected. This approach increases the device's chip processing latency and involves the overhead of multiple physical layer protocol processing areas.
[0048] According to an embodiment of the present disclosure, device 120 can adjust the throughput of service packets sent from device 120 to device 130 by changing the length of the frame delimiter in the transmitted bitstream 125 (i.e., the corresponding transmission overhead), so that it matches the throughput of service packets from device A. In some embodiments, device 120 can set up a buffer for storing frames to be sent to device 130, monitor the amount of data in the frame, and adjust the length of the frame delimiter in bitstream 125 based on the data amount. To better understand the present invention, an exemplary structure of a bitstream transmitted between devices is described in conjunction with FIG2.
[0049] FIG2 shows a schematic diagram of an exemplary structure of a bit stream 200 transmitted between devices according to some embodiments of the present disclosure. Based on a local clock source, a communication device (e.g., device 110 or 120) sends a bit stream 200 as shown in the figure. The bit stream 200 includes frames 201 arranged at intervals and a frame delimiter 202. At the data link layer, the bit stream 200 is split into multiple discrete frames 201. Typically, in order to reduce the bit error rate, the frames 201 can be coded data, including business data and a checksum. Frame coding methods may include, but are not limited to, Hamming codes, binary convolutional codes, Reed-Solomon codes, low-density parity-check codes, 4B / 5B codes, 64B / 66B codes, or combinations thereof.
[0050] Frame delimiter 202 is used to demarcate the boundaries of frame 201, allowing the receiver to detect the beginning of a new frame. In some implementations, frame delimiter 202 can be implemented as an alignment marker (AM). Frame delimiter 202 can include a specially encoded bit sequence, for example, a bit sequence reserved for use based on the frame encoding method. Once the receiver detects the presence of such a bit sequence, it determines that a new frame is about to arrive.
[0051] The frame delimiter 202 may include a coded field (e.g., the reserved bit sequence described above) for indicating frame division, which may be, for example, 20 bytes in size. The frame delimiter 202 may also include a field carrying control information, such as indicating the size of the next frame. The field carrying control information may also carry other control information, such as adjustment information for the frame delimiter length (via one or more designated bits) as described herein. A predefined coded value may indicate whether the frame delimiter length will be increased or decreased. The lengths of the coded field indicating frame division and the field carrying control information may be fixed.
[0052] The length of the frame delimiter 202 may include a variable-length field (e.g., a non-negative integer, preferably an integer multiple of 4), making the total length of the frame delimiter 202 variable. This field may be empty data that carries no information. For example, the empty data field may increase or decrease in predefined steps, thereby changing the length of the frame delimiter 202. For example, the default total length of the frame delimiter 202 may be 40 bytes, and may be changed in steps of 4 bytes, for example, reduced to 36 bytes, 32 bytes, or lower, or increased to 44 bytes, 48 bytes, or greater. It will be understood that the larger the length, the greater the transmission overhead of the frame delimiter 202, and the fewer service messages included in the bit stream within a given time, i.e., the throughput of service messages is reduced. The reverse is also true. It should be noted that the receiver needs to know the length of the frame delimiter 202 in advance in order to correctly demarcate the start position of a new frame.
[0053] Figure 3 shows a schematic block diagram of a communication system 300 according to some embodiments of the present disclosure. In Figure 3, the communication system 300 includes a device 320 and a device 330, wherein the device 320 may be an exemplary implementation of the device 120 shown in Figure 1, and the device 330 may be an exemplary implementation of the device 130 shown in Figure 1.
[0054] As shown in the figure, device 320 receives bitstream 315 via physical layer receiver 322. Bitstream 315 may include frames to be transmitted to device 330, wherein the frames include service packets. In this case, device 320, as an intermediate device, receives bitstream 315 from an upstream device (not shown, such as device 110 in FIG. 1 ), obtains the frames to be transmitted to device 330, and forwards bitstream 325 including the frames to be transmitted to device 330 to device 330 via physical layer transmitter 328. Bitstream 315 and bitstream 325 may have the structure of a bitstream as shown in FIG. 2 .
[0055] In response to receiving the bitstream 315, the device 320 may perform a framing operation on the bitstream 315 and store the obtained frames 324 in a buffer 323. The buffer 323 may be a first-in-first-out (FIFO) buffer. Frames that enter the buffer 323 first may be provided to the physical layer transmitter 328 earlier and transmitted to the device 330 via the bitstream 325. In some embodiments, the device 320 may detect a frame delimiter in the bitstream 315, divide the bitstream 315 into a sequence of frames, and sequentially input the frames 324 into the buffer 323. In some embodiments, the frame delimiter may be an alignment marker (AM). In this case, the device 120 may perform data stream boundary locking, such as AM locking, on the physical layer receiving side 322, extract the data stream bounded by the AM (i.e., the divided frames), and input the frames into the buffer 323. It should be noted that the device 320 only needs to extract and save the frame 324 from the bitstream 315 to the buffer 323 , and does not need to perform any link layer and higher layer encoding and decoding operations on the frame 324 in the buffer 323 .
[0056] Device 320 includes a frame delimiter length control module 326 for monitoring the amount of data in frame 324 within buffer 323. In some embodiments, frame delimiter length control module 326 sets one or more thresholds for buffer 323 and determines whether to adjust the length of a frame delimiter (e.g., AM) in bitstream 325 by comparing the amount of data in buffer 323 with the thresholds. In some embodiments, the thresholds may include a first threshold serving as a lower watermark and a second threshold serving as an upper watermark, where the first threshold is less than the second threshold. Control module 326 may determine whether to adjust the length of the frame delimiter based on the comparison of the amount of data in buffer 323 with the first and second thresholds.
[0057] If the data volume is less than or equal to a first threshold, indicating that the amount of data in buffer 323 is relatively small and device 323 is currently transmitting bitstream 325 at a relatively high throughput, control module 326 can trigger physical layer transmitter 328 to increase the overhead of the frame delimiter, thereby slowing down the consumption of frames 324 in buffer 323. If the data volume is greater than or equal to a second threshold, indicating that the amount of data in buffer 323 is relatively large and device 323 is currently transmitting bitstream 325 at a relatively low throughput, control module 326 can trigger physical layer transmitter 328 to reduce the overhead of the frame delimiter, thereby speeding up the consumption of frames 324 in buffer 323. For example, in response to the data volume being less than or equal to the first threshold, four bytes of null data can be added to the frame delimiter, or in response to the data volume being greater than or equal to the second threshold, the null data field of the frame delimiter can be reduced by four bytes. It should be understood that a frame delimiter should at least include a coding field indicating frame division and a field carrying control information, and these contents should not be deleted.
[0058] In some embodiments, more thresholds can be configured to reflect the degree of traffic difference between devices or the urgency of the current need to adjust the frame delimiter. For example, if the amount of data is lower than or equal to the third threshold, which is a threshold smaller than the first threshold, it is desired to slow down the speed of consuming frames 324 more quickly, and more empty data (e.g., 8 bytes) can be added to the frame delimiter. Similarly, if the amount of data is higher than or equal to the fourth threshold, which is a threshold larger than the second threshold, it is desired to consume the data in the cache 323 more quickly, and more empty data (e.g., 8 bytes) can be reduced in the frame delimiter, but the empty data is at least 0 bytes, that is, it does not affect the coding field indicating the frame division and the field carrying control information.
[0059] To ensure that device 330 can correctly extract frames from bitstream 325, control module 326 can instruct device 330 to send adjustment information regarding the length of the frame delimiters in bitstream 325 before actually adjusting the length of the frame delimiters. In some embodiments, the adjustment information can be sent in one or more consecutive frame delimiters in bitstream 325, where the adjustment information can be indicated by a coded field in the frame delimiters. Accordingly, device 330 receives the adjustment information regarding the length of the frame delimiters in bitstream 325 from device 320 and determines the adjusted length of the frame delimiters based on the adjustment information. If the frame delimiter is an alignment marker (AM), a binary value encoded for a specific field of the AM can be set to indicate whether the frame delimiter length will be increased or decreased. Thus, before adjusting the frame delimiter overhead size, the adjustment information is transmitted to device 330 via the content of the AM itself, multiple AM windows in advance, allowing device 330 to perceive the moment of AM overhead adjustment.
[0060] Specifically, as shown in FIG3 , device 330 receives a bitstream from device 320 via a physical layer receiver 332. A framing module 336 can detect new frames in bitstream 325 through frame delimiters and locate the new frame based on the current frame delimiter length, thereby obtaining frame data from bitstream 325 for subsequent processing. Device 330 also includes a frame delimiter length determination module 334, which is configured to detect whether a frame delimiter contains adjustment information for the frame delimiter length, thereby enabling dynamic adjustment of the frame delimiter. In some embodiments, device 330 can determine that the frame delimiter length will be adjusted if at least a predetermined number of consecutive frame delimiters contain adjustment information (e.g., based on a majority rule). The offset from the starting position of the new frame delimiter to the earliest frame delimiter containing the adjustment information can be predefined (e.g., the fourth or any other number). Alternatively, a stricter determination condition can be implemented, confirming that the frame delimiter length will change only if multiple (e.g., at least three) consecutive frame delimiters contain adjustment information. When the conditions are met, the frame delimiter length determination module 334 provides the changed frame delimiter length information, for example, increasing or decreasing by 4 bytes, to the framing module 336. In this way, the device 330 and the device 320 synchronize the frame delimiter length information, ensuring that the bit stream 325 can be correctly framed.
[0061] It should be noted that although device 320 in FIG3 acts as an intermediate device to forward service data, and buffer 323 is implemented as a receive buffer, the embodiments of the present disclosure are also applicable to scenarios where device 320 itself generates service data. In this case, buffer 323 acts as a transmit buffer to store frames to be sent to device 330, which include service messages from the data link layer or higher layers. According to the embodiments of the present disclosure, synchronization between high-level service traffic and the transmitted bit stream can be achieved by monitoring the amount of data in the transmit buffer.
[0062] FIG4 is a schematic diagram illustrating a process of dynamically adjusting the length of a frame delimiter according to some embodiments of the present disclosure. For ease of explanation, FIG4 is described with reference to FIG3 and using an alignment marker (AM) as an example of a frame delimiter.
[0063] The dynamic adjustment mechanism of device 320 includes the following process. If the size of FIFO buffer 323 reaches the upper limit, indicating that the transmit traffic 325 of device 320 is less than the receive traffic 315, it is necessary to reduce the AM overhead size and increase the data traffic sent. For example, AM = 40 bytes can be reduced to AM = 36 bytes. Starting from the current AM window, AM window adjustment information is transmitted in three consecutive AM windows (not limited to three and can be configured according to link requirements). The information of the fourth AM window and subsequent AM windows (AM = 36 bytes) is transmitted to device 330 using special encoding content in the three consecutive AM windows. Then, device 320 changes the AM size to AM = 36 bytes in the fourth AM window.
[0064] Figure 4 illustrates the situation where the AM window needs to be increased. If the FIFO buffer 323 reaches its lower limit, indicating that the transmit traffic 325 of device 320 is greater than the receive traffic 315, the AM overhead size needs to be increased to reduce the amount of data being sent. For example, AM = 36 bytes can be increased to AM = 40 bytes. Starting with the current AM window, three consecutive AM windows transmit AM window adjustment information (not limited to three, this can be configured based on link requirements). Information from the fourth and subsequent AM windows (AM = 40 bytes) is transmitted to device 330 using specially encoded content within the three consecutive AMs. Then, device 320 changes the AM size to AM = 40 bytes in the fourth AM window.
[0065] If the FIFO buffer size has not reached either the upper limit or the lower limit, the current AM size will remain unchanged without any adjustment, and no message about the AM size change will be sent.
[0066] Device 330's mechanism for dynamically adjusting the AM includes the following process. Based on the received AM content, device 330 extracts the AM message from the AM. If the message contains AM size adjustment information, and if it is included in three consecutive AM windows or in two of three messages (a voting mechanism ensures the reliability of the adjustment information), the received AM adjustment information is considered valid. If the AM message indicates an increase or decrease in the AM size, bitstream 325 is received in the fourth AM window according to the new AM size. If no AM size adjustment information is received, the AM size remains unchanged and new data continues to be received.
[0067] In some embodiments, if an AM adjustment message exception occurs on device 330, or an exception occurs in the physical layer decoding state machine, device 330 may report the exception to the software system for processing. The upper-layer software then restarts the link between device 320 and device 330 to restore the link.
[0068] FIG5 shows a schematic flow chart of a communication method 500 according to some embodiments of the present disclosure. The method 500 may be executed by a first device, such as the device 120 shown in FIG1 .
[0069] In method 500, at 510, a first device obtains the amount of data in a buffer, the buffer including frames to be transmitted to a second device via a bitstream. The second device may be, for example, device 130 shown in FIG1 . At 520, the first device sends, to the second device, adjustment information regarding the length of a frame delimiter in the bitstream based on a comparison of the amount of data with at least one threshold. At 530, the first device transmits the bitstream to the second device based on the adjusted length of the frame delimiter.
[0070] In some embodiments, the at least one threshold may include a first threshold and a second threshold, the first threshold being less than the second threshold, wherein the comparison of the data amount and the at least one threshold includes: in response to the data amount being less than or equal to the first threshold, determining to increase the length of the frame delimiter; and in response to the data amount being greater than or equal to the second threshold, determining to reduce the length of the frame delimiter.
[0071] In some embodiments, the length of the frame delimiter may be adjusted in steps of a predefined number of bytes.
[0072] In some embodiments, the adjustment information may be included in at least one frame delimiter of the bitstream.
[0073] In some embodiments, sending adjustment information for the length of a frame delimiter of the bitstream of the second device to the second device may include sending the adjustment information via each of a plurality of consecutive frame delimiters of the bitstream.
[0074] In some embodiments, the method 500 may further include: adjusting the length of a frame delimiter following the plurality of consecutive frame delimiters.
[0075] In some embodiments, the method 500 may further include: receiving a bitstream for the second device; extracting a frame to be transmitted to the second device based on a frame delimiter in the received bitstream; and storing the extracted frame in the buffer.
[0076] In some embodiments, the method 500 may further include: generating a frame to be transmitted to the second device; and storing the generated frame in the buffer.
[0077] In some embodiments, the cache may include a first-in-first-out (FIFO) cache.
[0078] In some embodiments, the adjustment information may include an encoded binary value.
[0079] In some embodiments, the frame delimiter includes an alignment word marker, and the alignment word marker includes a first coding field indicating frame division, a second coding field including the adjustment information, and a variable-length empty data field.
[0080] FIG6 shows a schematic flow chart of another communication method 600 according to some embodiments of the present disclosure. The method 600 may be executed by a second device, such as the device 130 shown in FIG1 .
[0081] In method 600, at 610, a second device receives a bitstream from a first device, the bitstream including a frame and a frame delimiter. At 620, the second device receives adjustment information for the length of the frame delimiter of the bitstream from the first device. At 620, the second device determines an adjusted length of the frame delimiter based on the adjustment information.
[0082] In some embodiments, method 600 may further include extracting the frame from the bitstream based on the adjusted length.
[0083] In some embodiments, the adjustment information may include an encoded binary value.
[0084] In some embodiments, the adjustment information may indicate increasing or decreasing the length of the frame delimiter, and the length may be adjusted by a step of a predefined number of bytes.
[0085] In some embodiments, the adjustment information may be included in at least one frame delimiter of the bitstream.
[0086] In some embodiments, determining the adjusted length of the frame delimiter comprises determining that the length is to be adjusted in response to determining that at least a predetermined number of frame delimiters of a plurality of consecutive frame delimiters include the adjustment information.
[0087] In some embodiments, determining the adjusted length of the frame delimiter may include determining that the length is to be adjusted in response to each of a plurality of consecutive frame delimiters including the adjustment information.
[0088] In some embodiments, determining the adjusted length may include determining that a frame delimiter subsequent to the plurality of consecutive frame delimiters has the adjusted length.
[0089] In some embodiments, the frame delimiter may include an alignment word marker, wherein the alignment word marker includes a first coding field indicating frame division, a second coding field including the adjustment information, and a variable-length empty data field.
[0090] In some embodiments, the method 600 may further include: in response to determining that there is a decoding error of the physical layer data, resetting the communication link between the second device and the first device.
[0091] FIG7 shows a schematic block diagram of a communication device 700 according to some embodiments of the present disclosure. The device 700 can be implemented in the first device described above or by the first device. The device 700 includes an acquisition unit 710 and a transmission unit 720. The acquisition unit 710 is configured to acquire an amount of data in a buffer, the buffer including frames to be transmitted to a second device via a bitstream. The transmission unit 720 is configured to send adjustment information for the length of a frame delimiter in the bitstream to the second device based on a comparison between the amount of data and at least one threshold. The transmission unit 710 is further configured to transmit the bitstream to the second device based on the adjusted length of the frame delimiter.
[0092] FIG8 shows a schematic block diagram of another communication apparatus 800 according to some embodiments of the present disclosure. Apparatus 800 may be implemented in or by the second device described above. Apparatus 800 includes a receiving unit 810 and a determining unit 820. Receiving unit 810 is configured to receive a bitstream including a frame and a frame delimiter from a first device, and to receive adjustment information for the length of the frame delimiter from the first device. Determining unit 820 is configured to determine the adjusted length of the frame delimiter based on the adjustment information.
[0093] The above referenced Figures 1 to 8 describe a mechanism for dynamically adjusting the frame delimiter length of a transmission bit stream according to an embodiment of the present disclosure. Through this mechanism, the overhead size is adjusted at the physical layer to achieve synchronization of service traffic between devices. Compared with the prior art, the advantage of the embodiments of the present disclosure is that the service synchronization performance problem caused by clock frequency deviation is solved at the physical layer without requiring the link layer and higher-layer logic to participate in the processing. Therefore, the processing delay and chip area of service traffic performance synchronization can be greatly reduced, and the frequency deviation synchronization processing between devices is greatly simplified.
[0094] FIG9 shows a schematic block diagram of an example device 900 that can be used to implement an embodiment of the present disclosure. Device 900 can be used to implement processes 500 and 600 as shown in FIG5 and FIG6 and apparatuses 700 and 800 as shown in FIG7 and FIG8. As shown, device 900 includes a central processing unit (CPU) 901, and central processing unit 901 may include multiple cores, each of which may perform various appropriate actions and processes according to computer program instructions stored in a read-only memory (ROM) 902 or computer program instructions loaded from a storage unit 908 into a random access memory (RAM) 903. In RAM 903, various programs and data required for the operation of device 900 may also be stored. CPU 901, ROM 902, and RAM 903 are connected to each other via bus 904. Input / output (I / O) interface 905 is also connected to bus 904.
[0095] Various components in the device 900 are connected to the I / O interface 905, including an input unit 906, such as a keyboard, a mouse, etc.; an output unit 907, such as various types of displays, speakers, etc.; a storage unit 908, such as a magnetic disk, an optical disk, etc.; and a communication unit 909, such as a network card, a modem, a wireless communication transceiver, etc. The communication unit 909 allows the device 900 to exchange information / data with other devices via a computer network such as the Internet and / or various telecommunication networks.
[0096] The various processes and processing described above, such as processes 500 and 600, may be performed by one or more cores in the processing unit 901. For example, in some embodiments, processes 500 and 600 may be implemented as computer software programs that are tangibly contained in a machine-readable medium, such as the storage unit 908. In some embodiments, part or all of the computer program may be loaded and / or installed onto the device 900 via the ROM 902 and / or the communication unit 909. When the computer program is loaded into the RAM 903 and executed by the CPU 901 or a core of the CPU, one or more actions of the processes 500 and 600 described above may be performed.
[0097] The present disclosure may be a method, an apparatus, a system and / or a computer program product. The computer program product may include a computer-readable storage medium carrying computer-readable program instructions for executing various aspects of the present disclosure.
[0098] A computer-readable storage medium can be a tangible device that can hold and store instructions for use by an instruction execution device. A computer-readable storage medium can be, for example, but not limited to, an electrical storage device, a magnetic storage device, an optical storage device, an electromagnetic storage device, a semiconductor storage device, or any suitable combination thereof. More specific examples (a non-exhaustive list) of computer-readable storage media include: a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), a static random access memory (SRAM), a portable compact disc read-only memory (CD-ROM), a digital versatile disk (DVD), a memory stick, a floppy disk, a mechanical encoding device, such as a punch card or a raised structure in a groove on which instructions are stored, and any suitable combination thereof. As used herein, a computer-readable storage medium is not to be construed as a transient signal per se, such as a radio wave or other freely propagating electromagnetic wave, an electromagnetic wave propagating through a waveguide or other transmission medium (e.g., a light pulse through a fiber optic cable), or an electrical signal transmitted through an electrical wire.
[0099] The computer-readable program instructions described herein can be downloaded from a computer-readable storage medium to each computing / processing device, or downloaded to an external computer or external storage device via a network, such as the Internet, a local area network, a wide area network, and / or a wireless network. The network can include copper transmission cables, fiber optic transmission, wireless transmission, routers, firewalls, switches, gateway computers, and / or edge servers. The network adapter card or network interface in each computing / processing device receives the computer-readable program instructions from the network and forwards the computer-readable program instructions to be stored in the computer-readable storage medium in each computing / processing device.
[0100] The computer program instructions for performing the operations of the present disclosure may be assembly instructions, instruction set architecture (ISA) instructions, machine instructions, machine-dependent instructions, microcode, firmware instructions, state setting data, or source code or object code written in any combination of one or more programming languages, including object-oriented programming languages such as Smalltalk, C++, and conventional procedural programming languages such as "C" language or similar programming languages. Computer-readable program instructions may be executed entirely on a user's computer, partially on a user's computer, as an independent software package, partially on a user's computer, partially on a remote computer, or entirely on a remote computer or server. In the case of a remote computer, the remote computer may be connected to the user's computer via any type of network, including a local area network (LAN) or a wide area network (WAN), or may be connected to an external computer (e.g., utilizing an Internet service provider to connect via the Internet). In some embodiments, an electronic circuit, such as a programmable logic circuit, a field programmable gate array (FPGA), or a programmable logic array (PLA), may be personalized by utilizing the state information of the computer-readable program instructions. The electronic circuit may execute the computer-readable program instructions, thereby realizing various aspects of the present disclosure.
[0101] Various aspects of the present disclosure are described herein with reference to flowcharts and / or block diagrams of methods, apparatus (systems), and computer program products according to embodiments of the present disclosure. It should be understood that each block of the flowcharts and / or block diagrams, and combinations of blocks in the flowcharts and / or block diagrams, can be implemented by computer-readable program instructions.
[0102] These computer-readable program instructions can be provided to a processing unit of a general-purpose computer, a special-purpose computer, or other programmable data processing device, thereby producing a machine such that when these instructions are executed by the processing unit of the computer or other programmable data processing device, a device is generated that implements the functions / actions specified in one or more blocks in the flowchart and / or block diagram. These computer-readable program instructions can also be stored in a computer-readable storage medium, where these instructions cause the computer, programmable data processing device, and / or other device to operate in a specific manner. Thus, the computer-readable medium storing the instructions comprises an article of manufacture that includes instructions for implementing various aspects of the functions / actions specified in one or more blocks in the flowchart and / or block diagram.
[0103] Computer-readable program instructions may also be loaded onto a computer, other programmable data processing apparatus, or other device so that a series of operational steps are performed on the computer, other programmable data processing apparatus, or other device to produce a computer-implemented process, thereby causing the instructions executed on the computer, other programmable data processing apparatus, or other device to implement the functions / actions specified in one or more blocks in the flowchart and / or block diagram.
[0104] The flow charts and block diagrams in the accompanying drawings show the possible architecture, functions and operations of the systems, methods and computer program products according to multiple embodiments of the present disclosure. In this regard, each box in the flow chart or block diagram can represent a part of a module, program segment or instruction, and a part of a module, program segment or instruction includes one or more executable instructions for realizing the prescribed logical function. In some alternative implementations, the functions marked in the box can also occur in a sequence different from that marked in the accompanying drawings. For example, two consecutive boxes can actually be executed substantially in parallel, and they can sometimes be executed in the opposite order, depending on the functions involved. It should also be noted that each box in the block diagram and / or flow chart, and the combination of the boxes in the block diagram and / or flow chart, can be implemented by a dedicated hardware-based system that performs the prescribed function or action, or can be implemented by a combination of dedicated hardware and computer instructions.
[0105] The embodiments of the present disclosure have been described above. The above description is exemplary, not exhaustive, and is not limited to the disclosed embodiments. Many modifications and variations will be apparent to those skilled in the art without departing from the scope and spirit of the described embodiments. The terminology used herein is selected to best explain the principles of the embodiments, practical applications, or improvements to the technology in the market, or to enable other persons skilled in the art to understand the embodiments disclosed herein.
Claims
1. A communication method, comprising: At the first device, obtaining an amount of data in a buffer, the buffer including frames to be transmitted to a second device via a bitstream; sending, to a second device, adjustment information for a length of a frame delimiter in the bitstream based on a comparison of the data amount and at least one threshold; as well as The bit stream is transmitted to the second device based on the frame delimiter after the length is adjusted.
2. The method of claim 1 , wherein the at least one threshold comprises a first threshold and a second threshold, the first threshold being smaller than the second threshold, wherein the comparison of the data volume with the at least one threshold comprises: In response to the data amount being less than or equal to the first threshold, determining to increase the length of the frame delimiter; as well as In response to the data amount being greater than or equal to the second threshold, it is determined to reduce the length of the frame delimiter.
3. The method according to claim 1 or 2, wherein: The length of the frame delimiter is adjusted in steps of a predefined number of bytes.
4. The method according to any one of claims 1 to 3, wherein The adjustment information is included in at least one frame delimiter of the bitstream.
5. The method according to any one of claims 1 to 4, wherein Sending adjustment information for the length of a frame delimiter of a bit stream of the second device to the second device includes: The adjustment information is sent via each of a plurality of consecutive frame delimiters of the bitstream.
6. The method according to claim 5, further comprising: The length of a frame delimiter following the plurality of consecutive frame delimiters is adjusted.
7. The method according to any one of claims 1 to 6, further comprising: receiving a bitstream for the second device; extracting a frame to be transmitted to the second device based on a frame delimiter in the received bit stream; as well as The extracted frames are stored in the buffer.
8. The method according to any one of claims 1 to 6, further comprising: generating a frame to be transmitted to the second device; as well as The generated frame is stored in the buffer.
9. The method of any one of claims 1 to 8, wherein the buffer comprises a first-in-first-out (FIFO) buffer.
10. The method according to any one of claims 1 to 9, wherein the adjustment information comprises an encoded binary value.
11. The method according to any one of claims 1 to 10, wherein the frame delimiter comprises an alignment word marker, the alignment word marker comprises a first encoding field indicating frame division, a second encoding field comprising the adjustment information, and a variable-length empty data field.
12. A communication method, comprising: At the second device, receiving a bitstream from a first device, the bitstream comprising a frame and a frame delimiter; receiving, from the first device, adjustment information for a length of the frame delimiter of the bitstream; as well as Based on the adjustment information, an adjusted length of the frame delimiter is determined.
13. The method according to claim 12, further comprising: The frame is extracted from the bitstream based on the adjusted length.
14. The method of claim 12 or 13, wherein the adjustment information comprises an encoded binary value. 15 . The method according to claim 12 , wherein the adjustment information indicates increasing or decreasing the length of the frame delimiter, and a step size of adjusting the length is a predefined number of bytes.
16. The method according to any one of claims 12 to 15, wherein the adjustment information is included in at least one frame delimiter of the bitstream.
17. The method of claim 12, wherein determining the adjusted length of the frame delimiter comprises: In response to determining that at least a predetermined number of frame delimiters in a plurality of consecutive frame delimiters include the adjustment information, it is determined that the length is to be adjusted.
18. The method of claim 17, wherein determining the adjusted length of the frame delimiter comprises: In response to each of a plurality of consecutive frame delimiters including the adjustment information, it is determined that the length is to be adjusted.
19. The method of claim 17 or 18, wherein determining the adjusted length comprises: A frame delimiter subsequent to the plurality of consecutive frame delimiters is determined to have the adjusted length.
20. The method according to any one of claims 12 to 19, wherein the frame delimiter comprises an alignment word marker, the alignment word marker comprising a first encoding field indicating frame division, a second encoding field comprising the adjustment information, and a variable-length empty data field.
21. The method according to any one of claims 12 to 20, further comprising: In response to determining that a decoding error of the physical layer data exists, resetting the communication link between the second device and the first device.
22. A communication device comprising: an acquiring unit configured to acquire an amount of data in a buffer, the buffer including frames to be transmitted to the second device via a bitstream; as well as a transmitting unit configured to send, to the second device, adjustment information for a length of a frame delimiter in the bit stream based on a comparison between the data amount and at least one threshold; as well as The transmission unit is further configured to transmit the bit stream to the second device based on the frame delimiter after length adjustment.
23. A communication device comprising: a receiving unit configured to receive a bit stream including a frame and a frame delimiter from a first device, and receive adjustment information for a length of the frame delimiter from the first device; as well as The determining unit is configured to determine the adjusted length of the frame delimiter based on the adjustment information.
24. An electronic device comprising a processor comprising a plurality of processing cores; and Memory; At least one processing core among the plurality of processing cores is configured to execute instructions in the memory, so that the electronic device performs the method according to any one of claims 1 to 11 or any one of claims 12 to 21.
25. A computer-readable storage medium having one or more computer instructions stored thereon, wherein the one or more computer instructions are executed by a processor to cause the processor to perform the method according to any one of claims 1 to 11 or any one of claims 12 to 21.
26. A computer program product comprising machine-executable instructions which, when executed by a device, cause the device to perform the method according to any one of claims 1 to 11 or any one of claims 12 to 21.
Citation Information
Patent Citations
Method and apparatus for delay jitter elimination during message transmission process
CN103647615A
Ultra-wideband system signal detection method and device
CN117395121A
Physical layer configuration indication method and related device
CN117595972A
Detection of start frame delimiters in a wireless digital communication system
US20110116534A1
Method and Apparatus for Start of Frame Delimiter Detection
US20130114645A1
Cited By
Time sequence alignment method and device, medium and equipment
CN121967940A