Method for changing length of data frame, electronic device and storage medium
The controller sends a series of commands and data frame design in the optical transport network, which solves the problem of lossless switching of OSU data frame frame length and error correction that is difficult to achieve at the same time, and achieves the accuracy of frame length identification and the lossless nature of data frames. .
Patent Information
- Application Number
- PCT/CN2023/129355
- Authority / Receiving Office
- WO · WO
- Patent Type
- Applications
- Current Assignee / Owner
- Priority Date
- 2023-03-16
- Filing Date
- 2023-11-02
- Publication Date
- 2024-09-19
AI Technical Summary
In the optical transport network, it is difficult to achieve lossless frame length switching and error correction of OSU data frames at the same time, resulting in frame length identification errors and service damage.
Send a series of commands through the controller to ensure that the receiving end and the sending end change the length of the data frame at the same time, use the frame length overhead to identify the frame length, and include the frame positioning overhead in the data frame to determine the frame positioning position to ensure the frame length switching process Losslessness in data frames.
In most cases, frame length identification errors are avoided, while the overhead and payload of the data frame are guaranteed to be lossless, and frame length lossless switching is supported.
Smart Images

Figure CN2023129355_19092024_PF_FP_ABST
Abstract
Description
Method for changing data frame length, electronic device and storage medium
[0001] Cross-references
[0002] The present invention claims priority to a Chinese patent application filed with the Patent Office of China on March 16, 2023, with application number 202310315996.4 and invention name “Method, electronic device and storage medium for changing data frame length”. The entire contents of the application are incorporated herein by reference. Technical Field
[0003] The present application belongs to the field of communication technology, and specifically relates to a method for changing the length of a data frame, an electronic device, and a storage medium. Background Art
[0004] In an Optical Transport Network (OTN), low-speed services are typically deployed in an Optical Service Unit (OSU). The framing time of an OSU data frame is related to its rate and length. Since framing must be completed within a certain timeframe, when the rate is very low, the length of the OSU data frame must be sufficiently short to meet the framing time requirement. For high-speed OSUs, a shorter frame length means a very short framing time, but a framing time of only 3 milliseconds is sufficient. A framing time that is too short has no additional benefits other than wasting overhead bandwidth. Therefore, OSU data frames with at least two frame lengths are required. Shorter frames are used when the OSU rate is low, and longer frames are used when the OSU rate is high.
[0005] To support two frame lengths, there are two implementation options. Option 1 is for the controller to set the frame length for both the transmitter and receiver. Option 2 is for the controller to set only the transmitter's frame length. The frame length information is stored in the frame length overhead, and the receiver identifies the frame length based on the frame length overhead. Since there are only two frame lengths, the receiver can first set the frame according to one length. If framing fails, it can set the frame according to the other length, repeatedly trying. If the transmitter sends one of the two frame lengths, the receiver will always be able to achieve framing. After framing is successful, the receiver can determine the frame length based on the frame length overhead, ensuring that the correct frame header position can always be identified. Packet services installed on the OSU need to support lossless bandwidth adjustment, which requires support for lossless frame length switching. This means changing the frame length without causing overhead or payload errors. Analyzing the two solutions above, Solution 1 has the advantage of being reliable, meaning that bit errors introduced during OSU transmission cannot cause frame length recognition errors. However, it cannot support lossless frame length switching because the frame length change commands issued by the controller are too slow and delayed, making it impossible to guarantee that both the transmitter and receiver will receive the switching commands simultaneously. Furthermore, the delay introduced during frame transmission is uncertain. Solution 2 has the advantage of supporting lossless frame length switching. However, if bit errors occur during OSU transmission and these errors cause errors in the frame length overhead, frame length recognition errors will occur, severely impacting services within the OSU. Furthermore, the receiver needs to repeatedly switch between the two frame lengths during the framing period, which further prolongs the framing time for lower-rate OSUs.
[0006] Thus, there is currently no good solution that allows the OSU to support two different frame lengths while addressing the shortcomings of the above solutions. Therefore, a method for changing the data frame length is urgently needed so that in most cases, even if there are bit errors, frame length recognition errors will not occur. At the same time, the overhead and payload of the data frame are not lost when changing the data frame length.
[0007] Summary of the Invention
[0008] The embodiments of the present application provide a method, electronic device and storage medium for changing the length of a data frame, which can prevent frame length recognition errors in most cases even if there are bit errors, and at the same time, the overhead and payload of the data frame are not lost when the data frame length is changed.
[0009] In a first aspect, an embodiment of the present application provides a method for changing the length of a data frame, the method comprising: when the controller determines that the length of the data frame is changed from a first length to a second length, the controller sends a first command to the receiving end, wherein the first command is used to instruct the receiving end to determine the length of the received data frame based on the frame length overhead in the data frame, the data frame includes the frame length overhead, and the frame length overhead is used to indicate the length of the data frame, the transmitting end is used to send the data frame, and the receiving end is used to receive the data frame sent by the transmitting end; when the controller determines that the receiving end executes the first command successfully, the controller sends a second command to the transmitting end, wherein the second command carries a numerical value for indicating the second length, and the second command is used to instruct the length of the data frame sent by the transmitting end to change to the second length; when the controller determines that the transmitting end executes the second command successfully, the controller sends a third command to the receiving end, wherein the third command carries a numerical value for indicating the second length, and the third command is used to instruct the receiving end to determine the length of the received data frame based on the second length.
[0010] In a second aspect, an embodiment of the present application provides an electronic device comprising a processor, a memory, and a program or instruction stored in the memory and executable on the processor, wherein the program or instruction, when executed by the processor, implements the steps of the method described in the first aspect.
[0011] In a third aspect, an embodiment of the present application provides a readable storage medium, on which a program or instruction is stored. When the program or instruction is executed by a processor, the steps of the method described in the first aspect are implemented. BRIEF DESCRIPTION OF THE DRAWINGS
[0012] FIG1 is a flow chart of a method for changing the length of a data frame provided in an embodiment of the present application;
[0013] FIG2 is a schematic structural diagram of a system for changing the length of a data frame provided in an embodiment of the present application;
[0014] FIG3 is a schematic structural diagram of an electronic device provided in an embodiment of the present application. DETAILED DESCRIPTION
[0015] The following will be combined with the drawings in the embodiments of this application to clearly and completely describe the technical solutions in the embodiments of this application. Obviously, the embodiments described are part of the embodiments of this application, not all of them. Based on the embodiments in this application, all other embodiments obtained by ordinary technicians in this field without making creative efforts are within the scope of protection of this application.
[0016] The terms "first," "second," and the like in the specification and claims of this application are used to distinguish similar objects, and are not used to describe a specific order or precedence. It should be understood that the terms used in this manner are interchangeable where appropriate, so that the embodiments of this application can be implemented in an order other than that illustrated or described herein, and that the objects distinguished by "first," "second," and the like are generally of the same type, and do not limit the number of objects; for example, the first object can be one or more. In addition, the term "and / or" in the specification and claims refers to at least one of the connected objects, and the character " / " generally indicates that the objects connected are in an "or" relationship.
[0017] The method for changing the length of a data frame, the electronic device, and the storage medium provided in the embodiments of the present application are described in detail below with reference to the accompanying drawings through specific embodiments and their application scenarios.
[0018] FIG1 shows a method for changing the length of a data frame provided by an embodiment of the present application, the method comprising the following steps:
[0019] Step 102: When the controller determines to change the length of the data frame from the first length to the second length, the controller sends a first command to the receiving end.
[0020] In this step, the administrator can issue commands on the controller. Upon receiving a command from the user to change the data frame length, the controller can determine that the length of the data frame needs to be changed from a first length to a second length. Furthermore, the controller can send a first command to the receiving end, instructing the receiving end to determine the length of the received data frame based on the frame length overhead in the data frame. The data frame includes a frame length overhead, which indicates the length of the data frame. The receiving end is configured to receive the data frame sent by the sending end, and the sending end is configured to send the data frame. After receiving the first command, the receiving end sets a method for identifying the data frame to determine the length of the data frame based on the frame length overhead in the data frame, and then frames the data frame based on the length of the data frame.
[0021] As an example, a data frame consists of B rows of data blocks, each containing a fixed number of bits. A row of data blocks contains C data blocks, meaning the data frame consists of B*C data blocks. Of the B*C data blocks in the data frame, the first N data blocks are fixed overhead, and the last B*CN data blocks are fixed payload. Within the fixed overhead of the data frame is a frame length overhead, which indicates the length of the data frame. The length of the data frame is B*C, measured in data blocks. Therefore, the length of the data frame is B*C data blocks. If a data block contains D bits, the length of the data frame is B*C*D bits. The frame length overhead can contain either B*C or B*C*D.
[0022] In the data frame, the frame length overhead of the data frame always exists. When the receiving end receives the first command, it can identify the frame length overhead, determine the length of the data frame through the frame length overhead, and then frame the data frame.
[0023] In this way, when the length of the data frame sent by the subsequent sending end changes from the first length to the second length, the receiving end can identify the frame length overhead of the data frame and determine the second length of the data frame based on the frame length overhead, and then frame the received data frame. In this way, the sending end and the receiving end can change the frame length at the same time, ensuring that the data frame can be correctly identified during the data frame length switching process, thereby realizing lossless switching of the data frame length.
[0024] Step 104: When the controller determines that the receiving end executes the first command successfully, the controller sends a second command to the sending end.
[0025] Specifically, when it is determined that the receiving end has successfully executed the first command, a second command may be sent to the sending end. The second command carries a numerical value indicating the second length. The second command is used to instruct the sending end to change the length of the data frame sent to the second length. That is, after receiving the second command, the sending end may change the length of the data frame sent from the first length to the second length according to the second command. Since the frame length overhead in the data frame always exists, when the frame length of the data frame is changed to the second length, the frame length overhead corresponding to the data frame also corresponds to the second length. It should be understood that after receiving the second command, the sending end may not immediately change the length of the data frame to be sent to the second length. It may generate a data frame according to the second length in the second command after sending a preset number of data frames. The preset number can be set in advance and is not specifically limited here. As an example, assuming that the first length of the data frame sent by the sending end is L1, the controller sends a second command to the sending end, and the second command includes a numerical value L2 for indicating the second length. After receiving the second command, the sending end can change the length of the sent data frame from the first length L1 to the second length L2, and then send a data frame with a frame length of L2.
[0026] After confirming that the receiving end of the data frame has been configured to determine the data frame length based on the frame length overhead in the received data frame, the second command is sent to the transmitting end. In this way, if the frame length of the data frame sent by the transmitting end changes, the receiving end can reframe the data frame based on the frame length overhead in the data frame. This allows the transmitting and receiving ends to change the frame length simultaneously, ensuring lossless switching of the data frame length.
[0027] Step 106: When the controller determines that the sending end executes the second command successfully, the controller sends a third command to the receiving end.
[0028] In this step, if the controller determines that the transmitting end has successfully executed the above-mentioned second command, it indicates that the transmitting end has changed the length of the transmitted data frame from the first length to the second length. The controller can then send a third command to the receiving end, where the third command carries the value of the second length. The third command is used to instruct the receiving end to determine the length of the received data frame based on the second length, and then frame the data frame using the second length. Because the length of the data frame received by the receiving end has been changed from the first length to the second length, after receiving the third command, the receiving end no longer needs to determine the length of the received data frame based on the frame length overhead in the received data frame. Instead, the receiving end can determine the length of the received data frame based on the second length in the third command, and then frame the received data frame. This prevents incorrect identification of the data frame length due to errors in the frame length overhead content.
[0029] As an example, assuming that the third command carries the second length value L2, the controller can send the third command to the receiving end when it determines that the sending end has successfully executed the second command. After receiving the third command, the receiving end no longer determines the length of the data frame based on the frame length overhead in the received data frame, but can determine the length of the received data frame based on the second length L2, and then frame the received data frame.
[0030] In an embodiment of the present application, when a controller determines that the length of a data frame needs to be changed from a first length to a second length, the controller sends a first command to the receiving end, wherein the first command is used to instruct the receiving end to determine the length of the received data frame based on the frame length overhead in the data frame, wherein the data frame includes a frame length overhead, which is used to indicate the length of the data frame. The receiving end is used to receive the data frame sent by the transmitting end, and the transmitting end is used to send the data frame. When the controller determines that the receiving end has successfully executed the first command, the controller sends a second command to the transmitting end, wherein the second command carries a value indicating the second length, and the second command is used to instruct the transmitting end to change the length of the data frame sent to the second length. When the controller determines that the transmitting end has successfully executed the second command, the controller sends a third command to the receiving end, wherein the third command carries a value indicating the second length, and the third command is used to instruct the receiving end to determine the length of the received data frame based on the second length. After determining that the transmitting end has set up framing based on the frame length overhead in the received data frame, the controller sends the second command to the transmitting end. In this way, when the frame length of the data frame sent by the transmitting end changes, the receiving end can change the frame length of both the transmitting end and the receiving end at the same time, ensuring lossless switching of the data frame length.
[0031] Furthermore, if the transmitting end determines that the second command has been successfully executed, a third command is sent to the receiving end. Since the length of the data frame received by the receiving end has been changed from the first length to the second length, after receiving the third command, the receiving end no longer needs to determine the length of the received data frame based on the frame length overhead in the received data frame. The receiving end can determine the length of the received data frame based on the second length in the third command and then perform a framing operation on the received data frame. This prevents incorrect identification of the data frame length due to errors in the frame length overhead content, while ensuring that the data frame overhead and payload are intact when the data frame length is changed.
[0032] In one implementation, the data frame also includes a frame length overhead, and the content of the frame length overhead is used to determine the length of the data frame where the frame length overhead is located. The sending end writes the length of the data frame into the frame length overhead based on the length of the data frame currently being sent; the data frame also includes a frame positioning overhead, and the content of the frame positioning overhead is fixed bit information. The sending end fixedly writes the fixed bit information into the frame positioning overhead, and the receiving end determines the expected frame positioning overhead position of the data frame based on the length of the data frame and the content of the frame positioning overhead.
[0033] Specifically, the data frame also includes a frame length overhead. The content of the frame length overhead is used to determine the length of the data frame in which the frame length overhead is located. Regardless of whether the transmitting end receives the second command, the transmitting end must write the data frame length into the frame length overhead based on the data frame length. When the transmitting end receives the second command, it must also modify the content of the frame length overhead of the data frame based on the second length. When generating the data frame, the transmitting end may write the frame alignment overhead into the frame alignment overhead of the data frame. The frame alignment overhead is typically located at the beginning of the data frame and may contain fixed bit information. After receiving the data frame, the receiving end may search for and identify the fixed bit information in the data frame. If the fixed bit information is identified, the frame alignment overhead of the data frame may be determined. Furthermore, the receiving end may frame the data frame based on the frame length overhead of the data frame or a predetermined data frame length. Furthermore, the receiving end may determine the expected frame alignment overhead position of the next received data frame based on the data frame length and the frame alignment overhead content. Thus, after receiving the next data frame, the frame alignment overhead of the data frame may be searched based on the expected frame alignment overhead position.
[0034] In one implementation, the receiving end determines, based on the length of the data frame and the content of the frame alignment overhead, an expected frame alignment overhead position of the data frame, including:
[0035] When the receiving end fails to find the fixed bit information in the expected frame positioning overhead position, the receiving end re-searches for the expected frame positioning overhead position based on the fixed bit information and the length of the data frame; when the receiving end finds the fixed bit information in the expected frame positioning overhead position, the expected frame positioning overhead position is used as the frame positioning overhead position, and the expected frame positioning overhead position is moved backward by the length of the data frame as the new expected frame positioning overhead position; when the receiving end finds the fixed bit information in the expected frame positioning overhead position, the content of all overheads of the data frame is valid content; when the receiving end fails to find the fixed bit information in the expected frame positioning overhead position, the content of all overheads of the data frame is invalid content.
[0036] Specifically, after receiving a data frame, the receiving end may search for fixed bit information at an expected frame alignment overhead position. If the receiving end does not find the fixed bit information at the expected frame alignment overhead position, the receiving end may continue to identify and search for the fixed bit information backward. After finding the fixed bit information, the receiving end may shift the position of the fixed bit information backward by the length of the data frame as the expected frame alignment overhead position, and then continue to search for the presence of fixed bit information at the expected frame alignment overhead position. The backward shift means shifting in the direction of the unreceived data frame. The length of the data frame may be determined by the frame length overhead in the data frame or by a fixed value in the received command.
[0037] When the receiving end can find the fixed bit information in the expected frame alignment overhead position, the expected frame alignment overhead position can be determined as the frame alignment overhead position of the current data frame, and the expected frame alignment overhead position can be moved backward by the length of the data frame as the new expected frame alignment overhead position, where the length of the data frame can be determined by the frame length overhead in the data frame or by a fixed value in the received command.
[0038] In this way, when the fixed bit information is not found in the expected frame alignment overhead position, the fixed bit information can be further identified and searched for. After the fixed bit information is identified, the position of the fixed bit information is shifted backward by the length of the data frame in combination with the length of the data frame where the fixed bit information is located, as the expected frame alignment overhead position. The expected frame alignment overhead position is then searched for whether the fixed bit information exists. When the fixed bit information is found in the expected frame alignment overhead position, the expected frame alignment overhead position can be determined as the frame alignment overhead position of the current data frame, and the expected frame alignment overhead position is shifted backward by the length of the data frame as the new expected frame alignment overhead position. The new expected frame alignment overhead position is then searched for whether the fixed bit information exists. The above processing ensures that the receiving end correctly identifies the exact position of the overhead and payload of the data frame based on the fixed bit information and the data frame length.
[0039] Furthermore, when the receiving end finds the fixed bit information at the expected frame alignment overhead location, all overhead content in the data frame currently containing the fixed bit information becomes valid, meaning all overhead content in the data frame can be used normally. If the receiving end does not find the fixed bit information at the expected frame alignment overhead location, meaning an error occurs while searching for the data frame, all overhead content in the data frame currently containing the expected frame alignment overhead location becomes invalid, meaning all overhead content in the current data frame cannot be used.
[0040] In one implementation, the re-searching the expected frame alignment overhead position according to the fixed bit information and the length of the data frame includes:
[0041] The receiving end searches for the fixed bit information in all received bits until the fixed bit information is found; after finding the fixed bit information, the position of the fixed bit information is moved backward by the length of the data frame as the expected frame alignment overhead position.
[0042] Specifically, the data frame received by the receiving end is actually presented in the form of bits. The receiving end can only consider the expected value frame alignment overhead position as the location of the frame alignment overhead if the fixed bit information is found at the expected value frame alignment overhead position. Initially, any position can be used as the expected frame alignment overhead position. If the fixed bit information is found at the expected value frame alignment overhead position, the expected value frame alignment overhead position is considered to be the location of the frame alignment overhead, and the expected value frame alignment overhead is moved backward by the length of the data frame as the new expected frame alignment overhead position; if the fixed bit information cannot be found at the expected value frame alignment overhead position, the search continues backward bit by bit until the fixed bit information position is found, and the found fixed bit information position is moved backward by the length of the data frame as the new expected frame alignment overhead position. The above process is repeated.
[0043] To prevent bit errors from affecting the search for fixed bit information, it may be required that the expected frame alignment overhead position be considered the location of the frame alignment overhead only after the fixed bit information is found multiple times in a row at the expected frame alignment overhead position. The expected frame alignment overhead position is always considered the location of the frame alignment overhead until the fixed bit information cannot be found multiple times in a row at the expected frame alignment overhead position. If the fixed bit information cannot be found multiple times in a row at the expected frame alignment overhead position when the expected frame alignment overhead position is considered the location of the frame alignment overhead, the frame alignment overhead position is considered unfindable until the fixed bit information is found multiple times in a row at the expected frame alignment overhead position.
[0044] In one implementation, after sending the first command to the receiving end, the method further includes:
[0045] When the first command does not carry the numerical value for indicating the second length and the receiving end finds the fixed bit information in the expected frame alignment overhead position, the content of the frame length overhead is valid, and the receiving end uses the content of the frame length overhead as the length of the data frame, and moves the expected frame alignment overhead position backward by the length of the data frame as the new expected frame alignment overhead position; when the first command does not carry the numerical value for indicating the second length and the receiving end does not find the fixed bit information in the expected frame alignment overhead position, the content of the frame length overhead is invalid, and the receiving end uses the content of the frame length overhead when it was last valid as the length of the data frame, and re-searches the expected frame alignment overhead position based on the fixed bit information and the length of the data frame.
[0046] Specifically, after the controller sends a first command to the receiving end, if the first command does not carry a value indicating the second length and the receiving end finds fixed bit information at the expected frame alignment overhead position, then the content of the frame length overhead of the data frame at the current expected frame alignment overhead position is valid. The length of the corresponding data frame can be determined based on the content of the frame length overhead. The content of the frame length overhead can then be used as the length of the data frame to determine a new expected frame alignment overhead position. The length of the data frame is shifted backward from the current expected frame alignment overhead position to serve as the new expected frame alignment overhead position. The aforementioned backward shift means shifting in the direction of the unreceived data frame. In this way, after receiving the next data frame, the above operation can be continued to check whether the new expected frame alignment overhead position contains fixed bit information, thereby determining whether the frame alignment overhead of the new data frame is at the new expected frame alignment overhead position.
[0047] When the first command does not carry a numerical value for indicating the second length and the receiving end does not find the fixed bit information at the expected frame positioning overhead position, the content of the frame length overhead of the current data frame is invalid. The receiving end can use the content when the frame length overhead was valid last time as the length of the data frame. The receiving end re-searches for the fixed bit information in all received bits. After finding the fixed bit information, the content when the frame length overhead was valid last time can be used as the length of the data frame, and the content when the frame length overhead was valid last time is moved backward at the position of the fixed bit information as the new expected frame positioning overhead position. In this way, the above operations can be continued to check whether the fixed bit information exists at the new expected frame positioning overhead position, thereby determining whether the frame positioning overhead of a new data frame is at the new expected frame positioning overhead position.
[0048] In one implementation, when the first command carries the value indicating the second length and the receiving end finds the fixed bit information in the expected frame alignment overhead position, the content of the frame length overhead is valid, and the receiving end uses the content of the frame length overhead as the length of the data frame, and shifts the expected frame alignment overhead position backward by the length of the data frame to set it as the new expected frame alignment overhead position.
[0049] When the first command carries the numerical value indicating the second length and the receiving end does not find the fixed bit information in the expected frame positioning overhead position, the content of the frame length overhead is invalid, and the receiving end uses the second length as the length of the data frame and re-searches for the expected frame positioning overhead position based on the fixed bit information and the length of the data frame.
[0050] Specifically, after the controller sends a first command to the receiving end, if the first command carries a value indicating the second length and the receiving end finds fixed bit information at the expected frame alignment overhead position, the content of the frame length overhead of the data frame at the currently expected frame alignment overhead position is valid. The length of the corresponding data frame can be determined using the content of the frame length overhead. The new expected frame alignment overhead position can then be determined using the content of the frame length overhead as the length of the data frame. The current expected frame alignment overhead position is shifted backward by the length of the data frame as the new expected frame alignment overhead position. The aforementioned backward shift means shifting in the direction of the unreceived data frame. In this way, after receiving the next data frame, the aforementioned operation can be continued to check whether the new expected frame alignment overhead position contains fixed bit information, thereby determining whether the frame alignment overhead of the new data frame is at the new expected frame alignment overhead position.
[0051] When the first command carries a numerical value indicating the second length and the receiving end does not find the fixed bit information at the expected frame positioning overhead position, the content of the frame length overhead of the current data frame is invalid. The receiving end can use the second length as the length of the data frame. The receiving end re-searches for the fixed bit information in the received bits. After finding the fixed bit information, the second length can be used as the length of the data frame, and the second length is moved backward at the position of the fixed bit information as the new expected frame positioning overhead position. In this way, the above operations are continued to be performed to check whether the fixed bit information exists at the new expected frame positioning overhead position, thereby determining whether the frame positioning overhead of a new data frame is at the new expected frame positioning overhead position.
[0052] In one implementation, the second command carries a value indicating the second length. After sending the second command to the sending end, the method further includes:
[0053] The transmitting end writes the value of the second length into the frame length overhead and uses the second length as the length of the data frame.
[0054] Specifically, the second command sent by the controller carries a value of the second length. After the controller sends the second command to the sending end, the sending end can write the value of the second length into the frame length overhead of the data frame during the process of generating the data frame, and use the second length as the length of the generated data frame. In this way, the receiving end first receives the first command, and then the sending end changes the length of the generated data frame to the second length after receiving the second command. The sending end and the receiving end can change the frame length at the same time, ensuring that the data frame can be correctly identified during the data frame length switching process, thereby realizing lossless switching of the data frame length.
[0055] In one implementation, after sending the third command to the receiving end, the method further includes:
[0056] The receiving end uses the second length as the length of the data frame, and determines the expected frame alignment overhead position of the data frame according to the length of the data frame and the content of the frame alignment overhead position.
[0057] Specifically, after the controller sends the third command to the receiving end, since the third command carries the value of the second length, the receiving end uses the second length as the length of all received data frames, determines the expected frame positioning overhead position of the data frame based on the length of the data frame and the fixed bit information, and checks whether there is fixed bit information at the expected frame positioning overhead position, thereby determining whether the frame positioning overhead of the data frame is at the expected frame positioning overhead position.
[0058] In one implementation, the method further includes:
[0059] When the receiving end receives the first command, it returns a response message indicating that the first command has been successfully executed; when the sending end receives the second command, it returns a response message indicating that the second command has been successfully executed; when the receiving end receives the third command, it returns a response message indicating that the third command has been successfully executed.
[0060] Specifically, when the receiving end receives the first command, it may return a response message indicating that the first command has been successfully executed to the controller. When the sending end receives the second command, it may return a response message indicating that the second command has been successfully executed to the controller. When the receiving end receives the third command, it may return a response message indicating that the third command has been successfully executed to the controller.
[0061] In this way, the controller can determine whether the receiving end successfully executes the first command or the third command based on whether the response information sent by the receiving end is received, and can also determine whether the sending end successfully executes the second command based on whether the response information sent by the sending end is received.
[0062] In one implementation, after sending the first command to the receiving end, the method further includes:
[0063] The controller waits until receiving a response message that the first command is successfully executed, and then determines that the receiving end has successfully executed the first command or waits until a preset time has expired without receiving a response message that the first command is successfully executed; the controller determines that the receiving end has failed to execute the first command after sending the first command a preset number of times and within the preset time after each sending of the first command. After sending a second command to the sending end, the method further includes: the controller waits until receiving a response message that the second command is successfully executed, and then determines that the sending end has successfully executed the second command or waits until the preset time has expired without receiving a response message that the second command is successfully executed; the controller After the controller sends the second command for the preset number of times and does not receive a response message of successful execution of the second command within the preset time after each sending of the second command, it is determined that the sending end has failed to execute the second command; after sending the third command to the receiving end, the method further includes: the controller waits until a response message of successful execution of the third command is received, and then determines that the receiving end has successfully executed the third command or waits until the preset time is reached without receiving a response message of successful execution of the third command; after the controller sends the third command for the preset number of times and does not receive a response message of successful execution of the third command within the preset time after each sending of the third command, it is determined that the receiving end has failed to execute the third command.
[0064] Specifically, after sending the first command to the receiving end, the controller can wait until it receives a response message indicating that the first command is successfully executed. At this time, it can be determined that the receiving end has successfully executed the first command, or it can wait until the preset time is reached and no response message indicating that the first command is successfully executed is received, and then the first command is resent to the receiving end. After sending the first command a preset number of times and not receiving a response message indicating that the first command is successfully executed within the preset time after each sending of the first command, the controller can determine that the receiving end has failed to execute the first command. In this way, the controller can determine whether the receiving end has successfully executed the first command after determining whether it has received a response message indicating that the first command is successfully executed sent by the receiving end. The above-mentioned preset time and preset number of times can be set according to actual needs and are not specifically limited here.
[0065] After sending the second command to the sending end, the controller may wait until receiving a response message indicating that the second command was successfully executed, and may determine that the sending end has successfully executed the second command, or wait until a preset time has expired without receiving a response message indicating that the second command was successfully executed, and then resend the second command to the sending end. If the controller sends the second command a preset number of times and does not receive a response message indicating that the second command was successfully executed within a preset time after each sending of the second command, the sending end may determine that the sending end has failed to execute the second command. In this way, the controller can determine whether the sending end has successfully executed the second command by determining whether it has received a response message indicating that the second command was successfully executed from the sending end.
[0066] After sending the third command to the receiving end, the controller may wait until receiving a response message indicating that the third command was successfully executed, and then determine that the receiving end has successfully executed the third command; or wait until a preset time has elapsed and no response message indicating that the third command was successfully executed is received, and then the controller may resend the third command to the receiving end. If the controller has sent the third command a preset number of times and has not received a response message indicating that the third command was successfully executed within a preset time after each sending of the third command, then it may be determined that the receiving end has failed to execute the third command. In this way, the controller can determine whether the receiving end has successfully executed the third command by determining whether it has received a response message indicating that the third command was successfully executed from the receiving end.
[0067] In one implementation, after sending the third command to the receiving end, the method further includes:
[0068] After determining that the receiving end successfully executes the third command, the controller determines that the length of the data frame is successfully changed from the first length to the second length; after determining that the receiving end fails to execute the first command, determines that the sending end fails to execute the second command, or determines that the receiving end fails to execute the third command, the controller determines that the length of the data frame is failed to change from the first length to the second length.
[0069] Specifically, after the controller determines that the receiving end has successfully executed the third command, it can determine that the sending end has sent a data frame with a second length. The receiving end can also use the second length as the length of the received data frame, and then frame the received data frame. In this way, it can be determined that the length of the data frame has been successfully changed from the first length to the second length.
[0070] In addition, after the controller determines that the receiving end fails to execute the first command, determines that the sending end fails to execute the second command, or determines that the receiving end fails to execute the third command, it can determine that changing the length of the data frame from the first length to the second length fails.
[0071] It should be noted that the method for changing the data frame length provided in the embodiments of the present application can be performed by a device for changing the data frame length, or a control module in the device for changing the data frame length that is used to perform the method for changing the data frame length. In the embodiments of the present application, the device for changing the data frame length provided in the embodiments of the present application is described by taking the method for changing the data frame length performed by the device for changing the data frame length as an example.
[0072] FIG2 is a schematic diagram of a system for changing the length of a data frame according to an embodiment of the present invention. As shown in FIG2 , the system 200 for changing the length of a data frame includes: a controller 210 , a receiving end 220 , and a transmitting end 230 .
[0073] When determining that the length of the data frame is changed from the first length to the second length, the controller 210 sends a first command to the receiving end 220, wherein the first command is used to instruct the receiving end 220 to determine the length of the received data frame based on the frame length overhead in the data frame, the data frame includes the frame length overhead, and the frame length overhead is used to indicate the length of the data frame, the transmitting end 230 is used to send the data frame, and the receiving end 220 is used to receive the data frame sent by the transmitting end 230; when determining that the receiving end 220 successfully executes the first command, the controller 210 sends a second command to the transmitting end 230, wherein the second command carries a value indicating the second length, and the second command is used to instruct the transmitting end 230 to change the length of the data frame sent by the transmitting end 230 to the second length; when determining that the transmitting end 230 successfully executes the second command, the controller 210 sends a third command to the receiving end 220, wherein the third command carries a value of the second length, and the third command is used to instruct the receiving end 220 to determine the length of the received data frame based on the second length.
[0074] In one implementation, the data frame also includes a frame length overhead, and the content of the frame length overhead is used to determine the length of the data frame where the frame length overhead is located. The sending end 230 writes the length of the data frame into the frame length overhead based on the length of the data frame currently being sent; the data frame also includes a frame positioning overhead, and the content of the frame positioning overhead is fixed bit information. The sending end 230 fixedly writes the fixed bit information into the frame positioning overhead, and the receiving end 220 determines the expected frame positioning overhead position of the data frame based on the length of the data frame and the content of the frame positioning overhead.
[0075] In one implementation, when the receiving end 220 fails to find the fixed bit information at the expected frame positioning overhead position, the expected frame positioning overhead position is re-searched based on the fixed bit information and the length of the data frame; when the receiving end 220 finds the fixed bit information at the expected frame positioning overhead position, the expected frame positioning overhead position is used as the frame positioning overhead position, and the expected frame positioning overhead position is moved backward by the length of the data frame as the new expected frame positioning overhead position; when the receiving end 220 finds the fixed bit information at the expected frame positioning overhead position, the content of all overheads of the data frame is valid content; when the receiving end 220 fails to find the fixed bit information at the expected frame positioning overhead position, the content of all overheads of the data frame is invalid content.
[0076] In one implementation, the receiving end 220 searches for the fixed bit information in all received bits until the fixed bit information is found; after finding the fixed bit information, the position of the fixed bit information is moved backward by the length of the data frame as the expected frame positioning overhead position.
[0077] In one implementation, when the first command does not carry the numerical value for indicating the second length and the receiving end 220 finds the fixed bit information in the expected frame positioning overhead position, the content of the frame length overhead is valid, and the receiving end 220 uses the content of the frame length overhead as the length of the data frame, and moves the expected frame positioning overhead position backward by the length of the data frame as the new expected frame positioning overhead position; when the first command does not carry the numerical value for indicating the second length and the receiving end 220 does not find the fixed bit information in the expected frame positioning overhead position, the content of the frame length overhead is invalid, and the receiving end 220 uses the content of the frame length overhead when it was last valid as the length of the data frame, and re-searches the expected frame positioning overhead position based on the fixed bit information and the length of the data frame.
[0078] In one implementation, when the first command carries the numerical value for indicating the second length and the receiving end 220 finds the fixed bit information in the expected frame positioning overhead position, the content of the frame length overhead is valid, and the receiving end 220 uses the content of the frame length overhead as the length of the data frame, and moves the expected frame positioning overhead position backward by the length of the data frame as the new expected frame positioning overhead position; when the first command carries the numerical value for indicating the second length and the receiving end 220 does not find the fixed bit information in the expected frame positioning overhead position, the content of the frame length overhead is invalid, and the receiving end 220 uses the second length as the length of the data frame, and re-searches for the expected frame positioning overhead position based on the fixed bit information and the length of the data frame.
[0079] In one implementation, the transmitter 230 writes the value of the second length into the frame length overhead and uses the second length as the length of the data frame.
[0080] In one implementation, the receiving end 220 uses the second length as the length of the data frame, and determines the expected frame alignment overhead position of the data frame according to the length of the data frame and the content of the frame alignment overhead position.
[0081] In one implementation, when the receiving end 220 receives the first command, it returns a response message indicating that the first command has been successfully executed; when the sending end 230 receives the second command, it returns a response message indicating that the second command has been successfully executed; when the receiving end 220 receives the third command, it returns a response message indicating that the third command has been successfully executed.
[0082] In one implementation, the controller 210 waits until receiving a response message indicating that the first command is successfully executed, and then determines that the receiving end 220 has successfully executed the first command or waits until a preset time has expired without receiving a response message indicating that the first command is successfully executed; the controller 210 determines that the receiving end 220 has failed to execute the first command if it has sent the first command a preset number of times and has not received a response message indicating that the first command is successfully executed within the preset time after each sending of the first command; the controller 210 waits until receiving a response message indicating that the second command is successfully executed, and then determines that the sending end 230 has successfully executed the second command or waits until the preset time has expired without receiving a response message indicating that the second command is successfully executed ; After the controller 210 sends the second command for the preset number of times and does not receive the response information of the successful execution of the second command within the preset time after each sending of the second command, it is determined that the sending end 230 has failed to execute the second command; the controller 210 waits until the response information of the successful execution of the third command is received, and then determines that the receiving end 220 has successfully executed the third command or waits until the preset time is reached without receiving the response information of the successful execution of the third command; after the controller 210 sends the third command for the preset number of times and does not receive the response information of the successful execution of the third command within the preset time after each sending of the third command, it is determined that the receiving end 220 has failed to execute the third command.
[0083] In one implementation, the controller 210 determines that the length of the data frame is successfully changed from the first length to the second length after determining that the receiving end 220 successfully executes the third command; the controller 210 determines that the length of the data frame is successfully changed from the first length to the second length after determining that the receiving end 220 fails to execute the first command, determines that the sending end 230 fails to execute the second command, or determines that the receiving end 220 fails to execute the third command.
[0084] The system for changing the data frame length provided in the embodiment of the present application can implement each process implemented in the method embodiment of Figure 1. To avoid repetition, they will not be described here.
[0085] Optionally, as shown in FIG3 , an embodiment of the present application further provides an electronic device 300, comprising a processor 301 and a memory 302, wherein the memory 302 stores a program or instruction that can be run on the processor 301, and the program or instruction is implemented when the processor 301 executes: when the controller determines to change the length of the data frame from the first length to the second length, the controller sends a first command to the receiving end, wherein the first command is used to instruct the receiving end to determine the length of the received data frame according to the frame length overhead in the data frame, the data frame includes the frame length overhead, and the frame length overhead is used to indicate the length of the data frame, and the sending end is used to send the data frame. The receiving end is used to receive the data frame sent by the sending end; when the controller determines that the receiving end has successfully executed the first command, the controller sends a second command to the sending end, wherein the second command carries a value indicating the second length, and the second command is used to instruct the sending end to change the length of the data frame sent by the sending end to the second length; when the controller determines that the sending end has successfully executed the second command, the controller sends a third command to the receiving end, wherein the third command carries the value of the second length, and the third command is used to instruct the receiving end to determine the length of the received data frame according to the second length.
[0086] In one implementation, the data frame also includes a frame length overhead, and the content of the frame length overhead is used to determine the length of the data frame where the frame length overhead is located. The sending end writes the length of the data frame into the frame length overhead based on the length of the data frame currently being sent; the data frame also includes a frame positioning overhead, and the content of the frame positioning overhead is fixed bit information. The sending end fixedly writes the fixed bit information into the frame positioning overhead, and the receiving end determines the expected frame positioning overhead position of the data frame based on the length of the data frame and the content of the frame positioning overhead, and determines whether the frame positioning overhead of the data frame is at the expected frame positioning overhead position.
[0087] In one implementation, when the receiving end fails to find the fixed bit information at the expected frame alignment overhead position, the receiving end re-searches for the expected frame alignment overhead position based on the fixed bit information and the length of the data frame; when the receiving end finds the fixed bit information at the expected frame alignment overhead position, the expected frame alignment overhead position is used as the frame alignment overhead position, and the expected frame alignment overhead position is moved backward by the length of the data frame as the new expected frame alignment overhead position; when the receiving end finds the fixed bit information at the expected frame alignment overhead position, the contents of all overheads of the data frame are valid contents; when the receiving end fails to find the fixed bit information at the expected frame alignment overhead position, the contents of all overheads of the data frame are invalid contents.
[0088] In one implementation, the data frame also includes a frame length overhead, and the content of the frame length overhead is used to determine the length of the data frame where the frame length overhead is located. The sending end writes the length of the data frame into the frame length overhead based on the length of the data frame currently being sent; the receiving end searches for the fixed bit information in all received bits until the fixed bit information is found; after finding the fixed bit information, the position of the fixed bit information is moved backward by the length of the data frame as the expected frame positioning overhead position.
[0089] In one implementation, after sending a first command to the receiving end, when the first command does not carry the numerical value for indicating the second length and the receiving end finds the fixed bit information in the expected frame positioning overhead position, the content of the frame length overhead is valid, and the receiving end uses the content of the frame length overhead as the length of the data frame, and moves the expected frame positioning overhead position backward by the length of the data frame as the new expected frame positioning overhead position; when the first command does not carry the numerical value for indicating the second length and the receiving end does not find the fixed bit information in the expected frame positioning overhead position, the content of the frame length overhead is invalid, and the receiving end uses the content of the frame length overhead when it was last valid as the length of the data frame, and re-searches for the expected frame positioning overhead position based on the fixed bit information and the length of the data frame.
[0090] In one implementation, after sending a first command to the receiving end, when the first command carries the numerical value indicating the second length and the receiving end finds the fixed bit information in the expected frame positioning overhead position, the content of the frame length overhead is valid, and the receiving end uses the content of the frame length overhead as the length of the data frame, and moves the expected frame positioning overhead position backward by the length of the data frame as the new expected frame positioning overhead position; when the first command carries the numerical value indicating the second length and the receiving end does not find the fixed bit information in the expected frame positioning overhead position, the content of the frame length overhead is invalid, and the receiving end uses the second length as the length of the data frame, and re-searches for the expected frame positioning overhead position based on the fixed bit information and the length of the data frame.
[0091] In one implementation, the second command carries a value indicating the second length. After sending the second command to the sending end, the sending end writes the value of the second length in the frame length overhead and uses the second length as the length of the data frame.
[0092] In one implementation, after sending the third command to the receiving end, the receiving end uses the second length as the length of the data frame and determines the expected frame alignment overhead position of the data frame based on the length of the data frame and the content of the frame alignment overhead position.
[0093] In one implementation, when the receiving end receives the first command, it returns a response message indicating that the first command has been successfully executed; when the sending end receives the second command, it returns a response message indicating that the second command has been successfully executed; and when the receiving end receives the third command, it returns a response message indicating that the third command has been successfully executed.
[0094] In one implementation, after sending the first command to the receiving end, the controller waits until receiving a response message indicating that the first command is successfully executed, and then determines that the receiving end has successfully executed the first command or has waited until a preset time has expired without receiving a response message indicating that the first command is successfully executed; if the controller has sent the first command a preset number of times and has not received a response message indicating that the first command is successfully executed within the preset time after each sending of the first command, then determines that the receiving end has failed to execute the first command; if the controller waits until receiving a response message indicating that the second command is successfully executed, then determines that the sending end has successfully executed the second command or has waited until the preset time has expired without receiving the second command a response message indicating successful execution; if the controller sends the second command the preset number of times and does not receive a response message indicating successful execution of the second command within the preset time after each sending of the second command, it is determined that the sending end has failed to execute the second command; the controller waits until a response message indicating successful execution of the third command is received, and then determines that the receiving end has successfully executed the third command or waits until the preset time is reached without receiving a response message indicating successful execution of the third command; if the controller sends the third command the preset number of times and does not receive a response message indicating successful execution of the third command within the preset time after each sending of the third command, it is determined that the receiving end has failed to execute the third command.
[0095] In one implementation, after sending a third command to the receiving end, the controller determines that the length of the data frame is successfully changed from the first length to the second length after determining that the receiving end successfully executes the third command; the controller determines that the length of the data frame is failed to be changed from the first length to the second length after determining that the receiving end fails to execute the first command, determines that the sending end fails to execute the second command, or determines that the receiving end fails to execute the third command.
[0096] The specific execution steps can refer to the various steps of the above-mentioned method embodiment for changing the data frame length, and can achieve the same technical effect. To avoid repetition, they will not be described here.
[0097] It should be noted that the electronic devices in the embodiments of the present application include: servers, terminals, or other devices other than terminals.
[0098] The above electronic device structure does not constitute a limitation of the electronic device. The electronic device may include more or fewer components than shown in the figure, or combine certain components, or arrange the components differently. For example, the input unit may include a graphics processing unit (GPU) and a microphone, and the display unit may be configured in the form of a liquid crystal display, an organic light emitting diode, etc. to configure the display panel. The user input unit includes a touch panel and at least one of other input devices. The touch panel is also called a touch screen. Other input devices may include but are not limited to a physical keyboard, function keys (such as volume control buttons, switch buttons, etc.), a trackball, a mouse, and a joystick, which will not be repeated here.
[0099] The memory can be used to store software programs and various data. The memory may mainly include a first storage area for storing programs or instructions and a second storage area for storing data, wherein the first storage area may store an operating system, applications or instructions required for at least one function (such as a sound playback function, an image playback function, etc.), etc. In addition, the memory may include a volatile memory or a non-volatile memory, or the memory may include both volatile and non-volatile memories. Among them, the non-volatile memory may be a read-only memory (ROM), a programmable read-only memory (PROM), an erasable programmable read-only memory (EPROM), an electrically erasable programmable read-only memory (EEPROM), or a flash memory. Volatile memory can be random access memory (RAM), static random access memory (SRAM), dynamic random access memory (DRAM), synchronous dynamic random access memory (SDRAM), double data rate synchronous dynamic random access memory (DDRSDRAM), enhanced synchronous dynamic random access memory (ESDRAM), synchronous link DRAM (SLDRAM) and direct rambus random access memory (DRRAM).
[0100] The processor may include one or more processing units; optionally, the processor may integrate an application processor and a modem processor, wherein the application processor primarily handles operations related to the operating system, user interface, and application programs, and the modem processor primarily processes wireless communication signals, such as a baseband processor. It is understood that the modem processor may not be integrated into the processor.
[0101] An embodiment of the present application also provides a readable storage medium, on which a program or instruction is stored. When the program or instruction is executed by a processor, the various processes of the above-mentioned method embodiment for changing the length of the data frame are implemented, and the same technical effect can be achieved. To avoid repetition, it will not be repeated here.
[0102] The processor is the processor in the electronic device described in the above embodiment. The readable storage medium includes a computer-readable storage medium, such as ROM, RAM, magnetic disk or optical disk.
[0103] It should be noted that, in this article, the terms "comprise", "include" or any other variants thereof are intended to cover non-exclusive inclusion, so that a process, method, article or device comprising a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, article or device. In the absence of further restrictions, an element defined by the statement "comprises a ..." does not exclude the presence of other identical elements in the process, method, article or device comprising the element. In addition, it should be noted that the scope of the methods and devices in the embodiments of the present application is not limited to performing functions in the order shown or discussed, and may also include performing functions in a substantially simultaneous manner or in the opposite order according to the functions involved. For example, the described method may be performed in an order different from that described, and various steps may also be added, omitted, or combined. In addition, the features described with reference to certain examples may be combined in other examples.
[0104] Through the description of the above implementation methods, those skilled in the art can clearly understand that the above-mentioned embodiment methods can be implemented by means of software plus the necessary general hardware platform, and of course can also be implemented by hardware, but in many cases the former is a better implementation method. Based on this understanding, the technical solution of the present application is essentially or the part that contributes to the prior art can be embodied in the form of a computer software product, which is stored in a storage medium (such as ROM / RAM, magnetic disk, optical disk), including a number of instructions for enabling a terminal (which can be a mobile phone, computer, server, or network device, etc.) to execute the methods described in each embodiment of the present application.
[0105] The embodiments of the present application are described above in conjunction with the accompanying drawings, but the present application is not limited to the above-mentioned specific implementation methods. The above-mentioned specific implementation methods are merely illustrative and not restrictive. Under the guidance of this application, ordinary technicians in this field can also make many forms without departing from the purpose of this application and the scope of protection of the claims, all of which are within the protection of this application.
Claims
1. A method for changing the length of a data frame, in, include: When determining to change the length of the data frame from the first length to the second length, the controller sends a first command to the receiving end, wherein the first command is used to instruct the receiving end to determine the length of the received data frame according to the frame length overhead in the data frame, the data frame includes the frame length overhead, the frame length overhead is used to indicate the length of the data frame, the sending end is used to send the data frame, and the receiving end is used to receive the data frame sent by the sending end; When determining that the receiving end executes the first command successfully, the controller sends a second command to the sending end, wherein the second command carries a value indicating the second length, and the second command is used to instruct the length of the data frame sent by the sending end to change to the second length; When determining that the sending end executes the second command successfully, the controller sends a third command to the receiving end, wherein the third command carries the value of the second length, and the third command is used to instruct the receiving end to determine the length of the received data frame according to the second length.
2. The method according to claim 1, in, The data frame also includes a frame length overhead, and the content of the frame length overhead is used to determine the length of the data frame where the frame length overhead is located. The transmitting end writes the length of the data frame into the frame length overhead according to the length of the data frame currently being sent; The data frame also includes a frame alignment overhead, the content of the frame alignment overhead is fixed bit information, the sending end fixedly writes the fixed bit information in the frame alignment overhead, and the receiving end determines the expected frame alignment overhead position of the data frame based on the length of the data frame and the content of the frame alignment overhead.
3. The method according to claim 2, in, The receiving end determines the expected frame alignment overhead position of the data frame according to the length of the data frame and the content of the frame alignment overhead, including: When the receiving end does not find the fixed bit information in the expected frame alignment overhead position, then re-searching the expected frame alignment overhead position according to the fixed bit information and the length of the data frame; When the receiving end finds the fixed bit information at the expected frame alignment overhead position, the expected frame alignment overhead position is used as the frame alignment overhead position, and the expected frame alignment overhead position is shifted backward by the length of the data frame as the new expected frame alignment overhead position; When the receiving end finds the fixed bit information at the expected frame alignment overhead position, the contents of all the overheads of the data frame are valid contents; When the receiving end fails to find the fixed bit information at the expected frame alignment overhead position, the contents of all the overheads of the data frame are invalid contents.
4. The method according to claim 3, in, The re-searching the expected frame alignment overhead position according to the fixed bit information and the length of the data frame includes: The receiving end searches for the fixed bit information in all received bits until the fixed bit information is found; After finding the fixed bit information, the position of the fixed bit information is moved backward by the length of the data frame as the expected frame alignment overhead position.
5. The method according to claim 4, in, After sending the first command to the receiving end, the method further includes: When the first command does not carry the value for indicating the second length and the receiving end finds the fixed bit information in the expected frame alignment overhead position, the content of the frame length overhead is valid, the receiving end uses the content of the frame length overhead as the length of the data frame, and moves the expected frame alignment overhead position backward by the length of the data frame as the new expected frame alignment overhead position; When the first command does not carry the value for indicating the second length and the receiving end does not find the fixed bit information at the expected frame alignment overhead position, the content of the frame length overhead is invalid, and the receiving end uses the content of the last time the frame length overhead was valid as the fixed bit information. The length of the data frame, and re-searching the expected frame alignment overhead position according to the fixed bit information and the length of the data frame.
6. The method according to claim 4, in, After sending the first command to the receiving end, the method further includes: When the first command carries the value indicating the second length and the receiving end finds the fixed bit information in the expected frame alignment overhead position, the content of the frame length overhead is valid, and the receiving end uses the content of the frame length overhead as the length of the data frame, and moves the expected frame alignment overhead position backward by the length of the data frame as the new expected frame alignment overhead position; When the first command carries the numerical value indicating the second length and the receiving end fails to find the fixed bit information in the expected frame alignment overhead position, the content of the frame length overhead is invalid, and the receiving end uses the second length as the length of the data frame and re-searches for the expected frame alignment overhead position based on the fixed bit information and the length of the data frame.
7. The method according to claim 2, wherein the second command carries a value for indicating the second length, and after sending the second command to the sending end, further include: The transmitting end writes the value of the second length into the frame length overhead, and uses the second length as the length of the data frame.
8. The method according to claim 4, in, After sending the third command to the receiving end, the method further includes: The receiving end uses the second length as the length of the data frame, and determines the expected frame alignment overhead position of the data frame according to the length of the data frame and the content of the frame alignment overhead position.
9. The method according to claim 1, in, The method further comprises: When the receiving end receives the first command, it returns a response message that the first command is successfully executed; When the sending end receives the second command, the sending end returns a response message that the second command is successfully executed; When the receiving end receives the third command, the receiving end returns a response message indicating that the third command is successfully executed.
10. The method according to claim 9, in, After the controller sends the first command to the receiving end, the method further includes: The controller waits until receiving a response message indicating that the first command is successfully executed, and then determines that the receiving end has successfully executed the first command, or waits until a preset time has expired without receiving a response message indicating that the first command is successfully executed; The controller determines that the receiving end fails to execute the first command if the controller fails to receive a response message of successful execution of the first command within the preset time after sending the first command for a preset number of times and each time after sending the first command; After sending the second command to the sending end, the method further includes: The controller waits until receiving a response message indicating that the second command is successfully executed, and then determines that the sending end has successfully executed the second command, or waits until the preset time has expired without receiving a response message indicating that the second command is successfully executed; After the controller sends the second command for the preset number of times and does not receive a response message indicating that the second command is successfully executed within the preset time after each sending of the second command, it is determined that the sending end fails to execute the second command; After sending the third command to the receiving end, the method further includes: The controller waits until receiving a response message indicating that the third command is successfully executed, and then determines that the receiving end has successfully executed the third command, or waits until the preset time has expired without receiving a response message indicating that the third command is successfully executed; After the controller sends the third command for the preset number of times and does not receive response information indicating successful execution of the third command within the preset time after each sending of the third command, it is determined that the receiving end fails to execute the third command.
11. The method according to claim 10, in, After sending the third command to the receiving end, the method further includes: After determining that the receiving end executes the third command successfully, the controller determines that the length of the data frame is changed from the first length to the second length successfully; The controller determines that changing the length of the data frame from the first length to the second length fails after determining that the receiving end fails to execute the first command, determines that the sending end fails to execute the second command, or determines that the receiving end fails to execute the third command.
12. An electronic device, in, The electronic device includes a processor, a memory, and a program or instruction stored in the memory and executable on the processor. When the program or instruction is executed by the processor, the steps of the method for changing the data frame length as described in any one of claims 1 to 11 are implemented.
13. A readable storage medium, in, The readable storage medium stores a program or instruction, and when the program or instruction is executed by the processor, the steps of the method for changing the data frame length as described in any one of claims 1-11 are implemented.
Citation Information
Patent Citations
System and method for adaptive frame length control in OFDM system
CN101286971A
Method for indicating frame ending
CN101841385A
Frame configuration method, device and system
CN104079397A
Frame synchronization method and frame synchronization device
CN105450331A
Adaptive variable frame length telemetry data framing method and system
CN111740806A
