Data processing method and apparatus

By introducing control information into the communication device to determine the working mode of the physical layer module, the problem of waste of power consumption when transmitting invalid data is solved, and the low-power operation of the physical layer module is realized.

WO2025119267A1PCT designated stage expired Publication Date: 2025-06-12HUAWEI TECH CO LTD
View PDF 6 Cites 0 Cited by

Patent Information

Application Number
PCT/CN2024/137057
Authority / Receiving Office
WO · WO
Patent Type
Applications
Current Assignee / Owner
Priority Date
2023-12-07
Filing Date
2024-12-05
Publication Date
2025-06-12

AI Technical Summary

Technical Problem

The physical layer module of the communication device has a problem of waste of power when transmitting invalid data, because the physical layer is always in normal mode and is not adjusted according to the data content.

Method used

By introducing control information into the MAC layer module or the physical layer submodule of the communication device, it indicates whether the physical layer module contains valid data, thereby determining its operating mode and selecting a normal mode or a low-power mode.

Benefits of technology

Effectively reduce the power consumption of the physical layer module, especially when transmitting a large amount of invalid data, it significantly reduces energy consumption by switching to low-power mode.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN2024137057_12062025_PF_FP_ABST
    Figure CN2024137057_12062025_PF_FP_ABST
Patent Text Reader

Abstract

Embodiments of the present application provide a data processing method, which is applied to a communication apparatus serving as a sending end. The communication apparatus comprises a first module and a second module, the second module being a physical layer module. The first module acquires a first data stream and control information and sends the first data stream and the control information to the second module, the control information indicating whether the first data stream comprises valid data. On the basis of the control information, the second module determines a working mode of the second module when processing the first data stream, the working mode comprising a normal mode or a low-power mode. In other words, the physical layer module is not always in the normal mode, but can determine, on the basis of the control information, whether the first data stream comprises valid data, so as to determine the working mode of the physical layer module. By using the present scheme, the physical layer module can work in the normal mode and also can work in the low-power mode, so that the power consumption of the physical layer module is effectively reduced.
Need to check novelty before this filing date? Find Prior Art

Description

Data processing method and device

[0001] This application claims priority to the Chinese patent application filed with the State Intellectual Property Office on December 7, 2023, with application number 202311683913.3 and invention name “A Data Processing Method and Device”, the entire contents of which are incorporated by reference into this application. Technical Field

[0002] The present application relates to the field of communications, and in particular to a data processing method and device. Background Art

[0003] When transmitting data, a communication device can process the data in accordance with the open system interconnection (OSI) seven-layer model. The first layer of the OSI seven-layer model is the physical layer, and the second layer is the data link layer. The data link layer includes the media access control (MAC) layer. Among them, after the MAC layer on the sending side receives data sent by the upstream device or the upper-layer service, it sends the received data to the physical layer. When the MAC layer does not receive data sent by the upstream device or the upper-layer service, it sends an empty (IDLE) code stream to the physical layer to ensure the continuity of the physical layer code stream. The physical layer on the receiving side will send all the data streams on the sending side to the MAC layer on the receiving side for processing, including valid data and IDLE data. After the MAC layer removes the IDLE data, it sends the valid data to other devices or upper-layer services. During the period when the MAC layer on the sending side sends the IDLE code stream, the physical layer actually transmits invalid data. The processing of invalid data by the physical layer wastes power.

[0004] Therefore, there is an urgent need for a solution that can solve the above problems. Summary of the Invention

[0005] The embodiment of the present application provides a data processing method that can effectively reduce the power consumption of the physical layer module.

[0006] In a first aspect, embodiments of the present application provide a data processing method that can be applied to a communication device, which functions as a transmitter. The communication device includes a first module and a second module, where the second module is a physical layer module. The first module can obtain a first data stream and control information, where the control information indicates whether the first data stream contains valid data. After obtaining the first data stream and control information, the first module sends the first data stream and control information to the second module. After receiving the first data stream and control information, the second module can determine the operating mode of the second module when processing the first data stream based on the control information. The operating mode can include normal mode or low-power mode. In other words, the second module, as a physical layer module, is not always in normal mode. Instead, it can determine whether the first data stream contains valid data based on the control information, thereby determining its own operating mode. Using this solution, the physical layer module can operate in both normal mode and low-power mode. Compared to conventional technologies where the physical layer module is always in normal mode, this solution can effectively reduce the power consumption of the physical layer module.

[0007] In one possible implementation, the first module may be a MAC layer module. In other words, the MAC layer module may send control information indicating whether the first data stream includes valid data to the physical layer module, so that the physical layer module determines its own operating mode when processing the first data stream based on the control information. This enables the physical layer module to operate in a low-power mode when the data included in the first data stream is invalid data, thereby effectively reducing the power consumption of the physical layer module.

[0008] In one possible implementation, the first module may be a physical layer submodule that is different from the second module. In this case, the physical layer submodule may send control information indicating whether the first data stream includes valid data to the second module, so that the second module determines its own operating mode when processing the first data stream based on the control information. This allows the second module to operate in a low-power mode when the data included in the first data stream is invalid data, thereby effectively reducing the power consumption of the physical layer module.

[0009] In one possible implementation, the first data stream includes multiple code blocks, and the second module determines, based on the control information, an operating mode for the second module when processing the first data stream. In a specific implementation, the control information can be used to determine the operating mode corresponding to each of the multiple code blocks when the second module processes them. In other words, the operating mode of the second module can be accurately determined at the code block granularity, thereby effectively reducing the power consumption of the physical layer module.

[0010] In one possible implementation, the control information includes sub-control information corresponding to each of the multiple code blocks, each sub-control information indicating whether the corresponding code block includes valid data. Accordingly, the second module can determine its own operating mode for processing the code block corresponding to the sub-control information based on the sub-control information. This approach enables the second module's operating mode to be precisely granular with respect to code blocks, thereby effectively reducing power consumption of the physical layer module.

[0011] In one possible implementation, if the plurality of code blocks include a first code block and a second code block, and the control information indicates that the first code block includes valid data and the second code block does not include valid data, the second module can determine, based on the control information, that the second module operates in the normal mode when processing the first code block, and that the second module operates in the low-power mode when processing the second code block. In this manner, the second module can operate in the low-power mode when processing the second code block, thereby reducing the power consumption of the physical layer module.

[0012] In one possible implementation, if the control information indicates that each code block included in the first data stream includes valid data, the second module may determine, based on the control information, that the operating mode of the second module when processing each code block included in the first data stream is the normal mode.

[0013] In one possible implementation, if the control information indicates that none of the code blocks included in the first data stream contains valid data, the second module may determine, based on the control information, that the second module operates in the low-power mode when processing each code block included in the first data stream. In this manner, the second module operates in the low-power mode when processing the entire first data stream, thereby effectively reducing the power consumption of the physical layer module.

[0014] In one possible implementation, the physical layer module includes a physical coding sublayer (PCS) module. When the second module operates in a low-power mode, the PCS submodule does not perform scrambling and / or forward error correction (FEC) encoding operations. In other words, if the PCS submodule operates in a low-power mode, the PCS submodule does not perform scrambling and / or FEC encoding operations on the first data stream, thereby reducing the power consumption of the PCS submodule and, accordingly, reducing the power consumption of the entire physical layer module.

[0015] In one possible implementation, the physical layer module includes a physical medium attachment (PMA) submodule and a physical media dependent (PMD) submodule. In order to balance the number of 0s and 1s in the data stream ultimately received by the PMD submodule, in one example, when the working mode of the second module when processing the first data stream is a low power consumption mode, the PMA submodule can convert the first data stream sent to the PMD module into a pseudo-random code sequence, thereby balancing the number of 0s and 1s in the data stream received by the PMD submodule.

[0016] In one possible implementation, the PCS sub-module performs a scrambling operation on the first data stream in the normal mode, and stops performing the scrambling operation on the first data stream in the low power mode. When the PCS sub-module switches from the low power mode to the normal mode, the scrambling seed used by the PCS sub-module to perform the scrambling operation on the first data stream is continuous with the scrambling seed used for the last time the scrambling operation was performed on the first data stream, so that the receiving end can normally descramble the received data stream.

[0017] In one possible implementation, before obtaining the first data stream and the control information, the first module may obtain a second data stream. The second data stream may include indication information indicating whether the first data stream includes valid data. Accordingly, in this case, when obtaining the first data stream, the first module may generate control information that can be used to indicate whether the first data stream includes valid data based on the indication information.

[0018] In one possible implementation, the data processed by the PCS submodule on the first data stream and the data processed by the PCS submodule on the second database are within different alignment marker (AM) windows. The alignment marker insertion submodule included in the PCS submodule is used to insert AM. The data between two adjacent AMs can be understood as data within an AM window. In a specific example, the data processed by the PCS submodule on the second data stream is between the first AM and the second AM, and the data processed by the PCS submodule on the first data stream is between the third AM and the fourth AM. In a specific example, the second AM and the third AM are the same, that is, the second data stream and the first data stream are data within two adjacent AM windows. In another example, the second AM and the third AM may also be different.

[0019] In one possible implementation, the indication information can indicate a proportion of valid data included in the first data stream, and code blocks carrying valid data in the first data stream are evenly distributed in the first data stream. The second module can determine, based on the indication information, whether each code block included in the first data stream includes valid data.

[0020] In one possible implementation, the indication information may be carried by an Ethernet frame. In other words, the second data stream includes an Ethernet frame that carries the indication information. Accordingly, the second module may parse the second data stream to obtain the Ethernet frame and acquire the indication information carried in the Ethernet frame, thereby determining the operating mode of the second module when processing the first data stream based on the indication information.

[0021] In one possible implementation, a new Ethernet frame type can be defined, and this type of Ethernet frame is used to carry the aforementioned indication information. In one possible implementation, the new Ethernet frame type can be indicated by the start frame delimiter (SFD) field of the Ethernet frame. In other words, in one example, the SFD field of the Ethernet frame can be used to indicate that the Ethernet frame carries the aforementioned indication information. In this case, the second module can parse the second data stream to obtain the Ethernet frame, and determine that the Ethernet frame carries the indication information based on the SFD field of the Ethernet frame. Further, the indication information carried in the Ethernet frame is obtained so as to determine the operating mode of the second module when processing the first data stream based on the indication information.

[0022] In a possible implementation, when the first module obtains the second data stream, it can first determine whether the first data stream includes valid data, and then, based on the determination result of whether the first data stream includes valid data, generate the second data stream including the indication information. As a specific example, the first module can determine whether the first data stream includes valid data based on the flow ratio of valid data and invalid data and the data volume of valid data, wherein the flow ratio of valid data and invalid data can characterize the distribution of valid data and invalid data. The data volume of valid data can indicate the specific amount of valid data. Combined with the aforementioned distribution of valid data and invalid data, it can be determined whether the first data stream includes valid data.

[0023] In a second aspect, embodiments of the present application provide a data processing method that can be applied to a communication device, which serves as a receiving end. The communication device includes a first module and a second module, where the second module is a physical layer module. The first module can receive a first data stream, which includes indication information indicating whether the second data stream contains valid data. After receiving the first data stream including the indication information, the first module can send the indication information included in the first data stream to the second module. Accordingly, the second module determines the operating mode of the second module when processing the second data stream based on the indication information. The operating mode can include normal mode or low-power mode. In other words, the second module, as a physical layer module, is not always in normal mode. Instead, it can determine whether the second data stream contains valid data based on the indication information, thereby determining its own operating mode. Using this solution, the physical layer module can operate in both normal mode and low-power mode. Compared to conventional technologies in which the physical layer module is always in normal mode, this solution can effectively reduce the power consumption of the physical layer module.

[0024] In a possible implementation, the first module is a media access control (MAC) layer module or a physical layer submodule, and the physical layer submodule is different from the second module.

[0025] In a possible implementation, the first data stream and the second data stream are in different alignment word marker AM windows.

[0026] In a possible implementation, the second data stream is between the first AM and the second AM, and the first data stream is between the third AM and the fourth AM.

[0027] In a possible implementation, the indication information is specifically used to indicate the proportion of valid data included in the first data stream, and the code blocks carrying the valid data in the first data stream are evenly distributed in the first data stream.

[0028] In a possible implementation manner, the second data stream includes an Ethernet frame, and the Ethernet frame carries the indication information.

[0029] In a possible implementation manner, a start of frame delimiter (SFD) of the Ethernet frame indicates that the Ethernet frame carries the indication information.

[0030] In one possible implementation, the first data stream includes multiple code blocks, and the second module determines an operating mode for processing the first data stream based on the indication information. In a specific implementation, the indication information can be used to determine the corresponding operating mode for each of the multiple code blocks. This approach enables the operating mode of the second module to be accurately determined at the code block level, thereby effectively reducing power consumption of the physical layer module.

[0031] In one possible implementation, if the plurality of code blocks include a first code block and a second code block, and the indication information indicates that the first code block includes valid data and the second code block does not include valid data, the second module can determine, based on the indication information, that the operating mode of the second module when processing the first code block is the normal mode, and that the operating mode of the second module when processing the second code block is the low-power mode. Because the second module operates in the low-power mode when processing the second code block, this solution can reduce the power consumption of the physical layer module.

[0032] In one possible implementation, if the indication information indicates that each code block included in the first data stream includes valid data, the second module may determine, based on the indication information, that the operating mode of the second module when processing each code block included in the first data stream is the normal mode.

[0033] In one possible implementation, if the indication information indicates that none of the code blocks included in the first data stream contains valid data, the second module may determine, based on the indication information, that the operating mode of the second module when processing each code block included in the first data stream is the low power consumption mode, thereby effectively reducing the power consumption of the physical layer module.

[0034] In one possible implementation, the second module operates in a low-power mode, which can be understood as the second module stopping processing the received data stream. As a specific example, for the PMA submodule included in the physical layer module, if the PMA submodule operates in a low-power mode, the PMA submodule discards the data from the PMD submodule. In this way, the PCS submodule does not receive the data from the PMA submodule. Accordingly, the PCS submodule does not need to perform FEC decoding, descrambling and other processing operations, thereby reducing the power consumption of the PCS submodule, and accordingly, reducing the power consumption of the entire physical layer module.

[0035] In a third aspect, an embodiment of the present application provides a communication device, comprising a first module and a second module, the second module being a physical layer module; the first module is used to obtain a first data stream and control information, the control information indicating whether the first data stream includes valid data; and sending the first data stream and the control information to the second module; the second module is used to determine the working mode of the second module when processing the first data stream based on the control information, the working mode including: normal mode or low power consumption mode.

[0036] In a possible implementation, the first module is a media access control (MAC) layer module, or a physical layer submodule, and the physical layer submodule is different from the second module.

[0037] In a possible implementation, the first data stream includes multiple code blocks, and the second module is specifically configured to determine, based on the control information, a corresponding working mode when the second module processes each of the multiple code blocks.

[0038] In a possible implementation, the control information includes sub-control information corresponding to each code block in the multiple code blocks, and each sub-control information indicates whether the corresponding code block includes valid data.

[0039] In one possible implementation, the multiple code blocks include a first code block and a second code block, the control information indicates that the first code block includes valid data and the second code block does not include valid data, and the second module is specifically used to: determine, based on the control information, that the working mode of the second module when processing the first code block is the normal mode, and determine that the working mode of the second module when processing the second code block is the low power consumption mode.

[0040] In one possible implementation, the control information indicates that each code block included in the first data stream includes valid data, and the second module is specifically used to determine that the working mode of the second module when processing each code block included in the first data stream is the normal mode.

[0041] In one possible implementation, the control information indicates that none of the code blocks included in the first data stream includes valid data, and the second module is specifically used to determine that the working mode of the second module when processing each code block included in the first data stream is the low power consumption mode.

[0042] In one possible implementation, the physical layer module includes a PCS sub-module. When the working mode of the second module when processing the first data stream is the low power consumption mode, the PCS sub-module does not perform scrambling operations and / or forward error correction FEC encoding operations on the first data stream.

[0043] In one possible implementation, the physical layer module includes a physical medium attachment sublayer PMA submodule and a physical medium dependent layer PMD submodule. The PMA submodule is used to send a pseudo-random code sequence to the PMD submodule when the working mode of the second module when processing the first data stream is the low power consumption mode.

[0044] In one possible implementation, the physical layer module includes a physical coding sublayer PCS submodule, the PCS submodule performs an scrambling operation on the first data stream in the normal mode, and stops performing the scrambling operation on the first data stream in the low power mode. When the PCS submodule switches from the low power mode to the normal mode, the scrambling seed used by the PCS submodule to perform the scrambling operation on the first data stream is continuous with the scrambling seed used for the last scrambling operation on the first data stream.

[0045] In one possible implementation, the first module is also used to obtain a second data stream, which includes indication information, and the indication information indicates whether the first data stream includes valid data; the first module is specifically used to: obtain the first data stream and generate the control information based on the indication information.

[0046] In a possible implementation, the physical layer module includes a PCS submodule, and data processed by the PCS submodule on the first data stream and data processed by the PCS submodule on the second data stream are in different AM windows.

[0047] In one possible implementation, the physical layer module includes a PCS sub-module, and the data processed by the PCS sub-module for the second data stream is between the first alignment word marker AM and the second alignment word marker AM, and the data processed by the PCS sub-module for the first data stream is between the third AM and the fourth AM.

[0048] In a possible implementation, the indication information is specifically used to indicate the proportion of valid data included in the first data stream, and the code blocks carrying the valid data in the first data stream are evenly distributed in the first data stream.

[0049] In a possible implementation manner, the second data stream includes an Ethernet frame, and the Ethernet frame carries the indication information.

[0050] In a possible implementation manner, a Start of Frame Delimiter (SFD) field of the Ethernet frame indicates that the Ethernet frame carries the indication information.

[0051] In one possible implementation, the first module is specifically used to: determine the traffic ratio of valid data and invalid data, and the data volume of the valid data; determine whether the first data stream includes valid data based on the traffic ratio and the data volume of the valid data, and generate the second data stream including the indication information.

[0052] In a fourth aspect, an embodiment of the present application provides a communication device, which includes a first module and a second module, the second module being a physical layer module; the first module is used to receive a second data stream, the second data stream including indication information, the indication information indicating whether the first data stream includes valid data; the indication information is sent to the second module, the second module being a physical layer module; the second module is used to determine the working mode of the second module when processing the first data stream based on the indication information, and the working mode includes: normal mode or low power consumption mode.

[0053] In a possible implementation, the first module is a media access control (MAC) layer module or a physical layer submodule, and the physical layer submodule is different from the second module.

[0054] In a possible implementation, the first data stream and the second data stream are in different alignment word marker AM windows.

[0055] In a possible implementation, the second data stream is between the first AM and the second AM, and the first data stream is between the third AM and the fourth AM.

[0056] In a possible implementation, the indication information is specifically used to indicate the proportion of valid data included in the first data stream, and the code blocks carrying the valid data in the first data stream are evenly distributed in the first data stream.

[0057] In a possible implementation manner, the second data stream includes an Ethernet frame, and the Ethernet frame carries the indication information.

[0058] In a possible implementation manner, a start of frame delimiter (SFD) of the Ethernet frame indicates that the Ethernet frame carries the indication information.

[0059] In a possible implementation, the first data stream includes multiple code blocks, and the second module is specifically configured to determine, according to the indication information, a corresponding working mode when the second module processes each of the multiple code blocks.

[0060] In one possible implementation, the multiple code blocks include a first code block and a second code block, the control information indicates that the first code block includes valid data and the second code block does not include valid data, and the second module is specifically used to: determine, based on the control information, that the working mode of the second module when processing the first code block is the normal mode, and determine that the working mode of the second module when processing the second code block is the low power consumption mode.

[0061] In one possible implementation, the control information indicates that each code block included in the first data stream includes valid data, and the second module is specifically used to determine that the working mode of the second module when processing each code block included in the first data stream is the normal mode.

[0062] In one possible implementation, the control information indicates that none of the code blocks included in the first data stream includes valid data, and the second module is specifically used to determine that the working mode of the second module when processing each code block included in the first data stream is the low power consumption mode.

[0063] In one possible implementation, the second module includes a physical medium attachment sublayer PMA submodule and a physical medium dependence layer PMD submodule. When the operating mode of the second module when processing the first data stream is the low power consumption mode, the PMA submodule discards data from the PMD submodule.

[0064] In a fifth aspect, an embodiment of the present application provides a device. The device includes a processor and a memory. The memory is configured to store instructions or computer programs. The processor is configured to execute the instructions or computer programs in the memory to perform any of the methods described in the first aspect above, or to perform any of the methods described in the second aspect above.

[0065] In a sixth aspect, an embodiment of the present application provides a computer-readable storage medium, comprising instructions or a computer program, which, when executed on a computer, enables the computer to execute any of the methods described in the first aspect above, or enables the computer to execute any of the methods described in the second aspect above.

[0066] In the seventh aspect, an embodiment of the present application provides a computer program product comprising instructions or a computer program, which, when run on a computer, enables the computer to execute any of the methods described in the first aspect above, or enables the computer to execute any of the methods described in the second aspect above.

[0067] In an eighth aspect, an embodiment of the present application provides a chip, comprising an interface circuit and a processing circuit, wherein the interface circuit is used to receive and / or send data, and the processing circuit is used to perform data processing.

[0068] In one example, the chip can be applied to a communication device serving as a transmitting end. In this case:

[0069] The interface circuit is configured to obtain a first data stream and control information, the control information indicating whether the first data stream includes valid data, and transmit the first data stream and the control information to the processing circuit, the processing circuit being applied to a physical layer module. The processing circuit is configured to determine an operating mode of the processing circuit when processing the first data stream based on the control information, the operating mode including a normal mode and a low power mode.

[0070] In yet another example, the chip can be applied to a communication device serving as a receiving end. In this case:

[0071] The interface circuit is used to receive a second data stream, which includes indication information, and the indication information indicates whether the first data stream includes valid data; send the indication information to the processing circuit, and the processing circuit is applied to the physical layer module.

[0072] The processing circuit is configured to determine, according to the indication information, an operating mode of the processing circuit when processing the first data stream, where the operating mode includes: a normal mode or a low power consumption mode.

[0073] In a ninth aspect, an embodiment of the present application provides an optical module, comprising an interface circuit and a digital signal processor (DSP), wherein the interface circuit is used to receive and / or send data, and the DSP is used to perform data processing.

[0074] In one example, the optical module can be applied to a communication device serving as a transmitting end. In this case:

[0075] The interface circuit is used to obtain a first data stream and control information, where the control information indicates whether the first data stream includes valid data; and send the first data stream and the control information to the DSP. The DSP is used to determine the operating mode of the DSP when processing the first data stream based on the control information, where the operating mode includes: normal mode or low power consumption mode.

[0076] In yet another example, the optical module can be applied to a communication device serving as a receiving end. In this case:

[0077] The interface circuit is configured to receive a second data stream, the second data stream including indication information, the indication information indicating whether the first data stream includes valid data; and send the indication information to the DSP.

[0078] The DSP is configured to determine a working mode of the DSP when processing the first data stream according to the indication information, where the working mode includes a normal mode or a low power consumption mode.

[0079] In the tenth aspect, an embodiment of the present application provides a communication system, which includes: a communication device that executes the method described in any one of the first aspects above, and a communication device that executes the method described in any one of the second aspects above. BRIEF DESCRIPTION OF THE DRAWINGS

[0080] In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the following briefly introduces the drawings required for use in the embodiments or the description of the prior art. Obviously, the drawings described below are only some embodiments recorded in this application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative work.

[0081] FIG1 is a schematic diagram of an exemplary application scenario;

[0082] FIG2 is a flow chart of a data processing method provided in an embodiment of the present application;

[0083] FIG3 is a schematic diagram of a data flow structure provided in an embodiment of the present application;

[0084] FIG4 is a schematic diagram of the structure of an Ethernet frame provided in an embodiment of the present application;

[0085] FIG5 is a flow chart of another data processing method provided in an embodiment of the present application;

[0086] FIG6 is a schematic diagram of a data processing method provided in an embodiment of the present application;

[0087] FIG7 is a schematic structural diagram of a communication device provided in an embodiment of the present application;

[0088] FIG8 is a schematic diagram of the structure of a chip provided in an embodiment of the present application;

[0089] FIG9 is a schematic diagram of the structure of an optical module provided in an embodiment of the present application;

[0090] FIG10 is a schematic structural diagram of a device provided in an embodiment of the present application. DETAILED DESCRIPTION

[0091] The embodiment of the present application provides a data processing method that can effectively reduce the power consumption of the physical layer module.

[0092] To facilitate understanding, this article first introduces the MAC layer and physical layer in the OSI seven-layer model in conjunction with specific scenarios.

[0093] See FIG1 , which is a schematic diagram of an exemplary application scenario.

[0094] As shown in FIG1 , both the transmitting end and the receiving end include a MAC layer and a physical layer, and the physical layer may include a PCS, a PMA, and a PMD.

[0095] As the transmitter, its MAC layer can receive data from upstream devices or upper-layer services. If it does not receive data from upstream devices or upper-layer services, the MAC layer inserts an IDLE stream. Specifically, after receiving data from upstream devices or upper-layer services, the transmitter's MAC layer can encapsulate the data to form a MAC frame. If it does not receive data from upstream devices or upper-layer services, the MAC layer inserts an IDLE stream and generates a corresponding MAC frame based on the IDLE stream.

[0096] The MAC layer at the transmitting end sends MAC frames to the physical layer at the transmitting end. For example, the reconciliation sublayer (RS) is located between the MAC layer and the physical layer. The physical layer includes the PCS, PMA, and PMD. The RS and PCS can communicate via a medium independent interface (MII) channel. The MII channel is either a virtual channel or a logical channel.

[0097] The RS can convert serial MAC frames into parallel data streams and transmit the data streams to the PCS through the MII channel.

[0098] The PCS can process data streams received via the MII channel. In a specific example, the PCS can first encode and rate-match the data stream, and then transcode the encoded and rate-matched data stream, such as performing 64B / 66B encoding and 256B / 257B transcoding. Furthermore, the PCS can perform a scrambling operation on the transcoded data stream. After the scrambling operation, AM is added to the scrambled data stream. After AM is added, FEC encoding is further performed on the data stream after AM addition. After FEC encoding, the FEC-encoded data can be distributed and interleaved to distribute the interleaved data to the PMA.

[0099] The PMA can modulate the data from the PCS into a signal that the channel supports transmission.

[0100] The PMD is a signal transmitter used to transmit the signal modulated by the PMA through a transmission medium.

[0101] The physical layer of the receiving end receives the signal transmitted on the aforementioned transmission medium, processes the signal, and then passes it to the MAC layer of the receiving end. As mentioned above, the physical layer of the receiving end also includes PMD, PMA and PCS.

[0102] The receiving PMD first receives the signal transmitted on the transmission medium. The PMA then demodulates the signal. The data obtained after PMA demodulation is passed to the PCS, which performs the inverse operations on the received data as previously performed by the transmitting PCS. Specifically, the PCS performs operations such as FEC decoding and descrambling on the data to generate a data stream. This data stream is then processed by the RS and passed to the MAC. The receiving MAC then obtains the MAC frame sent by the transmitter and further processes it, for example, parsing it and sending it to upstream devices or upper-layer services.

[0103] In conventional technology, on the transmitting end, after the MAC layer receives data from an upstream device or upper-layer service, it can send the received data to the physical layer. If the MAC layer does not receive data from the upstream device or upper-layer service, it sends an idle stream to the physical layer. Therefore, regardless of whether the upstream device or upper-layer service sends valid data to the MAC layer, the physical layer receives the data. Accordingly, the physical layer processes the received data. In other words, regardless of whether the upstream device or upper-layer service sends valid data to the MAC layer, the physical layer remains in a normal state. A normal state for the transmitting end's physical layer means that it performs the aforementioned scrambling, FEC encoding, and other operations on the currently received data stream (valid data stream or idle data stream). Accordingly, the receiving end's physical layer also remains in a normal state. A normal state for the receiving end's physical layer means that it performs the aforementioned descrambling, FEC decoding, and other operations on the currently received data stream (valid data stream or idle data stream).

[0104] In order to reduce the power consumption of the physical layer of a communication device, an embodiment of the present application provides a data processing method.

[0105] It should be noted that a communication device may include a MAC layer module and a physical layer module. The MAC layer module is used to implement the functions implemented by the aforementioned MAC layer, and the physical layer module is used to implement the functions implemented by the aforementioned physical layer. The physical layer may include multiple submodules, each of which is used to implement a specific physical layer function. For example, the physical layer module includes a PCS submodule, a PMA submodule, and a PMD submodule. The PCS submodule is used to implement the functions implemented by the aforementioned PCS, the PMA submodule is used to implement the functions implemented by the aforementioned PMA, and the PMD submodule is used to implement the functions implemented by the aforementioned PMD. In one example, the PCS submodule may be further divided into corresponding submodules based on the functions it implements. For example, the PCS submodule may include a codeword processing submodule, a scrambling submodule, an FEC encoding submodule, an alignment word insertion submodule, etc. The codeword processing submodule may be used to encode and rate-match a data stream, and then transcode the encoded and rate-matched data stream. The scrambling submodule is used to perform scrambling operations, the FEC encoding submodule is used to perform FEC encoding, and the alignment word insertion submodule is used to insert an alignment word flag.

[0106] Next, the data processing method provided in the embodiment of the present application is introduced with reference to the accompanying drawings.

[0107] Referring to Figure 2, which is a flow chart of a data processing method provided in an embodiment of the present application, the method shown in Figure 2 can be applied to a communication device, which serves as a transmitting end.

[0108] The communication device mentioned in the embodiments of the present application can be a network device such as a switch or router, or a component of a network device, such as a single board or line card on the network device, or a functional module on the network device, or a chip used to implement the method of the present application, or a server or optical module, etc., and the embodiments of the present application do not specifically limit this. The communication devices can be directly connected to each other, for example, but not limited to, via Ethernet cables or optical cables.

[0109] In an embodiment of the present application, the communication device executing the method described in Figure 2 includes a first module and a second module, the second module is a physical layer module, the second module is different from the first module, and the second module is a module of a lower level than the first module.

[0110] In one example, the first module may be a MAC layer module.

[0111] In another example, the first module may be a physical layer submodule, for example, a PCS submodule of the physical layer, or a submodule of the PCS submodule of the physical layer, for example, the aforementioned codeword processing submodule.

[0112] The method shown in FIG. 2 may include the following steps S101 - S103 .

[0113] S101: A first module obtains a first data stream and control information, where the control information indicates whether the first data stream includes valid data.

[0114] In the embodiment of the present application, the first data stream is a data segment containing multiple bits.

[0115] In one example, when the first module is a MAC layer module, the first data flow includes MAC frame data. In a specific implementation of S101, the first module may generate the first data flow and the control information.

[0116] In one example, when the first module is a physical layer submodule, S101 may receive the first data stream and the control information sent by the MAC layer module during specific implementation. In this case, the first data stream is a data stream converted from MAC frame data. In one specific example, when the MAC layer module sends the first data stream and the control information to the physical layer submodule, for every 64 bits of data sent by the MAC layer module to the physical layer submodule, it also sends a 1-bit control signal to the physical layer submodule. This control signal is used to indicate whether the 64 bits of data are valid data.

[0117] The first data stream may include multiple code blocks, each of which is a data segment containing multiple bits. In one example, the length of the code block is the information bit length corresponding to the FEC codeword obtained after the PCS submodule performs FEC encoding on the code block. In one example, if the FEC codeword is a Reed-Solomon (RS) code, the length of the code block is 514 symbols, where each symbol contains 10 bits. In other words, a code block is a data segment containing 5140 bits. A code block in the first data stream can be obtained by transcoding 80 64-bit data segments sent by the MAC layer. Specifically, every four 64-bit data segments of the 80 64-bit data segments sent by the MAC layer can be grouped together. That is, the 80 64-bit data segments sent by the MAC layer can include 20 groups of data, each of which contains 256 bits of data. Each 256-bit data segment is subjected to 256B / 257B transcoding to obtain 257-bit data. Therefore, one code block may include 257*20=5140 bits of data.

[0118] For a code block, if the control signal corresponding to each 64-bit data among the 80 64-bit data included in the code block indicates that the corresponding 64-bit data is invalid data, then the control information corresponding to the code block indicates that the code block does not include valid data. Correspondingly, if the control signal corresponding to each 64-bit data among the 80 64-bit data included in the code block indicates that the corresponding 64-bit data is valid, then the control information corresponding to the code block indicates that the code block includes valid data.

[0119] As an example, the control information is global control information, which is used to indicate whether the entire first data stream includes valid data. For example, the control information corresponds to a bit, and the value of the bit indicates whether the entire first data stream includes valid data. When the value of the bit is 1, it indicates that the first data stream includes valid data; when the value of the bit is 0, it indicates that the first data stream does not include valid data.

[0120] As another example, the control information may be more fine-grained control information, which may indicate whether each of the multiple code blocks includes valid data. As a specific example, the control information may include sub-control information corresponding to each of the multiple code blocks, and for each sub-control information, it is used to indicate whether the code block corresponding to the sub-control information includes valid data. For example, the sub-control information corresponds to a bit, and when the value of the bit is 0, it indicates that the code block corresponding to the sub-control information does not include valid data, and when the value of the bit is 1, it indicates that the code block corresponding to the sub-control information includes valid data.

[0121] The valid data mentioned in the embodiments of the present application refers to data sent to the MAC layer by an upstream device of the MAC layer or an upper layer service. In other words, the valid data may be data other than the IDLE stream.

[0122] S102: The first module sends the first data stream and the control information to the second module.

[0123] S103: The second module determines, according to the control information, an operating mode of the second module when processing the first data stream, where the operating mode includes a normal mode or a low power consumption mode.

[0124] After obtaining the first data stream and the control information, the first module may send the first data stream and the control information to the second module. For example, when the first module is a MAC layer module, the MAC layer module may send the first data stream and the control information to a PCS submodule of the physical layer. For another example, when the first module is a physical layer submodule, the first module may send the first data stream and the control information to a physical layer submodule at a lower level than itself.

[0125] After the second module receives the first data stream and control information, it can determine whether the first data stream includes valid data based on the control information, thereby determining its own working mode when processing the first data stream. The working mode can be a normal mode or a low-power mode. The so-called normal mode can be understood as processing the received data stream according to the normal process, such as performing scrambling, FEC encoding and other processing operations on the received data stream normally. The so-called low-power mode can be understood as stopping processing the received data stream. For example, for the PCS sub-module included in the physical layer module, if the PCS sub-module operates in low-power mode, the PCS sub-module does not perform scrambling operations and / or FEC encoding operations on the first data stream, thereby reducing the power consumption of the PCS sub-module, and correspondingly reducing the power consumption of the entire physical layer module.

[0126] In one example, when the aforementioned control information is global control information, S103, during specific implementation, may determine a specific operating mode based on the control information, and operate in that operating mode when processing the entire first data stream. For example, if the control information indicates that the first data stream includes valid data, the second module may determine that its operating mode when processing the entire first data stream is normal mode. For another example, if the control information indicates that the first data stream does not include valid data, the second module may determine that its operating mode when processing the entire first data stream is low power mode.

[0127] In another example, when the aforementioned control information includes sub-control information corresponding to each of the multiple code blocks in the first data stream, S103 can, in a specific implementation, determine the corresponding working mode of the second module when processing each of the multiple code blocks based on the control information. Specifically, the second module can process the valid data in the first data stream based on the control information and not process the invalid data in the first data stream. In other words, for the valid data in the first data stream, the second module operates in normal mode so that the valid data can be processed according to the normal process. For the invalid data in the first data stream, the second module operates in low power consumption mode so that the invalid data is not processed.

[0128] As a specific example, if the aforementioned multiple code blocks include a first code block and a second code block, and the control information indicates that the first code block includes valid data and the second code block does not include valid data. For example, the sub-control information corresponding to the first code block indicates that the first code block includes valid data, and the sub-control information corresponding to the second code block indicates that the second code block does not include valid data. Then, based on the control information, the second module can determine that the operating mode of the second module when processing the first code block is the normal mode, and determine that the operating mode of the second module when processing the second code block is the low power mode. In this case, the PCS submodule can perform scrambling and FEC encoding operations on the first code block, and not perform scrambling and FEC encoding operations on the second code block.

[0129] As another specific example, if the control information indicates that each code block included in the first data stream contains valid data, for example, if the sub-control information corresponding to each code block indicates that the corresponding code block contains valid data, then the second module can determine, based on the control information, that the second module operates in the normal mode when processing each code block included in the first data stream. In this case, the PCS submodule can perform scrambling and FEC encoding operations on each code block in the first data stream.

[0130] As another specific example, if the control information indicates that none of the code blocks included in the first data stream include valid data. For example, the sub-control information corresponding to each code block indicates that none of the corresponding code blocks include valid data. Then, the second module can determine, based on the control information, that the operating mode of the second module when processing each code block included in the first data stream is the low-power mode. In this case, the PCS submodule can not perform scrambling and FEC encoding operations on each code block in the first data stream, thereby effectively reducing the power consumption of the PCS submodule, and correspondingly reducing the power consumption of the entire physical layer module.

[0131] As mentioned above, when the PCS submodule operates in low-power mode, it does not perform scrambling and / or FEC encoding operations on the first data stream. In this way, the data stream sent by the PCS submodule to the PMA submodule may have an imbalance in the number of 0s and 1s. In order to balance the number of 0s and 1s in the data stream ultimately received by the PMD submodule, in one example, when the operating mode when the second module processes the first data stream is low-power mode, for example, when the second module processes the aforementioned second code block, the PMA submodule can convert the first data stream sent to the PMD module into a pseudo-random binary sequence (PRBS), thereby balancing the number of 0s and 1s in the data stream received by the PMD submodule. The pseudo-random binary sequence can also be referred to as a pseudo-random code sequence.

[0132] In an embodiment of the present application, when the PCS submodule scrambles the first data stream, it can generate corresponding scrambling information based on a scrambling seed, and then use the scrambling information to scramble the first data stream. For multiple code blocks in the first data stream that require scrambling, a different scrambling seed is used for each code block, and the scrambling seeds used for the scrambling operations are continuous in the order in which the scrambling operations are performed on the multiple code blocks. This allows the receiving end to properly descramble the received data stream.

[0133] As described above, when the PCS submodule processes the first data stream, its operating mode can be switched between normal mode and low power mode. In the embodiment of the present application, when the PCS submodule switches from low power mode to normal mode, the scrambling seed used by the PCS submodule to perform the scrambling operation on the first data stream is continuous with the scrambling seed used in the last scrambling operation on the first data stream. For example:

[0134] The first data stream includes code block 1, code block 2, code block 3, and code block 4. Code block 1 and code block 4 include valid data, while code block 2 and code block 3 do not. The operating mode of the PCS submodule when processing code block 1 is normal mode. Therefore, the PCS submodule performs a scrambling operation on code block 1, and the scrambling seed used by the PCS submodule for the scrambling operation on code block 1 is a. The operating mode of the PCS submodule when processing code blocks 2 and 3 is switched to low power mode. Therefore, the PCS submodule does not perform a scrambling operation on code blocks 2 and 3. The operating mode of the PCS submodule when processing code block 4 is switched to normal mode. Therefore, the PCS submodule performs a scrambling operation on code block 4, and the scrambling seed used by the PCS submodule for the scrambling operation on code block 4 is b, which is continuous with the scrambling seed a used by the PCS submodule for the last scrambling operation.

[0135] As can be seen from the above description, using the solution of the embodiments of the present application, for a communication device acting as a transmitter, its physical layer module can operate in either normal mode or low-power mode. When the transmitted data is invalid, the physical layer module operates in low-power mode. Compared to conventional technologies in which the physical layer module is always in normal mode, this solution can effectively reduce the power consumption of the physical layer module.

[0136] In one example, before executing S101, the first module may further obtain a second data stream, where the second data stream may be a data stream obtained by the first module before obtaining the first data stream. The second data stream may include indication information, where the indication information is used to indicate whether the first data stream includes valid data. Accordingly, in this case, when obtaining the first data stream, the first module may generate control information based on the indication information that can be used to indicate whether the first data stream includes valid data.

[0137] In a specific example, when the first module obtains the second data stream, it can receive the indication information sent by the upper layer module and generate the second data stream including the indication information based on the indication information.

[0138] In another specific example, the first module may first determine whether the first data stream includes valid data, and then, based on the determination result of whether the first data stream includes valid data, generate a second data stream including the indication information. In one example, when the first module determines whether the first data stream includes valid data, it can determine whether the first data stream includes valid data based on the flow ratio of valid data and invalid data and the data volume of valid data, wherein the flow ratio of valid data and invalid data can characterize the distribution of valid data and invalid data. The data volume of valid data can indicate the specific amount of valid data. Combined with the aforementioned distribution of valid data and invalid data, it can be determined whether the first data stream includes valid data. For example, assuming an AM window can accommodate 10 code blocks, the traffic ratio of valid data to invalid data is 20:1, and the amount of valid data occupies 20 code blocks. In this case, the distribution of valid data and invalid data is: 20 code blocks of valid data → 1 code block of invalid data. The current second data stream includes 10 code blocks of valid data, and the other 10 code blocks of valid data need to be carried in the subsequent first data stream. Therefore, it can be determined that the first data stream contains valid data. For another example, assuming an AM window can accommodate 10 code blocks, the traffic ratio of valid data to invalid data is 1:20, and the valid data occupies 1 code block. In this case, the distribution of valid data and invalid data is: 1 code block of valid data → 20 code blocks of invalid data. The current second data stream contains one code block of valid data. Therefore, it can be determined that the first data stream does not contain valid data.

[0139] Regarding the first data stream and the second data stream, in one example, the data processed by the PCS submodule on the first data stream and the data processed by the PCS submodule on the second database are in different AM windows. Regarding the AM window, it should be noted that, as mentioned above, the PCS submodule may include an alignment word insertion submodule, and the alignment word insertion submodule is used to insert AM. The data between two adjacent AMs can be understood as data within an AM window. In a specific example, the data processed by the PCS submodule on the second data stream is between the first AM and the second AM, and the data processed by the PCS submodule on the first data stream is between the third AM and the fourth AM. In a specific example, the second AM and the third AM are the same, that is, the second data stream and the first data stream are data within two adjacent AM windows. In another example, the second AM and the third AM may also be different, and the embodiments of the present application do not make specific limitations.

[0140] For the convenience of description, the AM window of the second data stream is referred to as a first AM window.

[0141] As previously described, the first module can be a MAC layer module or a physical layer submodule. In one example, when the first module is a MAC layer submodule, the indication information can be, for example, in a code block included between the first AM and the second AM. For example, an IDLE code block is included between the first AM and the second AM, and the IDLE code block includes the indication information. In another example, when the first module is a physical layer submodule, the indication information can be, for example, located in the first AM.

[0142] This can be understood in conjunction with Figure 3, which is a schematic diagram of the structure of a data stream provided in an embodiment of the present application. As shown in Figure 3, second data stream 310 is located between AM 301 (i.e., the first AM) and AM 302 (i.e., the second AM), and first data stream 320 is located between AM 302 (i.e., the third AM) and AM 304 (i.e., the fourth AM). The indication information 311 is carried by code blocks in second data stream 310. The data obtained after the code blocks in first data stream 310 and second data stream 320 are FEC-encoded by the PCS submodule can be referred to as codewords. The embodiment of the present application does not specifically limit the format of the indication information. In one specific example, the indication information can be, for example, an Ethernet frame. In other words, the second data stream includes an Ethernet frame that carries the indication information. In one example, a new Ethernet frame type can be defined to carry the aforementioned indication information. In one possible implementation, the new Ethernet frame type can be indicated by the SFD field of the Ethernet frame. In other words, in one example, the SFD field of the Ethernet frame can be used to indicate that the Ethernet frame carries the aforementioned indication information.

[0143] Regarding the above-mentioned instruction information, it should be noted that:

[0144] In one example, for multiple code blocks included in the first data stream, the indication information includes sub-indication information corresponding to each code block in the multiple code blocks, and each sub-indication information indicates whether the corresponding code block includes valid data.

[0145] In another example, the indication information is specifically used to indicate the proportion of valid data included in the first data stream. In addition, in order to facilitate error correction and other controls on the first data stream, the code blocks carrying valid data in the first data stream are evenly distributed in the first data stream. In this way, the second module can also determine whether each code block included in the first data stream includes valid data based on the indication information. For example: assuming that the first data stream includes 8 code blocks and the aforementioned valid data accounts for 1 / 2, then the first code block, the third code block, the fifth code block and the seventh code block of the first data stream include valid data, and the second code block, the fourth code block, the sixth code block and the eighth code block of the first data stream do not include valid data. Assuming again that the first data stream includes 8 code blocks and the aforementioned valid data accounts for 1 / 4, then the first code block and the fifth code block of the first data stream include valid data, and the other code blocks do not include valid data.

[0146] Regarding the Ethernet frame, it is now understood in conjunction with Figure 4, which is a structural diagram of an Ethernet frame provided in an embodiment of the present application. As shown in Figure 4, the Ethernet frame includes: a preamble field, an SFD field, a message field (msg-field) field, and a frame check sequence (FCS) field. Among them, the SFD field is used to indicate that the Ethernet frame carries the aforementioned indication information, and the message field field can be used to carry the aforementioned valid data ratio. For example, the 3 bits of the message field indicate the valid data ratio. When the value of the 3 bits is 1, it indicates that the valid data ratio is 1 / 8. When the value of the 3 bits is 2, it indicates that the valid data ratio is 2 / 8, and so on. They are not listed here one by one.

[0147] In one example, after the first module sends the second data stream to the second module, the second module may send the second data stream to the receiving end. Accordingly, the receiving end may determine the working mode of its physical layer module based on the indication information in the second data stream.

[0148] Next, the steps performed by the communication device as the receiving end are described with reference to Figure 5. Similar to the communication device as the transmitting end, the communication device as the receiving end also includes a first module and a second module. For details about the first module and the second module, please refer to the relevant description above and will not be repeated here.

[0149] Referring to Figure 5, which is a flow chart of another data processing method provided by an embodiment of the present application, the method shown in Figure 5 may include the following steps S201-S203.

[0150] S201: A first module receives a second data stream, where the second data stream includes indication information, and the indication information indicates whether the first data stream includes valid data.

[0151] The first module receives the second data stream, which may be the first module receiving the second data stream from the sending end.

[0152] In one example, when the first module is a physical layer submodule, the indication information may be carried in the first AM. When the first module is a MAC layer module, the indication information may be located in a code block included between the first AM and the second AM.

[0153] Regarding the first AM, the second AM, the content and format of the indication information, and the relationship between the first data stream and the second data stream, reference may be made to the relevant descriptions of the above embodiments, and no repeated description is given here.

[0154] S202: The first module sends the instruction information to the second module.

[0155] S203: The second module determines, according to the indication information, a working mode of the second module when processing the first data stream, where the working mode includes: a normal mode or a low power consumption mode.

[0156] After receiving the second data stream, the first module can extract indication information from the second data stream and send the indication information to the second module, so that the second module can determine its own operating mode when processing the subsequently received first data stream based on the indication information. The operating mode can be a normal mode or a low-power mode. Normal mode can be understood as processing the received data stream according to the normal process. For example, the PMA submodule sends the received data stream to the PCS submodule, and the PCS submodule performs FEC decoding, descrambling, and other processing operations on the received data stream. Low-power mode can be understood as ceasing to process the received data stream. For example, if the PMA submodule included in the physical layer module operates in low-power mode, the PMA submodule discards data from the PMD submodule. As a result, the PCS submodule does not receive data from the PMA submodule. Accordingly, the PCS submodule does not need to perform FEC decoding, descrambling, and other processing operations, thereby reducing the power consumption of the PCS submodule and, consequently, the power consumption of the entire physical layer module.

[0157] In one example, during a specific implementation of S203, a specific operating mode may be determined based on the indication information, and the second module may operate in this operating mode when processing the entire first data stream. For example, if the control information indicates that the first data stream includes valid data, the second module may determine that its operating mode when processing the entire first data stream is normal mode. For another example, if the control information indicates that the first data stream does not include valid data, the second module may determine that its operating mode when processing the entire first data stream is low power mode.

[0158] In another example, when S203 is specifically implemented, the second module can determine the corresponding operating mode when processing each code block in the multiple code blocks based on the indication information. Specifically, the second module can process the valid data in the first data stream and not process the invalid data in the first data stream based on the indication information. In other words, for the valid data in the first data stream, the second module operates in normal mode so that the valid data is processed according to the normal process. For the invalid data in the first data stream, the second module operates in low power consumption mode so that the invalid data is not processed.

[0159] As a specific example, if the aforementioned multiple code blocks include a first code block and a second code block, and the indication information indicates that the first code block includes valid data and the second code block does not include valid data. Then the second module can determine, based on the indication information, that the working mode of the second module when processing the first code block is the normal mode, and determine that the working mode of the second module when processing the second code block is the low power mode. In this case, the PMA sub-module can send the first code block to the PCS sub-module so that the PCS sub-module performs FEC decoding and descrambling operations on the first code block. Accordingly, the PMA sub-module can discard the second code block. In this way, the PCS sub-module cannot receive the second code block. Accordingly, the PCS sub-module does not need to perform FEC decoding and descrambling operations on the second code block, thereby reducing the power consumption of the PCS sub-model and correspondingly reducing the power consumption of the physical layer module.

[0160] As another specific example, if the indication information indicates that each code block included in the first data stream contains valid data, the second module may determine, based on the indication information, that the second module operates in the normal mode when processing each code block included in the first data stream. In this case, the PMA sub-module may send each code block included in the first data stream to the PCS sub-module, so that the PCS sub-module performs FEC decoding and descrambling operations on each code block.

[0161] As another specific example, if the indication information indicates that none of the code blocks included in the first data stream contain valid data, the second module can determine, based on the indication information, that the second module operates in the low-power mode when processing each code block included in the first data stream. In this case, the PMA submodule can discard the entire first data stream. In this case, the PCS submodule will not receive the first data stream. Accordingly, the PCS submodule does not need to perform FEC decoding and descrambling operations on the first data stream, thereby reducing the power consumption of the PCS submodule and, accordingly, the physical layer module.

[0162] As can be seen from the above description, using the solution of the embodiments of the present application, the physical layer module of the communication device serving as the receiving end can operate in either normal mode or low-power mode. When the received data is invalid, the physical layer module operates in low-power mode. Compared to conventional technologies in which the physical layer module always operates in normal mode, this solution can effectively reduce the power consumption of the physical layer module.

[0163] The above introduces the data processing method provided in the embodiment of the present application. Next, taking the aforementioned first module as a MAC layer module and the second module as a physical layer module as an example, a possible implementation method of the present application is introduced.

[0164] This can be understood in conjunction with Figure 6, which is a schematic diagram of a data processing method provided in an embodiment of the present application.

[0165] As shown in FIG6 , both the transmitting end and the receiving end include a MAC layer module and a physical layer module, and the physical layer module may include a PCS submodule, a PMA submodule, and a PMD submodule.

[0166] The sending end and the receiving end can perform the following steps 1-9.

[0167] 1. The MAC layer module of the transmitting end obtains the second data stream, which includes indication information.

[0168] 2. The MAC layer module of the transmitting end sends the second data stream to its own physical layer module, which then sends the second data stream to the receiving end.

[0169] The physical layer module of the transmitting end can process the second data stream and send the processed second data stream to the receiving end. Regarding the processing method of the physical layer module of the transmitting end on the second data stream, please refer to the description of Figure 1 above and will not be repeated here.

[0170] 3. The physical layer module at the receiving end receives the second data stream sent by the sending end, and sends the second data stream to the physical layer module at the receiving end.

[0171] 4. The physical layer module of the receiving end parses the indication information and sends the indication information to the physical layer module of the receiving end.

[0172] 5. The MAC layer module of the transmitting end obtains the first data stream and control information, where the control information indicates whether the first data stream includes valid data.

[0173] 6. The MAC layer module of the transmitting end sends the first data stream and control information to its own physical layer module.

[0174] For the code blocks carrying valid data in the first data stream, the PCS submodule at the transmitting end performs scrambling and FEC encoding operations on the code blocks and then sends them to the PMA submodule.

[0175] For the code blocks that do not carry valid data in the first data stream, the PCS submodule at the transmitting end does not perform scrambling and FEC encoding operations on them, and directly transparently transmits the code blocks to the PMA submodule.

[0176] 7. The physical layer module of the transmitting end sends the processed first data stream to the receiving end.

[0177] 8. Based on the aforementioned indication information, the receiving end determines which code blocks in the first data stream contain valid data and which code blocks do not. For code blocks in the first data stream that contain valid data, the PMA submodule sends these code blocks to the PCS submodule, which performs operations such as FEC decoding and descrambling on them. For code blocks in the first data stream that do not contain valid data, the PMA submodule directly discards these code blocks. Accordingly, since the PCS submodule does not receive code blocks that do not contain valid data, it does not need to perform operations such as FEC decoding and descrambling on these code blocks that do not contain valid data.

[0178] 9. After processing the first data stream, the physical layer module at the receiving end sends it to the MAC layer module at the receiving end, and the MAC layer module further processes the received data.

[0179] Based on the data processing method provided in the above embodiment, the embodiment of the present application also provides a corresponding communication device. Next, the communication device is introduced in conjunction with the accompanying drawings.

[0180] Referring to Figure 7, which is a schematic diagram of the structure of a communication device provided in an embodiment of the present application, the communication device shown in Figure 7 can be used to execute the data processing method provided in the above method embodiment.

[0181] As shown in FIG7 , the communication device 700 includes a first module 701 and a second module 702 , where the second module 702 is a physical layer module.

[0182] In one example, the communication device 700 shown in FIG7 is used to execute the data processing method performed by the communication device as the sending end in the above method embodiment.

[0183] The first module 701 is configured to obtain a first data stream and control information, wherein the control information indicates whether the first data stream includes valid data; and send the first data stream and the control information to the second module 702;

[0184] The second module 702 is configured to determine, according to the control information, an operating mode of the second module 702 when processing the first data stream, where the operating mode includes a normal mode or a low power consumption mode.

[0185] In a possible implementation, the first module 701 is a media access control (MAC) layer module, or a physical layer submodule, and the physical layer submodule is different from the second module 702 .

[0186] In a possible implementation, the first data stream includes multiple code blocks, and the second module 702 is specifically configured to determine, based on the control information, a corresponding working mode when the second module 702 processes each of the multiple code blocks.

[0187] In a possible implementation, the control information includes sub-control information corresponding to each code block in the multiple code blocks, and each sub-control information indicates whether the corresponding code block includes valid data.

[0188] In one possible implementation, the multiple code blocks include a first code block and a second code block, the control information indicates that the first code block includes valid data and the second code block does not include valid data, and the second module 702 is specifically used to: determine, based on the control information, that the working mode of the second module 702 when processing the first code block is the normal mode, and determine that the working mode of the second module 702 when processing the second code block is the low power consumption mode.

[0189] In one possible implementation, the control information indicates that each code block included in the first data stream includes valid data, and the second module 702 is specifically used to determine that the working mode of the second module 702 when processing each code block included in the first data stream is the normal mode.

[0190] In one possible implementation, the control information indicates that none of the code blocks included in the first data stream includes valid data, and the second module 702 is specifically used to determine that the working mode of the second module 702 when processing each code block included in the first data stream is the low power consumption mode.

[0191] In one possible implementation, the physical layer module includes a PCS sub-module. When the working mode of the second module 702 when processing the first data stream is the low power consumption mode, the PCS sub-module does not perform scrambling operations and / or forward error correction FEC encoding operations on the first data stream.

[0192] In one possible implementation, the physical layer module includes a physical medium attachment sublayer PMA submodule and a physical medium dependent layer PMD submodule. The PMA submodule is used to send a pseudo-random code sequence to the PMD submodule when the working mode of the second module 702 when processing the first data stream is the low power consumption mode.

[0193] In one possible implementation, the physical layer module includes a physical coding sublayer PCS submodule, the PCS submodule performs an scrambling operation on the first data stream in the normal mode, and stops performing the scrambling operation on the first data stream in the low power mode. When the PCS submodule switches from the low power mode to the normal mode, the scrambling seed used by the PCS submodule to perform the scrambling operation on the first data stream is continuous with the scrambling seed used for the last scrambling operation on the first data stream.

[0194] In one possible implementation, the first module 701 is also used to obtain a second data stream, which includes indication information, and the indication information indicates whether the first data stream includes valid data; the first module 701 is specifically used to: obtain the first data stream, and generate the control information based on the indication information.

[0195] In a possible implementation, the physical layer module includes a PCS submodule, and data processed by the PCS submodule on the first data stream and data processed by the PCS submodule on the second data stream are in different AM windows.

[0196] In one possible implementation, the physical layer module includes a PCS sub-module, and the data processed by the PCS sub-module for the second data stream is between the first alignment word marker AM and the second alignment word marker AM, and the data processed by the PCS sub-module for the first data stream is between the third AM and the fourth AM.

[0197] In a possible implementation, the indication information is specifically used to indicate the proportion of valid data included in the first data stream, and the code blocks carrying the valid data in the first data stream are evenly distributed in the first data stream.

[0198] In a possible implementation manner, the second data stream includes an Ethernet frame, and the Ethernet frame carries the indication information.

[0199] In a possible implementation manner, a Start of Frame Delimiter (SFD) field of the Ethernet frame indicates that the Ethernet frame carries the indication information.

[0200] In one possible implementation, the first module 701 is specifically used to: determine the traffic ratio of valid data and invalid data, and the data volume of the valid data; determine whether the first data stream includes valid data based on the traffic ratio and the data volume of the valid data, and generate the second data stream including the indication information.

[0201] In another example, the communication device 700 shown in FIG7 is used to execute the data processing method performed by the communication device as the receiving end in the above method embodiment.

[0202] The first module 701 is configured to receive a second data stream, the second data stream including indication information, the indication information indicating whether the first data stream includes valid data; and send the indication information to the second module 702, the second module 702 being a physical layer module;

[0203] The second module 702 is configured to determine, according to the indication information, an operating mode of the second module 702 when processing the first data stream, where the operating mode includes a normal mode or a low power consumption mode.

[0204] In a possible implementation, the first module 701 is a media access control (MAC) layer module or a physical layer submodule, and the physical layer submodule is different from the second module 702 .

[0205] In a possible implementation, the first data stream and the second data stream are in different alignment word marker AM windows.

[0206] In a possible implementation, the second data stream is between the first AM and the second AM, and the first data stream is between the third AM and the fourth AM.

[0207] In a possible implementation, the indication information is specifically used to indicate the proportion of valid data included in the first data stream, and the code blocks carrying the valid data in the first data stream are evenly distributed in the first data stream.

[0208] In a possible implementation manner, the second data stream includes an Ethernet frame, and the Ethernet frame carries the indication information.

[0209] In a possible implementation manner, a start of frame delimiter (SFD) of the Ethernet frame indicates that the Ethernet frame carries the indication information.

[0210] In a possible implementation, the first data stream includes multiple code blocks, and the second module 702 is specifically configured to determine, according to the indication information, a corresponding working mode when the second module 702 processes each of the multiple code blocks.

[0211] In one possible implementation, the multiple code blocks include a first code block and a second code block, the control information indicates that the first code block includes valid data and the second code block does not include valid data, and the second module 702 is specifically used to: determine, based on the control information, that the working mode of the second module 702 when processing the first code block is the normal mode, and determine that the working mode of the second module 702 when processing the second code block is the low power consumption mode.

[0212] In one possible implementation, the control information indicates that each code block included in the first data stream includes valid data, and the second module 702 is specifically used to determine that the working mode of the second module 702 when processing each code block included in the first data stream is the normal mode.

[0213] In one possible implementation, the control information indicates that none of the code blocks included in the first data stream includes valid data, and the second module 702 is specifically used to determine that the working mode of the second module 702 when processing each code block included in the first data stream is the low power consumption mode.

[0214] In one possible implementation, the second module 702 includes a physical medium attachment sublayer PMA submodule and a physical medium dependence layer PMD submodule. When the working mode of the second module 702 when processing the first data stream is the low power consumption mode, the PMA submodule discards the data from the PMD submodule.

[0215] The present application also provides a chip, as shown in Figure 8, which is a schematic diagram of the structure of a chip provided in the present application. As shown in Figure 8, the chip 800 includes an interface circuit 801 and a processing circuit 802. The interface circuit 801 is used to receive and / or send data, and the processing circuit 802 is used to process data.

[0216] In one example, the chip 800 may be applied to a communication device serving as a transmitting end. In this case:

[0217] The interface circuit 801 is used to obtain a first data stream and control information, where the control information indicates whether the first data stream includes valid data; and send the first data stream and the control information to the processing circuit 802, which is applied to the physical layer module.

[0218] The processing circuit 802 is configured to determine, according to the control information, an operating mode of the processing circuit 802 when processing the first data stream, where the operating mode includes a normal mode or a low power consumption mode.

[0219] Regarding the specific operations performed by the interface circuit 801 and the processing circuit 802, reference may be made to the relevant description of the data processing method performed by the communication device as the transmitting end in the above method embodiment, and no repeated description will be made here.

[0220] In yet another example, the chip 800 may be applied to a communication device serving as a receiving end. In this case:

[0221] The interface circuit 801 is configured to receive a second data stream including indication information indicating whether the first data stream includes valid data; and send the indication information to the processing circuit 802 , which is applied to a physical layer module.

[0222] The processing circuit 802 is configured to determine, according to the indication information, an operating mode of the processing circuit 802 when processing the first data stream, where the operating mode includes: a normal mode or a low power consumption mode.

[0223] Regarding the specific operations performed by the interface circuit 801 and the processing circuit 802, reference may be made to the relevant description of the data processing method performed by the communication device as the receiving end in the above method embodiment, and no repeated description will be given here.

[0224] The present invention also provides an optical module, which can be understood by referring to FIG9 , which is a schematic diagram of the structure of an optical module provided in the present invention.

[0225] As shown in FIG9 , the optical module 900 includes an interface circuit 901 and a DSP 902 .

[0226] The interface circuit 901 is used to receive and / or send data;

[0227] The DSP 902 is used for data processing.

[0228] In one example, the optical module 900 can be applied to a communication device serving as a transmitting end. In this case:

[0229] The interface circuit 901 is configured to obtain a first data stream and control information, wherein the control information indicates whether the first data stream includes valid data; and send the first data stream and the control information to the DSP 902;

[0230] The DSP 902 is configured to determine, according to the control information, an operating mode of the DSP 902 when processing the first data stream, where the operating mode includes a normal mode or a low power consumption mode.

[0231] For specific operations performed by the interface circuit 901 and the DSP 902, reference may be made to the relevant description of the data processing method performed by the communication device as the transmitting end in the above method embodiment, and a repeated description will not be given here.

[0232] In yet another example, the optical module 900 may be applied to a communication device serving as a receiving end. In this case:

[0233] The interface circuit 901 is configured to receive a second data stream, the second data stream including indication information indicating whether the first data stream includes valid data, and send the indication information to the DSP 902;

[0234] The DSP 902 is configured to determine, according to the indication information, a working mode of the DSP 902 when processing the first data stream, where the working mode includes: a normal mode or a low power consumption mode.

[0235] For specific operations performed by the interface circuit 901 and the DSP 902, reference may be made to the relevant description of the data processing method performed by the communication device as the receiving end in the above method embodiment, and a repeated description will not be given here.

[0236] It should be noted that the hardware structure of the aforementioned communication device 700 may be the structure shown in FIG10 , which is a schematic diagram of the structure of a device provided in an embodiment of the present application.

[0237] Referring to Figure 10 , device 1000 includes a processor 1010, a communication interface 1020, and a memory 1030. The number of processors 1010 in device 1000 may be one or more, with Figure 10 illustrating a single processor as an example. In embodiments of the present application, processor 1010, communication interface 1020, and memory 1030 may be connected via a bus system or other means, with Figure 10 illustrating a connection via bus system 1040 as an example.

[0238] Processor 1010 may be a central processing unit (CPU), a network processor (NP), or a combination of a CPU and an NP. Processor 1010 may further include a hardware chip. The hardware chip may be an application-specific integrated circuit (ASIC), a programmable logic device (PLD), or a combination thereof. The PLD may be a complex programmable logic device (CPLD), a field-programmable gate array (FPGA), a generic array logic (GAL), or any combination thereof.

[0239] Memory 1030 may include volatile memory, such as random-access memory (RAM); non-volatile memory, such as flash memory, a hard disk drive (HDD), or a solid-state drive (SSD); or a combination of these types of memory. Memory 1030 may, for example, store the aforementioned indication information.

[0240] Optionally, the memory 1030 stores an operating system and programs, executable modules or data structures, or subsets thereof, or extended sets thereof, wherein the programs may include various operating instructions for implementing various operations. The operating system may include various system programs for implementing various basic services and processing hardware-based tasks. The processor 1010 can read the programs in the memory 1030 to implement the data processing method provided in the embodiments of the present application.

[0241] Bus system 1040 may be a Peripheral Component Interconnect (PCI) bus or an Extended Industry Standard Architecture (EISA) bus. Bus system 1040 may be divided into an address bus, a data bus, a control bus, etc. For ease of illustration, FIG10 shows only one thick line, but this does not mean that there is only one bus or only one type of bus.

[0242] An embodiment of the present application provides a computer-readable storage medium, including instructions or a computer program, which, when executed on a computer, causes the computer to execute the method described in the above method embodiment. For example, when the instructions or computer program are executed on a computer, the computer executes the data processing method performed by the communication device as the transmitting end as described in the above method embodiment. For another example, when the instructions or computer program are executed on a computer, the computer executes the data processing method performed by the communication device as the receiving end as described in the above method embodiment.

[0243] The embodiments of the present application provide a computer program product comprising instructions or a computer program, which, when executed on a computer, causes the computer to execute the method described in the above method embodiments. For example, when the computer program product is executed on a computer, the computer executes the data processing method performed by the communication device as the transmitting end as described in the above method embodiments. For another example, when the computer program product is executed on a computer, the computer executes the data processing method performed by the communication device as the receiving end as described in the above method embodiments.

[0244] The present application also provides a communication system for executing the data processing method provided in the present application. Specifically, the communication system may include a transmitting end and a receiving end, wherein the transmitting end is configured to execute the data processing method provided in the above method embodiment as a transmitting end communication device, and the receiving end is configured to execute the data processing method provided in the above method embodiment as a receiving end communication device.

[0245] The terms "first," "second," "third," "fourth," and the like (if any) in the specification and claims of this application and in the accompanying drawings are used to distinguish similar objects and are not necessarily used to describe a particular order or sequential sequence. It should be understood that the terms used in this manner are interchangeable where appropriate so that the embodiments described herein can be implemented in an order other than that illustrated or described herein. In addition, the terms "including" and "having," and any variations thereof, are intended to cover non-exclusive inclusions, e.g., a process, method, system, product, or apparatus comprising a series of steps or units is not necessarily limited to those steps or units explicitly listed, but may include other steps or units not explicitly listed or inherent to such processes, methods, products, or apparatus.

[0246] Those skilled in the art will clearly understand that, for the convenience and brevity of description, the specific working processes of the systems, devices and units described above can refer to the corresponding processes in the aforementioned method embodiments and will not be repeated here.

[0247] In the several embodiments provided in this application, it should be understood that the disclosed systems, devices and methods can be implemented in other ways. For example, the device embodiments described above are merely illustrative. For example, the division of units is only a logical business division. In actual implementation, there may be other division methods, such as multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be an indirect coupling or communication connection through some interface, device or unit, which can be electrical, mechanical or other forms.

[0248] Units described as separate components may or may not be physically separate, and components shown as units may or may not be physical units, that is, they may be located in one place or distributed across multiple network units. Some or all of these units may be selected to achieve the purpose of this embodiment according to actual needs.

[0249] In addition, each business unit in each embodiment of the present application can be integrated into a processing unit, each unit can exist physically separately, or two or more units can be integrated into a single unit. The above-mentioned integrated units can be implemented in the form of hardware or software business units.

[0250] If the integrated unit is implemented in the form of a software business unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present application, or the part that contributes to the prior art, or all or part of the technical solution can be embodied in the form of a software product, which is stored in a storage medium and includes several instructions for enabling a computer device (which can be a personal computer, server, or network device, etc.) to execute all or part of the steps of the various embodiments of the present application. The aforementioned storage medium includes various media that can store program codes, such as a USB flash drive, a mobile hard disk, a read-only memory (ROM), a random access memory (RAM), a magnetic disk, or an optical disk.

[0251] Those skilled in the art will appreciate that, in one or more of the above examples, the services described herein can be implemented using hardware, software, firmware, or any combination thereof. When implemented using software, these services can be stored on a computer-readable medium or transmitted as one or more instructions or codes on a computer-readable medium. Computer-readable media include computer storage media and communication media, including any medium that facilitates the transmission of computer programs from one location to another. Storage media can be any available medium that can be accessed by a general-purpose or special-purpose computer.

[0252] The above specific implementation methods further illustrate the objectives, technical solutions and beneficial effects of the present invention in detail. It should be understood that the above are only specific implementation methods of the present invention.

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

Claims

1. A data processing method, characterized in that: The method is applied to a communication device, the communication device includes a first module and a second module, the second module is a physical layer module, and the method includes: The first module obtains a first data stream and control information, wherein the control information indicates whether the first data stream includes valid data; The first module sends the first data stream and the control information to the second module; The second module determines, according to the control information, a working mode of the second module when processing the first data stream, where the working mode includes: a normal mode or a low power consumption mode.

2. The method according to claim 1, characterized in that: The first module is a media access control MAC layer module, or a physical layer submodule, and the physical layer submodule is different from the second module.

3. The method according to claim 1 or 2, characterized in that: The first data stream includes a plurality of code blocks, and the second module determines, according to the control information, a working mode of the second module when processing the first data stream, including: The second module determines, according to the control information, a corresponding working mode when the second module processes each code block in the multiple code blocks.

4. The method according to claim 3, characterized in that The control information includes sub-control information corresponding to each code block in the multiple code blocks, and each sub-control information indicates whether the corresponding code block includes valid data.

5. The method according to claim 3 or 4, characterized in that: The multiple code blocks include a first code block and a second code block, the control information indicates that the first code block includes valid data and the second code block does not include valid data, and the second module determines, according to the control information, the corresponding working modes of the second module when processing each of the multiple code blocks, including: The second module determines, based on the control information, that the working mode of the second module when processing the first code block is the normal mode, and determines that the working mode of the second module when processing the second code block is the low power consumption mode.

6. The method according to claim 3 or 4, characterized in that: The control information indicates that each code block included in the first data stream includes valid data, and the second module determines, according to the control information, a corresponding working mode when the second module processes each code block in the multiple code blocks, including: The second module determines that the working mode of the second module when processing each code block included in the first data stream is the normal mode.

7. The method according to claim 3 or 4, characterized in that: The control information indicates that each code block included in the first data stream does not include valid data, and the second module determines, according to the control information, a corresponding working mode when the second module processes each code block in the multiple code blocks, including: The second module determines that the working mode of the second module when processing each code block included in the first data stream is the low power consumption mode.

8. The method according to any one of claims 1 to 7, characterized in that: The physical layer module includes a physical coding sublayer PCS submodule. When the working mode of the second module when processing the first data stream is the low power consumption mode, the PCS submodule does not perform scrambling operation and / or forward error correction FEC encoding operation on the first data stream.

9. The method according to any one of claims 1 to 8, characterized in that: The physical layer module includes a physical medium attachment sublayer PMA submodule and a physical medium dependent layer PMD submodule, and the method further includes: The PMA submodule sends a pseudo-random code sequence to the PMD submodule when the working mode of the second module when processing the first data stream is the low power consumption mode.

10. The method according to any one of claims 1 to 9, characterized in that: The PCS submodule included in the physical layer module performs an scrambling operation on the first data stream in the normal mode, stops performing the scrambling operation on the first data stream in the low power mode, and when the PCS submodule switches from the low power mode to the normal mode, the scrambling seed used by the PCS submodule to perform the scrambling operation on the first data stream is continuous with the scrambling seed used for the last time the scrambling operation was performed on the first data stream.

11. The method according to any one of claims 1 to 10, characterized in that: The method further comprises: The first module acquires a second data stream, where the second data stream includes indication information, where the indication information indicates whether the first data stream includes valid data; The first module obtains the first data stream and control information, including: The first module obtains the first data stream and generates the control information according to the indication information.

12. The method according to claim 11, characterized in that The physical layer module includes a PCS submodule, and data processed by the PCS submodule on the first data stream and data processed by the PCS submodule on the second data stream are in different AM windows.

13. The method according to claim 11, characterized in that The physical layer module includes a PCS submodule, and the data processed by the PCS submodule for the second data stream is between the first alignment word mark AM and the second alignment word mark AM, and the data processed by the PCS submodule for the first data stream is between the third AM and the fourth AM.

14. The method according to any one of claims 11 to 13, characterized in that: The indication information is specifically used to indicate the proportion of valid data included in the first data stream, and the code blocks carrying the valid data in the first data stream are evenly distributed in the first data stream.

15. The method according to any one of claims 11 to 14, characterized in that: The second data stream includes an Ethernet frame, and the Ethernet frame carries the indication information.

16. The method according to claim 15, characterized in that A start frame delimiter (SFD) field of the Ethernet frame indicates that the Ethernet frame carries the indication information.

17. The method according to any one of claims 11 to 16, characterized in that: The first module obtains the second data stream, including: The first module determines the flow ratio of valid data and invalid data, and the data volume of the valid data; The first module determines whether the first data stream includes valid data according to the traffic proportion and the data volume of the valid data, and generates the second data stream including the indication information.

18. A data processing method, characterized in that: The method is applied to a communication device, the communication device includes a first module and a second module, the second module is a physical layer module, and the method includes: The first module receives a second data stream, where the second data stream includes indication information, where the indication information indicates whether the first data stream includes valid data; The first module sends the indication information to the second module, where the second module is a physical layer module; The second module determines, according to the indication information, a working mode of the second module when processing the first data stream, where the working mode includes: a normal mode or a low power consumption mode.

19. The method according to claim 18, characterized in that The first module is a media access control MAC layer module or a physical layer submodule, and the physical layer submodule is different from the second module.

20. The method according to claim 18 or 19, characterized in that The first data stream and the second data stream are in different alignment word mark AM windows.

21. The method according to claim 18 or 19, characterized in that The second data stream is between the first AM and the second AM, and the first data stream is between the third AM and the fourth AM.

22. The method according to any one of claims 18 to 21, characterized in that: The indication information is specifically used to indicate the proportion of valid data included in the first data stream, and the code blocks carrying the valid data in the first data stream are evenly distributed in the first data stream.

23. The method according to any one of claims 18 to 22, characterized in that: The second data stream includes an Ethernet frame, and the Ethernet frame carries the indication information.

24. The method according to claim 23, characterized in that The start frame delimiter SFD of the Ethernet frame indicates that the Ethernet frame carries the indication information.

25. The method according to any one of claims 18 to 24, characterized in that: The first data stream includes a plurality of code blocks, and the second module determines, according to the indication information, a working mode of the second module when processing the first data stream, including: The second module determines, according to the indication information, a corresponding working mode when the second module processes each code block in the multiple code blocks.

26. The method according to claim 25, characterized in that The multiple code blocks include a first code block and a second code block, the control information indicates that the first code block includes valid data and the second code block does not include valid data, and the second module determines, according to the indication information, the corresponding working modes of the second module when processing each of the multiple code blocks, including: The second module determines, based on the control information, that the working mode of the second module when processing the first code block is the normal mode, and determines that the working mode of the second module when processing the second code block is the low power consumption mode.

27. The method according to claim 25, characterized in that The control information indicates that each code block included in the first data stream includes valid data, and the second module determines, according to the indication information, a corresponding working mode when the second module processes each code block in the multiple code blocks, including: The second module determines that the working mode of the second module when processing each code block included in the first data stream is the normal mode.

28. The method according to claim 25, characterized in that The control information indicates that each code block included in the first data stream does not include valid data, and the second module determines, according to the indication information, a corresponding working mode when the second module processes each code block in the multiple code blocks, including: The second module determines that the working mode of the second module when processing each code block included in the first data stream is the low power consumption mode.

29. The method according to any one of claims 18 to 28, characterized in that: The second module includes a physical medium attachment sublayer PMA submodule and a physical medium dependence layer PMD submodule. When the working mode of the second module when processing the first data stream is the low power consumption mode, the PMA submodule discards the data from the PMD submodule.

30. A communication device, characterized in that: The communication device comprises a first module and a second module, wherein the second module is a physical layer module; The first module is used to obtain a first data stream and control information, wherein the control information indicates whether the first data stream includes valid data; and send the first data stream and the control information to the second module; The second module is used to determine a working mode of the second module when processing the first data stream according to the control information, and the working mode includes: a normal mode or a low power consumption mode.

31. A communication device, characterized in that: The communication device comprises a first module and a second module, wherein the second module is a physical layer module; The first module is used to receive a second data stream, the second data stream includes indication information, the indication information indicates whether the first data stream includes valid data; send the indication information to the second module, the second module is a physical layer module; The second module is used to determine, according to the indication information, a working mode of the second module when processing the first data stream, where the working mode includes: a normal mode or a low power consumption mode.

32. A chip, characterized in that: The chip includes an interface circuit and a processing circuit; The interface circuit is used to obtain a first data stream and control information, wherein the control information indicates whether the first data stream includes valid data; send the first data stream and the control information to the processing circuit, and the processing circuit is applied to a physical layer module; The processing circuit is used to determine, according to the control information, a working mode of the processing circuit when processing the first data stream, wherein the working mode includes: a normal mode or a low power consumption mode.

33. A chip, characterized in that: The chip includes an interface circuit and a processing circuit; The interface circuit is used to receive a second data stream, the second data stream includes indication information, the indication information indicates whether the first data stream includes valid data; send the indication information to the processing circuit, the processing circuit is applied to the physical layer module; The processing circuit is used to determine, according to the indication information, a working mode of the processing circuit when processing the first data stream, where the working mode includes: a normal mode or a low power consumption mode.

34. A device, characterized in that include: Processor and memory; The memory is used to store instructions or computer programs; The processor is used to execute the instructions or computer programs to perform the method according to any one of claims 1 to 29.

35. A computer-readable storage medium, characterized in that: The method comprises instructions or computer programs, which, when executed on a computer, cause the computer to execute the method according to any one of claims 1 to 29.

36. A communication system, characterized in that: The communication system comprises: A communication device for executing the method described in any one of claims 1 to 17, and a communication device for executing the method described in any one of claims 18 to 29.

Citation Information

Patent Citations

  • Method and system for low latency state transitions for energy efficiency

    CN101789877A

  • Dynamic power management system and method in a communications device

    CN102684904A

  • Control of energy efficiency above PMD interface

    CN103036687A

  • High-speed serial interface and data transmission method

    CN116414755A

  • Data processing method, device, equipment, system and computer readable storage medium

    CN116743677A