Detailed Description
Referring to fig. 1, an embodiment of a method for mitigating uplink burst of a base station is provided, which includes the following steps:
s110: and detecting whether an uplink message arrives.
Generally, a network architecture includes a user equipment (UE, which may be a terminal) and a base station (e.g., including an LTE base station, which is responsible for signal processing and resource management), where information can be directly transferred between the base station and the base station, and information can be transferred between terminals through the base station, that is, the base station forwards data sent by one terminal to another terminal, so as to implement communication between the terminals. The data uploaded by the terminal to the base station is called uplink, the data issued by the base station to the terminal is called downlink, namely, the message uploaded by the terminal to the base station is called uplink message, and the message issued by the base station to the terminal is called downlink message. In the base station, it is necessary to detect the message, that is, to detect whether a new message arrives, so as to receive the message subsequently and perform corresponding processing on the message.
If yes, executing the following steps:
s120: and storing the arrived uplink message into an uplink message buffer queue.
When detecting that an uplink message arrives, indicating that a new uplink message arrives during a preset time period, the terminal may be considered to send the new uplink message to the base station, and at this time, the arrived uplink message is stored in an uplink message buffer queue in the base station.
S130: and acquiring a message forwarding threshold in unit time according to the total number of the messages in the uplink message cache queue and the preset period duration.
The preset period duration is greater than zero, and a new threshold of the uplink message which can be forwarded to the network by the base station in unit time (ms), namely a message forwarding threshold, can be calculated through the total number of the messages in the uplink message cache queue and the preset period duration, so as to serve as a basis for forwarding the subsequent message. The message forwarding threshold refers to the maximum number of messages forwarded at a time, and the number of messages forwarded at a time in the subsequent message forwarding of the base station must not exceed the message forwarding threshold. The message forwarding threshold is obtained according to the total number of the messages in the uplink message buffer queue and the preset period duration, and as the messages in the uplink message buffer queue can be changed continuously (the terminal sends the uplink messages to the base station, and the messages in the uplink message buffer queue are increased), the message forwarding threshold can be changed and can be changed along with the total number of the messages in the uplink message buffer queue so as to meet the requirements of different conditions.
S140: and forwarding the messages which do not exceed the message forwarding threshold in the message cache queue, and deleting the forwarded messages from the message cache queue until the messages in the message cache queue are completely forwarded.
After the message forwarding threshold is obtained, the message forwarding can be carried out according to the message forwarding threshold, and because the quantity of the messages forwarded each time does not exceed the maximum data, namely the message forwarding threshold, the messages which do not exceed the message forwarding threshold in the message cache queue are forwarded each time, the forwarded messages are deleted from the message cache queue, the space of the message cache queue is vacated, space is made for the subsequently arrived messages, so that the space is saved, the messages are sequentially and circularly forwarded until the messages in the message cache queue are completely forwarded, and the forwarding of all the messages is realized.
According to the method for relieving the uplink burst of the base station, the message forwarding threshold in unit time is obtained according to the total number of the messages in the uplink message cache queue and the preset period duration, then the messages which do not exceed the message forwarding threshold in the message cache queue are forwarded, and the forwarded messages are deleted from the message cache queue until the messages in the message cache queue are completely forwarded. The message forwarding threshold is determined by the total number of messages in the uplink message buffer queue example and the preset period duration, namely, the message forwarding threshold changes along with the change of the total number of messages in the uplink message buffer queue, namely, the message forwarding threshold is dynamically adjustable, and on the basis of the message forwarding threshold, when the message forwarding threshold is forwarded each time, the message forwarding threshold is not exceeded by the number of messages, so that the maximum message forwarding can be realized, and the message balanced scheduling forwarding can be performed to relieve the burst of the uplink message, thereby relieving the burst of the downlink message and avoiding the occurrence of a packet loss phenomenon.
In this embodiment, if it is not detected that a new uplink packet arrives, it indicates that the base station does not receive the uplink packet newly sent by the terminal within the preset time period, it is not necessary to store the new uplink packet into the uplink packet buffer queue, but the uplink packet buffer queue may have remaining uplink packets that have not been forwarded, and directly jumping to the step of forwarding the messages which do not exceed the message forwarding threshold in the message cache queue, deleting the forwarded messages from the message cache queue until the messages in the message cache queue are completely forwarded, wherein the message forwarding threshold at this time can be a message forwarding threshold calculated when the arrival of the uplink message is detected last time, and if the uplink message is not detected for the first time, the message forwarding threshold is not calculated, and the message forwarding threshold at this time is a forwarding threshold preset at the initial time.
In one embodiment, before detecting whether an uplink packet arrives, the method further includes the steps of:
detecting whether the current recording time length reaches a preset time length or not;
if yes, the step of detecting whether an uplink message arrives is carried out.
In this embodiment, the interval detection is realized by recording the time length, that is, the time interval for performing the message detection is recorded, and when the current recording time length reaches the preset time length, it indicates that the time interval for the message detection is reached, and the message detection can be performed.
In this embodiment, the detection of whether the current recording duration reaches the preset duration is to implement interval detection of a message by setting the preset duration, and when the current recording duration does not reach the preset duration, that is, when the detection message is not reached, no message detection is needed, but there may still be an un-forwarded message in the message buffer queue, and at this time, forwarding of the message is needed, that is, when the previous recording duration does not reach the preset duration, a step of forwarding a message in the message buffer queue by no more than a message forwarding threshold is skipped, and the forwarded message is deleted from the message buffer queue until the message in the message buffer queue is completely forwarded, and the message forwarding threshold at this time is a message forwarding threshold calculated when the last current recording duration reaches the preset duration, and if the first current recording duration does not reach the preset duration, it is indicated that the message forwarding threshold is not calculated yet, and the message forwarding threshold at this time is the forwarding threshold preset at the beginning.
Referring to fig. 2, in one embodiment, the step S140 of forwarding a message in the message buffer queue by no more than the message forwarding threshold, and deleting the forwarded message from the message buffer queue until the message in the message buffer queue is completely forwarded includes:
s241: and forwarding the messages which do not exceed the message forwarding threshold in the message cache queue, and deleting the forwarded messages from the message cache queue.
S242: and judging whether the message buffer queue is empty or not.
If not, returning to the step of forwarding the messages which do not exceed the message forwarding threshold in the message cache queue and deleting the forwarded messages from the message cache queue.
If yes, go to step S243:
s243: and determining that the message in the message buffer queue is completely forwarded.
When the messages in the message cache queue are forwarded, in order to avoid the condition that the quantity of the forwarded messages is too large to cause the base station to go down suddenly, the messages which do not exceed the message forwarding threshold in the message cache queue are forwarded, and the forwarded messages are deleted from the message cache queue, so that the space is saved. Then, whether the forwarding of the messages in the message cache queue is completed or not needs to be judged, that is, whether the message cache queue is empty or not is judged, if not, it indicates that the messages in the message cache queue are not forwarded, at this time, the forwarding of the messages is returned to the step of deleting the messages which do not exceed the message forwarding threshold from the message cache queue, the forwarding of the messages is continued, and if the message cache queue is empty, it indicates that all the messages in the message cache queue are completely forwarded, and the completion of the forwarding of the messages in the message cache queue can be determined.
In one embodiment, the step S241 of forwarding the message in the message buffer queue by no more than the message forwarding threshold, and deleting the forwarded message from the message buffer queue includes: when the number of the messages in the message cache queue is larger than or equal to the message forwarding threshold, forwarding the messages in the message cache queue by the message forwarding threshold, and deleting the forwarded messages from the message cache queue; and when the number of the messages in the message cache queue is smaller than the message forwarding threshold, forwarding the rest messages in the message cache queue, and deleting the forwarded messages from the message cache queue.
Because the number of the remaining messages in the message cache queue changes along with the forwarding of the base station, in order to improve the forwarding efficiency, the number of the remaining messages in the message cache queue needs to be compared with a message forwarding threshold when the forwarding is performed, and when the number of the messages in the message cache queue is greater than or equal to the message forwarding threshold, the messages in the message cache queue are forwarded by the message forwarding threshold, so that the messages are forwarded to the maximum extent, and the forwarding efficiency is improved. However, when the number of messages in the message buffer queue is smaller than the message forwarding threshold, it indicates that the number of remaining messages in the message buffer queue is less than the message forwarding threshold, and at this time, it only needs to forward all the remaining messages in the message buffer queue.
In one embodiment, the step of detecting whether the current recording time length reaches the preset time length includes: and detecting whether the time length recorded by the preset timer reaches the preset time length.
When the time length recorded by the preset timer reaches the preset time length, namely the current recording time length reaches the preset time length, the uplink message can be detected whether to arrive or not subsequently. And when the time length recorded by the preset timer does not reach the preset time length, namely the current recording time length does not reach the preset time length, continuing to wait until the time length recorded by the preset timer reaches the preset time length.
That is, in this embodiment, the duration is recorded by using a preset timer, so that the duration is conveniently recorded, the current recording duration is the duration currently recorded by the preset timer, and when the duration recorded by the preset timer reaches the preset duration, it indicates that the current recording duration reaches the preset duration, and at this time, it may be detected whether an uplink packet arrives.
In this embodiment, when the duration recorded by the preset timer reaches the preset duration, the method further includes the steps of: and resetting the preset timer.
That is, when the duration recorded by the preset timer reaches the preset duration (that is, the current recorded duration reaches the preset duration), it indicates that the interval duration of the detected packet has arrived, and performs packet detection, that is, detects whether a packet has arrived, and at the same time, can perform preparation for next packet detection, that is, the interval duration of the next packet detection needs to be recorded, so that, when the duration recorded by the preset timer reaches the preset duration, the preset timer needs to be reset to prepare for next packet detection. It can be understood that whether the time length recorded by the preset timer reaches the preset time length is detected, if so, the preset timer is reset, and the step of detecting whether the uplink message reaches is performed.
In one embodiment, the step of obtaining the message forwarding threshold in unit time according to the total number of the messages in the uplink message buffer queue and the preset cycle duration includes:
and dividing the total number of the messages in the uplink message cache queue by the preset period duration to obtain the message forwarding threshold.
The procedure of the above-mentioned uplink burst mitigation method for a base station is specifically described in an embodiment below.
An Access base station in a communication network, which functions to process air interface and network Data exchange and forwarding, for example, when a terminal communicates with another terminal, Data transmitted by the terminal is forwarded through the base station, taking the TDD-LTE (Time Division duplex-Long Term Evolution) base station in fig. 3 as an example, Data transmission processing of the Access base station generally relates to main protocols such as MAC (Media Access Control), RLC (Radio Link Control, Radio Link Control in a wireless communication system), PDCP (Packet Data Convergence Protocol), GTP (GPRS tunneling Protocol, GPRS is a general Packet Radio service), and the like, where GTP layer Data form network Data transmission and Protocol Data processing such as PDCP inside the base station, and a Protocol structure related to a Data flow in the TDD-LTE base station (LTE base station in fig. 3) is shown in fig. 3, as can be seen from the protocol structure shown in fig. 3, traffic shaping of an uplink data packet in user data is not involved between protocols, and an uplink packet burst is easily generated to cause a downlink packet burst. Subsequently, an uplink balanced forwarding module is added to the protocol structure in fig. 3, as shown in fig. 4, the uplink balanced forwarding module is used for traffic shaping, that is, traffic and burst of the network are limited by using a traffic shaping technology. In the existing traffic shaping technology, the most commonly used technical scheme is based on a timing and quantitative forwarding strategy such as a buffer area, a token bucket and the like, the core of the method is to directly control the forwarding rate of a data packet, when a large number of data packets to be forwarded exist, a cache delay sending strategy is adopted, and when the bandwidth is available or the number of messages in the buffer area does not exceed a threshold, the messages are sent out. The method can obtain a certain effect in a certain scene, but the aim of controlling the forwarding rate of the method is that in a TCP transmission downloading case, the problem that downlink TCP data message bursts are caused by uplink TCP response message bursts is difficult to solve, because the uplink bursts occur in a base station, but downlink burst packet loss caused by the uplink bursts occurs in hundred megabyte network transmission equipment, in addition, the situations of the uplink TCP response message bursts of different terminals are different (the same downlink rate and the uplink rates corresponding to different terminals are different), and the problem that the uplink TCP response message bursts of all terminals are difficult to control by restricting the uplink message forwarding rate to cause the downlink TCP data message bursts is difficult to solve. That is, the situation of downlink burst caused by uplink burst is alleviated to a certain extent, but the traffic shaping of the uplink balanced forwarding module is based on the idea of "strict message forwarding rate", the forwarding effect is not good, and certain limitations are provided.
Specifically, the TDD-LTE base station system mainly involves the following processing:
1. GTP protocol related processing: the GTP receives network side data, adds corresponding header information based on an IP data packet of the terminal, packs the data and sends the packed data to the network, and the terminal receiving the data receives the data forwarded by the base station from the network to realize data transmission between the terminals. And in the same reverse direction, the base station receives data from the network, eliminates the corresponding head information of GTP and transmits the head information to the PDCP protocol layer.
2. PDCP protocol related processing: the PDCP protocol layer belongs to a second layer of the radio interface protocol stack and processes radio resource management (RRC) messages of the control plane and Internet Protocol (IP) packets of the user plane. On the user plane, the PDCP sublayer obtains IP data packets from the upper layers, may perform header compression and ciphering on the IP data packets, and then delivers to the RLC sublayer. In the same reverse direction, data from the RLC sublayer is received, and an Internet Protocol (IP) data packet of the user is restored and sent to the GTP protocol layer after header decompression and decryption.
3. The RLC protocol layer mainly performs functions of segmentation/concatenation, in-order delivery, etc. The MAC protocol layer mainly performs functions such as scheduling, Service Data Unit (SDU) multiplexing and demultiplexing, and the like. The PHY protocol is a physical layer protocol responsible for handling coding, modulation and demodulation, multi-antenna mapping, and other telecom physical layer functions. The physical layer serves the MAC layer in the form of a transport channel.
The above processing procedures involved in the TDD-LTE base station are all implemented strictly according to the protocol constraints, however, the TDD-LTE base station has the following disadvantages:
(1) the existing TDD-LTE base station uplink message scheduling and forwarding has a certain burstiness in time sequence according to a system frame format and an inherent frame format, and especially when a TDD-LTE terminal performs FTP (TCP transport protocol), a burst of an uplink TCP response message may cause a burst of a downlink TCP data message, thereby causing a bottleneck network node packet loss in hundred megabyte transmission.
(2) Some base stations have a traffic shaping scheme to relieve uplink bursts to a certain extent, but the preset thresholds of how many uplink messages can be forwarded in unit time are difficult to achieve universality, and the optimal preset thresholds of different test terminals/computers are different, so that the application has certain limitation. In addition, the idea of 'strictly controlling the message forwarding rate' in the traditional traffic shaping is that in a download service based on a TCP transmission protocol, it is also difficult to achieve universality to the syndrome of the burst of the uplink TCP response message, i.e. the universality is poor.
However, the method for mitigating uplink burst of the base station provided in this embodiment can effectively mitigate the problem of downlink burst caused by uplink burst, and the specific process is as follows:
firstly, a preset timer is set, the processing of the buffer messages is started periodically, including forwarding or buffering, whether the time length recorded by the preset timer reaches the preset time length or not is detected, when the time length recorded by the preset timer reaches the preset time length, whether a new uplink message reaches the base station or not is detected, the preset timer is reset, and otherwise, the processing is continued until the time length recorded by the preset timer reaches the preset time length.
And when detecting that a new uplink message arrives, storing the new uplink message which arrives into an uplink message buffer queue.
And then, dividing the total number of the messages in the uplink message cache queue by the preset period duration to obtain a message forwarding threshold and obtain the message forwarding threshold in unit time.
And finally, forwarding the messages which do not exceed the message forwarding threshold in the message cache queue, and deleting the forwarded messages from the message cache queue until the messages in the message cache queue are completely forwarded. Specifically, the messages not exceeding the message forwarding threshold in the message cache queue are forwarded to the network, and the terminal receiving the messages receives the messages forwarded by the base station from the network, so that data communication can be realized.
The method for alleviating uplink burst of the base station, which is provided by the above, transmits the received messages stored in the message buffer queue to the network for transmission at a relatively uniform rhythm in the control period (within the preset period duration), does not need to set a threshold in advance, and forwards the messages according to the preset threshold, but automatically adjusts the sending threshold (message forwarding threshold) according to the total number of the uplink messages uploaded and the control period, thereby alleviating the influence of the time division multiplexing inherent frame of the TDD system on uplink accumulation sending of the access network Forwarding is carried out, and universality is good.
Referring to fig. 5, the present invention provides a base station uplink burst mitigation apparatus, including:
a message detection module 510, configured to detect whether an uplink message arrives when the current recording duration reaches a preset duration.
And the buffer module 520 is configured to, when the detection result of the message detection module is yes, store the arriving uplink message in the uplink message buffer queue.
A threshold obtaining module 530, configured to obtain a message forwarding threshold in unit time according to the total number of messages in the uplink message buffer queue and a preset period duration.
The forwarding module 540 is configured to forward a message that does not exceed the message forwarding threshold in the message cache queue, and delete the forwarded message from the message cache queue until the message in the message cache queue is completely forwarded.
In one embodiment, the apparatus for mitigating uplink burst at a base station further includes:
and the time length detection module is used for detecting whether the current recording time length reaches the preset time length, and if so, entering the message detection module to execute detection to detect whether an uplink message arrives.
According to the base station uplink burst relieving device, the message forwarding threshold in unit time is obtained according to the total number of the messages in the uplink message cache queue and the preset period duration, then the messages which do not exceed the message forwarding threshold in the message cache queue are forwarded, and the forwarded messages are deleted from the message cache queue until the messages in the message cache queue are completely forwarded. The message forwarding threshold is determined by the total number of messages in the uplink message buffer queue example and the preset period duration, namely, the message forwarding threshold changes along with the change of the total number of messages in the uplink message buffer queue, namely, the message forwarding threshold is dynamically adjustable, and on the basis of the message forwarding threshold, when the message forwarding threshold is forwarded each time, the message forwarding threshold is not exceeded by the number of messages, so that the maximum message forwarding can be realized, and the message balanced scheduling forwarding can be performed to relieve the burst of the uplink message, thereby relieving the burst of the downlink message and avoiding the occurrence of a packet loss phenomenon.
Referring to fig. 6, in one embodiment, the forwarding module 540 includes:
the message forwarding module 641 is configured to forward a number of messages in the message cache queue that does not exceed a message forwarding threshold, and delete the forwarded messages from the message cache queue.
The determining module 642 is configured to determine whether the packet buffer queue is empty.
A determining module 643, configured to, when the determination result of the determining module is negative, return to the message forwarding module to forward the message in the message cache queue by no more than the message forwarding threshold, and delete the forwarded message from the message cache queue. And when the judgment result of the judgment module is yes, determining that the message in the message cache queue is completely forwarded.
In one embodiment, the message forwarding module 641 is further configured to forward a number of messages in the message cache queue by the threshold when the number of messages in the message cache queue is greater than or equal to the message forwarding threshold, and delete the forwarded message from the message cache queue; and when the number of the messages in the message cache queue is smaller than the message forwarding threshold, forwarding the rest messages in the message cache queue, and deleting the forwarded messages from the message cache queue.
In one embodiment, the duration detecting module is further configured to detect whether a duration recorded by the preset timer reaches a preset duration.
When the time length recorded by the preset timer reaches the preset time length, namely the current recording time length reaches the preset time length, the uplink message can be detected whether to arrive or not subsequently. And when the time length recorded by the preset timer does not reach the preset time length, namely the current recording time length does not reach the preset time length, continuing to wait until the time length recorded by the preset timer reaches the preset time length. In this embodiment, the apparatus for mitigating uplink burst at a base station further includes: and the zero clearing module is used for clearing the preset timer when the time length recorded by the preset timer reaches the preset time length.
In one embodiment, the threshold obtaining module 530 is configured to divide the total number of the messages in the uplink message buffer queue by the preset period duration to obtain the message forwarding threshold.
Since the uplink burst mitigation device of the base station is a device for executing the uplink burst mitigation method of the base station, and the specific detailed features thereof are in one-to-one correspondence, further description is omitted here.
The present invention also provides a computer storage medium of an embodiment, on which a computer program is stored, which, when executed by a processor, implements the steps of the above-described method for base station uplink burst mitigation.
The present invention further provides a computer device of an embodiment, including a memory, a processor, and a computer program stored on the memory and executable on the processor, where the processor implements the method for mitigating uplink burst of the base station when executing the computer program.
The technical features of the above embodiments can be arbitrarily combined, and for the sake of brevity, all possible combinations of the technical features in the above embodiments are not described, but should be considered as the scope of the present specification as long as there is no contradiction between the combinations of the technical features.
The above examples only show some embodiments of the present invention, and the description thereof is more specific and detailed, but not construed as limiting the scope of the invention. It should be noted that, for a person skilled in the art, several variations and modifications can be made without departing from the inventive concept, which falls within the scope of the present invention. Therefore, the protection scope of the present patent shall be subject to the appended claims.