CN113794585B - Message processing method and device - Google Patents
Message processing method and device Download PDFInfo
- Publication number
- CN113794585B CN113794585B CN202110959121.9A CN202110959121A CN113794585B CN 113794585 B CN113794585 B CN 113794585B CN 202110959121 A CN202110959121 A CN 202110959121A CN 113794585 B CN113794585 B CN 113794585B
- Authority
- CN
- China
- Prior art keywords
- message
- service message
- sending
- storage control
- buffer area
- 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.)
- Active
Links
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 sub-layer, 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 buffer area according to the indication information corresponding to the configuration bandwidth of the channel, and caching the service message into a second buffer area corresponding to the channel; and if the second buffer area meeting the message sending condition exists, sending the service message in the second buffer area. Therefore, the on-demand transmission of the service message under the common Ethernet scene is realized, and the transmission bandwidth of the message of each channel is ensured.
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 message.
Background
Ethernet is a computer local area network technology. The Ethernet technology standard is defined by the IEEE802.3 standard of the IEEE organization, which specifies the contents of the physical layer connections, electronic signals, and medium access layer protocols. Ethernet is now the most popular lan technology, replacing token ring, FDDI, ARCNET, and other lan technologies, also known as common ethernet. The flexible Ethernet technology (Flex Ethernet) is an interface technology for realizing service isolation bearer and network fragmentation of the bearer network, and has been rapidly developed in recent two years, and is widely accepted by various large-scale organizations.
In practical application, the real-time performance of various messages in the channel of the common Ethernet cannot be guaranteed, and the bandwidth of various messages cannot be guaranteed. Although the flexible ethernet can guarantee the above two points, more resources are required to be consumed, and the flexible ethernet needs to be supported by both the local end and the opposite end, so that extremely high requirements are put on the local end and the opposite end equipment.
Therefore, how to guarantee the channel bandwidth of the channel in the common ethernet scenario is one of the technical problems that deserves consideration.
Disclosure of Invention
In view of this, the present application provides a method and apparatus for processing a message, which are used to ensure the channel bandwidth of a channel in a common ethernet scenario.
Specifically, the application is realized by the following technical scheme:
according to a first aspect of the present application, there is provided a message processing method applied to a message processing apparatus, where the message processing apparatus is disposed between a media storage control layer and a physical coding sub-layer, the method comprising:
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 buffer area according to the indication information corresponding to the configuration bandwidth of the channel, and caching the service message into a second buffer area corresponding to the channel;
and if the second buffer area meeting the message sending condition exists, sending the service message in the second buffer area.
According to a second aspect of the present application, there is provided a message processing apparatus disposed between a media storage control layer and a physical coding sub-layer, 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 the service message matched with the configuration bandwidth of the channel from the first buffer area according to the indication information corresponding to the configuration bandwidth of the channel; and 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 area corresponding to the channel; and if the second buffer area meeting the message sending condition exists, sending the service message in the second buffer area.
According to a third aspect of the present application there is provided an electronic device comprising a processor and a 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 embodiment 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 carry out the method provided by the first aspect of the embodiments of the present application.
The embodiment of the application has the beneficial effects that:
according to 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 configuration bandwidth of each channel is read from the first cache according to the indication information of the configuration bandwidth of each channel, and then the service message meeting the message sending condition is cached in the corresponding second cache region of the channel, so that the on-demand sending of the service message under the common Ethernet scene is realized, and the sending bandwidth of the message of each channel is ensured.
Drawings
FIG. 1 is a flow chart 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 embodiment of an application architecture of a message processing method according to the present application;
FIG. 4a is a schematic diagram of a message processing apparatus according to an embodiment of the present application;
fig. 4b is a schematic diagram of an application scenario of a message processing apparatus according to an embodiment of the present application;
fig. 5 is a schematic hardware structure of an electronic device for implementing a message processing method according to an embodiment of the present application.
Detailed Description
Reference will now be made in detail to exemplary embodiments, examples of which are illustrated in the accompanying drawings. When the following description refers to the accompanying drawings, the same numbers in different drawings refer to the same or similar elements, unless otherwise indicated. The implementations described in the following exemplary examples do not represent all implementations consistent with the application. Rather, they are merely examples of apparatus and methods consistent with aspects of the 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 disclosure, the singular forms "a", "an" and "the" are intended to include the plural forms as well, unless the context clearly indicates otherwise. It will also be understood that the term "and/or" as used herein refers to and encompasses any or all possible combinations of one or more of the corresponding listed items.
It should be understood that although the terms first, second, third, etc. may be used herein to describe various information, these information should not be limited by 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 application. The word "if" as used herein may be interpreted as "at … …" or "at … …" or "responsive to a determination", depending on the context.
The message processing method provided by the application is described in detail below.
Referring to fig. 1, fig. 1 is a flowchart of a message processing method provided by the present application, where the method is applied to a message processing apparatus, and the message processing apparatus is disposed between a media storage control (Media Access Control, MAC) layer and a physical coding sublayer (Physical Coding Sublayer, PCS), and the physical coding sublayer is abbreviated as PCS layer, and the method may include the following steps:
s101, after receiving service messages based on each channel, caching the service messages into a first cache region corresponding to the service messages.
In this step, a plurality of channels are respectively set between the message processing device and the MAC layer and PCS layer, and the message processing device receives the service message sent based on each channel.
Optionally, each first buffer area in the message processing device is set based on the priority of the service message, and different priorities correspond to different first buffer areas. On this basis, each service packet carries a priority, and 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 message, the message processing device may parse the priority from the service message, and then store the service message into the first buffer area corresponding to the priority based on the priority.
Alternatively, the number of channels between the message processing apparatus and the MAC layer may be, but not limited to, 8, and similarly, the number of channels between the message processing apparatus and the PCS layer may be, but not limited to, 8, which may be specifically determined according to practical situations. It should be noted that, the channel between the message processing device and the MAC layer belongs to a physical channel, and the channel between the message processing device and the PCS layer belongs to a virtual channel.
Alternatively, the number of priorities of the service messages may be, but not limited to, 8, based on which the present application stores the received service messages in a differentiated manner according to the priorities.
Optionally, after performing step S101, the following procedure may be further included: when the cached space of any 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.
Specifically, each first buffer area is provided with a buffer upper limit value, namely each first buffer area corresponds to a set threshold value, and the condition that messages are lost due to overflow of the first buffer areas can be effectively prevented by setting a set threshold value for each first buffer area. On the basis, the message processing device can judge whether the cached space of each first cache region reaches a set threshold corresponding to the first cache region, and if so, the message processing device can send a back pressure signal to the MAC layer to inform the MAC layer that the service message is temporarily not sent to the message processing device. Thus, after the MAC layer receives the back pressure signal, it can stop sending the service message corresponding to the priority to the message processing device. Optionally, when the cached space of the first cache region is smaller than a set threshold, the service message may be cached in the first cache region.
In addition, the message processing device can continuously judge whether the cached space of the first cache region is smaller than the corresponding set threshold value, and when the cached space of the first cache region is smaller than the corresponding set threshold value, a notification of continuously sending the service message corresponding to the priority can be sent to the MAC layer. Or the MAC layer can wait for a set time after receiving the back pressure signal, and when the waiting time reaches the set time, the MAC layer continues to send the service message corresponding to the priority to the message processing device.
In an embodiment, the MAC layer may be a transmission direction MAC layer, and correspondingly, the PCS layer is a transmission direction PCS layer, as shown in fig. 2, where the message processing apparatus is disposed between the transmission direction MAC layer and the transmission direction PCS layer, and on this basis, the sending of the backpressure signal corresponding to the first buffer area to the media storage control layer may be performed according to the following procedure: the backpressure signal is sent to the sender MAC layer.
Specifically, under normal conditions, the message processing device receives a service message sent by the MAC layer in the sending direction, and then sends the service message to the PCS layer in the sending direction, so as to reach the receiving device. When the message processing apparatus in fig. 2 confirms that the buffered space in the first buffer area is greater than the set threshold, a first back pressure signal corresponding to the first buffer area is generated and sent to the sending direction MAC layer, where the first back pressure signal may carry a first priority of a message that needs to perform a back pressure operation, so that the sending direction MAC layer stops sending the service message corresponding to the first priority after receiving the back pressure signal.
On the basis, the message processing device can judge whether the cached space in the first cache area is larger than a set threshold, and when the cached space is not larger than the set threshold, a first sending instruction (carrying a first priority) can be generated, and then the first sending instruction is sent to a sending direction MAC layer, so that the sending direction MAC layer continues to send the corresponding service message (the 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 greater than the set threshold value, caching the service message into the first cache region.
In another embodiment, the MAC layer may be a receiving direction MAC layer, and correspondingly, the PCS layer may be a receiving mode PCS layer, as shown in fig. 3, where the message processing apparatus is disposed between the receiving direction MAC layer and the receiving direction PCS layer, and on this basis, the sending of the backpressure signal corresponding to the first buffer area to the media storage control layer may be performed according to the following procedure: the message processing device sends a back pressure signal to the receiving direction MAC layer so that the receiving direction MAC layer sends a message pause sending instruction to the sending direction MAC layer.
Specifically, under normal conditions, a receiving direction PCS layer in the receiving device receives a service message sent by a sender, then sends the service message to a message processing device, and then the message processing device sends the service message to a receiving direction MAC layer. On this basis, after the message processing apparatus in fig. 3 receives the service message sent by the PCS in the receiving direction, if the buffered space of the first buffer area corresponding to the second priority in the service message is greater than the set threshold, a second back pressure signal of the first buffer area is generated, and then the second back pressure signal is sent to the MAC layer in the receiving direction, so that after the second back pressure signal is received by the MAC layer in the receiving direction, 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 greater than the set threshold value, caching the service message into the first cache region.
Further, when determining that the buffered capacity of the first buffer area is greater than the set threshold corresponding to the first buffer area, the message processing device may carry, in the second back pressure signal, a second priority of the service message buffered in the first buffer area when sending the second back pressure signal, and then send the second back pressure 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 back pressure signal, and then when generating the message suspension sending instruction, send the parsed second priority to the sending direction MAC layer in the message suspension instruction, so that after the sending direction MAC layer receives the message suspension sending instruction, parse the second priority and then suspend sending the service message corresponding to the second priority.
Further, the message processing apparatus in fig. 3 may continue to determine whether the buffered space in the first buffer is greater than a set threshold, and when the buffered space is not greater than the set threshold, 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, parse the second priority from the second sending instruction, and then start sending a service message corresponding to the second priority.
Optionally, the message suspension sending instruction generated by the MAC layer in the receiving direction may be, but not limited to, an pfc (priority-based flow comtrol, priority-based flow control) flow control frame instruction, and accordingly, the pfc flow control frame instruction carries a second priority.
In practical application, the message processing apparatus may be disposed on two devices of the sender and the receiver at the same time, or may be disposed on only any device of the sender and the receiver.
It should be noted that, the set threshold value corresponding to each first buffer area may be the same or different, and may be specifically configured according to the actual situation.
S102, according to the indication information corresponding to the configuration bandwidth of the channel, reading the service message matched with the configuration bandwidth of the channel from the first buffer area and buffering the service message to the second buffer area corresponding to the channel.
In this step, for each channel, the message processing apparatus obtains indication information corresponding to the configuration bandwidth of the channel, reads, based on the indication information, a service message matching the configuration bandwidth of the channel from the first buffer, and then buffers the read service message in the second buffer corresponding to the channel. By executing the steps, the fact that the actual maximum bandwidth of each channel in the Ethernet is consistent with the preconfigured configuration bandwidth can be ensured.
Alternatively, the indication of the configuration bandwidth of each channel may be, but is not limited to, a valid signal that is a duty cycle. Specifically, when the message processing apparatus is configured with 8 channels, the bandwidth of each channel is configured in advance, so as to generate 8 valid signals with different duty ratios, 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 128 bits, and if the indication information of the configuration bandwidth of a certain channel is a valid signal with a duty cycle of 50%, the configuration bandwidth of the channel is 200GHz. And reading the service message of which the data bandwidth is matched with the configuration bandwidth configured by the channel from the first buffer area based on the valid signal corresponding to each channel, and then caching the read service message into the second buffer area corresponding to the channel. For example, when a service packet with a bandwidth consistent with the configuration bandwidth configured by the channel is read from the first buffer based on the valid signal configured by the channel, the following procedure may be implemented: the valid sequence is generated by the valid control signal duty cycle of the valid signal to control the bandwidth of the read data to match with the configuration bandwidth, such as the total bandwidth of 400Gbit, and when the valid duty cycle reaches 50%, the processing bandwidth is 200Gbit. Since valid is not necessarily equally spaced, read data transmitted by a channel can be controlled to any bandwidth by generating a valid sequence.
And S103, if a second buffer area meeting the message sending condition exists, sending the service message in the second buffer area.
In this step, after the packet processing device caches the matched service packet into the second buffer area based on the configuration bandwidth of each channel, the present application proposes that whether the second buffer area meeting the packet sending condition exists or not is judged because the packet in the second buffer area needs to be read out and sent to the opposite terminal device, and when the second buffer area meeting the packet sending condition exists, the service packet in the second buffer area meeting the packet sending condition is sent.
If the second buffer area meeting the message sending condition does not exist, an idle signal is sent.
By implementing the flow shown in fig. 1, after receiving a service message based on each channel, the service message is cached in a corresponding first cache region, then the service message with the data bandwidth consistent with the configuration bandwidth of each channel is read from the first cache according to the indication information of the configuration bandwidth of each channel, and then cached in a second cache region corresponding to the channel, and the service message meeting the message sending condition is sent out, thereby realizing the on-demand sending of the service message under the common ethernet and also ensuring the sending bandwidth of the messages of each channel.
Alternatively, when the service packet includes priority, step S103 may be performed according to the following procedure: if a plurality of second buffer areas meeting the message sending conditions exist, sending the service message in the second buffer area, to which the service message with the priority meeting the sending priority belongs, according to the priority of the service message.
Specifically, when one second buffer area meeting the message sending condition exists, sending a service message in the second buffer area; and when a plurality of second buffer areas meeting the message sending conditions exist, sending the service messages in the second buffer areas to which the service messages with high priority belong according to the priority of the service messages, thereby realizing the priority sending of the service messages with high priority and ensuring the real-time performance of the service message sending on the premise of ensuring that the sending bandwidth is matched with the configuration bandwidth.
And when the second buffer area meeting the message sending condition does not exist, an idle signal, such as idle word, is sent, so that the activity of the channel is ensured.
Specifically, the message processing device may set a ready signal in each second buffer area, and the message processing device may determine whether each second buffer area meets a message sending condition, and enable the ready signal corresponding to the second buffer area when the message sending condition is met, that is, pull the ready signal of the second buffer area high; when the second buffer area does not meet the message sending condition, pulling down a ready signal corresponding to the second buffer area; and further transmitting the service message in the second buffer based on the state of the ready signal corresponding to each second buffer. Optionally, when at least one complete service packet of the 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 cannot 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 service messages included in a complete data packet may be determined according to practical situations, which is not limited in this embodiment.
On the basis, when the message processing device executes the step, at the current time, judging whether the ready signal corresponding to each second buffer area is pulled up or not to determine the second buffer area corresponding to the ready signal pulled up at the current time, when confirming that the ready signal corresponding to a plurality of second buffer areas is pulled up at the current time, determining the second buffer area to which the service message with the highest priority belongs according to the priority of the service message stored in each second buffer area, and then sending the service message corresponding to the complete data packet in the determined second buffer area. When confirming that only 1 ready signal corresponding to the second buffer area is pulled up at the current time, sending a service message corresponding to a complete data packet in the second buffer area; and when the ready signals corresponding to all the second buffer areas are pulled down, an idle signal is sent at the moment, namely an idle word is sent.
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 under the common Ethernet scene, and the real-time and preferential transmission of the high-priority message 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 will not be discussed here.
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 sub-layer, and the apparatus includes:
the message splitting module 401 is configured to cache, after receiving a service message based on each channel, the service message into a first cache region corresponding to the service message;
the bandwidth management module 402 is configured to read, from the first buffer, a service packet that matches the configuration bandwidth of the channel according to the indication information corresponding to the configuration bandwidth of the channel; and sending the read service message to a message processing module;
a message processing module 403, configured to cache the read service message to a second cache area corresponding to the channel; and if the second buffer area meeting the message sending condition exists, sending the service message in the second buffer area.
Optionally, the service packet in this embodiment includes priority; then
The message splitting module 401 is configured to cache, according to the priority in the service message, the service message into a first cache region corresponding to the priority;
the message processing module 403 is specifically configured to send, if there are multiple second buffer areas that satisfy the message sending condition, according to the priority of the service message, the service message in the second buffer area to which the service message with the priority satisfying the sending priority belongs.
Optionally, the above-mentioned message splitting module 401 is further configured to generate a backpressure signal corresponding to a first buffer when a cached space in which any one of the first buffers exists reaches a set threshold; and sending a 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 transmission direction media storage control layer, the physical coding sub-layer is a transmission direction physical coding sub-layer, and the message processing device is arranged between the transmission direction media storage control layer and the transmission direction physical coding sub-layer, the back pressure signal is transmitted to the transmission direction media storage control layer;
when the media storage control layer is a receiving direction media storage control layer, the physical coding sub-layer is a receiving direction physical coding sub-layer, and the message processing device is arranged between the receiving direction media storage control layer and the receiving direction physical coding sub-layer, the back pressure signal is sent to the receiving direction media storage control layer, so that the receiving direction media storage control layer sends a message sending suspension instruction to the sending direction media storage control layer.
Optionally, the above-mentioned message processing module 403 is further configured to send an idle signal if there is no second buffer area that meets the message sending condition.
In order to better understand the present embodiment, an example is described in which the message processing apparatus shown in fig. 4 is set in a transmission direction (TX), that is, the foregoing message processing apparatus is set in fig. 2, when the transmission direction MAC sends the acquired service message to the message splitting module 401 through a channel set between the message processing apparatus and the message processing apparatus, after the message splitting module 401 receives the service message of the channel, the priority of the service message is resolved, and then the service message is cached in a first cache area corresponding to the resolved priority; it should be noted that, when the message splitting module caches a 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 a set threshold value, the message splitting module sends a message sending suspension instruction to the sending direction MAC layer so that the sending direction MAC layer suspends sending the service message with the priority level until the cached space in the first cache region is smaller than the set threshold value.
And the bandwidth management module 402 is configured to manage the data bandwidth of each channel read service packet. Specifically, the bandwidth management module may generate indication information with different duty ratios, that is, valid signals, in advance based on the configuration bandwidths of each channel, and then read, based on the valid signals of each channel, a service packet with a data bandwidth matching the configuration bandwidth of the channel from a corresponding first buffer, that is, read, from the first buffer, that the actual maximum bandwidth occupied by the service packet is consistent with the configured configuration bandwidth; then the read service message is sent to a message processing module 403;
after receiving the service message sent by the bandwidth management module, the message processing module 403 caches the service message in the second cache area corresponding to the channel. The message processing module 403 checks whether the ready signal corresponding to the second buffer area of each channel is high, if there are multiple ready signals, determines the second buffer area to which the multiple ready signals belong, and screens out the second buffer area to which the service message with the highest priority belongs; and then sending the service message in the screened second buffer area to a PCS layer in a sending direction, and sending the received service message to receiver equipment through a channel by the PCS layer. Therefore, the consistency of the data bandwidth and the configuration bandwidth of each channel can be ensured, and the real-time and preferential transmission of the high-priority message is also effectively realized.
Based on the same inventive concept, an 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 perform a message processing method provided by any embodiment of the present application. 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 perform communication with each other via the communication bus 504.
The communication bus mentioned above for the electronic devices may be a peripheral component interconnect standard (Peripheral Component Interconnect, PCI) bus or an extended industry standard architecture (Extended Industry Standard Architecture, EISA) bus, etc. The communication bus may be classified as an address bus, a data bus, a control bus, or the like. For ease of illustration, the figures are shown with only one bold line, but not with only one bus or one type of bus.
The communication interface is used for communication between the electronic device and other devices.
The Memory may include random access Memory (Random Access Memory, RAM), DDR SRAM (Double Data Rate Synchronous Dynamic Random Access Memory, double rate synchronous dynamic random access Memory), or 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 aforementioned processor.
The processor may be a general-purpose processor, including a central processing unit (Central Processing Unit, CPU), a network processor (Network Processor, NP), etc.; but also digital signal processors (Digital Signal Processor, DSP), application specific integrated circuits (Application Specific Integrated Circuit, ASIC), field programmable gate arrays (Field-Programmable Gate Array, FPGA) or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components.
In addition, the embodiment of the application provides a machine-readable storage medium, and the machine-readable storage medium stores a computer program which, when being called and executed by a processor, causes the processor to execute the message processing method provided by the embodiment of the application.
For the electronic device and the machine-readable storage medium embodiments, the description is relatively simple, and reference should be made to the description of the method embodiments for relevant points, since the method content involved is substantially similar to that of the method embodiments described above.
It is noted that relational terms such as first and second, and the like are 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. Moreover, 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 one … …" does not exclude the presence of other like elements in a process, method, article, or apparatus that comprises the element.
The implementation process of the functions and roles of each unit/module in the above device is specifically shown in the implementation process of the corresponding steps in the above method, and will not be repeated here.
For the device embodiments, reference is made to the description of the method embodiments for the relevant points, since they essentially correspond to the method embodiments. The above described apparatus embodiments are merely illustrative, wherein the units/modules illustrated as separate components may or may not be physically separate, and the components shown as units/modules may or may not be physical units/modules, i.e. may be located in one place, or may be distributed over a plurality of network units/modules. Some or all of the units/modules may be selected according to actual needs to achieve the purposes of the present solution. Those of ordinary skill in the art will understand and implement the present application without undue burden.
The foregoing description of the preferred embodiments of the application is not intended to be limiting, but rather to enable any modification, equivalent replacement, improvement or the like to be made within the spirit and principles of the application.
Claims (12)
1. A message processing method, which is characterized by being applied to a message processing device, wherein the message processing device is arranged between a media storage control layer and a physical coding sub-layer, 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 buffer area according to the indication information corresponding to the configuration bandwidth of the channel, and caching the service message into a second buffer area corresponding to the channel;
and if the second buffer area meeting the message sending condition exists, sending the service message in the second buffer area.
2. The method of claim 1, wherein the service message comprises a priority; then
Caching the service message in a first cache region corresponding to the service message, including:
according to the priority in the service message, caching the service message in a first cache region corresponding to the priority;
if there is a second buffer area meeting the message sending condition, sending a service message in the second buffer area, including:
if a plurality of second buffer areas meeting the message sending conditions exist, sending the service message in the second buffer area, to which the service message with the priority meeting the sending priority belongs, according to the priority of the service message.
3. The method as recited in claim 1, further comprising:
when the cached space of any first cache region reaches a set threshold value, generating a back pressure signal corresponding to the first cache region; and sending a back pressure signal corresponding to the first buffer area to the media storage control layer.
4. The method of claim 3, wherein the step of,
sending a backpressure signal corresponding to the first buffer area to the media storage control layer, wherein the backpressure signal comprises the following components:
when the media storage control layer is a transmission direction media storage control layer, the physical coding sub-layer is a transmission direction physical coding sub-layer, and the message processing device is arranged between the transmission direction media storage control layer and the transmission direction physical coding sub-layer, the back pressure signal is transmitted to the transmission direction media storage control layer;
when the media storage control layer is a receiving direction media storage control layer, the physical coding sub-layer is a receiving direction physical coding sub-layer, and the message processing device is arranged between the receiving direction media storage control layer and the receiving direction physical coding sub-layer, the back pressure signal is sent to the receiving direction media storage control layer, so that the receiving direction media storage control layer sends a message sending suspension instruction to the sending direction media storage control layer.
5. The method as recited in claim 1, further comprising:
and if the second buffer area meeting the message sending condition does not exist, sending an idle signal.
6. A message processing apparatus, the message processing apparatus 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 the service message matched with the configuration bandwidth of the channel from the first buffer area according to the indication information corresponding to the configuration bandwidth of the channel; and 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 area corresponding to the channel; and if the second buffer area meeting the message sending condition exists, sending the service message in the second buffer area.
7. The apparatus of claim 6, wherein the service message 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 send, if there are multiple second buffer areas that satisfy the message sending condition, according to the priority of the service message, the service message in the second buffer area to which the service message with the priority satisfying the sending priority belongs.
8. The apparatus of claim 7, wherein the device comprises a plurality of sensors,
the message splitting module is further configured to generate a backpressure signal corresponding to a first buffer area when a buffered space in which any one of the first buffer areas exists reaches a set threshold; and sending a back pressure signal corresponding to the first buffer area to the media storage control layer.
9. The apparatus of claim 8, wherein the message splitting module is specifically configured to:
when the media storage control layer is a transmission direction media storage control layer, the physical coding sub-layer is a transmission direction physical coding sub-layer, and the message processing device is arranged between the transmission direction media storage control layer and the transmission direction physical coding sub-layer, the back pressure signal is transmitted to the transmission direction media storage control layer;
when the media storage control layer is a receiving direction media storage control layer, the physical coding sub-layer is a receiving direction physical coding sub-layer, and the message processing device is arranged between the receiving direction media storage control layer and the receiving direction physical coding sub-layer, the back pressure signal is sent to the receiving direction media storage control layer, so that the receiving direction media storage control layer sends a message sending suspension instruction to the sending direction media storage control layer.
10. The apparatus of claim 6, wherein the device comprises a plurality of sensors,
the message processing module is further configured to send an idle signal if there is no second buffer area that satisfies a message sending condition.
11. An electronic device comprising a processor and a 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 one of claims 1-5.
12. A machine-readable storage medium storing a computer program which, when invoked and executed by a processor, causes the processor to perform the method of any one 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 CN113794585A (en) | 2021-12-14 |
CN113794585B true 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 (3)
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 |
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 |
Family Cites Families (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US11366588B2 (en) * | 2017-07-03 | 2022-06-21 | Intel Corporation | Tier-aware read and write |
-
2021
- 2021-08-20 CN CN202110959121.9A patent/CN113794585B/en active Active
Patent Citations (3)
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 |
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 |
---|---|
CN113794585A (en) | 2021-12-14 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN108616458B (en) | System and method for scheduling packet transmissions on a client device | |
US11968111B2 (en) | Packet scheduling method, scheduler, network device, and network system | |
US8248945B1 (en) | System and method for Ethernet per priority pause packet flow control buffering | |
US8121035B2 (en) | Apparatus and method for packet buffer management in IP network system | |
US8310934B2 (en) | Method and device for controlling information channel flow | |
US20090323524A1 (en) | Invoking different wireless link rate selection operations for different traffic classes | |
CN107426113B (en) | Message receiving method and network equipment | |
US8862768B2 (en) | Method and system for packetizing data for servicing traffic end-to-end | |
CN115834556B (en) | Data transmission method, system, device, storage medium and program product | |
JP7487316B2 (en) | Service level configuration method and apparatus | |
WO2011029358A1 (en) | Method and apparatus for scheduling messages | |
US7606151B2 (en) | Power reduction in switch architectures | |
WO2018000820A1 (en) | Method and device for queue management | |
US20060274754A1 (en) | Residential ethernet node apparatus for maintaining starting point of superframe and method for processing same | |
CN113794585B (en) | Message processing method and device | |
US9083617B2 (en) | Reducing latency of at least one stream that is associated with at least one bandwidth reservation | |
CN103490995B (en) | File transmitting method and device | |
CN114301576A (en) | Method and communication device for generating and transmitting acknowledgement frame in IEEE802.15.4 network | |
CN104159316A (en) | Scheduling method for multiple users in upper layer of LTE (Long Term Evolution) base station | |
CN114024844B (en) | Data scheduling method, data scheduling device and electronic equipment | |
US7855954B2 (en) | Speculative credit data flow control | |
CN116346720A (en) | Information transmission device and method | |
CN110300069B (en) | Data transmission method, optimization device and system | |
US8214665B2 (en) | Method and system for transmit queue management for energy efficient networking | |
CN111416682A (en) | Data transmission method and communication device |
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 |