CN108848040B - Message sending method, device and computer readable storage medium - Google Patents

Message sending method, device and computer readable storage medium Download PDF

Info

Publication number
CN108848040B
CN108848040B CN201810612429.4A CN201810612429A CN108848040B CN 108848040 B CN108848040 B CN 108848040B CN 201810612429 A CN201810612429 A CN 201810612429A CN 108848040 B CN108848040 B CN 108848040B
Authority
CN
China
Prior art keywords
message
data channel
bytes
channel
sent
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
Application number
CN201810612429.4A
Other languages
Chinese (zh)
Other versions
CN108848040A (en
Inventor
李建国
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Maipu Communication Technology Co Ltd
Original Assignee
Maipu Communication Technology Co Ltd
Priority date (The priority date 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 date listed.)
Filing date
Publication date
Application filed by Maipu Communication Technology Co Ltd filed Critical Maipu Communication Technology Co Ltd
Priority to CN201810612429.4A priority Critical patent/CN108848040B/en
Publication of CN108848040A publication Critical patent/CN108848040A/en
Application granted granted Critical
Publication of CN108848040B publication Critical patent/CN108848040B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L47/00Traffic control in data switching networks
    • H04L47/70Admission control; Resource allocation
    • H04L47/72Admission control; Resource allocation using reservation actions during connection setup
    • H04L47/722Admission control; Resource allocation using reservation actions during connection setup at the destination endpoint, e.g. reservation of terminal resources or buffer space
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L47/00Traffic control in data switching networks
    • H04L47/50Queue scheduling
    • H04L47/62Queue scheduling characterised by scheduling criteria
    • H04L47/625Queue scheduling characterised by scheduling criteria for service slots or service orders
    • H04L47/6275Queue scheduling characterised by scheduling criteria for service slots or service orders based on priority
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L47/00Traffic control in data switching networks
    • H04L47/70Admission control; Resource allocation

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Data Exchanges In Wide-Area Networks (AREA)
  • Communication Control (AREA)

Abstract

The embodiment of the invention provides a message sending method, message sending equipment and a computer readable storage medium, and relates to the technical field of data communication. The method obtains the mode of scheduling the weighted channel queue based on the number of bytes of the message sent by each of the obtained multiple data channels and the number of bytes of the message which is not sent, and then controls the message of the corresponding data channel to be sent based on the scheduling weighted channel queue, thereby realizing the dynamic weighted scheduling of the data channel without configuration, and avoiding the occurrence of an undersurn error in the sending of the message under the condition of inconsistent flow of the multiple data channels.

Description

Message sending method, device and computer readable storage medium
Technical Field
The present invention relates to the field of data communication technologies, and in particular, to a message sending method, a message sending device, and a computer-readable storage medium.
Background
In the router device, a CPOS, i.e., a channelized POS interface, of 155M is usually configured, where the POS is a packet over SDH, and the SDH is a Synchronous Digital Hierarchy wide area card for data forwarding. Usually, the speed of the backplane interface is greater than that of the wan interface, and the wan card needs to store and forward a plug-in ddr (double Data rate) memory on the sending side. In a CPOS wide area board card of a router SDH OC 3155M interface, there are 63E 1 physical channels of 2048Khz, and if E1 is configured as CE1, each CE1 can be configured with 31 subchannels of 64Khz at most, and the maximum configurable number of 31 × 63 — 1953 channels of the whole OC3 interface. Since the backplane rate is much greater than the rate of each channel, an external DDR SDRAM is required for store-and-forward, and since a data channel of one user may use a subchannel of n × 64k (n ═ 1-31) of CE1 or an E1 transparent channel (n ═ 32) of 2048Khz, an unscrun may be sent when a message is read from the DDR and then sent to a buffer of a certain data channel.
Disclosure of Invention
To solve the foregoing technical problem, embodiments of the present invention provide a message sending method, a message sending device, and a computer-readable storage medium. The technical scheme adopted by the invention is as follows:
in a first aspect, an embodiment of the present invention provides a packet sending method, where the method includes: acquiring the byte number of messages sent by a plurality of data channels in a preset time and the byte number of residual unsent messages; acquiring a scheduling weight channel queue based on the byte number of the message sent by each of the plurality of data channels and the byte number of the message not sent in the rest, wherein the scheduling weight channel queue represents the priority of the plurality of data channels; and controlling the message of the corresponding data channel to be sent based on the scheduling weight channel queue.
In the embodiment of the application, a scheduling weight channel queue is obtained based on the number of bytes of the message sent by each of the obtained multiple data channels and the number of bytes of the message which is not sent, and then the message of the corresponding data channel is controlled to be sent based on the scheduling weight channel queue, so that the dynamic weight scheduling of the data channel without configuration is realized, and the occurrence of an undersrun error in the sending of the message is avoided under the condition that the flows of the multiple data channels are inconsistent.
Optionally, the obtaining a scheduling weight channel queue based on the number of bytes of the message sent by each of the plurality of data channels and the number of bytes of the remaining unsent message includes: determining the size between the dynamic scheduling weighted values of the plurality of data channels based on the byte number of the message sent by each of the plurality of data channels and the byte number of the residual unsent message; and correspondingly sorting the plurality of data channels based on the size of the dynamic scheduling weight values of the plurality of data channels so as to obtain the scheduling weight channel queue, wherein the smaller the dynamic scheduling weight value is, the higher the priority of the data channel corresponding to the dynamic scheduling weight value in the scheduling weight channel queue is represented.
In the embodiment of the application, the plurality of data channels are correspondingly sequenced based on the determined size of the dynamic scheduling weight values of the plurality of data channels, so that the scheduling weight channel queue is obtained, the real-time scheduling weight channel queue is obtained, and the operation is simple.
Optionally, the determining, based on the number of bytes of the message sent by each of the plurality of data channels and the number of bytes of the remaining unsent message, a size between dynamic scheduling weight values of each of the plurality of data channels includes: calculating the product P of the number of bytes of the residual unsent message of the ith data channel in the plurality of data channels and the number of bytes of the message sent by the jth data channel in the plurality of data channelsijAnd the number of bytes of the remaining unsent messages in the jth data channel and the ith numberProduct P of byte number of message sent out from data channeljiSequentially taking 1, 2, … … and M-1 as i, wherein M is the total number of the data channels, and j is correspondingly taken as i + 1; comparing one by one to obtain PijIs less than PjiAnd determining that the dynamic scheduling weight value of the ith data channel is smaller than the dynamic scheduling weight value of the jth data channel, so as to determine the magnitude of the dynamic scheduling weight values of the plurality of data channels.
In this embodiment of the present application, a product P of the number of bytes of remaining unsent packets in an ith data channel of the multiple data channels and the number of bytes of packets sent in a jth data channel of the multiple data channelsijAnd the product P of the number of bytes of the residual unsent message in the jth data channel and the number of bytes of the message sent out by the ith data channeljiThe product is then compared one by one to obtain PijLess than PjiAnd determining that the dynamic scheduling weight value of the ith data channel is smaller than the dynamic scheduling weight value of the jth data channel, so that the sizes among the dynamic scheduling weight values of the multiple data channels are determined, and the calculation amount is small.
Optionally, the controlling, based on the scheduling weight channel queue, a packet of a corresponding data channel to be sent includes: acquiring a target data channel with the highest current priority in the scheduling weight channel queue; determining the difference value between the pre-stored message cache capacity and the number of bytes of unsent messages of the target data channel as the number of bytes needing to be scheduled; and controlling a storage control unit of the message sending equipment to read the message to be sent with a plurality of bytes needing to be scheduled from the target data channel corresponding to the external storage to a message output cache unit of the target data channel for caching, so that the byte sending unit of the target data channel reads the message to be sent from the message output cache unit of the target data channel based on an E1 time slot enabling signal corresponding to the target data channel, performs POS processing on the message, and maps the message to be sent after POS processing to an E1 physical time slot corresponding to the target data channel for sending.
In the embodiment of the application, the message sent by each data channel is scheduled as required, and the scheduling efficiency is improved.
In a second aspect, an embodiment of the present invention provides a message sending device, including a sending scheduling unit. The sending scheduling unit is used for acquiring the byte number of the message sent by each of the plurality of data channels within the preset time and the byte number of the residual unsent message; acquiring a scheduling weight channel queue based on the byte number of the message sent by each of the plurality of data channels and the byte number of the message not sent in the rest, wherein the scheduling weight channel queue represents the priority of the plurality of data channels; and controlling the message of the corresponding data channel to be sent based on the scheduling weight channel queue.
In a third aspect, the present invention provides a computer-readable storage medium, which stores program code, and when the program code is read and executed by a processor, the computer-readable storage medium performs the above method.
According to the message sending method, the message sending device and the computer readable storage medium provided by the embodiment of the invention, the mode of scheduling the weighted channel queue is obtained based on the number of bytes of the message sent by each of the obtained multiple data channels and the number of bytes of the message not sent, and then the message of the corresponding data channel is controlled to be sent based on the scheduling weighted channel queue, so that the dynamic weighted scheduling of the data channels without configuration is realized, and the occurrence of an undersrun error in the message sending is avoided under the condition that the flows of the multiple data channels are inconsistent.
Additional features and advantages of the invention will be set forth in the description which follows, and in part will be obvious from the description, or may be learned by the practice of the embodiments of the invention. The objectives and other advantages of the invention will be realized and attained by the structure particularly pointed out in the written description and claims hereof as well as the appended drawings.
Drawings
In order to more clearly illustrate the technical solutions of the embodiments of the present invention, the drawings needed to be used in the embodiments will be briefly described below, it should be understood that the following drawings only illustrate some embodiments of the present invention and therefore should not be considered as limiting the scope, and for those skilled in the art, other related drawings can be obtained according to the drawings without inventive efforts.
Fig. 1 is a flowchart of a message sending method according to an embodiment of the present invention;
fig. 2 is a flowchart of another message sending method according to an embodiment of the present invention;
fig. 3 is a block diagram of a message sending device according to an embodiment of the present invention;
fig. 4 is a block diagram of another structure of a message sending device according to an embodiment of the present invention.
Detailed Description
In order to make the objects, technical solutions and advantages of the embodiments of the present invention clearer, the technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the drawings in the embodiments of the present invention, and it is obvious that the described embodiments are some, but not all, embodiments of the present invention. The components of embodiments of the present invention generally described and illustrated in the figures herein may be arranged and designed in a wide variety of different configurations. Thus, the following detailed description of the embodiments of the present invention, presented in the figures, is not intended to limit the scope of the invention, as claimed, but is merely representative of selected embodiments of the invention. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present invention.
It should be noted that: like reference numbers and letters refer to like items in the following figures, and thus, once an item is defined in one figure, it need not be further defined or explained in subsequent figures. Meanwhile, in the description of the present invention, the terms "first", "second", and the like are used only for distinguishing the description, and are not to be construed as indicating or implying relative importance.
Referring to fig. 1, an embodiment of the present invention provides a packet sending method, where the method includes: step S100, step S110, and step S120.
Step S100: acquiring the byte number of the message sent by each of the plurality of data channels and the byte number of the residual unsent message within the preset time.
In this embodiment, the message sending method may be applied to a message sending device, and the message sending device includes a sending scheduling unit. The message sending device can be, but is not limited to, a router and a switch. For example, there are 63E 1 physical channels of 2048Khz in the CPOS wide area board of the router SDH OC 3155M interface, and if E1 is configured as CE1, each CE1 can be configured with 31 subchannels of 64Khz at most, and the maximum configurable number of 31 × 63 — 1953 channels of the whole OC3 interface. Since the backplane rate is much higher than the rate of each channel, external DDR SDRAM is required for store-and-forward, and since the data channel of one user may use the subchannel of n × 64k (n ═ 1-31) of CE1, or may use E1 transparent channel (n ═ 32) of 2048 Khz. The preset time may be a time when the E1 sends one frame of data, for example, 125 us. Further, the message sending device also includes a pulse generator for generating pulses for a predetermined time, for example, 125us pulses.
Step S110: and acquiring a scheduling weight channel queue based on the byte number of the message sent by each of the plurality of data channels and the byte number of the residual unsent message, wherein the scheduling weight channel queue represents the priority of the plurality of data channels.
Alternatively, referring to fig. 2, step S110 may include:
step S111: determining the size between the dynamic scheduling weighted values of the data channels based on the byte number of the message sent by each data channel and the byte number of the residual unsent message;
step S112: and correspondingly sorting the plurality of data channels based on the size of the dynamic scheduling weight values of the plurality of data channels so as to obtain the scheduling weight channel queue, wherein the smaller the dynamic scheduling weight value is, the higher the priority of the data channel corresponding to the dynamic scheduling weight value in the scheduling weight channel queue is represented.
In the embodiment of the application, the plurality of data channels are correspondingly sequenced based on the determined size of the dynamic scheduling weight values of the plurality of data channels, so that the scheduling weight channel queue is obtained, the real-time scheduling weight channel queue is obtained, and the operation is simple.
Optionally, step S111 includes:
calculating the product P of the number of bytes of the residual unsent message of the ith data channel in the plurality of data channels and the number of bytes of the message sent by the jth data channel in the plurality of data channelsijAnd the product P of the number of bytes of the residual unsent message in the jth data channel and the number of bytes of the message sent out by the ith data channeljiSequentially taking 1, 2, … … and M-1 as i, wherein M is the total number of the data channels, and j is correspondingly taken as i + 1;
comparing one by one to obtain PijLess than PjiAnd determining that the dynamic scheduling weight value of the ith data channel is smaller than the dynamic scheduling weight value of the jth data channel, so as to determine the magnitude of the dynamic scheduling weight values of the plurality of data channels. The dynamic scheduling weight value is defined as the quotient of the number of bytes of the remaining unsent messages of the corresponding data channel and the number of bytes of the messages sent out by the data channel.
In the embodiment of the present application, a product P of the number of bytes of remaining unsent packets in an ith data channel of the multiple data channels and the number of bytes of packets sent by a jth data channel of the multiple data channels is calculatedijAnd the product P of the number of bytes of the residual unsent message in the jth data channel and the number of bytes of the message sent out by the ith data channeljiAnd then comparing one by one to obtain PijLess than PjiAnd determining that the dynamic scheduling weight value of the ith data channel is smaller than the dynamic scheduling weight value of the jth data channel, so as to determine the respective dynamic scheduling weight values of the plurality of data channels, and the calculation amount is small.
For example, taking the total number M of the multiple data channels as 3 as an example, the product P of the number of bytes of the read 1 st data channel remaining unsent messages S1 and the number of bytes of messages N2 sent by the 2 nd data channel is calculated12(ii) S1 xn 2, andthe product P of the number of bytes S2 of the remaining unsent packets in the 2 nd data channel and the number of bytes N1 of the packets sent out from the 1 st data channel21Compare P further to S2 xn 112S1 XN 2 smaller than P21Either S2 XN 1, i.e. (S1 XN 2)<(S2 XN 1), characterization S1/N1<S2/N2, determining that the dynamic scheduling weight value (S1/N1) of the 1 st data channel is smaller than the dynamic scheduling weight value (S2/N2) of the 2 nd data channel, namely the priority of the 1 st data channel is higher than that of the 2 nd data channel, and then calculating the product P of the number of bytes of the read 1 st data channel remaining unsent messages S1 and the number of bytes of messages N3 sent by the 3 rd data channel13(S1 XN 3), and the product P of the number of bytes of the remaining unsent messages in the 3 rd data channel S3 and the number of bytes of the messages sent in the 1 st data channel N131Compare P further to S3 xn 113S1 XN 3 smaller than P31Either as S3 xn 1 (S1 xn 3)<(S3 XN 1), characterization S1/N1<S3/N3, determining that the dynamic scheduling weight value (S1/N1) of the 1 st data channel is less than the dynamic scheduling weight value (S3/N3) of the 3 rd data channel, that is, the priority of the 1 st data channel is higher than that of the 3 rd data channel … …, and so on, continuously comparing, the priority of the 3 rd data channel is higher than that of the 2 nd data channel, and obtaining a real-time scheduling weight channel queue Q ═ the 1 st data channel, the 3 rd data channel, the 2 nd data channel }.
Step S120: and controlling the message of the corresponding data channel to be sent based on the scheduling weight channel queue.
Alternatively, step S120 may include:
acquiring a target data channel with the highest current priority in the scheduling weight channel queue;
determining the difference value between the pre-stored message cache capacity and the number of bytes of unsent messages of the target data channel as the number of bytes needing to be scheduled; and the storage control unit of the control message sending equipment reads the message to be sent with a plurality of bytes needing to be scheduled from the target data channel corresponding to the external storage to the message output cache unit of the target data channel for caching, so that the byte sending unit of the target data channel reads the message to be sent from the message output cache unit of the target data channel based on the E1 time slot enabling signal corresponding to the target data channel and performs POS processing, and then maps the message to be sent after POS processing to the E1 physical time slot corresponding to the target data channel for sending.
In the embodiment of the application, the message sent by each data channel is scheduled as required, and the scheduling efficiency is improved.
In this embodiment, the CPOS is a channelized POS interface. POS is Packet Over SDH. SDH is Synchronous Digital Hierarchy. The external memory may be an external DDR SDRAM (Double Data Rate SDRAM).
For example, the channel queues are scheduled for transmission based on the scheduling weights. When scheduling, the target data channel with the highest priority in the scheduling weight channel queue is obtained first, then the remaining space is calculated, namely, subtracting the byte number S of the residual unsent message of the target data channel with the highest current priority from the message cache capacity to obtain the byte number F to be scheduled, then controlling the DDR control unit to read out F bytes of messages to be sent from a target data channel corresponding to the external DDR SDRAM to a message output cache unit of the target data channel for caching, reading the messages to be sent from the message output cache unit of the target data channel one byte by one byte based on an E1 time slot enabling signal corresponding to the target data channel by a byte sending unit of the target data channel and performing POS processing, and mapping the message to be sent after the POS processing to the E1 physical time slot corresponding to the target data channel for sending. The last 63E 1 are assembled into an SDH mapper and sent out from the optical interface. The above steps are repeated in a circulating way, so that the message sent by each channel is guaranteed to be scheduled according to the requirement.
According to the message sending method provided by the embodiment of the invention, the method of scheduling the weight channel queue is obtained based on the number of bytes of the message sent by each of the obtained multiple data channels and the number of bytes of the message not sent, and then the message of the corresponding data channel is controlled to be sent based on the scheduling weight channel queue, so that the dynamic weight scheduling of the data channel is realized without configuration, and the occurrence of an undersrun error in the message sending is avoided under the condition that the flow of the multiple data channels is inconsistent.
Referring to fig. 3, an embodiment of the present invention provides a message sending apparatus 200, which includes a sending scheduling unit 210. The sending scheduling unit 210 is configured to obtain the number of bytes of a message sent by each of the multiple data channels within a preset time and the number of bytes of a remaining unsent message; acquiring a scheduling weight channel queue based on the byte number of the message sent by each of the plurality of data channels and the byte number of the message not sent in the rest, wherein the scheduling weight channel queue represents the priority of the plurality of data channels; and controlling the message of the corresponding data channel to be sent based on the scheduling weight channel queue.
Optionally, the sending scheduling unit 210 is configured to determine, based on the number of bytes of the packet sent by each of the multiple data channels and the number of bytes of the remaining unsent packet, a size between dynamic scheduling weight values of each of the multiple data channels.
The sending scheduling unit 210 is configured to correspondingly rank the multiple data channels based on the size between the dynamic scheduling weight values of the multiple data channels, so as to obtain the scheduling weight channel queue, where a smaller dynamic scheduling weight value represents a higher priority of a data channel corresponding to the dynamic scheduling weight value in the scheduling weight channel queue.
The sending scheduling unit 210 is specifically configured to calculate a product P of the number of bytes of remaining unsent packets in the ith data channel of the multiple data channels and the number of bytes of packets sent by the jth data channel of the multiple data channelsijAnd the product P of the number of bytes of the residual unsent message in the jth data channel and the number of bytes of the message sent out by the ith data channeljiSequentially taking 1, 2, … … and M-1 as i, wherein M is the total number of the data channels, and j is correspondingly taken as i + 1; comparing one by one to obtain PijLess than PjiAnd determining that the dynamic scheduling weight value of the ith data channel is smaller than the dynamic scheduling weight value of the jth data channel, so as to determine the magnitude between the respective dynamic scheduling weight values of the plurality of data channels.
Further, the message sending device 200 may further include a storage control unit 220, a message output buffer unit 230 corresponding to each of the plurality of data channels, and a byte sending unit 240. The transmission scheduling unit 210 is connected to the storage control unit 220, the message output buffer unit 230, and the byte transmitting unit 240.
The sending scheduling unit 210 is configured to obtain a target data channel with a highest current priority in the scheduling weight channel queue; determining the difference value between the pre-stored message cache capacity and the number of bytes of unsent messages of the target data channel as the number of bytes needing to be scheduled; the storage control unit 220 is controlled to read the to-be-sent message with a plurality of bytes to be scheduled from the target data channel corresponding to the external memory to the message output cache unit 230 of the target data channel for caching, so that the byte sending unit 240 of the target data channel reads the to-be-sent message from the message output cache unit 230 of the target data channel based on the E1 time slot enabling signal corresponding to the target data channel, performs POS processing on the to-be-sent message, and maps the to-be-sent message after POS processing to the E1 physical time slot corresponding to the target data channel for sending.
Referring to fig. 4, the message sending apparatus 200 further includes a pulse generator 250, a counter 260 corresponding to each of the plurality of data channels, a first register 270, and a second register 280. The statistics device 260 of each data channel is respectively connected to the corresponding first register 270, the pulse generator 250 and the byte transmitting unit 240, and the first register 270 is connected to the transmitting scheduling unit 210. The second register 280 of each data channel is respectively connected to the transmission scheduling unit 210 and the corresponding message output buffer unit 230.
The pulse generator 250 is configured to generate a pulse within a preset time.
The counter 260 is configured to count the number of bytes of the message sent by the byte sending unit of the corresponding data channel within the preset time, and store the number of bytes of the message sent in the first register 270.
The counter 260 is used for counting the number N of times that the byte transmission completion signal of the byte transmission unit of the corresponding data channel occurs in the preset time, sending the N value into the first register for storage when the pulse of the pulse generator comes, and meanwhile, setting the counter value to 0. N is a natural number not less than 0.
In this embodiment, the number N of E1 slots configured for each data channel is different, and N is approximately summed to N (N ═ N) during the time when E1 transmits one frame of data (i.e., 125 us). The number of times of byte transmission completion signal N for each data channel associated with the E1 time slot enable signal for that data channel is counted using a 125us pulse generator.
The second register 280 is used for storing the number of bytes of the remaining unsent message of the message output buffer unit of the corresponding data channel.
Further, the message sending device may further include an SDH mapper, where the SDH mapper is configured to aggregate the received messages sent by the multiple E1 physical timeslots, and send the aggregated messages through an optical interface of the SDH mapper.
It is understood that the structure shown in fig. 4 is only an illustration, and only by taking the example of the message output buffer unit, the byte sending unit, the counter, the first register and the second register corresponding to one data channel, the message sending apparatus 200 may further include more or less components than those shown in fig. 4, or have a different configuration than that shown in fig. 4. The components shown in fig. 4 may be implemented in hardware, software, or a combination thereof.
It can be clearly understood by those skilled in the art that, for convenience and brevity of description, the specific working process of the message sending device described above may refer to the corresponding process in the foregoing method embodiment, and is not described herein again.
The embodiment of the invention provides message sending equipment, which comprises a sending scheduling unit, wherein the sending scheduling unit is used for acquiring the byte number of messages sent by a plurality of data channels in a preset time and the byte number of residual unsent messages. The sending and scheduling unit is configured to obtain a scheduling weight channel queue based on the number of bytes of the message sent by each of the plurality of data channels and the number of bytes of the remaining unsent message, where the scheduling weight channel queue represents the priority of the plurality of data channels. And the sending scheduling unit is used for controlling the message of the corresponding data channel to be sent based on the scheduling weight channel queue. The dynamic weight scheduling of the data channels is realized without configuration, so that the phenomenon that an undersrun error occurs in message sending is avoided under the condition that the flow of a plurality of data channels is inconsistent.
An embodiment of the present invention provides a computer-readable storage medium storing program code, which, when read and executed by a processor, performs the above-mentioned method.
The above description is only for the specific embodiments of the present invention, but the scope of the present invention is not limited thereto, and any person skilled in the art can easily conceive of the changes or substitutions within the technical scope of the present invention, and all the changes or substitutions should be covered within the scope of the present invention. Therefore, the protection scope of the present invention shall be subject to the protection scope of the claims.

Claims (8)

1. A method for sending a message, the method comprising:
acquiring the byte number of messages sent by a plurality of data channels in a preset time and the byte number of residual unsent messages;
acquiring a scheduling weight channel queue based on the byte number of the message sent by each of the plurality of data channels and the byte number of the message not sent in the rest, wherein the scheduling weight channel queue represents the priority of the plurality of data channels;
controlling the message of the corresponding data channel to be sent based on the scheduling weight channel queue;
the controlling the sending of the message of the corresponding data channel based on the scheduling weight channel queue comprises:
acquiring a target data channel with the highest current priority in the scheduling weight channel queue;
determining the difference value between the pre-stored message cache capacity and the number of bytes of unsent messages of the target data channel as the number of bytes needing to be scheduled;
and controlling a storage control unit of the message sending equipment to read the message to be sent with a plurality of bytes needing to be scheduled from the target data channel corresponding to the external storage to a message output cache unit of the target data channel for caching, so that the byte sending unit of the target data channel reads the message to be sent from the message output cache unit of the target data channel based on an E1 time slot enabling signal corresponding to the target data channel, performs POS processing on the message, and maps the message to be sent after POS processing to an E1 physical time slot corresponding to the target data channel for sending.
2. The method of claim 1, wherein obtaining a scheduling weight channel queue based on the number of bytes of packets sent out and the number of bytes of remaining unsent packets from each of the plurality of data channels comprises:
determining the size between the dynamic scheduling weighted values of the plurality of data channels based on the byte number of the message sent by each of the plurality of data channels and the byte number of the residual unsent message;
and correspondingly sorting the plurality of data channels based on the size of the dynamic scheduling weight values of the plurality of data channels so as to obtain the scheduling weight channel queue, wherein the smaller the dynamic scheduling weight value is, the higher the priority of the data channel corresponding to the dynamic scheduling weight value in the scheduling weight channel queue is represented.
3. The method of claim 2, wherein determining the respective dynamic scheduling weight values of the plurality of data lanes based on the number of bytes of packets sent out from each of the plurality of data lanes and the number of bytes of remaining unsent packets comprises:
calculating the product P of the number of bytes of the residual unsent message of the ith data channel in the plurality of data channels and the number of bytes of the message sent by the jth data channel in the plurality of data channelsijAnd said jth data channel has a remaining unsent message wordProduct P of the number of bytes and the number of bytes of the message sent by the ith data channeljiSequentially taking 1, 2, … … and M-1 as i, wherein M is the total number of the data channels, and j is correspondingly taken as i + 1;
comparing one by one to obtain PijLess than PjiAnd determining that the dynamic scheduling weight value of the ith data channel is smaller than the dynamic scheduling weight value of the jth data channel, so as to determine the magnitude between the respective dynamic scheduling weight values of the plurality of data channels.
4. A message transmission device is characterized by comprising a transmission scheduling unit,
the sending scheduling unit is used for acquiring the byte number of the message sent by each of the plurality of data channels within the preset time and the byte number of the residual unsent message; acquiring a scheduling weight channel queue based on the byte number of the message sent by each of the plurality of data channels and the byte number of the remaining unsent message, wherein the scheduling weight channel queue represents the priority of the plurality of data channels; controlling the message of the corresponding data channel to be sent based on the scheduling weight channel queue;
the message sending equipment also comprises a storage control unit, a message output cache unit and a byte sending unit which correspond to each data channel in the plurality of data channels, wherein the sending scheduling unit is connected with the storage control unit, the message output cache unit and the byte sending unit;
the sending scheduling unit is used for acquiring a target data channel with the highest current priority in the scheduling weight channel queue; determining the difference value between the pre-stored message cache capacity and the number of bytes of unsent messages of the target data channel as the number of bytes needing to be scheduled; and controlling the storage control unit to read the message to be sent of a plurality of bytes needing to be scheduled from the target data channel corresponding to the external memory to a message output cache unit of the target data channel for caching, so that the byte sending unit of the target data channel reads the message to be sent from the message output cache unit of the target data channel based on an E1 time slot enabling signal corresponding to the target data channel, performs POS processing on the message, and maps the message to be sent after POS processing to an E1 physical time slot corresponding to the target data channel for sending.
5. The message sending device according to claim 4, wherein the sending scheduling unit is configured to determine a size between dynamic scheduling weight values of each of the plurality of data channels based on a number of bytes of messages sent by each of the plurality of data channels and a number of bytes of remaining unsent messages; and correspondingly sorting the plurality of data channels based on the size of the dynamic scheduling weight values of the plurality of data channels so as to obtain the scheduling weight channel queue, wherein the smaller the dynamic scheduling weight value is, the higher the priority of the data channel corresponding to the dynamic scheduling weight value in the scheduling weight channel queue is represented.
6. The message sending device according to claim 5, wherein the sending scheduling unit is specifically configured to calculate a product P of the number of bytes of remaining unsent messages in an ith data channel of the multiple data channels and the number of bytes of messages sent by a jth data channel of the multiple data channelsijAnd the product P of the number of bytes of the residual unsent message in the jth data channel and the number of bytes of the message sent out by the ith data channeljiSequentially taking 1, 2, … … and M-1 as i, wherein M is the total number of the data channels, and j is correspondingly taken as i + 1;
comparing one by one to obtain PijLess than PjiAnd determining that the dynamic scheduling weight value of the ith data channel is smaller than the dynamic scheduling weight value of the jth data channel, so as to determine the magnitude of the dynamic scheduling weight values of the plurality of data channels.
7. The message sending device according to claim 4, further comprising a pulse generator, a statistics unit corresponding to each of the plurality of data channels, a first register, and a second register, wherein the statistics unit of each data channel is connected to the corresponding first register, the pulse generator, and the byte sending unit, and the first register is connected to the sending scheduling unit; the second register of each data channel is respectively connected with the sending scheduling unit and the corresponding message output cache unit;
the pulse generator is used for generating pulses within preset time;
the counter is used for counting the byte number of the message sent by the byte sending unit of the corresponding data channel in the preset time and storing the byte number of the sent message in the first register;
and the second register is used for storing the number of bytes of the residual unsent messages of the message output cache unit of the corresponding data channel.
8. A computer-readable storage medium, characterized in that the computer-readable storage medium stores a program code, which, when read and executed by a processor, performs the method according to any one of claims 1-3.
CN201810612429.4A 2018-06-13 2018-06-13 Message sending method, device and computer readable storage medium Active CN108848040B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201810612429.4A CN108848040B (en) 2018-06-13 2018-06-13 Message sending method, device and computer readable storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201810612429.4A CN108848040B (en) 2018-06-13 2018-06-13 Message sending method, device and computer readable storage medium

Publications (2)

Publication Number Publication Date
CN108848040A CN108848040A (en) 2018-11-20
CN108848040B true CN108848040B (en) 2022-06-21

Family

ID=64201867

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201810612429.4A Active CN108848040B (en) 2018-06-13 2018-06-13 Message sending method, device and computer readable storage medium

Country Status (1)

Country Link
CN (1) CN108848040B (en)

Families Citing this family (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113467938B (en) * 2021-06-18 2024-05-17 山东云海国创云计算装备产业创新中心有限公司 Bus resource allocation method and device and related equipment
CN113810459A (en) * 2021-07-29 2021-12-17 奇安信科技集团股份有限公司 Data transmission method and device, electronic equipment and storage medium

Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101827446A (en) * 2010-04-09 2010-09-08 新邮通信设备有限公司 Radio bearer scheduling method and device
CN107070620A (en) * 2016-12-09 2017-08-18 深圳信息职业技术学院 A kind of wireless communication system resource allocation methods and device

Family Cites Families (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102594670B (en) * 2012-02-06 2014-11-26 北京星网锐捷网络技术有限公司 Multiport multi-flow scheduling method, device and equipment
CN105813213B (en) * 2014-12-31 2019-11-12 中国电信股份有限公司 Method, base station and the system of data are transmitted in dual link scheme

Patent Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101827446A (en) * 2010-04-09 2010-09-08 新邮通信设备有限公司 Radio bearer scheduling method and device
CN107070620A (en) * 2016-12-09 2017-08-18 深圳信息职业技术学院 A kind of wireless communication system resource allocation methods and device

Also Published As

Publication number Publication date
CN108848040A (en) 2018-11-20

Similar Documents

Publication Publication Date Title
CN108848040B (en) Message sending method, device and computer readable storage medium
WO2012109911A1 (en) Method and apparatus for monitoring network traffic
CN104869079B (en) Array dispatching method and device based on dynamic weighting round-robin method
WO2020142867A1 (en) Traffic shaping method and related device
CN112511448A (en) Method for processing network congestion, method for updating model and related device
US6928054B1 (en) Apparatus, method, media and signals for connection-class parameter control of packet flow
CN109120525A (en) For the determining method of path of SDN, device, SDN controller and network
US7961744B2 (en) Frame multiplexing device
EP2432170A1 (en) A token bucket based data packet traffic shapping device
US11695703B2 (en) Multi-timescale packet marker
CN110113269B (en) Flow control method based on middleware and related device
EP3461085B1 (en) Method and device for queue management
CN108183840A (en) Verification method, device and the realization device of switch performance
CN102739531B (en) Flow shaping method and traffic shaping device
CN109905331A (en) Array dispatching method and device, communication equipment, storage medium
CN113381873B (en) Capacity expansion method and related device for network equipment
CN113726493B (en) Cell scheduling method and device
JPWO2003103234A1 (en) Packet transfer circuit and packet transfer method
CN109547336A (en) Acquisition methods, device and the storage medium of message reading state
US7304945B1 (en) Method and apparatus for dynamic bitmap generator scheduler
CN112511323B (en) Method and related apparatus for handling network congestion
US7436768B2 (en) Method, apparatus and computer program for transmitting a packet
US6115358A (en) Controlling the flow of ATM cells in an ATM network
CN104012048B (en) For providing the apparatus and method of random early check in a packet switched network
US6674716B1 (en) Cell compliance decision method and apparatus

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