WO2017016300A1 - Method and apparatus for processing token application, computer storage medium - Google Patents

Method and apparatus for processing token application, computer storage medium Download PDF

Info

Publication number
WO2017016300A1
WO2017016300A1 PCT/CN2016/083507 CN2016083507W WO2017016300A1 WO 2017016300 A1 WO2017016300 A1 WO 2017016300A1 CN 2016083507 W CN2016083507 W CN 2016083507W WO 2017016300 A1 WO2017016300 A1 WO 2017016300A1
Authority
WO
WIPO (PCT)
Prior art keywords
application
request
token
sent
flow queue
Prior art date
Application number
PCT/CN2016/083507
Other languages
French (fr)
Chinese (zh)
Inventor
张锐
Original Assignee
深圳市中兴微电子技术有限公司
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 深圳市中兴微电子技术有限公司 filed Critical 深圳市中兴微电子技术有限公司
Publication of WO2017016300A1 publication Critical patent/WO2017016300A1/en

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L47/00Traffic control in data switching networks
    • H04L47/10Flow control; Congestion control
    • H04L47/215Flow control; Congestion control using token-bucket

Definitions

  • the present invention relates to the field of communications, and in particular, to a token application processing method, apparatus, and computer storage medium.
  • the packet After the packet is forwarded to the packet, the packet is encapsulated into a cell and sent to the switching network for processing.
  • the end of the packet to the switching network is usually called the access end.
  • the cell After the cell is sent to the switching network, it is sent to the other end according to the carried destination information, and then reassembled into a packet and leaves the routing device.
  • This terminal is usually called the destination.
  • Whether the switching network works in a good state is an important factor to ensure the quality of service. When a large number of data exchanges between the access terminals and the destination end are performed on the switching network, how to avoid the network bandwidth and services caused by the congestion of the switching network The quality is reduced, which is an important function of the traffic management module of the switching network.
  • the traffic management module of the switching network needs to be divided into a plurality of flow queues according to the packet attributes, and the data is sent according to the size of the flow queue. command.
  • the application command includes an application token or a stop application token, and these commands are finally exchanged to the destination in the form of token request cells.
  • the destination end of the switching network delivers the tokens in an orderly manner according to the token application status and the priority attribute of the access end flow queue.
  • the access terminal obtains the token flow queue and can be dequeued. Otherwise, it continues to wait for authorization.
  • the real export capability of the end to effectively control the data traffic sent to the switching network, and determine the order of the flow queue services according to different priorities, can effectively achieve the purpose of avoiding congestion and improving service quality.
  • Some token applications occupy bandwidth due to other token requests, and cannot be sent in time. Therefore, the token cannot be delivered in time, which ultimately leads to a decline in service quality and performance.
  • the embodiments of the present invention are expected to provide a token application processing method, apparatus, and computer storage medium to solve the problem that the token application delay is large and the transmission congestion phenomenon is obvious.
  • a first aspect of the embodiments of the present invention provides a token application processing method, where the method includes:
  • the operation of adding the first identifier information to the sending sequence triggered by the application command is blocked;
  • the sending sequence is used to record the identifier information of each flow queue of the to-be-sent token application.
  • One of the identifiers in the sending sequence indicates that the flow queue corresponding to the identifier information has a pending token request.
  • the first identifier information is added to the sending sequence.
  • the method further includes:
  • the application request for controlling the token request is an application request of the last application command sent by the first flow queue.
  • the method further includes:
  • the method further includes:
  • the first identifier that is triggered by the application command is blocked. Information is added to the operation in the transmission sequence.
  • the method further includes:
  • tag information can be used to characterize whether the first identification information is located in the sending sequence
  • the method further includes:
  • the method further includes:
  • the request to be sent of each of the flow queues is sequentially executed according to the sequence in which the identification information of each flow queue enters the transmission sequence.
  • a second aspect of the embodiments of the present invention provides a token application processing apparatus, where the apparatus includes:
  • the determining unit is configured to: when receiving the application command of the first flow queue, determine whether the first identifier information of the first flow queue is included in the sending sequence;
  • a processing unit configured to: if the first identifier information is included in the sending sequence, masking an operation of adding the first identifier information to the sending sequence triggered by the application command;
  • the sending sequence is used to record identifier information of each flow queue of the token request to be sent;
  • the identifier information in the sending sequence indicates that the flow queue corresponding to the identifier information has a token request to be sent.
  • the processing unit is further configured to add the first identifier information to the sending sequence if the first identifier information is not included in the sending sequence.
  • the device further includes:
  • a recording unit configured to record an application request of a previous sent token request of the first flow queue
  • the first comparison unit is configured to compare whether the application request of the token request to be sent in the current flow queue is the same as the application request of the previous sent token request of the first flow queue;
  • the terminating unit is configured to terminate the first request if the application request of the token request to be sent in the current flow queue is the same as the application request of the previous sent token request of the first flow queue The sending of the token request to be sent this time in the flow queue.
  • the device further includes:
  • a recording unit configured to record an application request of a previous sent token request of the first flow queue
  • a second comparison unit configured to compare whether the application request in the application command of the first flow queue is the same as the application request of the previous sent token request
  • the processing unit is further configured to: if the application request in the application command of the first flow queue is the same as the application request of the previous sent token request, shielding the first application triggered by the application command The identification information is added to the operation in the transmission sequence.
  • the device further includes:
  • the control unit is configured to, when the token request of the first flow queue is sent based on the sending sequence, control an application request of the token request as an application request of the application command sent by the first flow queue last time.
  • the device further includes:
  • the rate limiting unit is configured to send a to-be-sent token request corresponding to the identifier information in the sending sequence according to the sending rate threshold.
  • the determining unit is configured to query the tag information, wherein the tag information can be used to indicate whether the first identifier information is located in the sending sequence; and based on the information content of the tag information, Whether the first identification information is located in the sending sequence.
  • the device further includes:
  • an updating unit configured to update the information content of the tag information based on whether the first identifier information is located in the sending sequence.
  • the device further includes:
  • a sending unit configured to enter the sending sequence according to the identification information of each of the flow queues In the order of sequence, the to-be-sent token requests of each of the flow queues are sequentially executed.
  • An embodiment of the present invention provides a computer storage medium, where the computer storage medium stores computer executable instructions, and the computer executable instructions are used to execute at least one of the token application processing methods.
  • the token application processing method and apparatus and the computer storage medium determine whether the first identification information of the first flow queue that sends the application command is located in the transmission sequence, and if the first identification information is already in the transmission sequence, the shielding is performed.
  • the first identification information is added to the operation in the transmission sequence. In this way, the identification information of the same flow queue can be prevented from being added to the transmission sequence again, thereby avoiding the formation of multiple repeated token requests to be sent, reducing the probability of sending duplicate token requests by the same flow queue and reducing the redundant token application and The bandwidth occupied by the redundant token request. In this way, it is possible to reduce the transmission delay and transmission congestion caused by the bandwidth request of the normal token application by the redundant token application.
  • FIG. 1 is a schematic flowchart of a token application processing method according to an embodiment of the present invention
  • FIG. 2 is a second schematic flowchart of a token application processing method according to an embodiment of the present invention.
  • FIG. 3A is a schematic diagram of a flow of repeated token application filtering according to an embodiment of the present invention.
  • FIG. 3B is a second schematic diagram of a flow of repeated token application filtering according to an embodiment of the present invention.
  • FIGS. 4A to 4E are schematic diagrams showing the structure of a token application processing apparatus according to an embodiment of the present invention.
  • FIG. 5 is a schematic structural diagram of another token application processing apparatus according to an embodiment of the present disclosure.
  • FIG. 6 is a third schematic flowchart of a token application processing method according to an embodiment of the present invention.
  • the token request needs to be sent.
  • the access terminal may send the application multiple times in a short period of time.
  • the action of the token can be sent once to achieve the purpose of applying for the token.
  • the transmission of the token will inevitably result in wasted bandwidth.
  • the flow queue of other application tokens must wait for the application of the flow queue to be sent before sending, which will result in The application delay is increased, so that the period of the token service is extended, which will inevitably lead to a decline in service quality.
  • the token application may have persistent congestion, which will result in the failure of many flow queue token requests to be communicated in time, resulting in a series of management failures.
  • the embodiment of the present invention provides a token application processing method.
  • a flow queue can be restricted to have only one pending token request at a time, that is, a flow queue can only send an order through an application command at a time.
  • Card application to avoid multiple duplicate token requests for the same stream queue. This can effectively reduce the total number of token applications in the switching network, avoid the flooding of token applications, and reduce the bandwidth occupied by duplicate token requests, thereby providing more bandwidth resources to send non-repeating token requests.
  • the problem of flooding and delay of token application is solved once.
  • the destination can also avoid the processing of duplicate token requests, which can improve the processing efficiency of token applications.
  • this embodiment provides a token application processing method, where the method includes:
  • Step S110 When receiving the application command of the first flow queue, determine whether the transmission sequence is Include first identification information of the first flow queue;
  • Step S120 If the first identifier information is included in the sending sequence, the operation of adding the first identifier information to the sending sequence triggered by the application command is blocked;
  • the sending sequence is used to record identifier information of each flow queue of the token request to be sent;
  • the identifier information in the sending sequence indicates that the flow queue corresponding to the identifier information has a token request to be sent.
  • the first flow queue does not specifically refer to a certain flow queue, but refers to any one of all flow pairs.
  • the first identifier information is an identifier of the first flow queue, and specifically may be information such as a queue number or a queue name of the first flow queue that can distinguish the first flow queue.
  • the first identification information is information used to identify the first flow queue among the plurality of identification information of the sending sequence. When a token request is sent, the identification information of the flow queue corresponding to the token request in the sequence is deleted.
  • the sending sequence may be a first in first out (FIFO) queue, and the sending queue sequentially adds the identification information of the corresponding stream queue to the sending sequence according to the received application command.
  • the duplicate token application formed by repeatedly sending the application command is firstly performed in step S110 of the embodiment. It is determined whether the first identifier information of the first flow queue has been included in the sending queue. If the first identifier information is included in the sequence, the first flow queue is considered to have a token request to be sent, and the request to trigger the formed token application has a large probability that the duplicate token application is caused. Therefore, the step of masking the first identification information into the transmission sequence is masked in step S120.
  • step S110 when it is determined whether the sending sequence includes the first identifier information, the first identifier information may be compared with each identifier information in the sending sequence to be confirmed one by one.
  • the first identification information may be added again in the transmission sequence.
  • the first flow queue can only have one pending token request at a time, and only one token request is sent at a time when the pending token application is sent; this can greatly reduce the duplicate token request and avoid the token application.
  • the method further includes:
  • Step S130 If the first identifier information is not included in the sending sequence, add the first identifier information to the sending sequence.
  • the step S130 and the step S120 are parallel operation steps, and there is no certain order.
  • adding the first identifier information to the sending sequence so that by updating the sending sequence, the first stream queue may be assigned to form a to-be-sent token request and Send a token request opportunity.
  • each stream pair has an opportunity to send a token request to the target end, which improves the fairness of the token application process.
  • the rate and probability of response which can increase the communication rate, reduce information leakage, and improve communication quality.
  • the method further includes:
  • the application request for controlling the token request is an application request of the application command sent last time by the first flow queue.
  • the application request is included in each application command.
  • the application request generally includes two types of requesting a request token and requesting to stop the application token.
  • the application request of the token application is the application request in the last application command.
  • the application request for the application token is ON, and the application request for stopping the application token is OFF.
  • a flow queue continuously sends four application commands, and the application requests for the four application commands are ON-ON-ON-ON.
  • the application request of the token request is ON in the final application command.
  • the application request in the four application commands sent by the flow queue is ON-OFF-ON-OFF, etc., when the token request of the first flow queue is sent, the application request of the token application is OFF in the final application command. can.
  • the first flow queue forms 4 application commands. If the method according to the prior art is used, 4 token applications should be sent, so that there are 4 token requests of the first flow queue in the exchange network; and the 4 tokens The application is for 4 duplicate token requests or two or two invalid token requests.
  • the number of tokens is first reduced, and secondly, the congestion and bandwidth occupation caused by the duplicate token application, the invalid token application, and the interference to the destination end are reduced.
  • the method further includes:
  • Step S101 Record an application request of a previous sent token request of the first flow queue
  • Step S102 Compare whether the application request of the token application to be sent this time is the same as the application request of the previous sent token application;
  • Step S103 If the application request of the token application to be sent is the same as the application request of the previous sent token request, the sending of the token request triggered by the application command is terminated.
  • the two in this mode refer to the application request of the token application to be sent this time and the application request of the previous sent token request.
  • the method further includes:
  • Step S201 Record an application request of a previous sent token request of the flow queue
  • Step S202 Compare whether the application request in the application command of the first flow queue is the same as the application request of the previous sent token application
  • Step S203 If the application request in the application command of the first flow queue is the same as the application request of the previous sent token request, then the first identification information triggered by the application command is added to the Send the operation in the sequence.
  • the two in this mode refer to the application request in the application command of the first flow queue and the application request of the previous sent token application.
  • the token request that is sent to the same destination and the application request is the same is also filtered, and the record of the application request of the previous token application is also passed, and this time
  • the comparison of application requests for application orders avoids repeated transmissions to reduce redundant token requests again.
  • the application request is ON.
  • the application request of the first flow queue is received again, and the application command also indicates that the application request is ON to the target A. brand.
  • you respond directly it will also result in a duplicate token request.
  • the application timing of the foregoing first mode and the second mode in this embodiment is when the previous sent token request has not received the destination end response. If the previous token request has been responded and the first stream queue data is being sent or sent, this time is equivalent to re-applying the token again and will not form a duplicate token request.
  • each time a flow queue sends a token application command the application request sent this time is recorded, and the queue is stored for storage.
  • the distinguishing queue storage can be understood as requesting for different flow queues and storing separately.
  • the application request of the flow queue A and the application request of the flow queue B are separately stored.
  • an area is allocated from the RAM for storing the application request of the flow queue A, and another area is used for storing the application of the flow queue B. begging.
  • the application request sent last time needs to be read first, and compared with the application request to be sent this time. If it is found that the application request sent twice is the same, then this time is considered The token application is unnecessary.
  • the token application sent by the application command is filtered out, or the token request formation and sending operation triggered by the token application is blocked.
  • the method is further improved, in order to avoid the one-time sending of too many token applications, causing congestion.
  • the method further includes:
  • the transmission rate here can be understood as the rate at which the number of token requests is sent, and can also be understood as the transmission rate of the data amount. If the transmission rate is the rate of the number of token requests, the transmission restriction control is performed by counting the number of transmissions and the number of transmissions of the token request. If the data rate is sent, it may be necessary to calculate the number of token requests and each data amount to limit the transmission rate.
  • the step S110 may further include:
  • identifier information can be used to identify whether the first identifier information is located in the sending sequence
  • a method for determining whether the first identification information is located in the transmission sequence is provided.
  • one tag information is set for each of the stream queues; the tag information may correspond to one or more tag bits, and the value of the tag bit is the information content.
  • the transmission sequence may be considered to include the identification information of the flow queue C. Otherwise, the identification information of the flow queue C is not included in the transmission sequence. Avoiding the first identification information and each marking information in the transmission sequence by setting the marking information The comparison is performed one by one, so that the judgment efficiency of step S110 can be improved.
  • the method further comprises updating the information content of the tag information based on whether the first identification information is located in the transmission sequence.
  • the identifier information is removed from the sending sequence, and the subsequent operations are facilitated accordingly, and the marking information is also updated accordingly.
  • the marking information is also updated, so that the marking confidence is updated to indicate that the first identification information is included in the sending sequence.
  • the sending sequence may be selected as a FIFO sequence.
  • the processing device when the processing device forms and sends the token request, the processing device performs the order according to the sending order of the application commands of the respective flow queues, so that the order can be performed. management. Therefore, the method further includes: performing the to-be-sent token application of the flow queue in sequence according to the sequence of the identification information of each of the flow queues entering the sending sequence.
  • the current device includes three flow queues, which are Q1, Q2, and Q3 respectively. If the order of four application commands sent by the three flow queues is Q2, Q1, Q1, and Q3, the information is sorted in the sending sequence. In turn, Q2, Q1, and Q3; the order in which token requests are sent is Q2, Q1, and Q3.
  • the present embodiment provides a token application method, which can reduce redundant token applications, reduce congestion caused by redundant token applications, improve response rate and processing efficiency of token applications, and improve communication service quality.
  • the embodiment provides a token application processing apparatus, and the apparatus includes:
  • the determining unit 110 is configured to: when receiving the application command of the first flow queue, determine whether the first identification information of the first flow queue is included in the sending sequence;
  • the processing unit 120 is configured to: if the first identification information is included in the sending sequence, the screen And an operation of adding the first identification information to the sending sequence triggered by the application command;
  • the sending sequence is used to record identifier information of each flow queue of the token request to be sent;
  • the identifier information in the sending sequence indicates that the flow queue corresponding to the identifier information has a token request to be sent.
  • the specific structure of the determining unit 110 and the processing unit 120 may include a processor or a processing circuit.
  • the processing circuit can include an application specific integrated circuit ASIC.
  • the processor may include processing results such as an application processor AP, a central processing unit CPU, a microprocessor MCU, a digital signal processor DSP, or a programmable array PLC.
  • the processor is coupled to the storage medium via an internal communication bus.
  • the processor executable instructions are stored on the storage medium, and the processor reads and executes the executable instructions, and the functions of the determining unit 110 and the processing unit 120 can be respectively implemented.
  • the transmit sequence can be a FIFO queue.
  • the same flow queue can be effectively prevented from repeatedly forming multiple identical token requests in a short period of time, thereby reducing
  • the redundant token application saves the bandwidth resources occupied by the redundant token application and improves the response rate and communication service quality.
  • the processing unit 120 is further configured to add the first identifier information to the sending sequence if the first identifier information is not included in the sending sequence.
  • the first identifier information is added to the sending sequence, so that the fairness of sending the token request by each stream queue is improved. It avoids the problem that some flow queues can not preempt the corresponding resources and cannot send token requests or the transmission probability is small and timely.
  • the apparatus is further improved, and the following two structures are further improved.
  • the device further includes:
  • the recording unit 131 is configured to record an application request of the previous sent token request of the first flow queue
  • the first comparison unit 132 is configured to compare whether the application request of the token application to be sent this time is the same as the application request of the previous sent token request;
  • the termination unit 133 is configured to terminate the token request to be sent if the application request of the token request to be sent in the first flow queue is the same as the application request of the previous sent token request. Send.
  • the recording unit 131 may include a storage medium, which may be a storage medium such as a RAM or a flash memory, configured to store an application request for a previous sent token request.
  • a storage medium such as a RAM or a flash memory
  • the first comparison unit 132 can include a processor or processing circuitry.
  • the processing circuit can include a comparator. By comparing the two application requests, it is determined whether the application request of the two previous sent token requests is the same as the request request of the token request to be sent this time. If the same, if the sending operation continues, the redundancy will be caused.
  • the token application in this embodiment, is further provided that the termination unit will terminate the transmission of the token request.
  • the structure corresponding to the termination unit may also be a processor or a processing circuit.
  • the device further includes:
  • the recording unit 131 is configured to record an application request of the previous sent token request of the first flow queue
  • the second comparison unit 141 is configured to compare whether the application request in the application command of the first flow queue is the same as the application request of the previous sent token request;
  • the processing unit 120 is further configured to: if the application request in the application command of the first flow queue is the same as the application request of the previous sent token request of the first flow queue, An operation of adding the first identification information to the transmission sequence triggered by an application command.
  • the structure of the recording unit 131 can be as shown in the structure of the recording unit, and can also include various kinds of the storage medium.
  • the structure of the second comparing unit is similar to that of the first comparing unit, but the compared parameters are different.
  • two inputs of the second comparing unit one for the previous sent token application Request for application, another request for this application.
  • the process 120 will determine, based on the comparison, that when the two input application requests are the same, the first identification information is not added again in the transmission sequence, and the transmission of the redundant token application can also be reduced.
  • the device further includes:
  • the control unit 150 is configured to, when transmitting the token request of the first flow queue based on the sending sequence, control an application request of the token request as an application request of the last application request.
  • the specific structure of the control unit 150 may include a processor.
  • the application request of the token application is subject to the last application command, that is, the The application request for the token application is the application request for the last token application. This can more accurately reflect the current needs of the flow queue.
  • the device further includes:
  • the rate limiting unit 151 is configured to send a to-be-sent token request corresponding to the identifier information in the sending sequence according to the sending rate threshold.
  • the specific structure of the rate limiting unit 151 may include an information processing structure such as a communication interface and a counter, and can generally limit the sending rate of the token request, avoid congestion caused by too many token application transmissions, and ultimately result in an overall transmission rate. Low problem.
  • the determining unit 110 is configured to query whether the first identifier information is located in the sending sequence, and the marking information is based on the marking information.
  • the information content determines whether the first identification information is located in the sending sequence.
  • the determining unit 110 determines whether the transmission sequence includes the first identification information according to the marking information, so that the determination speed is fast and the determining step is simple.
  • the apparatus further includes: an updating unit, configured to update the information content of the tag information based on whether the first identification information is located in the sending sequence .
  • the structure of the update unit may include a processor or processing circuit and a storage medium, and the processor or processing circuit may be used to update identification information in the storage medium.
  • the device further includes:
  • the sending unit 152 is configured to sequentially execute the to-be-sent token request of each of the flow queues according to the sequence of the identification information of each of the flow queues entering the sending sequence.
  • the sending unit 152 may include a communication interface, where the communication interface is used to send the token request, but the sending order of the token request is consistent with the sending order of the identifier information in the sending sequence.
  • the transmission sequence is a FIFO sequence. If the identification information of a flow queue first enters the transmission sequence, the corresponding to-be-sent token request will be sent preferentially.
  • the embodiment provides a token application processing device, which can be used as a hardware device for implementing the token application processing method in the foregoing method embodiment, and has the same redundancy for reducing the token application in the switching network, thereby saving
  • the bandwidth resource of the redundant token application can realize the transmission and processing of the token application more fairly and more efficiently, and improve the communication service instruction and efficiency.
  • the present example provides a token request processing apparatus, and the apparatus includes at least a flow queue filtering module 301, a flow queue state filtering module 302, and a sending shaping module 303.
  • the flow queue filtering module 301 can be used to maintain a sending sequence and an application request form. Said hair In the sending sequence, according to the application command received from the pre-stage module 304, the identifier information of the flow queue for sending the application command is stored, and the identifier information may be a queue number or the like. The transmission sequence does not repeatedly store identification information of the same flow queue.
  • the application request form is stored as an application request for the last application request of the same flow queue.
  • the flow queue filtering module 301 herein may be a composition result of the foregoing determining unit 110.
  • the flow queue state filtering module 302 can be used to maintain a token status sending table.
  • the token status sending table stores an application request for the last time the token request has been sent by each stream queue.
  • the flow queue state filtering module 302 in this example may correspond to the recording unit, the first comparison unit, and the termination unit in the foregoing embodiment; or correspond to the recording unit, the second ratio comparison unit, and the processing unit in the foregoing embodiments.
  • the sending and shaping module 303 is configured to limit the sending rate of the token request, avoid the congestion caused by the excessive number of sent or the excessive number of token applications, and also send the token request to the suffix module.
  • the transmit shaping module 303 in this example may be an integral part of the aforementioned transmitting unit.
  • the pre-stage module 304 and the post-stage module 305 are provided for describing the present example device, and are not limiting to implement the technical solution of the present invention.
  • the location of the flow queue filter module 301 and the flow queue state filtering module 302 may be reversed, or the flow queue state filtering module 302 may not need to be used in a loose application scenario such as rich bandwidth resources.
  • This example is based on the token request processing apparatus shown in FIG. 5, and provides a token request processing method.
  • the method described in this example includes:
  • Step 210 The flow queue filtering module 301 receives the application command, and stores the application request queue in the application command in the application request form.
  • the current device forms three flow queues, which are Q1, Q2, and Q3, respectively.
  • the front-end module 304 sends Q1-ON, Q2-OFF, Q3-ON, Q2-ON, and Q1-OFF information in a short period of time. You can use a piece of RAM to store this information in a queue.
  • the access address of the RAM is the queue number of Q1, Q2, and Q3, and the application request such as ON or OFF is written.
  • the queue number here is equivalent to the aforementioned identification information or identification information.
  • ON indicates the application token
  • OFF indicates the stop token request. Multiple application requests for the same flow queue, subsequent application requests overwrite the previous values. Then the state stored in the final RAM during this period is: address Q1 is OFF, address Q2 is ON, and address Q3 is ON.
  • Step 220 The flow queue filtering module 301 uses a FIFO to implement the function of sending sequence queuing, and stores the queue number of the flow queue that sends the request request in the FIFO for transmission. At this time, it is necessary to judge whether a queue has been waiting for transmission in the FIFO by a tag. If it is already in the FIFO, it is not necessary to join the FIFO again, otherwise it is added to the FIFO and waits for transmission. This tag is one of the aforementioned tag information.
  • the specific operation is as follows: When a flow queue generates an application command and is ready to be sent to the destination end of the switching network, the queue number of the flow queue needs to exist in a FIFO, but before being stored in the FIFO, the flow queue needs to be read first.
  • the tag is used to determine whether the queue number of the stream queue has been written into the FIFO. When the flag is 1, the current queue is already in the FIFO, and the other 0 is not in the FIFO.
  • the tag is stored in a RAM, which is called a queue filter table, and its read/write address can correspond to the queue number of each stream queue.
  • the identifier of the read stream queue is 1, it indicates that the stream queue number has been written into the FIFO and does not need to be written again; if the read stream queue identifier is 0, it indicates that the stream queue number is not in the FIFO.
  • the queue number of the flow queue needs to be written into the FIFO to wait for the token request to be sent, and the identifier corresponding to the queue is set to 1, in case the queue number is written to the FIFO again.
  • the identifier of the flow queue needs to be set to 0, indicating that the queue has been read from the FIFO and allowed to be written again.
  • the current device forms three flow queues, which are Q1, Q2, and Q3.
  • the application command received by the flow queue filtering module 301 is: Q1-ON, Q2-OFF, Q3-ON, Q2-ON, Q1-OFF, etc., assuming that the queue number of Q1, Q2, and Q3 is not stored in the transmission sequence FIFO, then The first three transmissions will write Q1, Q2, and Q3 to the FIFO in turn, and will be If the identifier is set to 1, then the next two Q2 and Q1 will not be written into the FIFO again, thus achieving the purpose of filtering out the next two transmissions.
  • the queue number ranked first in the sending queue is taken out, then the application request stored in the application request table is read, the latest application request is taken out to form a token request, and the token is sent.
  • Application
  • Step 230 The flow queue sending status filtering module maintains a token request request sending table, and each time the token request is sent, the latest sent token request application request is updated to the token request request sending table.
  • the token request request sending table is queried according to the queue number in the sending sequence, and the request for the token request sent by the flow queue is determined, and the token application is the same.
  • the application request is compared with the application request of the previous token application, and if the two are the same, the current transmission is terminated; otherwise, the token request is sent, and the token status sending table is updated based on the application request of the token application. in.
  • the subsequent module 305 After receiving the token request request of the queue, the subsequent module 305 finally encapsulates the information into a message to be sent to the exchange network.
  • Step 240 The sending shaping module 303 sets an shaping value according to the average processing rate of the switching network to limit the sending rate of the token request.
  • the specific implementation may include: setting a configurable transmission rate threshold, implemented by a counting device, allowing a token application to be sent once every time a certain time is counted, and restricting the first two levels of token application by flow control at other times Send rate.
  • the average processing rate corresponds to the foregoing sending rate threshold, and the sending rate threshold may be set in advance, or may be dynamically set according to a processing rate of the switching network.
  • the token application processing device is mainly composed of three parts, namely, a flow queue filtering, a flow queue state filtering module 302, and a transmission shaping module 303.
  • the token application processing device can achieve good results by the interaction and supplement of the above three modules. Due to the presence of the transmit shaping module 303, the transmission rate is limited. The large number of application commands frequently generated by the pre-stage module 304 need to be queued and sent in the flow queue filtering module 301. In the queuing process, the status of the same flow queue is reduced by avoiding repeated queuing transmission of the same queue.
  • the flow queue status filtering module 302 Detecting the same flow queue twice to send an application request, If the request is the same, you can block the sending of the next token request.
  • the embodiment of the present invention further provides a computer storage medium, where the computer storage medium stores computer executable instructions, and the computer executable instructions are used in at least one of the token application processing methods as described above, for example, FIG. At least one of the methods shown in FIG. 2, FIG. 3A, FIG. 3B, and FIG.
  • the computer storage medium may be a removable storage device, a read-only memory (ROM), a random access memory (RAM), a magnetic disk or an optical disk, and the like, which can store program code. Selected as a non-transient storage medium.
  • the disclosed apparatus and method may be implemented in other manners.
  • the device embodiments described above are merely illustrative.
  • the division of the unit is only a logical function division.
  • there may be another division manner such as: multiple units or components may be combined, or Can be integrated into another system, or some features can be ignored or not executed.
  • the coupling, or direct coupling, or communication connection of the components shown or discussed may be indirect coupling or communication connection through some interfaces, devices or units, and may be electrical, mechanical or other forms. of.
  • the units described above as separate components may or may not be physically separated, and the components displayed as the unit may or may not be physical units, that is, may be located in one place or distributed to multiple network units; Some or all of the units may be selected according to actual needs to achieve the purpose of the solution of the embodiment.
  • each functional unit in each embodiment of the present invention may be integrated into one processing module, or each unit may be separately used as one unit, or two or more units may be integrated into one unit; the above integration
  • the unit can be implemented in the form of hardware. It can also be implemented in the form of hardware plus software functional units.

Landscapes

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

Abstract

Disclosed in the present invention are a method and an apparatus for processing a token application, the method including: when receiving an application command from a first stream queue, determining whether first identifier information of the first stream queue is included in a transmission sequence; if the first identifier information is included in the transmission sequence, masking the operation, triggered by the application command, of adding the first identifier information into the transmission sequence, wherein the transmission sequence is used for recording the identifier information of each stream queue which is to transmit the token application, and one piece of the identifier information in the transmission sequence indicates one token application to be transmitted in the stream queue corresponding to the identifier information. Also disclosed in the embodiment of the present invention is computer storage medium.

Description

令牌申请处理方法、装置和计算机存储介质Token application processing method, device and computer storage medium 技术领域Technical field
本发明涉及通信领域,尤其涉及一种令牌申请处理方法、装置和计算机存储介质。The present invention relates to the field of communications, and in particular, to a token application processing method, apparatus, and computer storage medium.
背景技术Background technique
随着互联网的快速发展,人们对于网络也在不断的提出新的服务需求,网络带宽迅速增加。实现报文的高速转发处理的同时,人们对于网络连接的服务质量(Quality of Service,QoS)也越来越重视。With the rapid development of the Internet, people are constantly proposing new service demands for the network, and the network bandwidth is rapidly increasing. At the same time as the high-speed forwarding processing of packets, people pay more and more attention to the quality of service (QoS) of network connections.
对于路由设备,从用户网络侧接口输入的报文经过分组转发处理后,需要将报文封装成信元,发送到交换网上进行交换处理,发往交换网的一端我们通常称为接入端。信元发送到交换网后,根据携带的目的信息,被发送到另一端后,重新组装成报文,离开路由设备,这一端我们通常称为目的端。交换网能否工作在一个良好的状态是确保服务质量的一个重要因素,当众多接入端和目的端之间在交换网上进行大量的数据交换时,如何避免交换网拥塞导致的网络带宽和服务质量降低,是交换网流量管理模块的重要职能。After the packet is forwarded to the packet, the packet is encapsulated into a cell and sent to the switching network for processing. The end of the packet to the switching network is usually called the access end. After the cell is sent to the switching network, it is sent to the other end according to the carried destination information, and then reassembled into a packet and leaves the routing device. This terminal is usually called the destination. Whether the switching network works in a good state is an important factor to ensure the quality of service. When a large number of data exchanges between the access terminals and the destination end are performed on the switching network, how to avoid the network bandwidth and services caused by the congestion of the switching network The quality is reduced, which is an important function of the traffic management module of the switching network.
对于交换网的接入端,每当有数据报文需要上交换时,需要通过交换网流量管理模块按报文属性区分成众多的流队列进行管理,根据流队列的数据量大小合理的发出申请命令。所述申请命令包括申请令牌还是停止申请令牌,这些命令最终也以令牌申请信元的形式被交换到目的端。For the access end of the switching network, when there is a data packet to be exchanged, the traffic management module of the switching network needs to be divided into a plurality of flow queues according to the packet attributes, and the data is sent according to the size of the flow queue. command. The application command includes an application token or a stop application token, and these commands are finally exchanged to the destination in the form of token request cells.
交换网目的端根据接入端流队列的令牌申请情况和优先级属性有序的下发令牌,接入端得到令牌的流队列便可以出队,否则继续等待授权。通过这种交换网的接入端和目的端之间令牌申请和下发的机制,可以根据目 的端的真实出口能力来有效控制发送到交换网的数据流量,同时根据优先级的不同决定流队列服务的先后顺序,可以有效达到避免拥塞和提高服务质量的目的。The destination end of the switching network delivers the tokens in an orderly manner according to the token application status and the priority attribute of the access end flow queue. The access terminal obtains the token flow queue and can be dequeued. Otherwise, it continues to wait for authorization. Through the mechanism of token application and delivery between the access end and the destination end of the switching network, The real export capability of the end to effectively control the data traffic sent to the switching network, and determine the order of the flow queue services according to different priorities, can effectively achieve the purpose of avoiding congestion and improving service quality.
然而在进行令牌申请的过程中时常出现以下现象:However, the following phenomena often occur during the token application process:
第一:令牌申请泛滥,导致占用大量的带宽资源;First: the flood of token applications leads to a large amount of bandwidth resources;
第二:某些令牌申请因其他令牌申请占用了带宽,不能及时发送,从而不能及时得到令牌下发服务,最终导致服务质量和性能的下降。Second: Some token applications occupy bandwidth due to other token requests, and cannot be sent in time. Therefore, the token cannot be delivered in time, which ultimately leads to a decline in service quality and performance.
显然在现有技术中,如何对令牌申请进行更好的管控是提高服务质量、避免信息传输时延及减少信息传输拥堵的瓶颈之一。Obviously, in the prior art, how to better control the token application is one of the bottlenecks for improving the quality of service, avoiding information transmission delay and reducing information transmission congestion.
发明内容Summary of the invention
有鉴于此,本发明实施例期望提供一种令牌申请处理方法、装置和计算机存储介质,以解决令牌申请延时大及传输拥堵现象明显等问题。In view of this, the embodiments of the present invention are expected to provide a token application processing method, apparatus, and computer storage medium to solve the problem that the token application delay is large and the transmission congestion phenomenon is obvious.
本发明的技术方案是这样实现的:The technical solution of the present invention is implemented as follows:
本发明实施例第一方面提供一种令牌申请处理方法,所述方法包括:A first aspect of the embodiments of the present invention provides a token application processing method, where the method includes:
当接收到第一流队列的申请命令时,判断发送序列中是否包括所述第一流队列的第一标识信息;When the application request of the first flow queue is received, determining whether the first identifier information of the first flow queue is included in the sending sequence;
若所述发送序列中包括所述第一标识信息,则屏蔽所述申请命令触发的将所述第一标识信息添加到所述发送序列中的操作;If the first identifier information is included in the sending sequence, the operation of adding the first identifier information to the sending sequence triggered by the application command is blocked;
其中,所述发送序列,用于记录待发送令牌申请的各流队列的标识信息;所述发送序列中一个所述标识信息表明所述标识信息对应的流队列有一个待发送令牌申请。The sending sequence is used to record the identifier information of each flow queue of the to-be-sent token application. One of the identifiers in the sending sequence indicates that the flow queue corresponding to the identifier information has a pending token request.
基于上述方案,若所述发送序列中不包括所述第一标识信息,则将所述第一标识信息添加到所述发送序列中。Based on the foregoing solution, if the first identifier information is not included in the sending sequence, the first identifier information is added to the sending sequence.
基于上述方案,所述方法还包括: Based on the foregoing solution, the method further includes:
在基于所述发送序列发送所述第一流队列的令牌申请时,控制所述令牌申请的申请请求为所述第一流队列发送的最后一次所述申请命令的申请请求。When the token request of the first flow queue is sent based on the sending sequence, the application request for controlling the token request is an application request of the last application command sent by the first flow queue.
基于上述方案,所述方法还包括:Based on the foregoing solution, the method further includes:
记录所述第一流队列的前一个已发送令牌申请的申请请求;Recording an application request of a previous sent token request of the first flow queue;
比较本次所述第一流队列待发送的令牌申请的申请请求与所述前一个已发送令牌申请的申请请求是否相同;Comparing whether the application request of the token request to be sent in the first flow queue is the same as the application request of the previous sent token request;
若本次所述第一流队列待发送的令牌申请的申请请求与所述前一个已发送令牌申请的申请请求相同,则终止所述本次所述第一流队列待发送的令牌申请的发送。If the application request of the token request to be sent in the first flow queue is the same as the application request of the previous sent token request, the request for the token to be sent in the current flow queue is terminated. send.
基于上述方案,所述方法还包括:Based on the foregoing solution, the method further includes:
记录所述第一流队列的前一个已发送令牌申请的申请请求;Recording an application request of a previous sent token request of the first flow queue;
比较本次所述第一流队列的申请命令中的申请请求与所述第一流队列的前一个已发送令牌申请的申请请求是否相同;Comparing whether the application request in the application command of the first flow queue is the same as the application request of the previous sent token request of the first flow queue;
若本次所述第一流队列的申请命令中的申请请求与所述第一流队列的前一个已发送令牌申请的申请请求相同,则屏蔽本次所述申请命令触发的将所述第一标识信息添加到所述发送序列中的操作。If the application request in the application command of the first flow queue is the same as the application request of the previous sent token request in the first flow queue, the first identifier that is triggered by the application command is blocked. Information is added to the operation in the transmission sequence.
基于上述方案,所述方法还包括:Based on the foregoing solution, the method further includes:
依据发送速率阈值,发送所述发送序列中标识信息对应的待发送令牌申请。And sending, according to the sending rate threshold, a to-be-sent token request corresponding to the identifier information in the sending sequence.
基于上述方案,所述当接收到第一流队列的申请命令时,判断发送序列中是否包括所述第一流队列的第一标识信息,包括:And determining, according to the foregoing solution, that the first identifier information of the first flow queue is included in the sending sequence, when the request for the first flow queue is received, including:
查询标记信息,其中,所述标记信息能够用于表征所述第一标识信息是否位于所述发送序列中;Querying tag information, wherein the tag information can be used to characterize whether the first identification information is located in the sending sequence;
基于所述标记信息的信息内容,判断所述第一标识信息是否位于所述 发送序列中。Determining whether the first identification information is located in the information content based on the information content of the tag information In the send sequence.
基于上述方案,所述方法还包括:Based on the foregoing solution, the method further includes:
基于所述第一标识信息是否位于所述发送序列中,更新所述标记信息的信息内容。Updating the information content of the tag information based on whether the first identification information is located in the transmission sequence.
基于上述方案,所述方法还包括:Based on the foregoing solution, the method further includes:
按照各所述流队列的标识信息进入所述发送序列中的先后顺序,依次执行各所述流队列的待发送令牌申请。The request to be sent of each of the flow queues is sequentially executed according to the sequence in which the identification information of each flow queue enters the transmission sequence.
本发明实施例第二方面提供一种令牌申请处理装置,所述装置包括:A second aspect of the embodiments of the present invention provides a token application processing apparatus, where the apparatus includes:
判断单元,配置为当接收到第一流队列的申请命令时,判断发送序列中是否包括所述第一流队列的第一标识信息;The determining unit is configured to: when receiving the application command of the first flow queue, determine whether the first identifier information of the first flow queue is included in the sending sequence;
处理单元,配置为若所述发送序列中包括所述第一标识信息,则屏蔽所述申请命令触发的将所述第一标识信息添加到所述发送序列中的操作;a processing unit, configured to: if the first identifier information is included in the sending sequence, masking an operation of adding the first identifier information to the sending sequence triggered by the application command;
其中,所述发送序列,用于记录待发送令牌申请的各流队列的标识信息;The sending sequence is used to record identifier information of each flow queue of the token request to be sent;
所述发送序列中一个所述标识信息表明所述标识信息对应的流队列有一个待发送令牌申请。The identifier information in the sending sequence indicates that the flow queue corresponding to the identifier information has a token request to be sent.
基于上述方案,所述处理单元,还配置为若所述发送序列中不包括所述第一标识信息时,将所述第一标识信息添加到所述发送序列中。Based on the foregoing solution, the processing unit is further configured to add the first identifier information to the sending sequence if the first identifier information is not included in the sending sequence.
基于上述方案,所述装置还包括:Based on the above solution, the device further includes:
记录单元,配置为记录所述第一流队列的前一个已发送令牌申请的申请请求;a recording unit configured to record an application request of a previous sent token request of the first flow queue;
第一比较单元,配置为比较本次第一流队列待发送的令牌申请的申请请求与所述第一流队列的前一个已发送令牌申请的申请请求是否相同;The first comparison unit is configured to compare whether the application request of the token request to be sent in the current flow queue is the same as the application request of the previous sent token request of the first flow queue;
终止单元,配置为若本次第一流队列待发送的令牌申请的申请请求与所述第一流队列的前一个已发送令牌申请的申请请求相同,终止所述第一 流队列的本次待发送的令牌申请的发送。The terminating unit is configured to terminate the first request if the application request of the token request to be sent in the current flow queue is the same as the application request of the previous sent token request of the first flow queue The sending of the token request to be sent this time in the flow queue.
基于上述方案,所述装置还包括:Based on the above solution, the device further includes:
记录单元,配置为记录所述第一流队列的前一个已发送令牌申请的申请请求;a recording unit configured to record an application request of a previous sent token request of the first flow queue;
第二比较单元,配置为比较本次所述第一流队列的申请命令中的申请请求与前一个已发送令牌申请的申请请求是否相同;a second comparison unit, configured to compare whether the application request in the application command of the first flow queue is the same as the application request of the previous sent token request;
所述处理单元,还配置为若本次所述第一流队列的申请命令中的申请请求与前一个已发送令牌申请的申请请求相同,屏蔽本次所述申请命令触发的将所述第一标识信息添加到所述发送序列中的操作。The processing unit is further configured to: if the application request in the application command of the first flow queue is the same as the application request of the previous sent token request, shielding the first application triggered by the application command The identification information is added to the operation in the transmission sequence.
基于上述方案,所述装置还包括:Based on the above solution, the device further includes:
控制单元,配置为在基于所述发送序列发送所述第一流队列的令牌申请时,控制所述令牌申请的申请请求为所述第一流队列最后一次发送的所述申请命令的申请请求。The control unit is configured to, when the token request of the first flow queue is sent based on the sending sequence, control an application request of the token request as an application request of the application command sent by the first flow queue last time.
基于上述方案,所述装置还包括:Based on the above solution, the device further includes:
限速单元,配置为依据发送速率阈值,发送所述发送序列中标识信息对应的待发送令牌申请。The rate limiting unit is configured to send a to-be-sent token request corresponding to the identifier information in the sending sequence according to the sending rate threshold.
基于上述方案,所述判断单元,配置为查询标记信息,其中,所述标记信息能够用于表征所述第一标识信息是否位于所述发送序列中;及基于所述标记信息的信息内容,判断所述第一标识信息是否位于所述发送序列中。The determining unit is configured to query the tag information, wherein the tag information can be used to indicate whether the first identifier information is located in the sending sequence; and based on the information content of the tag information, Whether the first identification information is located in the sending sequence.
基于上述方案,所述装置还包括:Based on the above solution, the device further includes:
更新单元,配置为基于所述第一标识信息是否位于所述发送序列中,更新所述标记信息的信息内容。And an updating unit configured to update the information content of the tag information based on whether the first identifier information is located in the sending sequence.
基于上述方案,所述装置还包括:Based on the above solution, the device further includes:
发送单元,配置为按照各所述流队列的标识信息进入所述发送序列中 的先后顺序,依次执行各所述流队列的待发送令牌申请。a sending unit, configured to enter the sending sequence according to the identification information of each of the flow queues In the order of sequence, the to-be-sent token requests of each of the flow queues are sequentially executed.
本发明实施例提供了一种计算机存储介质,所述计算机存储介质中存储有计算机可执行指令,所述计算机可执行指令用于执行上述令牌申请处理方法的至少其中之一。An embodiment of the present invention provides a computer storage medium, where the computer storage medium stores computer executable instructions, and the computer executable instructions are used to execute at least one of the token application processing methods.
本发明实施例所述令牌申请处理方法、装置和计算机存储介质,判断发送申请命令的第一流队列的第一标识信息是否位于发送序列中,若第一标识信息已经位于发送序列中,就屏蔽将第一标识信息添加到发送序列中的操作。这样就可以避免同一流队列的标识信息再次添加到发送序列中,进而可以避免形成多个重复的待发送的令牌申请减少同一流队列发送重复令牌申请的几率且减少冗余令牌申请及冗余令牌申请占用的带宽。这样的话,就能够减少冗余令牌申请占用了正常令牌申请的带宽资源导致的发送时延大及传输拥堵的现象。The token application processing method and apparatus and the computer storage medium according to the embodiment of the present invention determine whether the first identification information of the first flow queue that sends the application command is located in the transmission sequence, and if the first identification information is already in the transmission sequence, the shielding is performed. The first identification information is added to the operation in the transmission sequence. In this way, the identification information of the same flow queue can be prevented from being added to the transmission sequence again, thereby avoiding the formation of multiple repeated token requests to be sent, reducing the probability of sending duplicate token requests by the same flow queue and reducing the redundant token application and The bandwidth occupied by the redundant token request. In this way, it is possible to reduce the transmission delay and transmission congestion caused by the bandwidth request of the normal token application by the redundant token application.
附图说明DRAWINGS
图1为本发明实施例所述令牌申请处理方法的流程示意图之一;FIG. 1 is a schematic flowchart of a token application processing method according to an embodiment of the present invention;
图2为本发明实施例所述令牌申请处理方法的流程示意图之二;2 is a second schematic flowchart of a token application processing method according to an embodiment of the present invention;
图3A为本发明实施例所述的重复令牌申请过滤的流程示意图之一;FIG. 3A is a schematic diagram of a flow of repeated token application filtering according to an embodiment of the present invention; FIG.
图3B为本发明实施例所述的重复令牌申请过滤的流程示意图之二;FIG. 3B is a second schematic diagram of a flow of repeated token application filtering according to an embodiment of the present invention; FIG.
图4A至4E为本发明实施例提供的令牌申请处理装置的结构示意图;4A to 4E are schematic diagrams showing the structure of a token application processing apparatus according to an embodiment of the present invention;
图5为本发明实施例提供的另一种令牌申请处理装置的结构示意图;FIG. 5 is a schematic structural diagram of another token application processing apparatus according to an embodiment of the present disclosure;
图6为本发明实施例所述令牌申请处理方法的流程示意图之三。FIG. 6 is a third schematic flowchart of a token application processing method according to an embodiment of the present invention.
具体实施方式detailed description
研究发现,导致令牌申请泛滥及令牌申请发送延时大的原因可包括:The study found that the reasons for the flood of token applications and the delay in sending token requests can include:
流队列一个令牌申请没有得到及时处理时,可能会重复发送多个申请命令从而形成多个重复的令牌申请。与此同时,流队列一个令牌申请没有 得到及时处理时,可能会通过申请命令指示停止申请令牌,然而停止申请令牌也是令牌申请的一种,也会导致交换网络中令牌申请泛滥,进而导致拥堵,某些令牌申请却迟迟不能发出。When a token request of a flow queue is not processed in time, multiple application commands may be repeatedly sent to form multiple duplicate token requests. At the same time, the flow queue has no token request When it is processed in time, the application token may be used to stop the application token. However, stopping the application token is also a type of token application, which may lead to flooding of token applications in the exchange network, which may lead to congestion. Delayed to send.
例如交换网接入端有某个流队列有数据报文需要发送到目的端,则需要发出令牌申请,若该令牌申请不经目的端处理,接入端可能短期内连续多次发出申请令牌的动作,其实发出一次即可达到申请令牌的目的,发送多次必然造成带宽浪费,与此同时其它申请令牌的流队列需等待该流队列的申请发送完毕后方可发送,会导致申请延迟加大,从而使得令牌下发服务的周期延长,必然导致服务质量的下降。若每个流队列都发送较多无效的令牌申请,则令牌申请就可能存在持续性拥堵,将会导致众多流队列令牌申请无法及时传达,导致一系列的管理失效问题。For example, if there is a traffic queue on the access end of the switching network that needs to send data packets to the destination, the token request needs to be sent. If the token application is not processed by the destination, the access terminal may send the application multiple times in a short period of time. The action of the token can be sent once to achieve the purpose of applying for the token. The transmission of the token will inevitably result in wasted bandwidth. At the same time, the flow queue of other application tokens must wait for the application of the flow queue to be sent before sending, which will result in The application delay is increased, so that the period of the token service is extended, which will inevitably lead to a decline in service quality. If each flow queue sends more invalid token requests, the token application may have persistent congestion, which will result in the failure of many flow queue token requests to be communicated in time, resulting in a series of management failures.
本发明实施例提供了一种令牌申请处理方法,通过发送序列的引入,限制一个流队列一次仅能够有一个待发送令牌申请,也就是说一个流队列一次仅能通过申请命令发送一个令牌申请,避免同一流队列的多个重复令牌申请。这样能够有效的减少交换网中令牌申请的总数,避免令牌申请的泛滥,同时也能够减少重复令牌申请占用的带宽,从而能够给出更多的带宽资源来发送非重复令牌申请,显然一次解决了令牌申请泛滥和延时大的问题。目的端也可以避免对重复令牌申请的处理,可以提高令牌申请的处理效率。The embodiment of the present invention provides a token application processing method. By introducing a transmission sequence, a flow queue can be restricted to have only one pending token request at a time, that is, a flow queue can only send an order through an application command at a time. Card application to avoid multiple duplicate token requests for the same stream queue. This can effectively reduce the total number of token applications in the switching network, avoid the flooding of token applications, and reduce the bandwidth occupied by duplicate token requests, thereby providing more bandwidth resources to send non-repeating token requests. Obviously, the problem of flooding and delay of token application is solved once. The destination can also avoid the processing of duplicate token requests, which can improve the processing efficiency of token applications.
以下结合说明书附图及具体实施例对本发明的技术方案做进一步的详细阐述,应当理解,以下所说明的优选实施例仅用于说明和解释本发明,并不用于限定本发明。The present invention will be further described in detail with reference to the accompanying drawings and specific embodiments.
方法实施例:Method embodiment:
如图1所示,本实施例提供一种令牌申请处理方法,所述方法包括:As shown in FIG. 1 , this embodiment provides a token application processing method, where the method includes:
步骤S110:当接收到第一流队列的申请命令时,判断发送序列中是否 包括所述第一流队列的第一标识信息;Step S110: When receiving the application command of the first flow queue, determine whether the transmission sequence is Include first identification information of the first flow queue;
步骤S120:若所述发送序列中包括所述第一标识信息,则屏蔽所述申请命令触发的将所述第一标识信息添加到所述发送序列中的操作;Step S120: If the first identifier information is included in the sending sequence, the operation of adding the first identifier information to the sending sequence triggered by the application command is blocked;
其中,所述发送序列,用于记录待发送令牌申请的各流队列的标识信息;The sending sequence is used to record identifier information of each flow queue of the token request to be sent;
所述发送序列中一个所述标识信息表明所述标识信息对应的流队列有一个待发送令牌申请。The identifier information in the sending sequence indicates that the flow queue corresponding to the identifier information has a token request to be sent.
在本申请中所述第一流队列没有专门特指某一个流队列,而是指所有流对了中的任意一个流队列。所述第一标识信息为所述第一流队列的标识,具体可为所述第一流队列的队列号或队列名称等能够区分出第一流队列的信息。所述第一标识信息为发送序列的多个标识信息中用于标识第一流队列的信息。发送一个令牌申请,则发送序列中对应于该令牌申请的流队列的标识信息就删除。In the present application, the first flow queue does not specifically refer to a certain flow queue, but refers to any one of all flow pairs. The first identifier information is an identifier of the first flow queue, and specifically may be information such as a queue number or a queue name of the first flow queue that can distinguish the first flow queue. The first identification information is information used to identify the first flow queue among the plurality of identification information of the sending sequence. When a token request is sent, the identification information of the flow queue corresponding to the token request in the sequence is deleted.
所述发送序列可为一个先入先出(First In First Out,FIFO)队列,所述发送队列按照接收到申请命令,依次将对应流队列的标识信息添加到发送序列中。但是在进行发送队列中的标识信息添加时,为了防止第一流队列在一个令牌申请未得到及时响应时,通过重复发送申请命令形成的重复令牌申请,在本实施例的步骤S110中会首先判断发送队列中是否已经包括了第一流队列的第一标识信息。若发现序列中已经包括例所述第一标识信息,则认为所述第一流队列尚有一个待发送的令牌申请,该申请命令触发形成的令牌申请很大几率是会导致重复令牌申请的,故在步骤S120中将屏蔽将第一标识信息再次添加到发送序列中的步骤。The sending sequence may be a first in first out (FIFO) queue, and the sending queue sequentially adds the identification information of the corresponding stream queue to the sending sequence according to the received application command. When the identification information in the sending queue is added, in order to prevent the first flow queue from being repeatedly responded to when the token request is not received in time, the duplicate token application formed by repeatedly sending the application command is firstly performed in step S110 of the embodiment. It is determined whether the first identifier information of the first flow queue has been included in the sending queue. If the first identifier information is included in the sequence, the first flow queue is considered to have a token request to be sent, and the request to trigger the formed token application has a large probability that the duplicate token application is caused. Therefore, the step of masking the first identification information into the transmission sequence is masked in step S120.
在步骤S110中,在判断所述发送序列是否包括所述第一标识信息时,可以将所述第一标识信息与所述发送序列中的各个标识信息进行逐一比对来确认。 In step S110, when it is determined whether the sending sequence includes the first identifier information, the first identifier information may be compared with each identifier information in the sending sequence to be confirmed one by one.
在步骤S120中的屏蔽,则可为不在发送序列中再次添加所述第一标识信息即可。In the masking in step S120, the first identification information may be added again in the transmission sequence.
显然这样的话,第一流队列一次仅能有一个待发送令牌申请,在进行待发送令牌申请发送时,一次仅发送一个令牌申请;这样能够大大的减少重复令牌申请,避免令牌申请的泛滥及网络带宽的占用,同时减少重复令牌申请对目的端的干扰。Obviously, the first flow queue can only have one pending token request at a time, and only one token request is sent at a time when the pending token application is sent; this can greatly reduce the duplicate token request and avoid the token application. The flooding and the occupation of network bandwidth, while reducing the interference of the duplicate token application on the destination.
此外,如图2所示,所述方法还包括:In addition, as shown in FIG. 2, the method further includes:
步骤S130:若所述发送序列中不包括所述第一标识信息,则将所述第一标识信息添加到所述发送序列中。Step S130: If the first identifier information is not included in the sending sequence, add the first identifier information to the sending sequence.
所述步骤S130与所述步骤S120是并列操作步骤,没有一定的先后顺序。当所述发送序列中没有所述第一标识信息时,则将所述第一标识信息添加到所述发送序列中,这样通过更新发送序列,可赋予第一流队列形成一个待发送令牌申请及发送一个令牌申请的机会。这样的话,就在各个流对列都有机会向目标端发送令牌申请,提升了令牌申请过程中的公平性。这样就能避免现有技术中某些流队列因为其他流队列的大量令牌申请,导致的没有机会和带宽发送令牌申请的问题,这样就能够从整体上提高各个流队列的令牌申请被响应的速率和几率,从而能够提高通信速率,减少信息漏发,提高了通信质量。The step S130 and the step S120 are parallel operation steps, and there is no certain order. And when the first identifier information is not included in the sending sequence, adding the first identifier information to the sending sequence, so that by updating the sending sequence, the first stream queue may be assigned to form a to-be-sent token request and Send a token request opportunity. In this case, each stream pair has an opportunity to send a token request to the target end, which improves the fairness of the token application process. In this way, it is possible to avoid the problem that some flow queues in the prior art have no chance and bandwidth to send a token request due to a large number of token requests of other flow queues, so that the token application of each flow queue can be improved as a whole. The rate and probability of response, which can increase the communication rate, reduce information leakage, and improve communication quality.
所述方法还包括:The method further includes:
在基于所述发送序列发送所述第一流队列的令牌申请时,控制所述令牌申请的申请请求为所述第一流队列最后一次发送的所述申请命令的申请请求。When the token request of the first flow queue is sent based on the sending sequence, the application request for controlling the token request is an application request of the application command sent last time by the first flow queue.
这样的话,若第一流队列在一个待发送令牌申请未被发送的时间内,形成了多次申请命令,每一次申请命令中均包括申请请求。所述申请请求通常包括请求申请令牌和请求停止申请令牌两种一种。当基于发送序列发 送所述第一流队列的令牌申请时,该令牌申请的申请请求为最后一次申请命令中的申请请求。In this case, if the first flow queue has a multiple application request within a time when the to-be-sent token request is not sent, the application request is included in each application command. The application request generally includes two types of requesting a request token and requesting to stop the application token. When based on the sending sequence When the token request of the first flow queue is sent, the application request of the token application is the application request in the last application command.
假设申请令牌的申请请求为ON,停止申请令牌的申请请求为OFF,例如某个流队列持续发送了4个申请命令,这4个申请命令的申请请求依次为ON-ON-ON-ON,则发送第一流队列的令牌申请时,该令牌申请的申请请求为最终申请命令中的ON。若流队列发送的4个申请命令中的申请请求依次为ON-OFF-ON-OFF等,则发送第一流队列的令牌申请时,该令牌申请的申请请求为最终申请命令中的OFF即可。Assume that the application request for the application token is ON, and the application request for stopping the application token is OFF. For example, a flow queue continuously sends four application commands, and the application requests for the four application commands are ON-ON-ON-ON. When the token request of the first flow queue is sent, the application request of the token request is ON in the final application command. If the application request in the four application commands sent by the flow queue is ON-OFF-ON-OFF, etc., when the token request of the first flow queue is sent, the application request of the token application is OFF in the final application command. can.
显然第一流队列形成了4个申请命令,若按照现有技术的方法,则应该发送4个令牌申请,这样交换网络中就有4个第一流队列的令牌申请;且这4个令牌申请为4个重复的令牌申请或两两为无效的令牌申请。Obviously, the first flow queue forms 4 application commands. If the method according to the prior art is used, 4 token applications should be sent, so that there are 4 token requests of the first flow queue in the exchange network; and the 4 tokens The application is for 4 duplicate token requests or two or two invalid token requests.
故首先从令牌数量上减少了,其次减少重复令牌申请、无效令牌申请导致的拥堵和带宽占用、及对目的端的干扰。Therefore, the number of tokens is first reduced, and secondly, the congestion and bandwidth occupation caused by the duplicate token application, the invalid token application, and the interference to the destination end are reduced.
在本申请中为了最大限度的减少重复令牌申请的发送和堵塞交换网络,在本申请中还提供两种重复令牌申请的避免方式。In order to minimize the transmission of duplicate token requests and the congestion switching network in this application, two ways of avoiding duplicate token requests are also provided in this application.
方式一:method one:
如图3A所示,所述方法还包括:As shown in FIG. 3A, the method further includes:
步骤S101:记录所述第一流队列的前一个已发送令牌申请的申请请求;Step S101: Record an application request of a previous sent token request of the first flow queue;
步骤S102:比较本次待发送的令牌申请的申请请求与所述前一个已发送令牌申请的申请请求是否相同;Step S102: Compare whether the application request of the token application to be sent this time is the same as the application request of the previous sent token application;
步骤S103:若本次待发送的令牌申请的申请请求与所述前一个已发送令牌申请的申请请求相同,则终止本次所述申请命令触发的令牌申请的发送。当然本方式中的两者指代的是本次待发送的令牌申请的申请请求与前一个已发送令牌申请的申请请求。Step S103: If the application request of the token application to be sent is the same as the application request of the previous sent token request, the sending of the token request triggered by the application command is terminated. Of course, the two in this mode refer to the application request of the token application to be sent this time and the application request of the previous sent token request.
方式二: Method 2:
如图3B所示,所述方法还包括:As shown in FIG. 3B, the method further includes:
步骤S201:记录所述流队列的前一个已发送令牌申请的申请请求;Step S201: Record an application request of a previous sent token request of the flow queue;
步骤S202:比较本次所述第一流队列的申请命令中的申请请求与前一个已发送令牌申请的申请请求是否相同;Step S202: Compare whether the application request in the application command of the first flow queue is the same as the application request of the previous sent token application;
步骤S203:若所述第一流队列的申请命令中的申请请求与前一个已发送令牌申请的申请请求相同,则屏蔽本次所述申请命令触发的将所述第一标识信息添加到所述发送序列中的操作。当然本方式中的两者指代的是本次所述第一流队列的申请命令中的申请请求与前一个已发送令牌申请的申请请求。Step S203: If the application request in the application command of the first flow queue is the same as the application request of the previous sent token request, then the first identification information triggered by the application command is added to the Send the operation in the sequence. Of course, the two in this mode refer to the application request in the application command of the first flow queue and the application request of the previous sent token application.
在本实施例中为了进一步减少重复令牌申请的出现,还将过滤发送给同一目的端且申请请求完全相同的令牌申请,还会通过前一次令牌申请的申请请求的记录,和本次申请命令的申请请求的比较,避免重复发送,以再次减少冗余的令牌申请。In this embodiment, in order to further reduce the occurrence of the duplicate token request, the token request that is sent to the same destination and the application request is the same is also filtered, and the record of the application request of the previous token application is also passed, and this time The comparison of application requests for application orders avoids repeated transmissions to reduce redundant token requests again.
如第一流队列前一个令牌申请发送给目的端A,申请请求为ON,此时,再次接收到第一流队列的申请命令,该申请命令还是指示向目标端A发送申请请求为ON的申请令牌。显然若直接响应,也会导致重复令牌申请。值得注意,本实施例前述方式一和方式二的技术方案的应用时机为前一个已发送令牌申请还未得到目的端响应的情况下。若前一个令牌申请已经响应且第一流队列数据在发送或已发送,这个时候相当于是重新再次申请令牌,不会在形成重复令牌申请。If the first token request is sent to the destination A, the application request is ON. At this time, the application request of the first flow queue is received again, and the application command also indicates that the application request is ON to the target A. brand. Obviously, if you respond directly, it will also result in a duplicate token request. It should be noted that the application timing of the foregoing first mode and the second mode in this embodiment is when the previous sent token request has not received the destination end response. If the previous token request has been responded and the first stream queue data is being sent or sent, this time is equivalent to re-applying the token again and will not form a duplicate token request.
在具体实现中,每当一个流队列发送出一次令牌申请命令后,会将本次发送的申请请求记录下来,区分队列进行存储。所述区分队列存储,可理解为对不同的流队列的申请请求,分别存储。例如流队列A的申请请求和流队列B的申请请求,是分别存储的。例如从RAM中划分一个区域用于存储流队列A的申请请求,再划分另一区域用于存储流队列B的申请请 求。后续当该流列再次进行发送令牌申请时,需先读出上次发送的申请请求,并和本次将要发送的申请请求进行比较,如果发现两次发送的申请请求相同,则认为本次令牌申请为不必要的,最终过滤掉本次申请命令触发的令牌申请发送,或屏蔽掉本次令牌申请触发的令牌申请的形成及发送操作。In a specific implementation, each time a flow queue sends a token application command, the application request sent this time is recorded, and the queue is stored for storage. The distinguishing queue storage can be understood as requesting for different flow queues and storing separately. For example, the application request of the flow queue A and the application request of the flow queue B are separately stored. For example, an area is allocated from the RAM for storing the application request of the flow queue A, and another area is used for storing the application of the flow queue B. begging. When the queue is sent again to send the token request, the application request sent last time needs to be read first, and compared with the application request to be sent this time. If it is found that the application request sent twice is the same, then this time is considered The token application is unnecessary. Finally, the token application sent by the application command is filtered out, or the token request formation and sending operation triggered by the token application is blocked.
当然,为了避免一次性发送过多的令牌申请,导致拥堵,在本实施例中所述方法做了进一步改进,所述方法还包括:Certainly, in the embodiment, the method is further improved, in order to avoid the one-time sending of too many token applications, causing congestion. The method further includes:
依据发送速率阈值,发送所述发送序列中标识信息对应的待发送令牌申请。And sending, according to the sending rate threshold, a to-be-sent token request corresponding to the identifier information in the sending sequence.
这里的发送速率可理解为发送所述令牌申请个数的速率,也可以理解为数据量的发送速率。若所述发送速率为令牌申请的个数的速率,则通过计时和令牌申请的发送个数的计数来进行发送限制管控。若所述数据量的发送速率,则可能需要计算出令牌申请的个数和每一个数据量,进行所述发送速率的限制。The transmission rate here can be understood as the rate at which the number of token requests is sent, and can also be understood as the transmission rate of the data amount. If the transmission rate is the rate of the number of token requests, the transmission restriction control is performed by counting the number of transmissions and the number of transmissions of the token request. If the data rate is sent, it may be necessary to calculate the number of token requests and each data amount to limit the transmission rate.
所述步骤S110还可包括:The step S110 may further include:
查询标识信息,所述标识信息能够用于标识所述第一标识信息是否位于所述发送序列中;Querying the identifier information, where the identifier information can be used to identify whether the first identifier information is located in the sending sequence;
基于所述标记信息的信息内容,判断所述第一标识信息是否位于所述发送序列中。Determining whether the first identification information is located in the sending sequence based on the information content of the tag information.
在本实施例中提供了一种判断所述第一标识信息是否位于所述发送序列中的方法。在本实施例中为每一个所述流队列设置了一个标记信息;所述标记信息可对应一个或多个标记位,该标记位的值即为所述信息内容。例如,流队列C对应的标记位为1时,可认为所述发送序列中包括流队列C的标识信息,否则认为发送序列中不包括所述流队列C的标识信息。通过标记信息的设置,避免将所述第一标识信息与发送序列中各标记信息的 逐一比对,从而能够提升步骤S110的判断效率。In this embodiment, a method for determining whether the first identification information is located in the transmission sequence is provided. In this embodiment, one tag information is set for each of the stream queues; the tag information may correspond to one or more tag bits, and the value of the tag bit is the information content. For example, when the flag bit corresponding to the flow queue C is 1, the transmission sequence may be considered to include the identification information of the flow queue C. Otherwise, the identification information of the flow queue C is not included in the transmission sequence. Avoiding the first identification information and each marking information in the transmission sequence by setting the marking information The comparison is performed one by one, so that the judgment efficiency of step S110 can be improved.
在一些实施例中,所述方法还包括:基于所述第一标识信息是否位于所述发送序列中,更新所述标记信息的信息内容。In some embodiments, the method further comprises updating the information content of the tag information based on whether the first identification information is located in the transmission sequence.
当发送序列中的一个标识信息对应的待发送令牌申请已发送,则发送序列中去除该标识信息,相应的方便后续操作,也要相应的更新所述标记信息。当然所述第一标识信息添加到所述发送序列后,也要更新所述标记信息,使所述标记信心更新为表示所述发送序列中包括了所述第一标识信息。When the to-be-sent token request corresponding to an identifier information in the sending sequence has been sent, the identifier information is removed from the sending sequence, and the subsequent operations are facilitated accordingly, and the marking information is also updated accordingly. Of course, after the first identification information is added to the sending sequence, the marking information is also updated, so that the marking confidence is updated to indicate that the first identification information is included in the sending sequence.
在本实施例中所述发送序列可选为FIFO序列,这样的话,处理装置在形成并发送令牌申请时,按照各个流队列的申请命令的发送顺序来执行,这样的话就能够进行有序的管理。故所述方法还包括:按照各所述流队列的标识信息进入所述发送序列中的先后顺序,依次执行所述流队列的待发送令牌申请。In this embodiment, the sending sequence may be selected as a FIFO sequence. In this case, when the processing device forms and sends the token request, the processing device performs the order according to the sending order of the application commands of the respective flow queues, so that the order can be performed. management. Therefore, the method further includes: performing the to-be-sent token application of the flow queue in sequence according to the sequence of the identification information of each of the flow queues entering the sending sequence.
例如当前设备包括3个流队列,分别是Q1、Q2及Q3;若接收到3个流队列发送的4个申请命令的顺序为Q2、Q1、Q1及Q3,则在发送序列中标识信息的排序依次是Q2、Q1和Q3;令牌申请的发送顺序为Q2、Q1、Q3。For example, the current device includes three flow queues, which are Q1, Q2, and Q3 respectively. If the order of four application commands sent by the three flow queues is Q2, Q1, Q1, and Q3, the information is sorted in the sending sequence. In turn, Q2, Q1, and Q3; the order in which token requests are sent is Q2, Q1, and Q3.
总之本实施例提供了一种令牌申请方法,能够减少冗余的令牌申请,减少冗余的令牌申请导致的拥堵,提高令牌申请的响应速率和处理效率,提高通信服务质量。In summary, the present embodiment provides a token application method, which can reduce redundant token applications, reduce congestion caused by redundant token applications, improve response rate and processing efficiency of token applications, and improve communication service quality.
设备实施例:Equipment embodiment:
如图4A所示,本实施例提供一种令牌申请处理装置,所述装置包括:As shown in FIG. 4A, the embodiment provides a token application processing apparatus, and the apparatus includes:
判断单元110,配置为当接收到第一流队列的申请命令时,判断发送序列中是否包括所述第一流队列的第一标识信息;The determining unit 110 is configured to: when receiving the application command of the first flow queue, determine whether the first identification information of the first flow queue is included in the sending sequence;
处理单元120,配置为若所述发送序列中包括所述第一标识信息,则屏 蔽所述申请命令触发的将所述第一标识信息添加到所述发送序列中的操作;The processing unit 120 is configured to: if the first identification information is included in the sending sequence, the screen And an operation of adding the first identification information to the sending sequence triggered by the application command;
其中,所述发送序列,用于记录待发送令牌申请的各流队列的标识信息;The sending sequence is used to record identifier information of each flow queue of the token request to be sent;
所述发送序列中一个所述标识信息表明所述标识信息对应的流队列有一个待发送令牌申请。The identifier information in the sending sequence indicates that the flow queue corresponding to the identifier information has a token request to be sent.
所述判断单元110和处理单元120的具体结构可包括处理器或处理电路。所述处理电路可包括专用集成电路ASIC。所述处理器可包括应用处理器AP、中央处理器CPU、微处理器MCU、数字信号处理器DSP或可编程阵列PLC等处理结果。所述处理器通过内部通信总线与存储介质相连。所述存储介质上存储有所述处理器可执行指令,所述处理器读取并执行所述可执行指令,则能够分别实现所述判断单元110和所述处理单元120的功能。The specific structure of the determining unit 110 and the processing unit 120 may include a processor or a processing circuit. The processing circuit can include an application specific integrated circuit ASIC. The processor may include processing results such as an application processor AP, a central processing unit CPU, a microprocessor MCU, a digital signal processor DSP, or a programmable array PLC. The processor is coupled to the storage medium via an internal communication bus. The processor executable instructions are stored on the storage medium, and the processor reads and executes the executable instructions, and the functions of the determining unit 110 and the processing unit 120 can be respectively implemented.
在本实施例所述装置中还包括存储介质,所述存储介质用于存储所述发送序列。所述发送序列可为FIFO队列。Also included in the apparatus of this embodiment is a storage medium for storing the transmission sequence. The transmit sequence can be a FIFO queue.
在本实施例中通过将发送申请命令的流队列的标识信息添加到发送队列中,再通过判断避免重复添加,能够有效的避免同一流队列在短期内重复形成多个相同的令牌申请,减少了冗余的令牌申请,节省了冗余的令牌申请占用的带宽资源,提升了响应速率和通信服务质量。In this embodiment, by adding the identifier information of the flow queue that sends the application command to the sending queue, and then judging to avoid repeated addition, the same flow queue can be effectively prevented from repeatedly forming multiple identical token requests in a short period of time, thereby reducing The redundant token application saves the bandwidth resources occupied by the redundant token application and improves the response rate and communication service quality.
所述处理单元120,还用于若所述发送序列中不包括所述第一标识信息,则将所述第一标识信息添加所述发送序列中。在本实施例中当发送序列中不包括所述第一标识信息时,将所述第一标识信息添加到所述发送序列中,这样的话,提高了各个流队列发送令牌申请的公平性,避免了某些流队列一直抢占不到对应资源导致的无法发送令牌申请或发送概率小及时延大的问题。 The processing unit 120 is further configured to add the first identifier information to the sending sequence if the first identifier information is not included in the sending sequence. In the embodiment, when the first identifier information is not included in the sending sequence, the first identifier information is added to the sending sequence, so that the fairness of sending the token request by each stream queue is improved. It avoids the problem that some flow queues can not preempt the corresponding resources and cannot send token requests or the transmission probability is small and timely.
基于上述方案,在本实施例中为了进一步降低冗余令牌申请,对所述装置还进行了进一步改进,以下提供两种所述装置再次改进的结构。Based on the above scheme, in order to further reduce the redundant token application in the present embodiment, the apparatus is further improved, and the following two structures are further improved.
结构一:Structure one:
如图4B所示,所述装置还包括:As shown in FIG. 4B, the device further includes:
记录单元131,配置为记录所述第一流队列的前一个已发送令牌申请的申请请求;The recording unit 131 is configured to record an application request of the previous sent token request of the first flow queue;
第一比较单元132,配置为比较将本次待发送的令牌申请的申请请求与所述前一个已发送令牌申请的申请请求是否相同;The first comparison unit 132 is configured to compare whether the application request of the token application to be sent this time is the same as the application request of the previous sent token request;
终止单元133,用于若本次所述第一流队列待发送的令牌申请的申请请求与所述前一个已发送令牌申请的申请请求相同,则终止所述本次待发送的令牌申请的发送。The termination unit 133 is configured to terminate the token request to be sent if the application request of the token request to be sent in the first flow queue is the same as the application request of the previous sent token request. Send.
所述记录单元131可包括存储介质,所述存储介质可为RAM或闪存Flash等存储介质,配置为存储前一个已发送令牌申请的申请请求。The recording unit 131 may include a storage medium, which may be a storage medium such as a RAM or a flash memory, configured to store an application request for a previous sent token request.
所述第一比较单元132可包括处理器或处理电路。所述处理电路可包括比较器。通过两个申请请求的比较,确定两个前一个已发送令牌申请的申请请求与本次待发送的令牌申请的申请请求是否相同,若相同,若继续执行发送操作,则会导致冗余令牌申请,故在本实施例中还设置有所述终止单元将终止所述令牌申请的发送。所述终止单元对应的结构也可为处理器或处理电路。The first comparison unit 132 can include a processor or processing circuitry. The processing circuit can include a comparator. By comparing the two application requests, it is determined whether the application request of the two previous sent token requests is the same as the request request of the token request to be sent this time. If the same, if the sending operation continues, the redundancy will be caused. The token application, in this embodiment, is further provided that the termination unit will terminate the transmission of the token request. The structure corresponding to the termination unit may also be a processor or a processing circuit.
结构二:Structure 2:
如图4C所示,所述装置还包括:As shown in FIG. 4C, the device further includes:
记录单元131,配置为记录所述第一流队列的前一个已发送令牌申请的申请请求;The recording unit 131 is configured to record an application request of the previous sent token request of the first flow queue;
第二比较单元141,配置为比较本次所述第一流队列的申请命令中的申请请求与前一个已发送令牌申请的申请请求是否相同; The second comparison unit 141 is configured to compare whether the application request in the application command of the first flow queue is the same as the application request of the previous sent token request;
所述处理单元120,还配置为于若本次所述第一流队列的申请命令中的申请请求与所述第一流队列的前一个已发送令牌申请的申请请求相同,则屏蔽本次所述申请命令触发的将所述第一标识信息添加到所述发送序列中的操作。The processing unit 120 is further configured to: if the application request in the application command of the first flow queue is the same as the application request of the previous sent token request of the first flow queue, An operation of adding the first identification information to the transmission sequence triggered by an application command.
所述记录单元131的结构可如结构一所示的记录单元,同样可包括各种所述存储介质。所述第二比较单元的结构与所述第一比较单元类似,但是比较的参数确有不同,在本结构中所述第二比较单元的两个输入,一个为前一个已发送令牌申请的申请请求,另一个为本次申请命令的申请请求。处理120将根据比较,确定出两个输入的申请请求相同时,不在发送序列中再次添加第一标识信息,同样可以减少冗余令牌申请的发送。The structure of the recording unit 131 can be as shown in the structure of the recording unit, and can also include various kinds of the storage medium. The structure of the second comparing unit is similar to that of the first comparing unit, but the compared parameters are different. In the present structure, two inputs of the second comparing unit, one for the previous sent token application Request for application, another request for this application. The process 120 will determine, based on the comparison, that when the two input application requests are the same, the first identification information is not added again in the transmission sequence, and the transmission of the redundant token application can also be reduced.
在一些实施例中,In some embodiments,
如图4D所示,所述装置还包括:As shown in FIG. 4D, the device further includes:
控制单元150,配置为在基于所述发送序列发送所述第一流队列的令牌申请时,控制所述令牌申请的申请请求为最后一次所述申请命令的申请请求。The control unit 150 is configured to, when transmitting the token request of the first flow queue based on the sending sequence, control an application request of the token request as an application request of the last application request.
所述控制单元150的具体结构可包括处理器,当一个流队列发送了多次申请命令,但是进行了一个令牌申请时,该令牌申请的申请请求以最后一次申请命令为准,即该令牌申请的申请请求为最后一次令牌申请的申请请求。这样能更加精确的反映出流队列当前的需求。The specific structure of the control unit 150 may include a processor. When a flow queue sends a multiple application command, but a token application is made, the application request of the token application is subject to the last application command, that is, the The application request for the token application is the application request for the last token application. This can more accurately reflect the current needs of the flow queue.
此外,所述装置还包括:In addition, the device further includes:
限速单元151,配置为依据发送速率阈值,发送所述发送序列中标识信息对应的待发送令牌申请。The rate limiting unit 151 is configured to send a to-be-sent token request corresponding to the identifier information in the sending sequence according to the sending rate threshold.
所述限速单元151的具体结构可包括通信接口和计数器等信息处理结构,总之能够限制所述令牌申请的发送速率,避免令牌申请发送的过多导致的拥堵,最终导致整体发送速率的低下的问题。 The specific structure of the rate limiting unit 151 may include an information processing structure such as a communication interface and a counter, and can generally limit the sending rate of the token request, avoid congestion caused by too many token application transmissions, and ultimately result in an overall transmission rate. Low problem.
所述判断单元110的结构有多种,在本实施例中所述判断单元110,具体用于查询所述第一标识信息是否位于所述发送序列中的标记信息;及基于所述标记信息的信息内容,判断所述第一标识信息是否位于所述发送序列中。在本实施例中所述判断单元110将依据标记信息判断出发送序列是否包括所述第一标识信息,这样具有判断速度快及判断步骤简单的特点。The determining unit 110 is configured to query whether the first identifier information is located in the sending sequence, and the marking information is based on the marking information. The information content determines whether the first identification information is located in the sending sequence. In the embodiment, the determining unit 110 determines whether the transmission sequence includes the first identification information according to the marking information, so that the determination speed is fast and the determining step is simple.
此外,基于上述方案,为了确保判断单元110的判断精确性,所述装置还包括:更新单元,用于基于所述第一标识信息是否位于所述发送序列中,更新所述标记信息的信息内容。In addition, based on the above solution, in order to ensure the accuracy of the determination of the determining unit 110, the apparatus further includes: an updating unit, configured to update the information content of the tag information based on whether the first identification information is located in the sending sequence .
所述更新单元的结构可包括处理器或处理电路及存储介质,所述处理器或处理电路可用于更新所述存储介质中的标识信息。The structure of the update unit may include a processor or processing circuit and a storage medium, and the processor or processing circuit may be used to update identification information in the storage medium.
此外,如图4E所示,所述装置还包括:In addition, as shown in FIG. 4E, the device further includes:
发送单元152,配置为按照各所述流队列的标识信息进入所述发送序列中的先后顺序,依次执行各所述流队列的待发送令牌申请。The sending unit 152 is configured to sequentially execute the to-be-sent token request of each of the flow queues according to the sequence of the identification information of each of the flow queues entering the sending sequence.
所述发送单元152可包括通信接口,该通信接口用于发送所述令牌申请,但是所述令牌申请的发送顺序与所述发送序列中所述标识信息的发送顺序是一致的。通常情况下所述发送序列为FIFO序列,若一个流队列的标识信息先进入发送序列,则其对应的待发送令牌申请将优先发送。The sending unit 152 may include a communication interface, where the communication interface is used to send the token request, but the sending order of the token request is consistent with the sending order of the identifier information in the sending sequence. Generally, the transmission sequence is a FIFO sequence. If the identification information of a flow queue first enters the transmission sequence, the corresponding to-be-sent token request will be sent preferentially.
总之本实施例提供例一种令牌申请处理装置,能够作为实现前述方法实施例中所述令牌申请处理方法的硬件装置,同样具有减少了交换网中令牌申请的冗余度,省下了冗余令牌申请的带宽资源,能够更加公平的更有效率的实现令牌申请的发送和处理,提高了通信服务指令和效率。In summary, the embodiment provides a token application processing device, which can be used as a hardware device for implementing the token application processing method in the foregoing method embodiment, and has the same redundancy for reducing the token application in the switching network, thereby saving The bandwidth resource of the redundant token application can realize the transmission and processing of the token application more fairly and more efficiently, and improve the communication service instruction and efficiency.
以下结合上述任意实施例,提供几个具体示例:Several specific examples are provided below in connection with any of the above embodiments:
如图5所示,本示例提供一个令牌申请处理装置,所述装置至少包括:流队列过滤模块301、流队列状态过滤模块302及发送整形模块303。As shown in FIG. 5, the present example provides a token request processing apparatus, and the apparatus includes at least a flow queue filtering module 301, a flow queue state filtering module 302, and a sending shaping module 303.
所述流队列过滤模块301,可用于维护发送序列和申请请求表。所述发 送序列内按照从前级模块304接收的申请命令,存储发送申请命令的流队列的标识信息,该标识信息可为队列号等。该发送序列对于同一流队列的标识信息不进行重复存储。所述申请请求表,存储为同一流队列最后一次申请命令的申请请求。此处的流队列过滤模块301可为前述判断单元110的组成结果。The flow queue filtering module 301 can be used to maintain a sending sequence and an application request form. Said hair In the sending sequence, according to the application command received from the pre-stage module 304, the identifier information of the flow queue for sending the application command is stored, and the identifier information may be a queue number or the like. The transmission sequence does not repeatedly store identification information of the same flow queue. The application request form is stored as an application request for the last application request of the same flow queue. The flow queue filtering module 301 herein may be a composition result of the foregoing determining unit 110.
所述流队列状态过滤模块302可用于维护令牌状态发送表。所述令牌状态发送表内存储各流队列最近一次已发送令牌申请的申请请求。本示例中所述流队列状态过滤模块302可对应于前述实施例中的记录单元、第一比较单元和终止单元;或对应于前述实施例中的记录单元、第二比比较单元和处理单元。The flow queue state filtering module 302 can be used to maintain a token status sending table. The token status sending table stores an application request for the last time the token request has been sent by each stream queue. The flow queue state filtering module 302 in this example may correspond to the recording unit, the first comparison unit, and the termination unit in the foregoing embodiment; or correspond to the recording unit, the second ratio comparison unit, and the processing unit in the foregoing embodiments.
所述发送整形模块303,用于限制令牌申请的发送速率,避免发送的令牌申请的数目过多或速率过大导致的拥堵,还用于向后缀模块发送所述令牌申请。本示例中的所述发送整形模块303可为前述发送单元的组成部分。The sending and shaping module 303 is configured to limit the sending rate of the token request, avoid the congestion caused by the excessive number of sent or the excessive number of token applications, and also send the token request to the suffix module. The transmit shaping module 303 in this example may be an integral part of the aforementioned transmitting unit.
图5中所示的,前级模块304和后级模块305是为描述本示例装置而设置的,并非实现本发明技术方案的限制条件。例如流队列过滤模块301和流队列状态过滤模块302的位置可以对调,或者在带宽资源丰富等宽松的应用场景下,流队列状态过滤模块302可以不需要。As shown in FIG. 5, the pre-stage module 304 and the post-stage module 305 are provided for describing the present example device, and are not limiting to implement the technical solution of the present invention. For example, the location of the flow queue filter module 301 and the flow queue state filtering module 302 may be reversed, or the flow queue state filtering module 302 may not need to be used in a loose application scenario such as rich bandwidth resources.
示例二:Example two:
本示例基于图5所示的令牌申请处理装置,提供一个令牌申请处理方法。This example is based on the token request processing apparatus shown in FIG. 5, and provides a token request processing method.
如图6所示,本示例所述方法包括:As shown in FIG. 6, the method described in this example includes:
步骤210:流队列过滤模块301接收申请命令,并将申请命令中的申请请求分队列存储在申请请求表中。例如当前设备形成了3条流队列,分别是Q1、Q2、Q3,前级模块304短期内依次发来Q1-ON,Q2-OFF,Q3-ON,Q2-ON,Q1-OFF等信息,那么可以使用一片RAM分队列存储这些信息, RAM的访问地址为Q1、Q2、Q3的队列号,写入表示ON或OFF等申请请求。这里的队列号就相当于前述的标识信息或标识信息。ON表示申请令牌,OFF表示停止令牌申请。同一流队列的多个申请请求,后续的申请请求覆盖前面的值。那么此段时间内最终RAM中存储的状态为:地址Q1里面为OFF,地址Q2里面为ON,地址Q3里面为ON。Step 210: The flow queue filtering module 301 receives the application command, and stores the application request queue in the application command in the application request form. For example, the current device forms three flow queues, which are Q1, Q2, and Q3, respectively. The front-end module 304 sends Q1-ON, Q2-OFF, Q3-ON, Q2-ON, and Q1-OFF information in a short period of time. You can use a piece of RAM to store this information in a queue. The access address of the RAM is the queue number of Q1, Q2, and Q3, and the application request such as ON or OFF is written. The queue number here is equivalent to the aforementioned identification information or identification information. ON indicates the application token, and OFF indicates the stop token request. Multiple application requests for the same flow queue, subsequent application requests overwrite the previous values. Then the state stored in the final RAM during this period is: address Q1 is OFF, address Q2 is ON, and address Q3 is ON.
步骤220:流队列过滤模块301使用一块FIFO实现发送序列排队的功能,将发送出申请请求的流队列的队列号存储在FIFO中等待发送。此时,需要通过一个标记符判断某队列是否已经在FIFO中等待发送,如果已经在FIFO中,则无需再次加入FIFO,否则加入FIFO中等待发送。该标记符为前述标记信息的一种。具体操作如下:当一个流队列产生一个申请命令,准备发送到交换网的目的端时,需要将该流队列的队列号存在一个FIFO中,但存到FIFO之前,需要先读取该流队列的标记符,来判断该流队列的队列号是否已经写入到了FIFO中,这里定义标记符为1时表示当前队列已经在FIFO中,反之为0表示不在FIFO中。标记符存在一片RAM中,该RAM称之为队列过滤表,其读写地址可对应于各个流队列的队列号。如果读取的流队列的标识符为1,表明将该流队列号已经写入FIFO中,无需再次写入;如果读取的流队列标识符为0,表明将该流队列号不在FIFO中,则需要将该流队列的队列号写入到FIFO中等待发送令牌申请,同时将该队列对应的标识符置1,以防该队列号被再次写入到FIFO中。待某流队列从FIFO中读出发送后,需要将该流队列的标识符置0,表示该队列已经从FIFO中读出,允许被再次写入。Step 220: The flow queue filtering module 301 uses a FIFO to implement the function of sending sequence queuing, and stores the queue number of the flow queue that sends the request request in the FIFO for transmission. At this time, it is necessary to judge whether a queue has been waiting for transmission in the FIFO by a tag. If it is already in the FIFO, it is not necessary to join the FIFO again, otherwise it is added to the FIFO and waits for transmission. This tag is one of the aforementioned tag information. The specific operation is as follows: When a flow queue generates an application command and is ready to be sent to the destination end of the switching network, the queue number of the flow queue needs to exist in a FIFO, but before being stored in the FIFO, the flow queue needs to be read first. The tag is used to determine whether the queue number of the stream queue has been written into the FIFO. When the flag is 1, the current queue is already in the FIFO, and the other 0 is not in the FIFO. The tag is stored in a RAM, which is called a queue filter table, and its read/write address can correspond to the queue number of each stream queue. If the identifier of the read stream queue is 1, it indicates that the stream queue number has been written into the FIFO and does not need to be written again; if the read stream queue identifier is 0, it indicates that the stream queue number is not in the FIFO. The queue number of the flow queue needs to be written into the FIFO to wait for the token request to be sent, and the identifier corresponding to the queue is set to 1, in case the queue number is written to the FIFO again. After a flow queue is read and sent from the FIFO, the identifier of the flow queue needs to be set to 0, indicating that the queue has been read from the FIFO and allowed to be written again.
这里依然采用前面所述为例,当前设备形成了3个流队列,分别是Q1、Q2、Q3。流队列过滤模块301接收的申请命令是:Q1-ON,Q2-OFF,Q3-ON,Q2-ON,Q1-OFF等信息,假设发送序列FIFO中未存储Q1、Q2、Q3的队列号,那么前3次的发送,会依次将Q1、Q2、Q3写入FIFO中,同时将对 应的标识符置1,那么后续2次的Q2和Q1就不会再次写入FIFO中,从而达到了将后续2次发送过滤掉的目的。当没有后续模块的流控信号时,排在发送队列中最前面的队列号会被取出,然后读取申请请求表存储的申请请求,取出最新的申请请求形成令牌申请并发送所述令牌申请。Here, as described above, the current device forms three flow queues, which are Q1, Q2, and Q3. The application command received by the flow queue filtering module 301 is: Q1-ON, Q2-OFF, Q3-ON, Q2-ON, Q1-OFF, etc., assuming that the queue number of Q1, Q2, and Q3 is not stored in the transmission sequence FIFO, then The first three transmissions will write Q1, Q2, and Q3 to the FIFO in turn, and will be If the identifier is set to 1, then the next two Q2 and Q1 will not be written into the FIFO again, thus achieving the purpose of filtering out the next two transmissions. When there is no flow control signal of the subsequent module, the queue number ranked first in the sending queue is taken out, then the application request stored in the application request table is read, the latest application request is taken out to form a token request, and the token is sent. Application.
步骤230:流队列发送状态过滤模块维护一张令牌申请请求发送表,每发送一次令牌申请,都会将最新发送的令牌申请的申请请求更新到令牌申请请求发送表中。当有新的流队列需要发送时,根据发送序列中的队列号,查询所述令牌申请请求发送表,确定出该流队列上次发送的令牌申请的申请请求,同本次令牌申请的申请请求与前一次令牌申请的申请请求进行比较,如果二者相同则终止本次发送,否则发送本次令牌申请,并基于本次令牌申请的申请请求更新到令牌状态发送表中。后级模块305接收到队列的令牌申请请求后,最终封装成信元发送到交换网上去。Step 230: The flow queue sending status filtering module maintains a token request request sending table, and each time the token request is sent, the latest sent token request application request is updated to the token request request sending table. When a new flow queue needs to be sent, the token request request sending table is queried according to the queue number in the sending sequence, and the request for the token request sent by the flow queue is determined, and the token application is the same. The application request is compared with the application request of the previous token application, and if the two are the same, the current transmission is terminated; otherwise, the token request is sent, and the token status sending table is updated based on the application request of the token application. in. After receiving the token request request of the queue, the subsequent module 305 finally encapsulates the information into a message to be sent to the exchange network.
步骤240:发送整形模块303根据交换网的平均处理速率设置一个整形值,来限制令牌申请的发送速率。具体实现可包括:设置一个可配置的发送速率阈值,通过一个计数装置来实现,每当计数到一定时刻,允许发送一次令牌申请,其它时刻通过流控来限制前两级的令牌申请的发送速率。该平均处理速率对应于前述发送速率阈值,所述发送速率阈值可为事先设置的,也可以是根据交换网的处理速率动态设置的。Step 240: The sending shaping module 303 sets an shaping value according to the average processing rate of the switching network to limit the sending rate of the token request. The specific implementation may include: setting a configurable transmission rate threshold, implemented by a counting device, allowing a token application to be sent once every time a certain time is counted, and restricting the first two levels of token application by flow control at other times Send rate. The average processing rate corresponds to the foregoing sending rate threshold, and the sending rate threshold may be set in advance, or may be dynamically set according to a processing rate of the switching network.
结合图5和图6可知,所述令牌申请处理装置主要由3个部分组成,分别为流队列过滤莫快速、流队列状态过滤模块302及发送整形模块303。令牌申请处理装置通过上述3个模块的相互作用和补充来能达到良好的效果。由于发送整形模块303的存在,发送速率受到限制。且前级模块304频繁产生的大量申请命令需要在流队列过滤模块301需排队发送,排队过程中通过避免相同队列重复排队发送,降低同一流队列的状态发送频率;最后在流队列状态过滤模块302检测同一流队列先后两次的发送申请请求, 如果申请请求相同,可以屏蔽后一次的令牌申请的发送。通过这些机制,防止令牌申请信元冗余及造成拥塞,提高不同流队列间的令牌申请与服务的公平性,从而达到交换网中令牌高效申请的目的。As shown in FIG. 5 and FIG. 6, the token application processing device is mainly composed of three parts, namely, a flow queue filtering, a flow queue state filtering module 302, and a transmission shaping module 303. The token application processing device can achieve good results by the interaction and supplement of the above three modules. Due to the presence of the transmit shaping module 303, the transmission rate is limited. The large number of application commands frequently generated by the pre-stage module 304 need to be queued and sent in the flow queue filtering module 301. In the queuing process, the status of the same flow queue is reduced by avoiding repeated queuing transmission of the same queue. Finally, the flow queue status filtering module 302 Detecting the same flow queue twice to send an application request, If the request is the same, you can block the sending of the next token request. Through these mechanisms, the token application cell redundancy and congestion are prevented, and the fairness of the token application and service between different flow queues is improved, thereby achieving the purpose of efficiently applying for tokens in the exchange network.
本发明实施例还提供一种计算机存储介质,所述计算机存储介质中存储有计算机可执行指令,所述计算机可执行指令用于如上所述令牌申请处理方法的至少其中之一,例如图1、图2、图3A、图3B及图6所示方法的至少其中之一。所述计算机存储介质可为移动存储设备、只读存储器(ROM,Read-Only Memory)、随机存取存储器(RAM,Random Access Memory)、磁碟或者光盘等各种可以存储程序代码的介质;可选为非瞬间存储介质。The embodiment of the present invention further provides a computer storage medium, where the computer storage medium stores computer executable instructions, and the computer executable instructions are used in at least one of the token application processing methods as described above, for example, FIG. At least one of the methods shown in FIG. 2, FIG. 3A, FIG. 3B, and FIG. The computer storage medium may be a removable storage device, a read-only memory (ROM), a random access memory (RAM), a magnetic disk or an optical disk, and the like, which can store program code. Selected as a non-transient storage medium.
在本申请所提供的几个实施例中,应该理解到,所揭露的设备和方法,可以通过其它的方式实现。以上所描述的设备实施例仅仅是示意性的,例如,所述单元的划分,仅仅为一种逻辑功能划分,实际实现时可以有另外的划分方式,如:多个单元或组件可以结合,或可以集成到另一个***,或一些特征可以忽略,或不执行。另外,所显示或讨论的各组成部分相互之间的耦合、或直接耦合、或通信连接可以是通过一些接口,设备或单元的间接耦合或通信连接,可以是电性的、机械的或其它形式的。In the several embodiments provided by the present application, it should be understood that the disclosed apparatus and method may be implemented in other manners. The device embodiments described above are merely illustrative. For example, the division of the unit is only a logical function division. In actual implementation, there may be another division manner, such as: multiple units or components may be combined, or Can be integrated into another system, or some features can be ignored or not executed. In addition, the coupling, or direct coupling, or communication connection of the components shown or discussed may be indirect coupling or communication connection through some interfaces, devices or units, and may be electrical, mechanical or other forms. of.
上述作为分离部件说明的单元可以是、或也可以不是物理上分开的,作为单元显示的部件可以是、或也可以不是物理单元,即可以位于一个地方,也可以分布到多个网络单元上;可以根据实际的需要选择其中的部分或全部单元来实现本实施例方案的目的。The units described above as separate components may or may not be physically separated, and the components displayed as the unit may or may not be physical units, that is, may be located in one place or distributed to multiple network units; Some or all of the units may be selected according to actual needs to achieve the purpose of the solution of the embodiment.
另外,在本发明各实施例中的各功能单元可以全部集成在一个处理模块中,也可以是各单元分别单独作为一个单元,也可以两个或两个以上单元集成在一个单元中;上述集成的单元既可以采用硬件的形式实现, 也可以采用硬件加软件功能单元的形式实现。In addition, each functional unit in each embodiment of the present invention may be integrated into one processing module, or each unit may be separately used as one unit, or two or more units may be integrated into one unit; the above integration The unit can be implemented in the form of hardware. It can also be implemented in the form of hardware plus software functional units.
本领域普通技术人员可以理解:实现上述方法实施例的全部或部分步骤可以通过程序指令相关的硬件来完成,前述的程序可以存储于一计算机可读取存储介质中,该程序在执行时,执行包括上述方法实施例的步骤;所述存储介质可为各种可以存储程序代码的介质。A person skilled in the art can understand that all or part of the steps of implementing the above method embodiments may be completed by using hardware related to the program instructions. The foregoing program may be stored in a computer readable storage medium, and the program is executed when executed. The steps of the above method embodiments are included; the storage medium can be any medium that can store program code.
以上所述,仅为本发明的具体实施方式,但本发明的保护范围并不局限于此,凡按照本发明原理所作的修改,都应当理解为落入本发明的保护范围。 The above is only the specific embodiment of the present invention, but the scope of the present invention is not limited thereto, and modifications made in accordance with the principles of the present invention should be understood as falling within the scope of the present invention.

Claims (19)

  1. 一种令牌申请处理方法,所述方法包括:A token application processing method, the method comprising:
    当接收到第一流队列的申请命令时,判断发送序列中是否包括所述第一流队列的第一标识信息;When the application request of the first flow queue is received, determining whether the first identifier information of the first flow queue is included in the sending sequence;
    若所述发送序列中包括所述第一标识信息,则屏蔽所述申请命令触发的将所述第一标识信息添加到所述发送序列中的操作;If the first identifier information is included in the sending sequence, the operation of adding the first identifier information to the sending sequence triggered by the application command is blocked;
    其中,所述发送序列,用于记录待发送令牌申请的各流队列的标识信息;所述发送序列中一个所述标识信息表明所述标识信息对应的流队列有一个待发送令牌申请。The sending sequence is used to record the identifier information of each flow queue of the to-be-sent token application. One of the identifiers in the sending sequence indicates that the flow queue corresponding to the identifier information has a pending token request.
  2. 根据权利要求1所述的方法,其中,The method of claim 1 wherein
    所述方法还包括:The method further includes:
    若所述发送序列中不包括所述第一标识信息,则将所述第一标识信息添加到所述发送序列中。And if the first identifier information is not included in the sending sequence, adding the first identifier information to the sending sequence.
  3. 根据权利要求1或2所述的方法,其中,The method according to claim 1 or 2, wherein
    所述方法还包括:The method further includes:
    在基于所述发送序列发送所述第一流队列的令牌申请时,控制所述令牌申请的申请请求为所述第一流队列发送的最后一次所述申请命令的申请请求。When the token request of the first flow queue is sent based on the sending sequence, the application request for controlling the token request is an application request of the last application command sent by the first flow queue.
  4. 根据权利要求1或2所述的方法,其中,The method according to claim 1 or 2, wherein
    所述方法还包括:The method further includes:
    记录所述第一流队列的前一个已发送令牌申请的申请请求;Recording an application request of a previous sent token request of the first flow queue;
    比较本次所述第一流队列待发送的令牌申请的申请请求与所述前一个已发送令牌申请的申请请求是否相同;Comparing whether the application request of the token request to be sent in the first flow queue is the same as the application request of the previous sent token request;
    若本次所述第一流队列待发送的令牌申请的申请请求与所述前一个已 发送令牌申请的申请请求相同,则终止所述本次所述第一流队列待发送的令牌申请的发送。If the application request of the token request to be sent in the first flow queue is the same as the previous one If the application request for sending the token request is the same, the sending of the token request to be sent in the current flow queue is terminated.
  5. 根据权利要求1或2所述的方法,其中,The method according to claim 1 or 2, wherein
    所述方法还包括:The method further includes:
    记录所述第一流队列的前一个已发送令牌申请的申请请求;Recording an application request of a previous sent token request of the first flow queue;
    比较本次所述第一流队列的申请命令中的申请请求与所述第一流队列的前一个已发送令牌申请的申请请求是否相同;Comparing whether the application request in the application command of the first flow queue is the same as the application request of the previous sent token request of the first flow queue;
    若本次所述第一流队列的申请命令中的申请请求与所述第一流队列的前一个已发送令牌申请的申请请求相同,则屏蔽本次所述申请命令触发的将所述第一标识信息添加到所述发送序列中的操作。If the application request in the application command of the first flow queue is the same as the application request of the previous sent token request in the first flow queue, the first identifier that is triggered by the application command is blocked. Information is added to the operation in the transmission sequence.
  6. 根据权利要求1或2所述的方法,其中,The method according to claim 1 or 2, wherein
    所述方法还包括:The method further includes:
    依据发送速率阈值,发送所述发送序列中标识信息对应的待发送令牌申请。And sending, according to the sending rate threshold, a to-be-sent token request corresponding to the identifier information in the sending sequence.
  7. 根据权利要求1或2所述的方法,其中,The method according to claim 1 or 2, wherein
    所述当接收到第一流队列的申请命令时,判断发送序列中是否包括所述第一流队列的第一标识信息,包括:When the request for the first flow queue is received, determining whether the first identifier of the first flow queue is included in the sending sequence includes:
    查询标记信息,其中,所述标记信息能够用于表征所述第一标识信息是否位于所述发送序列中;Querying tag information, wherein the tag information can be used to characterize whether the first identification information is located in the sending sequence;
    基于所述标记信息的信息内容,判断所述第一标识信息是否位于所述发送序列中。Determining whether the first identification information is located in the sending sequence based on the information content of the tag information.
  8. 根据权利要求7所述的方法,其中,The method of claim 7 wherein
    所述方法还包括:The method further includes:
    基于所述第一标识信息是否位于所述发送序列中,更新所述标记信息的信息内容。 Updating the information content of the tag information based on whether the first identification information is located in the transmission sequence.
  9. 根据权利要求1或2所述的方法,其中,The method according to claim 1 or 2, wherein
    所述方法还包括:The method further includes:
    按照各所述流队列的标识信息进入所述发送序列中的先后顺序,依次执行各所述流队列的待发送令牌申请。The request to be sent of each of the flow queues is sequentially executed according to the sequence in which the identification information of each flow queue enters the transmission sequence.
  10. 一种令牌申请处理装置,所述装置包括:A token application processing device, the device comprising:
    判断单元,配置为当接收到第一流队列的申请命令时,判断发送序列中是否包括所述第一流队列的第一标识信息;The determining unit is configured to: when receiving the application command of the first flow queue, determine whether the first identifier information of the first flow queue is included in the sending sequence;
    处理单元,配置为若所述发送序列中包括所述第一标识信息,则屏蔽所述申请命令触发的将所述第一标识信息添加到所述发送序列中的操作;a processing unit, configured to: if the first identifier information is included in the sending sequence, masking an operation of adding the first identifier information to the sending sequence triggered by the application command;
    其中,所述发送序列,用于记录待发送令牌申请的各流队列的标识信息;The sending sequence is used to record identifier information of each flow queue of the token request to be sent;
    所述发送序列中一个所述标识信息表明所述标识信息对应的流队列有一个待发送令牌申请。The identifier information in the sending sequence indicates that the flow queue corresponding to the identifier information has a token request to be sent.
  11. 根据权利要求10所述的装置,其中,The device according to claim 10, wherein
    所述处理单元,还配置为若所述发送序列中不包括所述第一标识信息时,将所述第一标识信息添加到所述发送序列中。The processing unit is further configured to add the first identifier information to the sending sequence if the first identifier information is not included in the sending sequence.
  12. 根据权利要求10或11所述的装置,其中,The apparatus according to claim 10 or 11, wherein
    所述装置还包括:The device also includes:
    记录单元,配置为记录所述第一流队列的前一个已发送令牌申请的申请请求;a recording unit configured to record an application request of a previous sent token request of the first flow queue;
    第一比较单元,配置为比较本次第一流队列待发送的令牌申请的申请请求与所述第一流队列的前一个已发送令牌申请的申请请求是否相同;The first comparison unit is configured to compare whether the application request of the token request to be sent in the current flow queue is the same as the application request of the previous sent token request of the first flow queue;
    终止单元,配置为若本次第一流队列待发送的令牌申请的申请请求与所述第一流队列的前一个已发送令牌申请的申请请求相同,终止所述第一流队列的本次待发送的令牌申请的发送。 The terminating unit is configured to terminate the current flow queue request to be sent if the application request of the token request to be sent in the current flow queue is the same as the application request of the previous sent token request of the first flow queue. The token application is sent.
  13. 根据权利要求10或11所述的装置,其中,The apparatus according to claim 10 or 11, wherein
    所述装置还包括:The device also includes:
    记录单元,配置为记录所述第一流队列的前一个已发送令牌申请的申请请求;a recording unit configured to record an application request of a previous sent token request of the first flow queue;
    第二比较单元,配置为比较本次所述第一流队列的申请命令中的申请请求与前一个已发送令牌申请的申请请求是否相同;a second comparison unit, configured to compare whether the application request in the application command of the first flow queue is the same as the application request of the previous sent token request;
    所述处理单元,还配置为若本次所述第一流队列的申请命令中的申请请求与前一个已发送令牌申请的申请请求相同,屏蔽本次所述申请命令触发的将所述第一标识信息添加到所述发送序列中的操作。The processing unit is further configured to: if the application request in the application command of the first flow queue is the same as the application request of the previous sent token request, shielding the first application triggered by the application command The identification information is added to the operation in the transmission sequence.
  14. 根据权利要求10或11所述的装置,其中,The apparatus according to claim 10 or 11, wherein
    所述装置还包括:The device also includes:
    控制单元,配置为在基于所述发送序列发送所述第一流队列的令牌申请时,控制所述令牌申请的申请请求为所述第一流队列最后一次发送的所述申请命令的申请请求。The control unit is configured to, when the token request of the first flow queue is sent based on the sending sequence, control an application request of the token request as an application request of the application command sent by the first flow queue last time.
  15. 根据权利要求10或11所述的装置,其中,The apparatus according to claim 10 or 11, wherein
    所述装置还包括:The device also includes:
    限速单元,配置为依据发送速率阈值,发送所述发送序列中标识信息对应的待发送令牌申请。The rate limiting unit is configured to send a to-be-sent token request corresponding to the identifier information in the sending sequence according to the sending rate threshold.
  16. 根据权利要求10或11所述的装置,其中,The apparatus according to claim 10 or 11, wherein
    所述判断单元,配置为查询标记信息,其中,所述标记信息能够用于表征所述第一标识信息是否位于所述发送序列中;及基于所述标记信息的信息内容,判断所述第一标识信息是否位于所述发送序列中。The determining unit is configured to query the tag information, wherein the tag information can be used to indicate whether the first identifier information is located in the sending sequence; and determine the first based on the information content of the tag information Whether the identification information is in the transmission sequence.
  17. 根据权利要求16所述的装置,其中,The device according to claim 16, wherein
    所述装置还包括:The device also includes:
    更新单元,配置为基于所述第一标识信息是否位于所述发送序列中, 更新所述标记信息的信息内容。And an updating unit configured to determine whether the first identification information is located in the sending sequence, Update the information content of the tag information.
  18. 根据权利要求10或11所述的装置,其中,The apparatus according to claim 10 or 11, wherein
    所述装置还包括:The device also includes:
    发送单元,配置为按照各所述流队列的标识信息进入所述发送序列中的先后顺序,依次执行各所述流队列的待发送令牌申请。The sending unit is configured to sequentially execute the to-be-sent token request of each of the stream queues according to the sequence of the identification information of each of the flow queues entering the sending sequence.
  19. 一种计算机存储介质,所述计算机存储介质中存储有计算机可执行指令,所述计算机可执行指令用于执行权利要求1至8所述令牌申请处理方法的至少其中之一。 A computer storage medium having stored therein computer executable instructions for performing at least one of the token application processing methods of claims 1-8.
PCT/CN2016/083507 2015-07-29 2016-05-26 Method and apparatus for processing token application, computer storage medium WO2017016300A1 (en)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN201510455946.1A CN107040478A (en) 2015-07-29 2015-07-29 Token application processing method and device
CN201510455946.1 2015-07-29

Publications (1)

Publication Number Publication Date
WO2017016300A1 true WO2017016300A1 (en) 2017-02-02

Family

ID=57884805

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2016/083507 WO2017016300A1 (en) 2015-07-29 2016-05-26 Method and apparatus for processing token application, computer storage medium

Country Status (2)

Country Link
CN (1) CN107040478A (en)
WO (1) WO2017016300A1 (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114430362A (en) * 2021-12-28 2022-05-03 东莞市李群自动化技术有限公司 Link switching method, FPGA chip, device and storage medium

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111556114A (en) * 2020-04-26 2020-08-18 天津中新智冠信息技术有限公司 Information interaction method and device and server

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20050047425A1 (en) * 2003-09-03 2005-03-03 Yonghe Liu Hierarchical scheduling for communications systems
US7555579B2 (en) * 2004-05-21 2009-06-30 Nortel Networks Limited Implementing FIFOs in shared memory using linked lists and interleaved linked lists
CN101902487A (en) * 2009-05-26 2010-12-01 中兴通讯股份有限公司 Queue scheduling method and device based on linked list
CN103107996A (en) * 2013-02-07 2013-05-15 北京中视广信科技有限公司 On-line download method and system of digital certificate and digital certificate issuing platform

Family Cites Families (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101808037B (en) * 2010-03-15 2014-09-10 中兴通讯股份有限公司 Method and device for traffic management in switch network
CN103188160B (en) * 2013-04-18 2016-12-07 杭州华三通信技术有限公司 A kind of flow control methods and retransmission unit

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20050047425A1 (en) * 2003-09-03 2005-03-03 Yonghe Liu Hierarchical scheduling for communications systems
US7555579B2 (en) * 2004-05-21 2009-06-30 Nortel Networks Limited Implementing FIFOs in shared memory using linked lists and interleaved linked lists
CN101902487A (en) * 2009-05-26 2010-12-01 中兴通讯股份有限公司 Queue scheduling method and device based on linked list
CN103107996A (en) * 2013-02-07 2013-05-15 北京中视广信科技有限公司 On-line download method and system of digital certificate and digital certificate issuing platform

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114430362A (en) * 2021-12-28 2022-05-03 东莞市李群自动化技术有限公司 Link switching method, FPGA chip, device and storage medium
CN114430362B (en) * 2021-12-28 2024-04-12 东莞市李群自动化技术有限公司 Link switching method, FPGA chip, equipment and storage medium

Also Published As

Publication number Publication date
CN107040478A (en) 2017-08-11

Similar Documents

Publication Publication Date Title
US11799764B2 (en) System and method for facilitating efficient packet injection into an output buffer in a network interface controller (NIC)
CN109412964B (en) Message control method and network device
US9800513B2 (en) Mapped FIFO buffering
US8867559B2 (en) Managing starvation and congestion in a two-dimensional network having flow control
EP2466824B1 (en) Service scheduling method and device
US10122623B2 (en) Control device and control method in SDN network
WO2017016505A1 (en) Data enqueuing and dequeuing method and queue management unit
CN109684269B (en) PCIE (peripheral component interface express) exchange chip core and working method
CN104468401A (en) Message processing method and device
WO2022089175A1 (en) Network congestion control method and apparatus
US11876859B2 (en) Controlling packet delivery based on application level information
WO2017016300A1 (en) Method and apparatus for processing token application, computer storage medium
CN113157465B (en) Message sending method and device based on pointer linked list
WO2020082839A1 (en) Message processing method, related device and computer storage medium
WO2019109902A1 (en) Queue scheduling method and apparatus, communication device, and storage medium
WO2017000861A1 (en) Method and apparatus for learning mac address in virtual local area network of switch
WO2024032426A1 (en) Data processing method, network interface card, electronic device, and storage medium
CN112838992B (en) Message scheduling method and network equipment
WO2023207628A1 (en) Packet transmission method and packet forwarding device
CN113765796B (en) Flow forwarding control method and device
US9621487B2 (en) Method and apparatus for protection switching based on memory control in packet transport system
US9674282B2 (en) Synchronizing SLM statuses of a plurality of appliances in a cluster
CN115396380B (en) Data stream transmission method, device and equipment based on time sensitive network
WO2024011907A1 (en) Data scheduling method, and electronic device and storage medium
WO2022227568A1 (en) Data transmission method, network node, optical system, and storage medium

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 16829667

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

122 Ep: pct application non-entry in european phase

Ref document number: 16829667

Country of ref document: EP

Kind code of ref document: A1