CN113794585A - Message processing method and device - Google Patents
Message processing method and device Download PDFInfo
- Publication number
- CN113794585A CN113794585A CN202110959121.9A CN202110959121A CN113794585A CN 113794585 A CN113794585 A CN 113794585A CN 202110959121 A CN202110959121 A CN 202110959121A CN 113794585 A CN113794585 A CN 113794585A
- Authority
- CN
- China
- Prior art keywords
- message
- sending
- cache region
- storage control
- control layer
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Granted
Links
- 238000003672 processing method Methods 0.000 title claims abstract description 18
- 238000000034 method Methods 0.000 claims abstract description 37
- 239000000872 buffer Substances 0.000 claims description 19
- 238000004590 computer program Methods 0.000 claims description 11
- 230000005540 biological transmission Effects 0.000 abstract 2
- 238000004891 communication Methods 0.000 description 9
- 230000008569 process Effects 0.000 description 8
- 238000005516 engineering process Methods 0.000 description 7
- 230000009471 action Effects 0.000 description 4
- 238000010586 diagram Methods 0.000 description 3
- 238000003491 array Methods 0.000 description 1
- 230000009286 beneficial effect Effects 0.000 description 1
- 238000013467 fragmentation Methods 0.000 description 1
- 238000006062 fragmentation reaction Methods 0.000 description 1
- 230000006870 function Effects 0.000 description 1
- 230000006872 improvement Effects 0.000 description 1
- 238000002955 isolation Methods 0.000 description 1
- 230000004048 modification Effects 0.000 description 1
- 238000012986 modification Methods 0.000 description 1
- 230000002093 peripheral effect Effects 0.000 description 1
- 230000004044 response Effects 0.000 description 1
Images
Classifications
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L41/00—Arrangements for maintenance, administration or management of data switching networks, e.g. of packet switching networks
- H04L41/08—Configuration management of networks or network elements
- H04L41/0896—Bandwidth or capacity management, i.e. automatically increasing or decreasing capacities
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L69/00—Network arrangements, protocols or services independent of the application payload and not provided for in the other groups of this subclass
- H04L69/22—Parsing or analysis of headers
Landscapes
- Engineering & Computer Science (AREA)
- Computer Networks & Wireless Communication (AREA)
- Signal Processing (AREA)
- Computer Security & Cryptography (AREA)
- Data Exchanges In Wide-Area Networks (AREA)
Abstract
The application provides a message processing method and a device, the method is applied to a message processing device, the message processing device is arranged between a media storage control layer and a physical coding sublayer, and the method comprises the following steps: after receiving a service message based on each channel, caching the service message into a first cache region corresponding to the service message; reading a service message matched with the configuration bandwidth of the channel from the first cache region according to the indication information corresponding to the configuration bandwidth of the channel, and caching the service message to a second cache region corresponding to the channel; and if the second cache region meeting the message sending condition exists, sending the service message in the second cache region. Therefore, the method and the device realize the on-demand transmission of the service messages in the common Ethernet scene and ensure the transmission bandwidth of the messages of each channel.
Description
Technical Field
The present application relates to the field of communications technologies, and in particular, to a method and an apparatus for processing a packet.
Background
Ethernet is a computer local area network technology. The IEEE802.3 standard, organized by IEEE, sets forth an ethernet technology standard that specifies the contents of the physical layer connections, electrical signals, and medium access layer protocols. Ethernet is now the most popular local area network technology, replacing other local area network technologies such as token ring, FDDI, ARCNET, etc., also known as ordinary ethernet. The flexible Ethernet technology (Flex Ethernet) is an interface technology for realizing service isolation bearer and network fragmentation in a bearer network, has been rapidly developed in recent two years, and is widely accepted by various large standards organizations.
In practical application, the ordinary ethernet network cannot guarantee the real-time performance of various messages in the channel, and cannot guarantee the bandwidth of various messages. Although the flexible ethernet can guarantee the above two points, it needs to consume more resources, and both the home terminal and the opposite terminal need to support the flexible ethernet, which puts very high requirements on the devices of the home terminal and the opposite terminal.
Therefore, how to guarantee the channel bandwidth of the channel in the normal ethernet scenario is one of the considerable technical problems.
Disclosure of Invention
In view of this, the present application provides a message processing method and apparatus, so as to guarantee a channel bandwidth of a channel in a common ethernet scenario.
Specifically, the method is realized through the following technical scheme:
according to a first aspect of the present application, a packet processing method is provided, which is applied to a packet processing device, where the packet processing device is disposed between a media storage control layer and a physical coding sublayer, and the method includes:
after receiving a service message based on each channel, caching the service message into a first cache region corresponding to the service message;
reading a service message matched with the configuration bandwidth of the channel from the first cache region according to the indication information corresponding to the configuration bandwidth of the channel, and caching the service message to a second cache region corresponding to the channel;
and if the second cache region meeting the message sending condition exists, sending the service message in the second cache region.
According to a second aspect of the present application, there is provided a packet processing apparatus, where the packet processing apparatus is disposed between a media storage control layer and a physical coding sublayer, the apparatus including:
the message splitting module is used for caching the service message into a first cache region corresponding to the service message after receiving the service message based on each channel;
the bandwidth management module is used for reading a service message matched with the configuration bandwidth of the channel from the first cache region according to the indication information corresponding to the configuration bandwidth of the channel; sending the read service message to a message processing module;
the message processing module is used for caching the read service message to a second cache region corresponding to the channel; and if the second cache region meeting the message sending condition exists, sending the service message in the second cache region.
According to a third aspect of the present application, there is provided an electronic device comprising a processor and a machine-readable storage medium, the machine-readable storage medium storing a computer program executable by the processor, the processor being caused by the computer program to perform the method provided by the first aspect of the embodiments of the present application.
According to a fourth aspect of the present application, there is provided a machine-readable storage medium storing a computer program which, when invoked and executed by a processor, causes the processor to perform the method provided by the first aspect of the embodiments of the present application.
The beneficial effects of the embodiment of the application are as follows:
by implementing the message processing method provided by the embodiment of the application, after receiving the service message based on each channel, the service message is cached in the corresponding first cache region, then the service message with the data bandwidth consistent with the configured bandwidth of the channel is read from the first cache according to the indication information of the configured bandwidth of each channel, and then the service message is cached in the second cache region corresponding to the channel, and the service message meeting the message sending condition is sent out, so that the service message is sent as required under the common Ethernet scene, and the sending bandwidth of the message of each channel is also ensured.
Drawings
Fig. 1 is a schematic flowchart of a message processing method according to an embodiment of the present application;
fig. 2 is a schematic diagram of an application architecture of a message processing method according to an embodiment of the present application;
fig. 3 is a second schematic view of an application architecture of a message processing method according to an embodiment of the present application;
fig. 4a is a schematic structural diagram of a message processing apparatus according to an embodiment of the present application;
fig. 4b is a schematic view of an application scenario of a message processing apparatus according to an embodiment of the present application;
fig. 5 is a schematic diagram of a hardware structure of an electronic device implementing a message processing method according to an embodiment of the present application.
Detailed Description
Reference will now be made in detail to the exemplary embodiments, examples of which are illustrated in the accompanying drawings. When the following description refers to the accompanying drawings, like numbers in different drawings represent the same or similar elements unless otherwise indicated. The embodiments described in the following exemplary embodiments do not represent all embodiments consistent with the present application. Rather, they are merely examples of apparatus and methods consistent with aspects such as the present application.
The terminology used herein is for the purpose of describing particular embodiments only and is not intended to be limiting of the application. As used in this application, the singular forms "a", "an", and "the" are intended to include the plural forms as well, unless the context clearly indicates otherwise. It should also be understood that the term "and/or" as used herein refers to and encompasses any and all possible combinations of one or more of the corresponding listed items.
It is to be understood that although the terms first, second, third, etc. may be used herein to describe various information, such information should not be limited to these terms. These terms are only used to distinguish one type of information from another. For example, first information may also be referred to as second information, and similarly, second information may also be referred to as first information, without departing from the scope of the present application. The word "if" as used herein may be interpreted as "at … …" or "when … …" or "in response to a determination", depending on the context.
The following describes the message processing method provided in the present application in detail.
Referring to fig. 1, fig. 1 is a flowchart of a message processing method applied to a message processing device, where the message processing device is disposed between a Media Access Control (MAC) layer and a Physical Coding Sublayer (PCS), the PCS layer being referred to as a PCS layer for short, and the method may include the following steps:
s101, after receiving a service message based on each channel, caching the service message into a first cache region corresponding to the service message.
In this step, a plurality of channels are respectively arranged between the message processing device and the MAC layer and the PCS layer, the message processing device receives a service message sent based on each channel, and in order to ensure the channel bandwidth of each channel, the message processing device is provided with a plurality of first cache regions, and then caches the service message in the corresponding first cache regions after receiving the service message.
Optionally, each first buffer in the message processing apparatus is set based on a priority of the service message, and different priorities correspond to different first buffers. On this basis, if each service packet carries a priority, step S101 may be executed according to the following procedure: and caching the service message into a first cache region corresponding to the priority according to the priority in the service message.
Specifically, after receiving the service packet, the packet processing apparatus may analyze the priority from the service packet, and then store the service packet in the first buffer corresponding to the priority based on the priority.
Optionally, the number of channels between the message processing apparatus and the MAC layer may be, but is not limited to, 8, and similarly, the number of channels between the message processing apparatus and the PCS layer may also be, but is not limited to, 8, which may be determined according to an actual situation. It should be noted that the channel between the message processing apparatus and the MAC layer belongs to a physical channel, and the channel between the message processing apparatus and the PCS layer belongs to a virtual channel.
Optionally, the number of the priorities of the service packets may be, but is not limited to, 8, and based on this, the received service packets are stored in a differentiated manner according to the priorities.
Optionally, after step S101 is executed, the following process may be further included: when the cached space of any one first cache region reaches a set threshold value, generating a back pressure signal corresponding to the first cache region; and sending the back pressure signal corresponding to the first buffer area to a media storage control layer.
Specifically, each first buffer area is provided with a buffer upper limit value, that is, each first buffer area corresponds to a respective set threshold, and by setting a set threshold for each first buffer area, the situation that the first buffer area loses messages due to overflow can be effectively prevented. On this basis, the message processing apparatus may determine whether the cached space of each first cache region reaches a set threshold corresponding to the first cache region, and if the cached space of each first cache region reaches the set threshold, the message processing apparatus may send a back-pressure signal to the MAC layer to notify the MAC layer that the message processing apparatus is not to send a service message to the MAC layer. Thus, after the MAC layer receives the backpressure signal, it can stop sending the service packet corresponding to the priority to the packet processing device. Optionally, when the cached space of the first cache region is smaller than a set threshold, the service packet may be cached in the first cache region.
In addition, the message processing apparatus may continue to determine whether the cached space of the first cache region is smaller than the corresponding set threshold, and if so, may send a notification to the MAC layer to continue sending the service message corresponding to the priority. Or, after receiving the back-pressure signal, the MAC layer may wait for a set time, and when the wait time reaches the set time, continue to send the service packet corresponding to the priority to the packet processing device.
In an embodiment, the MAC layer may be a sending direction MAC layer, and correspondingly, the PCS layer is a sending direction PCS layer, as shown in fig. 2, when the message processing apparatus is disposed between the sending direction MAC layer and the sending direction PCS layer, on this basis, sending the backpressure signal corresponding to the first buffer to the media storage control layer may be performed according to the following processes: and sending the back pressure signal to a MAC layer of a sending direction.
Specifically, under normal conditions, the message processing apparatus receives a service message sent to the MAC layer from the sending direction, and then sends the service message to the PCS layer from the sending direction, so as to reach the receiving device. When the message processing apparatus in fig. 2 determines that the cached space of the first cache is greater than the set threshold, a first backpressure signal corresponding to the first cache is generated and sent to the sending direction MAC layer, where the first backpressure signal may carry a first priority of a message that needs to perform backpressure operation, so that the sending direction MAC layer stops sending a service message corresponding to the first priority after receiving the backpressure signal.
On this basis, the message processing apparatus may determine whether the cached space in the first cache region is greater than a set threshold, and when the cached space is not greater than the set threshold, may generate a first sending instruction (carrying a first priority), and then send the first sending instruction to the sending direction MAC layer, so that the sending direction MAC layer continues to send a corresponding service message (a service message corresponding to the first priority) after receiving the first sending instruction.
And when the cached space of the first cache region corresponding to the first priority in the service message is not larger than the set threshold, caching the service message into the first cache region.
In another embodiment, the MAC layer may be a MAC layer in a receiving direction, and correspondingly, the PCS layer may be a PCS layer in a receiving manner, as shown in fig. 3, at this time, the message processing apparatus is disposed between the MAC layer in the receiving direction and the PCS layer in the receiving direction, and on this basis, the backpressure signal corresponding to the first buffer may be sent to the media storage control layer according to the following process: the message processing device sends a back pressure signal to the MAC layer of the receiving direction, so that the MAC layer of the receiving direction sends a message pause sending instruction to the MAC layer of the sending direction.
Specifically, under normal conditions, the PCS layer in the receiving device receives a service packet sent by the sending device, and then sends the service packet to the packet processing device, and then the packet processing device sends the service packet to the MAC layer in the receiving direction. On this basis, after the message processing apparatus in fig. 3 receives a service message sent by the PCS in the receiving direction, if the cached space of the first cache corresponding to the second priority in the service message is greater than the set threshold, a second backpressure signal of the first cache is generated, and then the second backpressure signal is sent to the MAC layer in the receiving direction, so that after the MAC layer in the receiving direction receives the second backpressure signal, a message pause sending instruction is generated, and then the message pause sending instruction is sent to the MAC layer in the sending direction, so that after the MAC layer in the sending direction receives the message pause sending instruction, the sending of the service message to the receiving device is paused. And when the cached space of the first cache region corresponding to the second priority in the service message is not larger than the set threshold, caching the service message into the first cache region.
Further, when determining that the cached capacity of the first cache region is greater than the set threshold corresponding to the first cache region, the message processing apparatus may carry a second priority of the service message cached in the first cache region in the second backpressure signal when sending the second backpressure signal, then send the second backpressure signal carrying the second priority to the receiving direction MAC layer, so that the receiving direction MAC layer parses the second priority from the second backpressure signal, and then when generating a message pause sending instruction, send the parsed second priority to the sending direction MAC layer carried in the message pause instruction, so that the sending direction MAC layer, after receiving the message pause sending instruction, parses the second priority, and then suspends sending the service message corresponding to the second priority.
Further, the message processing apparatus in fig. 3 may continue to determine whether the cached space in the first cache region is greater than a set threshold, and when the cached space is not greater than the set threshold, may generate a second sending instruction (carrying a second priority), and then send the second sending instruction to the receiving direction MAC layer, so that the receiving direction MAC layer forwards the second sending instruction to the sending direction MAC layer, and further, after the sending direction MAC layer receives the second sending instruction, the second priority is analyzed from the second sending instruction, and then the service message corresponding to the second priority is sent.
Optionally, the message pause sending instruction generated by the receiving side to the MAC layer may be, but is not limited to, a pfc (priority-based flow control) flow control frame instruction, and accordingly, the second priority is carried in the pfc flow control frame instruction.
It should be noted that, in practical applications, the message processing apparatus may be disposed on both the sender and the receiver, or may be disposed on only one of the sender and the receiver.
It should be noted that the set threshold corresponding to each first cache region may be the same or different, and may be specifically configured according to an actual situation.
And S102, reading the service message matched with the configuration bandwidth of the channel from the first cache region and caching the service message to a second cache region corresponding to the channel according to the indication information corresponding to the configuration bandwidth of the channel.
In this step, for each channel, the message processing apparatus may obtain indication information corresponding to the configuration bandwidth of the channel, then read a service message matching the configuration bandwidth of the channel from the first cache region based on the indication information, and then cache the read service message in the second cache region corresponding to the channel. By performing the above steps, it can be ensured that the actual maximum bandwidth of each channel in the ethernet network is consistent with the preconfigured configuration bandwidth.
Alternatively, the indication information of the configuration bandwidth of each channel may be, but is not limited to, a valid signal of a duty ratio. Specifically, when the message processing apparatus is configured with 8 channels, valid signals with 8 different duty ratios are generated for configuring the bandwidth of each channel in advance, that is, different duty ratios correspond to different bandwidths. For example, the total bandwidth of the ethernet is 400GHz, the clock frequency is 3.125GHz, the data bit width is 128bit, and if the indication information of the configuration bandwidth of a certain channel is a valid signal with a duty ratio of 50%, the configuration bandwidth of the channel is 200 GHz. And reading a service message of which the data bandwidth of the data is matched with the configuration bandwidth configured by the channel from the first cache region based on the valid signal corresponding to each channel, and caching the read service message into a second cache region corresponding to the channel. For example, when a service packet whose data bandwidth is consistent with the configured bandwidth of the channel is read from the first buffer based on the valid signal of the configured channel, the following procedure may be performed: and generating a valid sequence by marking the duty ratio of a valid control signal effective to control the bandwidth of the read data to be matched with the configured bandwidth, such as 400Gbit of the total bandwidth, wherein when the valid duty ratio reaches 50%, the processing bandwidth is 200 Gbit. Since valid is not necessarily equally spaced, read data transmitted by the channel can be controlled to reach an arbitrary bandwidth by generating a valid sequence.
And S103, if a second cache region meeting the message sending condition exists, sending the service message in the second cache region.
In this step, after the message processing apparatus caches the matched service message in the second cache region based on the configured bandwidth of each channel, since the message in the second cache region needs to be read and sent to the opposite terminal device, the application proposes that whether the second cache region meeting the message sending condition exists or not is judged, and if the second cache region meets the message sending condition, the service message in the second cache region meeting the message sending condition is sent.
It should be noted that, if there is no second buffer area that satisfies the message sending condition, an idle signal is sent.
By implementing the flow shown in fig. 1, after receiving a service packet based on each channel, the service packet is cached in the corresponding first cache region, then the service packet whose data bandwidth is consistent with the configured bandwidth of the channel is read from the first cache region according to the indication information of the configured bandwidth of each channel, and then the service packet is cached in the second cache region corresponding to the channel, and the service packet meeting the packet sending condition is sent out, thereby realizing the on-demand sending of the service packet under the ordinary ethernet, and ensuring the sending bandwidth of the packet of each channel.
Optionally, when the service packet includes the priority, step S103 may be executed according to the following procedure: and if a plurality of second cache regions meeting the message sending condition exist, sending the service messages of which the priority meets the sending priority and which belong to the second cache regions according to the priority of the service messages.
Specifically, when one second cache region meeting the message sending condition exists, sending the service message in the second cache region; and when a plurality of second cache regions meeting the message sending condition exist, the service messages in the second cache region to which the service messages with high priority belong are sent to the outside according to the priority of the service messages, so that the service messages with high priority are sent preferentially on the premise of ensuring that the sending bandwidth is matched with the configuration bandwidth, and the real-time property of sending the service messages is ensured.
And when the second buffer area meeting the message sending condition does not exist, sending an idle signal, such as sending an idle word and the like, so as to ensure the keep-alive performance of the channel.
Specifically, the message processing apparatus may set a ready signal in each second cache region, and the message processing apparatus may determine whether each second cache region satisfies a message sending condition, and enable the ready signal corresponding to the second cache region when the message sending condition is satisfied, that is, raise the ready signal of the second cache region; when the second cache region does not meet the message sending condition, pulling down a ready signal corresponding to the second cache region; and further, based on the state of the ready signal corresponding to each second cache region, sending the service message in the second cache region. Optionally, when at least one service packet of a complete data packet is cached in each second cache region, it indicates that the second cache region meets the packet sending condition. And when the service message cached in the second cache region can not form a complete data packet, the second cache region is indicated to not meet the message sending condition. It should be noted that the number of the service packets included in one complete data packet may be determined according to actual situations, and this embodiment does not limit this.
On this basis, when executing the step, the message processing apparatus may determine, at the current time, whether the ready signal corresponding to each second cache region is pulled up, to determine the second cache region corresponding to the ready signal pulled up at the current time, and when it is determined that the ready signals corresponding to a plurality of second cache regions are pulled up at the current time, determine, according to the priority of the service message stored in each second cache region, the second cache region to which the service message with the highest priority belongs, and then send the service message corresponding to one complete data packet in the determined second cache region. When it is determined that only 1 ready signal corresponding to the second cache region is pulled high at the current time, sending a service message corresponding to a complete data packet in the second cache region; and when the ready signals corresponding to all the second cache regions are pulled down, transmitting an idle signal at the moment, namely transmitting an idle word.
By implementing the message processing method provided by the application, the consistency of the data bandwidth and the configuration bandwidth of each channel can be ensured in a common Ethernet scene, and meanwhile, the real-time and preferential sending of high-priority messages is effectively realized.
Based on the same inventive concept, the application also provides a message processing device corresponding to the message processing method. The implementation of the message processing apparatus may refer to the above description of the message processing method, and is not discussed here one by one.
Referring to fig. 4, fig. 4 is a message processing apparatus according to an exemplary embodiment of the present application, where the message processing apparatus is disposed between a media storage control layer and a physical coding sublayer, and the apparatus includes:
the message splitting module 401 is configured to, after receiving a service message based on each channel, cache the service message in a first cache region corresponding to the service message;
a bandwidth management module 402, configured to read, according to indication information corresponding to the configured bandwidth of the channel, a service packet matching the configured bandwidth of the channel from the first cache region; sending the read service message to a message processing module;
a message processing module 403, configured to cache the read service message in a second cache region corresponding to the channel; and if the second cache region meeting the message sending condition exists, sending the service message in the second cache region.
Optionally, the service packet in this embodiment includes a priority; then
The message splitting module 401 is configured to cache the service message in a first cache region corresponding to a priority in the service message according to the priority in the service message;
the message processing module 403 is specifically configured to, if there are multiple second cache regions that satisfy the message sending condition, send, according to the priority of the service message, the service message in the second cache region to which the service message whose priority satisfies the sending priority belongs.
Optionally, the message splitting module 401 is further configured to generate a backpressure signal corresponding to any one of the first cache regions when the cached space of the first cache region reaches a set threshold; and sending the back pressure signal corresponding to the first buffer area to the media storage control layer.
Optionally, in this embodiment, the message splitting module 401 is specifically configured to:
when the media storage control layer is a sending direction media storage control layer, the physical coding sublayer is a sending direction physical coding sublayer, and the message processing device is arranged between the sending direction media storage control layer and the sending direction physical coding sublayer, the backpressure signal is sent to the sending direction media storage control layer;
and when the media storage control layer is a receiving direction media storage control layer, the physical coding sublayer is a receiving direction physical coding sublayer, and the message processing device is arranged between the receiving direction media storage control layer and the receiving direction physical coding sublayer, sending the backpressure signal to the receiving direction media storage control layer so that the receiving direction media storage control layer sends a message pause sending instruction to the sending direction media storage control layer.
Optionally, the message processing module 403 is further configured to send an idle signal if there is no second buffer that meets the message sending condition.
For better understanding of the present embodiment, the message processing apparatus shown in fig. 4 is set in the sending direction (TX), that is, the message processing apparatus is set in fig. 2, when the sending direction MAC sends an acquired service message to the message splitting module 401 through a channel set between the message processing apparatus and the message processing apparatus, after receiving the service message of the channel, the message splitting module 401 analyzes the priority of the service message, and then caches the service message in a first cache region corresponding to the analyzed priority; it should be noted that, when the message splitting module caches the service message in the first cache region, it may be determined whether the cached space of the first cache region is greater than a set threshold, and when the used space of the first cache region does not reach the set threshold, the service message is cached in the first cache region; and when the cached space in the first cache region is larger than the set threshold, the message splitting module sends a message pause sending instruction to the sending direction MAC layer so that the sending direction MAC layer pauses sending the service message of the priority until the cached space in the first cache region is smaller than the set threshold.
And the bandwidth management module 402 is configured to manage and control a data bandwidth of each channel for reading the service packet. Specifically, the bandwidth management module generates indication information of different duty ratios, namely valid signals, in advance based on the configured bandwidth of each channel, and then reads a service packet with a data bandwidth matched with the configured bandwidth of the channel from a corresponding first cache region based on the valid signals of each channel, namely, the actual maximum bandwidth occupied by the service packet read from the first cache region is consistent with the configured bandwidth; then, the read service message is sent to the message processing module 403;
after receiving the service packet sent by the bandwidth management module, the packet processing module 403 caches the service packet in the second cache region corresponding to the channel. The message processing module 403 may check whether a ready signal corresponding to the second cache region of each channel is raised, and if multiple raised ready signals exist, determine the second cache regions to which the multiple raised ready signals belong, and screen out the second cache region to which the service message with the highest priority belongs; and then sending the screened service message in the second cache region to a PCS layer in the sending direction, and sending the received service message to the receiving party equipment by the PCS layer through a channel. Therefore, the consistency of the data bandwidth and the configuration bandwidth of each channel can be ensured, and meanwhile, the real-time and preferential sending of the high-priority message is effectively realized.
Based on the same inventive concept, the embodiment of the present application provides an electronic device, as shown in fig. 5, including a processor 501 and a machine-readable storage medium 502, where the machine-readable storage medium 502 stores a computer program capable of being executed by the processor 501, and the processor 501 is caused by the computer program to execute the message processing method provided in any embodiment of the present application. In addition, the electronic device further comprises a communication interface 503 and a communication bus 504, wherein the processor 501, the communication interface 503 and the machine-readable storage medium 502 are communicated with each other through the communication bus 504.
The communication bus mentioned in the electronic device may be a Peripheral Component Interconnect (PCI) bus, an Extended Industry Standard Architecture (EISA) bus, or the like. The communication bus may be divided into an address bus, a data bus, a control bus, etc. For ease of illustration, only one thick line is shown, but this does not mean that there is only one bus or one type of bus.
The communication interface is used for communication between the electronic equipment and other equipment.
The Memory may include a Random Access Memory (RAM), a DDR SRAM (Double Data Rate Dynamic Random Access Memory), and a Non-Volatile Memory (NVM), such as at least one disk Memory. Optionally, the memory may also be at least one memory device located remotely from the processor.
The Processor may be a general-purpose Processor, including a Central Processing Unit (CPU), a Network Processor (NP), and the like; but also Digital Signal Processors (DSPs), Application Specific Integrated Circuits (ASICs), Field Programmable Gate Arrays (FPGAs) or other Programmable logic devices, discrete Gate or transistor logic devices, discrete hardware components.
In addition, the embodiment of the present application provides a machine-readable storage medium, which stores a computer program, and when the computer program is called and executed by a processor, the computer program causes the processor to execute the message processing method provided by the embodiment of the present application.
For the embodiments of the electronic device and the machine-readable storage medium, since the contents of the related methods are substantially similar to those of the foregoing embodiments of the methods, the description is relatively simple, and for the relevant points, reference may be made to the partial description of the embodiments of the methods.
It is noted that, herein, relational terms such as first and second, and the like may be used solely to distinguish one entity or action from another entity or action without necessarily requiring or implying any actual such relationship or order between such entities or actions. Also, the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or apparatus. Without further limitation, an element defined by the phrase "comprising an … …" does not exclude the presence of other identical elements in a process, method, article, or apparatus that comprises the element.
The implementation process of the functions and actions of each unit/module in the above device is specifically described in the implementation process of the corresponding step in the above method, and is not described herein again.
For the device embodiments, since they substantially correspond to the method embodiments, reference may be made to the partial description of the method embodiments for relevant points. The above-described embodiments of the apparatus are merely illustrative, wherein the units/modules described as separate parts may or may not be physically separate, and the parts displayed as units/modules may or may not be physical units/modules, may be located in one place, or may be distributed on a plurality of network units/modules. Some or all of the units/modules can be selected according to actual needs to achieve the purpose of the scheme of the application. One of ordinary skill in the art can understand and implement it without inventive effort.
The above description is only exemplary of the present application and should not be taken as limiting the present application, as any modification, equivalent replacement, or improvement made within the spirit and principle of the present application should be included in the scope of protection of the present application.
Claims (12)
1. A message processing method is applied to a message processing device, wherein the message processing device is arranged between a media storage control layer and a physical coding sublayer, and the method comprises the following steps:
after receiving a service message based on each channel, caching the service message into a first cache region corresponding to the service message;
reading a service message matched with the configuration bandwidth of the channel from the first cache region according to the indication information corresponding to the configuration bandwidth of the channel, and caching the service message to a second cache region corresponding to the channel;
and if the second cache region meeting the message sending condition exists, sending the service message in the second cache region.
2. The method of claim 1, wherein the traffic packet includes a priority; then
Caching the service message into a first cache region corresponding to the service message, including:
caching the service message into a first cache region corresponding to the priority according to the priority in the service message;
if a second cache region meeting the message sending condition exists, sending the service message in the second cache region, including:
and if a plurality of second cache regions meeting the message sending condition exist, sending the service messages of which the priority meets the sending priority and which belong to the second cache regions according to the priority of the service messages.
3. The method of claim 1, further comprising:
when the cached space of any one first cache region reaches a set threshold value, generating a back pressure signal corresponding to the first cache region; and sending the back pressure signal corresponding to the first buffer area to the media storage control layer.
4. The method of claim 3,
sending the backpressure signal corresponding to the first buffer to the media storage control layer, including:
when the media storage control layer is a sending direction media storage control layer, the physical coding sublayer is a sending direction physical coding sublayer, and the message processing device is arranged between the sending direction media storage control layer and the sending direction physical coding sublayer, the backpressure signal is sent to the sending direction media storage control layer;
and when the media storage control layer is a receiving direction media storage control layer, the physical coding sublayer is a receiving direction physical coding sublayer, and the message processing device is arranged between the receiving direction media storage control layer and the receiving direction physical coding sublayer, sending the backpressure signal to the receiving direction media storage control layer so that the receiving direction media storage control layer sends a message pause sending instruction to the sending direction media storage control layer.
5. The method of claim 1, further comprising:
and if the second cache region meeting the message sending condition does not exist, sending an idle signal.
6. A message processing apparatus, wherein the message processing apparatus is disposed between a media storage control layer and a physical coding sublayer, the apparatus comprising:
the message splitting module is used for caching the service message into a first cache region corresponding to the service message after receiving the service message based on each channel;
the bandwidth management module is used for reading a service message matched with the configuration bandwidth of the channel from the first cache region according to the indication information corresponding to the configuration bandwidth of the channel; sending the read service message to a message processing module;
the message processing module is used for caching the read service message to a second cache region corresponding to the channel; and if the second cache region meeting the message sending condition exists, sending the service message in the second cache region.
7. The apparatus of claim 6, wherein the traffic packet comprises a priority; then
The message splitting module is used for caching the service message into a first cache region corresponding to the priority according to the priority in the service message;
the message processing module is specifically configured to, if there are multiple second cache regions that satisfy the message sending condition, send, according to the priority of the service message, the service message in the second cache region to which the service message whose priority satisfies the sending priority belongs.
8. The apparatus of claim 7,
the message splitting module is further configured to generate a backpressure signal corresponding to any one of the first cache regions when the cached space of the first cache region reaches a set threshold; and sending the back pressure signal corresponding to the first buffer area to the media storage control layer.
9. The apparatus according to claim 8, wherein the packet splitting module is specifically configured to:
when the media storage control layer is a sending direction media storage control layer, the physical coding sublayer is a sending direction physical coding sublayer, and the message processing device is arranged between the sending direction media storage control layer and the sending direction physical coding sublayer, the backpressure signal is sent to the sending direction media storage control layer;
and when the media storage control layer is a receiving direction media storage control layer, the physical coding sublayer is a receiving direction physical coding sublayer, and the message processing device is arranged between the receiving direction media storage control layer and the receiving direction physical coding sublayer, sending the backpressure signal to the receiving direction media storage control layer so that the receiving direction media storage control layer sends a message pause sending instruction to the sending direction media storage control layer.
10. The apparatus of claim 6,
the message processing module is further configured to send an idle signal if there is no second cache region that satisfies a message sending condition.
11. An electronic device comprising a processor and a machine-readable storage medium, the machine-readable storage medium storing a computer program executable by the processor, the processor being caused by the computer program to perform the method of any of claims 1-5.
12. A machine readable storage medium, having stored thereon a computer program which, when invoked and executed by a processor, causes the processor to perform the method of any of claims 1-5.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202110959121.9A CN113794585B (en) | 2021-08-20 | 2021-08-20 | Message processing method and device |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202110959121.9A CN113794585B (en) | 2021-08-20 | 2021-08-20 | Message processing method and device |
Publications (2)
Publication Number | Publication Date |
---|---|
CN113794585A true CN113794585A (en) | 2021-12-14 |
CN113794585B CN113794585B (en) | 2023-10-27 |
Family
ID=79182049
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN202110959121.9A Active CN113794585B (en) | 2021-08-20 | 2021-08-20 | Message processing method and device |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN113794585B (en) |
Citations (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN1645860A (en) * | 2005-01-20 | 2005-07-27 | 中国科学院计算技术研究所 | Terminal up dispatching method for voice service in wide band wireless cut-in network |
US20190004701A1 (en) * | 2017-07-03 | 2019-01-03 | Intel Corporation | Tier-Aware Read and Write |
CN109743136A (en) * | 2018-12-29 | 2019-05-10 | Ut斯达康通讯有限公司 | Transmitting message transfer approach, method of reseptance and processing unit |
CN110493145A (en) * | 2019-08-01 | 2019-11-22 | 新华三大数据技术有限公司 | A kind of caching method and device |
-
2021
- 2021-08-20 CN CN202110959121.9A patent/CN113794585B/en active Active
Patent Citations (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN1645860A (en) * | 2005-01-20 | 2005-07-27 | 中国科学院计算技术研究所 | Terminal up dispatching method for voice service in wide band wireless cut-in network |
US20190004701A1 (en) * | 2017-07-03 | 2019-01-03 | Intel Corporation | Tier-Aware Read and Write |
CN109743136A (en) * | 2018-12-29 | 2019-05-10 | Ut斯达康通讯有限公司 | Transmitting message transfer approach, method of reseptance and processing unit |
CN110493145A (en) * | 2019-08-01 | 2019-11-22 | 新华三大数据技术有限公司 | A kind of caching method and device |
Also Published As
Publication number | Publication date |
---|---|
CN113794585B (en) | 2023-10-27 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
US10826830B2 (en) | Congestion processing method, host, and system | |
WO2021032131A1 (en) | User plane information reporting method and apparatus | |
US11968111B2 (en) | Packet scheduling method, scheduler, network device, and network system | |
US8606290B2 (en) | Method and apparatus for performing a demotion in a cellular communications network | |
US7843943B2 (en) | Differentiation for bandwidth request contention | |
CN101547435B (en) | Method and device for reporting cached state | |
JP2008104152A (en) | Packet transmission apparatus of communication system | |
US20070159970A1 (en) | Power reduction in switch architectures | |
WO2022206315A1 (en) | Access control method and apparatus for network slice | |
WO2023103419A1 (en) | Message queue-based method and apparatus for sending 5g messages in batches, and electronic device | |
CN112822646B (en) | Message processing method and device, electronic equipment and computer readable storage medium | |
CN112566262B (en) | Data processing method and device, communication equipment and storage medium | |
WO2021023185A1 (en) | Method and device for access restriction detection | |
CN113794585A (en) | Message processing method and device | |
US20080253285A1 (en) | Apparatus, method, and computer program product providing improved silence suppression detection | |
CN111224759A (en) | Bearer configuration method, device and equipment | |
WO2012159485A1 (en) | Method and device for reporting and analyzing data | |
CN114024844A (en) | Data scheduling method, data scheduling device and electronic equipment | |
CN114079907A (en) | Information processing method, network equipment and computer storage medium | |
CN106506434B (en) | Service data transmission method and device | |
EP3177067B1 (en) | Network controller, system, and method for resource allocation | |
WO2021253999A1 (en) | Data access method and apparatus, chip and computer storage medium | |
WO2024174085A1 (en) | Data transmission method and related device thereof | |
CN117768417A (en) | Data transmission method, device, computer equipment and storage medium | |
EP4138481A1 (en) | Resource management method and apparatus, server, and storage medium |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
PB01 | Publication | ||
PB01 | Publication | ||
SE01 | Entry into force of request for substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
GR01 | Patent grant | ||
GR01 | Patent grant |