Data transmission method, device, network equipment and storage medium

Through the coordination of the token barrel algorithm and multiple token buckets, the problem of low reliability of data transmission in the industrial control network has been solved, and the effective control and improvement of the data transmission of data messages.

CN115987903BActive Publication Date: 2025-01-28NEUSOFT CORP
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202211668043.8
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-12-23
Publication Date
2025-01-28
Estimated Expiration
2042-12-23

AI Technical Summary

Technical Problem

When the network resources are insufficient or the load is too high, the firewall equipment in industrial control networks lacks a reasonable data transmission control mechanism, resulting in a reduced reliability of data packet transmission.

Method used

Through the token barrel algorithm, according to the types and target data of the data message to be sent, use multiple token barrels (the first token barrel, the second token barrel, and the third token barrel) control data report) The sending or cache of the article achieves transmission control of data messages.

Benefits of technology

Improved the reliability of data transmission, and through reasonable transmission control, the data messages delayed or lost when the network resources were insufficient or overloaded.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN115987903B_ABST
    Figure CN115987903B_ABST
Patent Text Reader

Abstract

The present disclosure relates to a data transmission method, device, network equipment and storage medium. The method includes: determining a target protocol type and a target data volume of a data message to be sent; when the target protocol type is a first preset protocol type, sending or caching the data message according to the target data volume, a first token bucket, a second token bucket and a third token bucket; or, when the target protocol type is a second preset protocol type, sending or caching the data message of the second preset protocol type according to the target data volume, the first token bucket and the third token bucket; wherein the first preset protocol type and the second preset protocol type are different protocol types, the first token filling rate corresponding to the first token bucket is greater than the second token filling rate corresponding to the second token bucket, the third token filling rate corresponding to the third token bucket is less than or equal to the target difference, and the target difference is the difference between the first token filling rate and the second token filling rate.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present disclosure relates to the field of communication technology, and in particular, to a data sending method, device, network equipment and storage medium. Background Art

[0002] With the advancement of communication technology, network devices such as firewalls or routers are also needed in the field of industrial control to ensure the security of network communications. Firewall devices in industrial control networks usually use a best-effort transmission model, and all data packets of multiple protocol types are sent with the same priority. When network resources are sufficient, data packets of all protocols can be sent normally. However, when network resources are insufficient or the network load is too high, there is a lack of a reasonable data transmission control mechanism, which reduces the reliability of industrial control-related data packet transmission. Summary of the invention

[0003] In order to overcome the above problems existing in the related art, the present disclosure provides a data sending method, apparatus, network device and storage medium.

[0004] According to a first aspect of an embodiment of the present disclosure, a data sending method is provided, the method comprising:

[0005] Determine the target protocol type and target data volume of the data message to be sent;

[0006] When the target protocol type is a first preset protocol type, sending or buffering the data message according to the target data volume, the first token bucket, the second token bucket, and the third token bucket; or,

[0007] When the target protocol type is a second preset protocol type, sending or caching the data message of the second preset protocol type according to the target data volume, the first token bucket and the third token bucket;

[0008] Among them, the first preset protocol type and the second preset protocol type are different protocol types, the second token bucket is a token bucket dedicated to data packets of the first preset protocol type, the first token fill rate corresponding to the first token bucket is greater than the second token fill rate corresponding to the second token bucket, the third token fill rate corresponding to the third token bucket is less than or equal to the target difference, and the target difference is the difference between the first token fill rate and the second token fill rate.

[0009] In some embodiments, sending or caching the data message according to the target data volume, the first token bucket, the second token bucket, and the third token bucket includes:

[0010] When the first token bucket and the second token bucket meet the first preset condition, the data message is sent, and a first remaining token data amount of the first token bucket and a second remaining token data amount of the second token bucket are updated according to the target data amount; or,

[0011] When the first token bucket and the second token bucket do not satisfy the first preset condition, sending or caching the data message of the first preset protocol type according to the target data volume, the first token bucket and the third token bucket;

[0012] The first preset condition includes: the first remaining token data amount is greater than or equal to the target data amount, and the second remaining token data amount is greater than or equal to the target amount.

[0013] In some embodiments, sending or caching the data message of the first preset protocol type according to the target data volume, the first token bucket, and the third token bucket includes:

[0014] If it is determined according to the target data volume that the first token bucket and the third token bucket meet the second preset condition, the data message is sent, and the first remaining token data amount and the third remaining token data amount of the third token bucket are updated according to the target data amount; or,

[0015] If it is determined according to the target data volume that the first token bucket and the third token bucket do not satisfy the second preset condition, storing the data message in a first cache queue corresponding to the first preset protocol type;

[0016] The second preset condition includes: the first remaining token data amount is greater than or equal to the target data amount, and the third remaining token data amount is greater than or equal to the target data amount.

[0017] In some embodiments, storing the data message in a first cache queue corresponding to the first preset protocol type includes:

[0018] Determine data flow information according to the data message;

[0019] When it is determined that the first cache queue includes a first data flow queue corresponding to the data flow information, storing the data message in the first data flow queue; or,

[0020] When it is determined that the first cache queue does not include the first data flow queue corresponding to the data flow information, the first data flow queue is created in the first cache queue according to the data flow information, and the data packet is stored in the first data flow queue.

[0021] In some embodiments, the method further comprises:

[0022] In the case that unsent first cache data packets are stored in the first cache queue, the first cache data packets of each first data flow queue are polled and sent from multiple first data flow queues in the first cache queue according to the first remaining token data amount, the second remaining token data amount and the third remaining token data amount.

[0023] In some embodiments, sending or caching the data message of the second preset protocol type according to the target data volume, the first token bucket, and the third token bucket includes:

[0024] If the third remaining token data amount of the third token bucket is less than the third total token data amount of the third token bucket, the data message is stored in the second cache queue corresponding to the second preset protocol type; or,

[0025] If the third remaining token data amount is equal to the third token total data amount of the third token bucket, the data message is sent or cached according to the first token bucket.

[0026] In some embodiments, sending or caching the data message according to the first token bucket includes:

[0027] When the first remaining token data amount of the first token bucket is greater than or equal to the target data amount, sending the data message, and updating the first remaining token data amount according to the target data amount; or,

[0028] When the first remaining token data amount is less than the target data amount, the data message is stored in the second cache queue.

[0029] In some embodiments, the method further comprises:

[0030] When the first cache queue is empty and unsent second cache data packets are stored in the second cache queue, the second cache data packets of each second data flow queue are polled and sent from multiple second data flow queues in the second cache queue according to the first remaining token data amount and the third remaining token data amount.

[0031] According to a second aspect of an embodiment of the present disclosure, a data sending device is provided, the device comprising:

[0032] A determination module, used to determine the target protocol type and target data volume of the data message to be sent;

[0033] A processing module, configured to send or cache the data message according to the target data volume, the first token bucket, the second token bucket, and the third token bucket when the target protocol type is a first preset protocol type; or, when the target protocol type is a second preset protocol type, send or cache the data message of the second preset protocol type according to the target data volume, the first token bucket, and the third token bucket;

[0034] Among them, the first preset protocol type and the second preset protocol type are different protocol types, the second token bucket is a token bucket dedicated to data packets of the first preset protocol type, the first token fill rate corresponding to the first token bucket is greater than the second token fill rate corresponding to the second token bucket, the third token fill rate corresponding to the third token bucket is less than or equal to the target difference, and the target difference is the difference between the first token fill rate and the second token fill rate.

[0035] In some embodiments, the processing module is used to send the data message when the first token bucket and the second token bucket meet a first preset condition, and update the first remaining token data amount of the first token bucket and the second remaining token data amount of the second token bucket according to the target data amount; or, when the first token bucket and the second token bucket do not meet the first preset condition, send or cache the data message of the first preset protocol type according to the target data amount, the first token bucket and the third token bucket; wherein the first preset condition includes: the first remaining token data amount is greater than or equal to the target data amount, and the second remaining token data amount is greater than or equal to the target amount.

[0036] In some embodiments, the processing module is used to send the data message and update the first remaining token data amount and the third remaining token data amount of the third token bucket according to the target data amount if it is determined that the first token bucket and the third token bucket meet the second preset condition based on the target data amount; or, if it is determined that the first token bucket and the third token bucket do not meet the second preset condition based on the target data amount, store the data message in the first cache queue corresponding to the first preset protocol type; the second preset condition includes: the first remaining token data amount is greater than or equal to the target data amount, and, the third remaining token data amount is greater than or equal to the target data amount.

[0037] In some embodiments, the processing module is used to determine data flow information based on the data packet; when it is determined that the first cache queue includes a first data flow queue corresponding to the data flow information, the data packet is stored in the first data flow queue; or, when it is determined that the first cache queue does not include the first data flow queue corresponding to the data flow information, the first data flow queue is created in the first cache queue according to the data flow information, and the data packet is stored in the first data flow queue.

[0038] In some embodiments, the processing module is also used to, when there are unsent first cache data packets stored in the first cache queue, poll and send the first cache data packets of each first data flow queue from multiple first data flow queues in the first cache queue according to the first remaining token data amount, the second remaining token data amount and the third remaining token data amount.

[0039] In some embodiments, the processing module is used to store the data message in the second cache queue corresponding to the second preset protocol type if the third remaining token data amount of the third token bucket is less than the third total token data amount of the third token bucket; or, if the third remaining token data amount is equal to the third total token data amount of the third token bucket, send or cache the data message according to the first token bucket.

[0040] In some embodiments, the processing module is used to send the data message when the first remaining token data amount of the first token bucket is greater than or equal to the target data amount, and update the first remaining token data amount according to the target data amount; or, when the first remaining token data amount is less than the target data amount, store the data message in the second cache queue.

[0041] In some embodiments, the processing module is also used to poll and send second cache data packets of each second data flow queue from multiple second data flow queues in the second cache queue according to the first remaining token data amount and the third remaining token data amount when the first cache queue is empty and the second cache queue stores unsent second cache data packets.

[0042] According to a third aspect of an embodiment of the present disclosure, a network device is provided, comprising: a memory on which a computer program is stored; and a processor for executing the computer program in the memory to implement the steps of the method described in the first aspect of the present disclosure.

[0043] According to a fourth aspect of an embodiment of the present disclosure, a computer-readable storage medium is provided, on which a computer program is stored. When the computer program is executed by a processor, the steps of the method described in the first aspect of the present disclosure are implemented.

[0044] The technical solution provided by the embodiment of the present disclosure may include the following beneficial effects: determining the target protocol type and target data volume of the data message to be sent; when the target protocol type is the first preset protocol type, sending or caching the data message according to the target data volume, the first token bucket, the second token bucket and the third token bucket; or, when the target protocol type is the second preset protocol type, sending or caching the data message of the second preset protocol type according to the target data volume, the first token bucket and the third token bucket; wherein the first preset protocol type and the second preset protocol type are different protocol types, the second token bucket is a token bucket dedicated to the data message of the first preset protocol type, the first token filling rate corresponding to the first token bucket is greater than the second token filling rate corresponding to the second token bucket, and the third token filling rate corresponding to the third token bucket is less than or equal to the target difference, and the target difference is the difference between the first token filling rate and the second token filling rate. In this way, through the token bucket algorithm, the sending of the data message can be controlled according to the target protocol type of the data message to be sent and multiple token buckets are used to control the transmission of the data message, thereby realizing the transmission control of the data message and improving the reliability of the data message transmission.

[0045] It is to be understood that the foregoing general description and the following detailed description are exemplary and explanatory only and are not restrictive of the present disclosure. BRIEF DESCRIPTION OF THE DRAWINGS

[0046] The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the present disclosure and, together with the description, serve to explain the principles of the present disclosure.

[0047] Figure 1 The figure is a flow chart of a data sending method according to an exemplary embodiment.

[0048] Figure 2 The figure is a flow chart showing another data sending method according to an exemplary embodiment.

[0049] Figure 3 is a flow chart showing another data sending method according to an exemplary embodiment.

[0050] Figure 4 The present invention is a flowchart of a method for sending a data message in a buffer queue according to an exemplary embodiment.

[0051] Figure 5 The invention is a block diagram of a data sending device according to an exemplary embodiment.

[0052] Figure 6 The invention is a block diagram of a network device according to an exemplary embodiment. DETAILED DESCRIPTION

[0053] Exemplary embodiments will be described in detail herein, examples of which are shown in the accompanying drawings. When the following description refers to the drawings, the same numbers in different drawings represent the same or similar elements unless otherwise indicated. The embodiments described in the following exemplary embodiments do not represent all embodiments consistent with the present disclosure. Instead, they are merely examples of devices and methods consistent with some aspects of the present disclosure as detailed in the appended claims.

[0054] It should be noted that all actions of acquiring signals, information or data in the present disclosure are carried out in compliance with the relevant data protection laws and policies of the country where the device is located and with the authorization given by the owner of the corresponding device.

[0055] In the description of the present disclosure, the terms used, such as "first", "second", etc., are used to distinguish similar objects and do not have to be understood as a specific order or sequence. In addition, in the description with reference to the accompanying drawings, the same symbols in different drawings represent the same elements unless otherwise stated.

[0056] In the description of the present disclosure, the term "including" and its variations are open inclusions, i.e., "including but not limited to". The term "based on" means "based at least in part on". The term "one embodiment" means "at least one embodiment"; the term "another embodiment" means "at least one additional embodiment"; the term "some embodiments" means "at least some embodiments". The relevant definitions of other terms will be given in the following description.

[0057] In the description of the present disclosure, unless otherwise specified, "multiple" means two or more than two, and other quantifiers are similar thereto; "at least one item", "one or more items" or similar expressions refer to any combination of these items, including any combination of single items or plural items. For example, at least one item a can represent any number of a; for another example, one or more items among a, b and c can represent: a, b, c, ab, ac, bc, or abc, where a, b, c can be single or multiple; "and / or" is a kind of association relationship that describes the associated objects, indicating that there can be three relationships, for example, A and / or B can represent: A exists alone, A and B exist at the same time, and B exists alone, where A and B can be singular or plural.

[0058] Although operations or steps are described in a specific order in the drawings in the embodiments of the present disclosure, it should not be understood that it is required to perform these operations or steps in the specific order shown or in a serial order, or to perform all the operations or steps shown to obtain the desired results. In the embodiments of the present disclosure, these operations or steps can be performed in series in different orders; these operations or steps can also be performed in parallel; or some of these operations or steps can be performed.

[0059] The present disclosure is described below in conjunction with specific embodiments.

[0060] First, the application scenario of the present disclosure is described. The present disclosure can be applied to data communication scenarios, especially data communication in the field of industrial control. Firewall devices in industrial control networks usually use a best-effort quality transmission model. In the case of insufficient network resources or excessive network load, there is a lack of a reasonable priority control mechanism, resulting in delayed transmission or even discard of industrial control-related data packets, which affects the reliability of data transmission and the reliability of industrial equipment control.

[0061] In order to solve the above problems, the present invention provides a data transmission method, device, network device and storage medium. The method can control the transmission of data messages by using a token bucket algorithm according to the target protocol type of the data message to be sent, thereby realizing the transmission control of the data message and improving the reliability of the data message transmission.

[0062] Figure 1 FIG. 1 is a flow chart of a data transmission method according to an exemplary embodiment. The method can be applied to a network device, which may include a firewall, a router, a computer, a server, or other devices. Figure 1 As shown, the method may include:

[0063] S101. Determine a target protocol type and a target data volume of a data message to be sent.

[0064] In some embodiments, the target protocol type may be determined based on preset protocol parameters of the data message.

[0065] For example, when the preset protocol parameter is a first value (eg, 1), the target protocol type may be a first preset protocol type; when the preset protocol parameter is a non-first value (eg, 0), the target protocol type may be a second preset protocol type.

[0066] In one implementation, the first preset protocol type may be an industrial control protocol type or other pre-set high-priority protocol types, and the second preset protocol type may be a non-industrial control protocol type (eg, a common protocol type) or other pre-set low-priority protocol types.

[0067] In some embodiments, the message size of the data message may be used as the target data volume.

[0068] S102: When the target protocol type is the first preset protocol type, send or cache the data message according to the target data volume, the first token bucket, the second token bucket, and the third token bucket.

[0069] S103: When the target protocol type is the second preset protocol type, send or cache the data message according to the target data volume, the first token bucket, and the third token bucket.

[0070] Among them, the first preset protocol type and the second preset protocol type can be different protocol types, the second token bucket can be a token bucket dedicated to data packets of the first preset protocol type, the first token fill rate corresponding to the first token bucket can be greater than the second token fill rate corresponding to the second token bucket, and the third token fill rate corresponding to the third token bucket can be less than or equal to the target difference, and the target difference is the difference between the first token fill rate and the second token fill rate.

[0071] It should be noted that, in the embodiment of the present disclosure, for a data message, step S102 or step S103 may be selected to be executed according to the target protocol type.

[0072] In order to enable those skilled in the art to better understand the technical solution provided by the embodiment of the present disclosure, the principle of the token bucket algorithm provided by the embodiment of the present disclosure is first introduced:

[0073] The token bucket algorithm is a flow control technology that can be used for flow restriction and flow shaping, and can measure the flow rate and burst. The token bucket can be regarded as a container for a certain number of tokens. For the token bucket set in the network device (firewall or router, etc.), the network device can set the size of the token bucket and place tokens into the token bucket at the set rate. When the tokens in the bucket are full (exceeding the size of the token bucket), the extra tokens overflow and the tokens in the bucket no longer increase. Each message that needs to be forwarded must take a certain number of tokens from the token bucket (the specific number depends on the size of the message) before it can be sent normally. If there are enough tokens in the bucket to send the message, the data is sent, otherwise it can be discarded or cached.

[0074] The token bucket provided in the embodiment of the present disclosure may have one or more of the following parameters:

[0075] Token Fill Rate: This is used to characterize the rate at which tokens are filled. This rate can be expressed in bytes per second or bits per second. For example, the token fill rate can be 100,000,000 bytes per second.

[0076] Total token data size (Size): used to represent the total amount of data represented by the total number of tokens in the token bucket when it is full. It should be noted that the total token data size can be obtained by multiplying the total number of tokens in the token bucket by the amount of data represented by each token. For example, the total number of tokens in the token bucket (that is, the token bucket size) can be set to 200,000,000, and the amount of data represented by each token is 1 byte, so the total token data size can be 200,000,000 bytes.

[0077] Remaining token data volume: used to represent the amount of data represented by the number of tokens currently remaining in the token bucket. For example, the number of tokens currently remaining in the token bucket is 10,000,000, and the amount of data represented by each token is 1 byte, so the remaining token data volume can be 10,000,000 bytes.

[0078] In some embodiments of the present disclosure, multiple token buckets may be provided to implement the data transmission method. For example, at least the following three token buckets may be provided:

[0079] First token bucket: The first token filling rate (Rate1) corresponding to the first token bucket can be any preset value, for example, it can be a preset maximum network rate, and the maximum network rate can be the maximum bandwidth that all devices in the industrial control system can use. The first token total data volume (Size1) corresponding to the first token bucket can be twice or more of the first token filling rate (Rate1). For example, if the first token filling rate is 100MByte / s, the first token total data volume can be 200MByte or more.

[0080] Second token bucket: The second token fill rate (Rate2) corresponding to the second token bucket can be any preset value that is less than or equal to the first token fill rate (Rate1). For example, the second token fill rate can be a preset rate for sending data packets of the first preset protocol type, for example, it can be the guaranteed rate (also called guaranteed bandwidth) required for data packets of the first preset protocol type, and the second token fill rate can be less than the first token fill rate. The second token total data volume (Size2) corresponding to the second token bucket can be twice or more of the second token fill rate (Rate2). For example, if the second token fill rate is 50MByte / s, the second token total data volume can be 100MByte or more.

[0081] Third token bucket: The third token fill rate (Rate3) corresponding to the third token bucket can be any pre-set rate that is less than or equal to the target difference, and the target difference can be the difference between the first token fill rate (Rate1) and the second token fill rate (Rate2). For example, the first token fill rate is 100MByte / s and the second token fill rate is 80MByte / s. The third token fill rate can be any rate that is less than or equal to 20MByte / s, such as 16MByte / s. The third token total data volume (Size3) corresponding to the third token bucket can be twice or more of the above-mentioned third token fill rate (Rate3). For example, if the second token fill rate is 16MByte / s, the second token total data volume can be 32MByte or more.

[0082] In some embodiments, the third token fill rate may be the product of the target difference and a preset tolerance factor. The tolerance factor may be any value greater than 0 and less than 1. For example, the preset tolerance factor may be 0.8 or 0.7.

[0083] In some embodiments, the first token bucket may also be referred to as an NA token bucket, the second token bucket may also be referred to as an OA token bucket, and the third token bucket may also be referred to as a CA token bucket.

[0084] In some embodiments, the data sending method provided by the embodiments of the present disclosure can be applied to the communication network of an industrial control system. The above-mentioned first preset protocol type may be an industrial control protocol type, and the data packet of the industrial control protocol type is data used to control industrial equipment; in the industrial control system, the protocol type of other data packets except the industrial control protocol type may be a second preset protocol type (or called a common protocol type).

[0085] In some embodiments, the first token bucket can be used as a token bucket shared by the first preset protocol type and the second preset protocol type; the second token bucket and the third token bucket can both be used as token buckets dedicated to the first preset protocol type, wherein data packets of the first preset protocol type can preferentially use the second token bucket for data transmission, and when the second token bucket does not have enough tokens, the third token bucket can be used, so that the third token bucket can be used to cope with sudden data traffic of the first preset protocol type.

[0086] The above method is adopted to determine the target protocol type and target data volume of the data message to be sent; when the target protocol type is the first preset protocol type, the data message is sent or cached according to the target data volume, the first token bucket, the second token bucket and the third token bucket; or, when the target protocol type is the second preset protocol type, the data message of the second preset protocol type is sent or cached according to the target data volume, the first token bucket and the third token bucket; wherein the first preset protocol type and the second preset protocol type are different protocol types, the second token bucket is a token bucket dedicated to the data message of the first preset protocol type, the first token filling rate corresponding to the first token bucket is greater than the second token filling rate corresponding to the second token bucket, the third token filling rate corresponding to the third token bucket is less than or equal to the target difference, and the target difference is the difference between the first token filling rate and the second token filling rate. In this way, through the token bucket algorithm, the sending of the data message can be controlled according to the target protocol type of the data message to be sent and multiple token buckets are used, thereby realizing the transmission control of the data message and improving the reliability of the data message transmission.

[0087] It should be noted that, in the above step S102, there may be multiple ways to send or cache the data message according to the target data volume, the first token bucket, the second token bucket, and the third token bucket, for example:

[0088] In some embodiments, when the first token bucket and the second token bucket meet the first preset condition, the data message can be sent directly, and the first remaining token data amount of the first token bucket and the second remaining token data amount of the second token bucket can be updated according to the target data amount.

[0089] For example, the first remaining token data amount and the second remaining token data amount can be reduced according to the target data amount. For example, the difference obtained by subtracting the target data amount from the first remaining token data amount can be used as the updated first remaining token data amount, and the difference obtained by subtracting the target data amount from the second remaining token data amount can be used as the updated second remaining token data amount, that is, after taking out the tokens corresponding to the target data amount from both the first token bucket and the second token bucket, the data message is directly sent.

[0090] The first preset condition may include: the first remaining token data amount of the first token bucket is greater than or equal to the target data amount, and the second remaining token data amount of the second token bucket is greater than or equal to the target amount. It should be noted that the first preset condition may indicate that there are enough tokens in both the first token bucket and the second token bucket for sending the data message.

[0091] In other embodiments, when the first token bucket and the second token bucket do not satisfy the first preset condition, the data message may be sent or cached according to the target data volume, the first token bucket and the third token bucket.

[0092] For example, whether the first token bucket and the third token bucket meet the second preset condition can be determined based on the target data volume. If the second preset condition is met, the data packet is sent, and the first remaining token data volume and the third remaining token data volume of the third token bucket are updated according to the target data volume; if the second preset condition is not met, the data packet is stored in the first cache queue corresponding to the first preset protocol type.

[0093] The second preset condition may include: the first remaining token data amount is greater than or equal to the target data amount, and the third remaining token data amount is greater than or equal to the target data amount.

[0094] It should be noted that the second preset condition may indicate that there are enough tokens in the first token bucket and the third token bucket for sending the data message.

[0095] In this way, the data message can be sent or cached in any of the above methods.

[0096] Figure 2 FIG. 1 is a flow chart of another data sending method according to an exemplary embodiment. Figure 2 As shown, the method may include:

[0097] S201. Determine a target protocol type and a target data volume of a data message to be sent.

[0098] S202: When the target protocol type is a first preset protocol type, determine whether the first token bucket and the second token bucket meet a first preset condition according to the target data volume.

[0099] The first preset condition may include: a first remaining token data amount of the first token bucket is greater than or equal to a target data amount, and a second remaining token data amount of the second token bucket is greater than or equal to a target amount.

[0100] It should be noted that the first preset condition may indicate that there are enough tokens in the first token bucket and the second token bucket for sending the data message.

[0101] S203: When the first token bucket and the second token bucket meet the first preset condition, send a data message, and update a first remaining token data amount of the first token bucket and a second remaining token data amount of the second token bucket according to the target data amount.

[0102] For example, the first remaining token data amount and the second remaining token data amount can be reduced according to the target data amount. For example, the difference obtained by subtracting the target data amount from the first remaining token data amount can be used as the updated first remaining token data amount, and the difference obtained by subtracting the target data amount from the second remaining token data amount can be used as the updated second remaining token data amount, that is, after taking out the tokens corresponding to the target data amount from both the first token bucket and the second token bucket, the data message is directly sent.

[0103] S204: When the first token bucket and the second token bucket do not meet the first preset condition, determine whether the first token bucket and the third token bucket meet the second preset condition according to the target data volume.

[0104] The second preset condition may include: the first remaining token data amount is greater than or equal to the target data amount, and the third remaining token data amount is greater than or equal to the target data amount.

[0105] It should be noted that the second preset condition may indicate that there are enough tokens in the first token bucket and the third token bucket for sending the data message.

[0106] S205: If it is determined according to the target data volume that the first token bucket and the third token bucket meet the second preset condition, a data message is sent, and the first remaining token data volume and the third remaining token data volume of the third token bucket are updated according to the target data volume.

[0107] By way of example, the difference obtained by subtracting the target data amount from the first remaining token data amount can be used as the updated first remaining token data amount, and the difference obtained by subtracting the target data amount from the third remaining token data amount can be used as the updated third remaining token data amount, that is, after taking out the tokens corresponding to the target data amount from the first token bucket and the third token bucket, the data message is sent directly.

[0108] S206: If it is determined according to the target data volume that the first token bucket and the third token bucket do not satisfy the second preset condition, the data message is stored in a first cache queue corresponding to the first preset protocol type.

[0109] It should be noted that the first token bucket and the third token bucket do not meet the second preset condition, which may indicate that at least one of the first token bucket or the third token bucket does not have enough tokens for sending the data message. At this time, the data message may be cached.

[0110] In the embodiments of the present disclosure, the cache queues corresponding to different protocol types may be the same or different.

[0111] Through the above manner, the data message can be sent or cached according to the first token bucket, the second token bucket and the third token bucket, thereby improving the reliability of data message sending.

[0112] In some embodiments of the present disclosure, the data message may be stored in a multi-cache queue manner. For example, the first cache queue may be used to store data messages of a first preset protocol type (e.g., an industrial control protocol type), and the second cache queue may be used to store data messages of a second preset protocol type (e.g., a non-industrial control protocol type). The first cache queue is a high priority queue, and the second cache queue is a low priority queue.

[0113] In some embodiments, the data packets may be stored in the first cache queue in the order of cache time.

[0114] In some other embodiments, data flow information may be first determined according to the data packet; and then, the data packet may be stored in the first cache queue according to the data flow information.

[0115] The data flow information may include one or more of the source IP, source port, destination IP, destination port and protocol number of the data packet. For example, the data flow information may include the source IP; for another example, the data flow information may include the source IP and the destination IP; for another example, the data flow information may also include the source IP, source port, destination IP, destination port and protocol number.

[0116] For example, the first cache queue may include one or more first data flow queues, and different data flow information may correspond to different first data flow queues.

[0117] The method of storing the data packet in the first cache queue according to the data flow information may include:

[0118] When it is determined that the first cache queue includes the first data flow queue corresponding to the data flow information, the data message is stored in the first data flow queue. For example, the data message may be stored at the end of the first data flow queue.

[0119] When it is determined that the first cache queue does not include the first data flow queue corresponding to the data flow information, a first data flow queue is created in the first cache queue according to the data flow information, and the data message is stored in the newly created first data flow queue.

[0120] In one implementation, the first cache queue may be stored in the form of a linked list, each element in the linked list may store a first data stream queue corresponding to a data stream information, and the first data stream queue corresponding to each data stream information may also be stored in the form of a linked list.

[0121] In this way, the data packets can be cached through the cache queue.

[0122] In some embodiments of the present disclosure, the data transmission method may further include a method for transmitting data in the first cache queue according to the token bucket. For example, when there are enough tokens in the above-mentioned multiple token buckets to send data packets, the data packets in the above-mentioned first cache queue may be sent. The method may further include:

[0123] In the case where unsent first cache data packets are stored in the first cache queue, the first cache data packets of each first data flow queue are polled and sent from the multiple first data flow queues in the first cache queue according to the first remaining token data amount, the second remaining token data amount and the third remaining token data amount. For example:

[0124] First, the amount of data to be sent is determined according to the first remaining token data amount, the second remaining token data amount, and the third remaining token data amount. For example, the sum of the second remaining token data amount and the third remaining token data amount can be calculated and used as the amount of data to be sent, or the minimum value of the sum and the first remaining token data amount can be used as the amount of data to be sent.

[0125] Then, according to the amount of data to be sent, data packets are polled and sent from each first data flow queue of the first cache queue, that is, each first data flow queue sends a data packet, and then sends it to another first data flow queue, and polling and sending are continued until the total data amount of the data packets sent is greater than or equal to the amount of data to be sent, or until all the data packets in the first cache queue are sent.

[0126] In this way, the data packets in the first cache queue can be sent according to multiple token buckets.

[0127] Figure 3 FIG. 1 is a flow chart showing another method for sending data according to an exemplary embodiment. Figure 3 As shown, the method may include:

[0128] S301: Determine the target protocol type and target data volume of the data message to be sent.

[0129] S302. When the target protocol type is the second preset protocol type, if the third remaining token data volume of the third token bucket is less than the third token total data volume of the third token bucket, the data message is stored in the second cache queue corresponding to the second preset protocol type.

[0130] The second preset protocol type is different from the first preset protocol type. For example, the first preset protocol type may include an industrial control protocol type, and the second preset protocol type may be a non-industrial control protocol type (or may be called a common protocol type).

[0131] It should be noted that the third token bucket is a token bucket dedicated to the first protocol message. The third remaining token data volume is less than the third token total data volume, which can indicate that the third token bucket is currently in an unsatisfied state, that is, the tokens in the third token bucket have been used by the data message of the first preset protocol type and are not fully filled. At this time, it can be indicated that the data message of the first preset protocol type has burst traffic. The data message of the second preset protocol type can first enter the second cache queue and wait for sending, so as to avoid affecting the transmission of the data message of the first preset protocol type.

[0132] S303: When the target protocol type is the second preset protocol type, if the third remaining token data amount corresponding to the third token bucket is equal to the third token total data amount of the third token bucket, send or cache the data message according to the first token bucket.

[0133] It should be noted that, for a data message, any one of the above S302 and S303 can be selected to be executed.

[0134] In this way, data packets of the second preset protocol type can be sent or buffered.

[0135] It should also be noted that the fact that the third remaining token data volume is less than the third token total data volume can indicate that the third token bucket is currently full, which can also indicate that there is no burst traffic in the data packet of the first preset protocol type. At this time, the data packet of the second preset protocol type can be sent or cached according to the first token bucket.

[0136] In some embodiments, when the first remaining token data amount of the first token bucket is greater than or equal to the target data amount, a data message is sent, and the first remaining token data amount is updated according to the target data amount.

[0137] For example, the difference obtained by subtracting the target data amount from the first remaining token data amount may be used as the updated first remaining token data amount, and the data message may be directly sent.

[0138] In other embodiments, when the first remaining token data amount is less than the target data amount, the data message is stored in a second cache queue corresponding to the second preset protocol type.

[0139] In some embodiments, the data packets may be stored in the second cache queue in the order of cache time.

[0140] In some other embodiments, data flow information may be first determined according to the data packet; and then, the data packet may be stored in the second cache queue according to the data flow information.

[0141] Likewise, the data flow information may include one or more of the source IP, source port, destination IP, destination port and protocol number of the data packet.

[0142] The second cache queue may include one or more second data flow queues, and different data flow information may correspond to different second data flow queues.

[0143] The method of storing the data packet in the second cache queue according to the data flow information may include:

[0144] When it is determined that the second cache queue includes the second data flow queue corresponding to the data flow information, the data message is stored in the second data flow queue. For example, the data message may be stored at the end of the second data flow queue.

[0145] When it is determined that the second cache queue does not include the second data flow queue corresponding to the data flow information, a second data flow queue is created in the second cache queue according to the data flow information, and the data message is stored in the newly created second data flow queue.

[0146] In one implementation, the second cache queue may also be stored in the form of a linked list, each element in the linked list may store a second data stream queue corresponding to a data stream information, and the second data stream queue corresponding to each data stream information may also be stored in the form of a linked list.

[0147] In this way, data packets of the second preset protocol type can be cached by the second cache queue.

[0148] In some embodiments of the present disclosure, the data sending method may further include a method for sending data packets in the second cache queue according to a token bucket.

[0149] It should be noted that the priority of the second cache queue can be lower than that of the first cache queue. When there is no data to be sent in the first cache queue, the data packets in the second cache queue can be sent; if there are still data packets in the first cache queue that have not been sent, the data packets in the first cache queue will be sent first, and the data packets in the second cache queue will be sent after all the data packets in the first cache queue have been sent.

[0150] For example, when the first cache queue is empty and the second cache queue stores unsent second cache data packets, the second cache data packets of each second data flow queue can be polled and sent from multiple second data flow queues in the second cache queue based on the first remaining token data amount and the third remaining token data amount.

[0151] In this way, the data packets in the second cache queue can be sent according to multiple token buckets.

[0152] In some other embodiments of the present disclosure, when the target protocol type is the second preset protocol type, if the third remaining token data volume corresponding to the third token bucket is equal to the third token total data volume of the third token bucket, the data message is sent or cached according to the first token bucket and the second token bucket.

[0153] By way of example, the token data volume difference between the first remaining token data volume of the first token bucket and the second token total data volume of the second token bucket can be calculated. When the token data volume difference is greater than or equal to the target data volume, a data packet is sent and the first remaining token data volume is updated according to the target data volume. Conversely, when the token data volume difference is less than the target data volume, the data packet can be stored in a second cache queue corresponding to a second preset protocol type.

[0154] In this way, the data message can be sent or buffered according to the first token bucket and the second token bucket.

[0155] Figure 4 FIG. 1 is a flow chart showing a method for sending a data message in a buffer queue according to an exemplary embodiment. Figure 4 As shown, the method may include:

[0156] S401: Determine whether there is a data message to be sent in a first cache queue corresponding to a first preset protocol type.

[0157] S402: When there is a data message to be sent in a first cache queue corresponding to a first preset protocol type, send a first cache data message in the first cache queue.

[0158] In this step, the first cache data message of each first data flow queue can be polled and sent from the multiple first data flow queues in the first cache queue. For example, the first cache data message of the first data flow queue corresponding to each data flow information in the first cache queue can be polled and obtained, and the first cache data message can be sent according to the first token bucket, the second token bucket and the third token bucket.

[0159] It should be noted that the specific method of sending the first cache data message according to the first token bucket, the second token bucket and the third token bucket can refer to the method of sending the data message corresponding to the first preset protocol type according to the first token bucket, the second token bucket and the third token bucket in the aforementioned embodiment of the present disclosure, which will not be repeated here.

[0160] S403: When there is no data packet to be sent in the first cache queue corresponding to the first preset protocol type, determine whether there is a data packet to be sent in the second cache queue corresponding to the second preset protocol type.

[0161] S404: When there are data packets to be sent in the second cache queue corresponding to the second preset protocol type, send the second cache data packets in the second cache queue.

[0162] In this step, the second cache data message of the second data flow queue corresponding to each data flow information in the second cache queue may be polled and obtained, and the second cache data message may be sent according to the first token bucket and the third token bucket.

[0163] It should be noted that the specific method of sending the second cache data message according to the first token bucket and the third token bucket can refer to the method of sending the data message corresponding to the second preset protocol type according to the first token bucket and the third token bucket in the aforementioned embodiment of the present disclosure, which will not be repeated here.

[0164] In this way, the data message in the cache queue can be sent according to the first token bucket, the second token bucket and the third token bucket.

[0165] Figure 5 is a block diagram of a data sending device 1100 according to an exemplary embodiment. Figure 5 As shown, the device 1100 may include:

[0166] Determination module 1101, used to determine the target protocol type and target data volume of the data message to be sent;

[0167] The processing module 1102 is used to send or cache the data message according to the target data volume, the first token bucket, the second token bucket and the third token bucket when the target protocol type is the first preset protocol type; or, when the target protocol type is the second preset protocol type, send or cache the data message of the second preset protocol type according to the target data volume, the first token bucket and the third token bucket;

[0168] Among them, the first preset protocol type and the second preset protocol type are different protocol types, the second token bucket is a token bucket dedicated to data packets of the first preset protocol type, the first token fill rate corresponding to the first token bucket is greater than the second token fill rate corresponding to the second token bucket, the third token fill rate corresponding to the third token bucket is less than or equal to the target difference, and the target difference is the difference between the first token fill rate and the second token fill rate.

[0169] In some embodiments, the processing module 1102 is used to send the data message when the first token bucket and the second token bucket meet a first preset condition, and update the first remaining token data amount of the first token bucket and the second remaining token data amount of the second token bucket according to the target data amount; or, when the first token bucket and the second token bucket do not meet the first preset condition, send or cache the data message of the first preset protocol type according to the target data amount, the first token bucket and the third token bucket; wherein the first preset condition includes: the first remaining token data amount is greater than or equal to the target data amount, and the second remaining token data amount is greater than or equal to the target amount.

[0170] In some embodiments, the processing module 1102 is used to send the data message and update the first remaining token data amount and the third remaining token data amount of the third token bucket according to the target data amount if it is determined that the first token bucket and the third token bucket meet the second preset condition based on the target data amount; or, if it is determined that the first token bucket and the third token bucket do not meet the second preset condition based on the target data amount, store the data message in the first cache queue corresponding to the first preset protocol type; the second preset condition includes: the first remaining token data amount is greater than or equal to the target data amount, and, the third remaining token data amount is greater than or equal to the target data amount.

[0171] In some embodiments, the processing module 1102 is used to determine data flow information based on the data packet; when it is determined that the first cache queue includes a first data flow queue corresponding to the data flow information, the data packet is stored in the first data flow queue; or, when it is determined that the first cache queue does not include the first data flow queue corresponding to the data flow information, the first data flow queue is created in the first cache queue according to the data flow information, and the data packet is stored in the first data flow queue.

[0172] In some embodiments, the processing module 1102 is also used to, when there are unsent first cache data packets stored in the first cache queue, poll and send the first cache data packets of each first data flow queue from multiple first data flow queues in the first cache queue according to the first remaining token data amount, the second remaining token data amount and the third remaining token data amount.

[0173] In some embodiments, the processing module 1102 is used to store the data message in the second cache queue corresponding to the second preset protocol type if the third remaining token data amount of the third token bucket is less than the third total token data amount of the third token bucket; or, if the third remaining token data amount is equal to the third total token data amount of the third token bucket, send or cache the data message according to the first token bucket.

[0174] In some embodiments, the processing module 1102 is used to send the data message when the first remaining token data amount of the first token bucket is greater than or equal to the target data amount, and update the first remaining token data amount according to the target data amount; or, when the first remaining token data amount is less than the target data amount, store the data message in the second cache queue.

[0175] In some embodiments, the processing module 1102 is also used to poll and send the second cache data message of each second data flow queue from multiple second data flow queues in the second cache queue according to the first remaining token data amount and the third remaining token data amount when the first cache queue is empty and the second cache queue stores unsent second cache data messages.

[0176] Regarding the device in the above embodiment, the specific manner in which each module performs operations has been described in detail in the embodiment of the method, and will not be elaborated here.

[0177] Figure 6 FIG. 2 is a block diagram of a network device 2000 according to an exemplary embodiment. Figure 6 As shown, the network device 2000 may include: a processor 2001 and a memory 2002. The network device 2000 may also include one or more of a multimedia component 2003, an input / output (I / O) interface 2004, and a communication component 2005.

[0178] The processor 2001 is used to control the overall operation of the network device 2000 to complete all or part of the steps in the above-mentioned data transmission method. The memory 2002 is used to store various types of data to support the operation of the network device 2000, and these data may include, for example, instructions for any application or method used to operate on the network device 2000, and application-related data, such as contact data, sent and received messages, pictures, audio, video, etc. The memory 2002 can be implemented by any type of volatile or non-volatile storage device or a combination thereof, such as static random access memory (Static Random Access Memory, referred to as SRAM), electrically erasable programmable read-only memory (Electrically Erasable Programmable Read-Only Memory, referred to as EEPROM), erasable programmable read-only memory (Erasable Programmable Read-Only Memory, referred to as EPROM), programmable read-only memory (Programmable Read-Only Memory, referred to as PROM), read-only memory (Read-Only Memory, referred to as ROM), magnetic memory, flash memory, magnetic disk or optical disk. The multimedia component 2003 may include a screen and an audio component. The screen may be, for example, a touch screen, and the audio component is used to output and / or input audio signals. For example, the audio component may include a microphone, which is used to receive external audio signals. The received audio signal may be further stored in the memory 2002 or sent through the communication component 2005. The audio component also includes at least one speaker for outputting audio signals. The input / output interface 2004 provides an interface between the processor 2001 and other interface modules, and the above-mentioned other interface modules may be keyboards, mice, buttons, etc. These buttons may be virtual buttons or physical buttons. The communication component 2005 is used for wired or wireless communication between the network device 2000 and other devices. Wireless communication, such as Wi-Fi, Bluetooth, Near Field Communication (NFC), 2G, 3G, 4G, 5G, NB-IOT, eMTC, or other 6G, etc., or a combination of one or more of them, is not limited here. Therefore, the corresponding communication component 2005 may include: Wi-Fi module, Bluetooth module, NFC module, etc.

[0179] In an exemplary embodiment, the network device 2000 can be implemented by one or more application specific integrated circuits (ASIC), digital signal processors (DSP), digital signal processing devices (DSPD), programmable logic devices (PLD), field programmable gate arrays (FPGA), controllers, microcontrollers, microprocessors or other electronic components to execute the above-mentioned data sending method.

[0180] In another exemplary embodiment, there is also provided a computer-readable storage medium, which stores a computer program or program instructions, and when the computer program or program instructions are executed by a processor, the steps of the above-mentioned data transmission method are implemented. For example, the computer-readable storage medium can be the above-mentioned memory 2002 including program instructions, and the above-mentioned program instructions can be executed by the processor 2001 of the network device 2000 to complete the above-mentioned data transmission method. Exemplarily, the computer-readable storage medium can be a non-temporary computer-readable storage medium, for example, the non-temporary computer-readable storage medium can be a ROM, a random access memory (RAM), a CD-ROM, a magnetic tape, a floppy disk, and an optical data storage device, etc.

[0181] In another exemplary embodiment, a computer program product is further provided. The computer program product includes a computer program executable by a programmable device, and the computer program has a code portion for executing the above data transmission method when executed by the programmable device.

[0182] Those skilled in the art will readily appreciate other embodiments of the present disclosure after considering the specification and practicing the present disclosure. This application is intended to cover any variations, uses or adaptations of the present disclosure, which follow the general principles of the present disclosure and include common knowledge or customary technical means in the art that are not disclosed in the present disclosure. The specification and examples are to be considered as exemplary only, and the true scope and spirit of the present disclosure are indicated by the following claims.

[0183] It should be understood that the present disclosure is not limited to the exact structures that have been described above and shown in the drawings, and that various modifications and changes may be made without departing from the scope thereof. The scope of the present disclosure is limited only by the appended claims.

Claims

1. A data transmission method, characterized in that: The method comprises: Determine the target protocol type and target data volume of the data message to be sent; When the target protocol type is a first preset protocol type, sending or buffering the data message according to the target data volume, the first token bucket, the second token bucket, and the third token bucket; or, When the target protocol type is a second preset protocol type, sending or caching the data message of the second preset protocol type according to the target data volume, the first token bucket and the third token bucket; The first preset protocol type and the second preset protocol type are different protocol types, the second token bucket is a token bucket dedicated to data messages of the first preset protocol type, a first token fill rate corresponding to the first token bucket is greater than a second token fill rate corresponding to the second token bucket, a third token fill rate corresponding to the third token bucket is less than or equal to a target difference, and the target difference is a difference between the first token fill rate and the second token fill rate; The sending or caching of the data message according to the target data volume, the first token bucket, the second token bucket, and the third token bucket includes: When the first token bucket and the second token bucket meet the first preset condition, the data message is sent, and a first remaining token data amount of the first token bucket and a second remaining token data amount of the second token bucket are updated according to the target data amount; or, When the first token bucket and the second token bucket do not satisfy the first preset condition, sending or caching the data message of the first preset protocol type according to the target data volume, the first token bucket and the third token bucket; The first preset condition includes: the first remaining token data amount is greater than or equal to the target data amount, and the second remaining token data amount is greater than or equal to the target amount; The sending or caching the data message of the second preset protocol type according to the target data volume, the first token bucket and the third token bucket includes: If the third remaining token data amount of the third token bucket is less than the third total token data amount of the third token bucket, the data message is stored in the second cache queue corresponding to the second preset protocol type; or, If the third remaining token data amount is equal to the third token total data amount of the third token bucket, the data message is sent or cached according to the first token bucket.

2. The method according to claim 1, characterized in that: The sending or caching the data message of the first preset protocol type according to the target data volume, the first token bucket, and the third token bucket includes: If it is determined according to the target data volume that the first token bucket and the third token bucket meet the second preset condition, the data message is sent, and the first remaining token data amount and the third remaining token data amount of the third token bucket are updated according to the target data amount; or, If it is determined according to the target data volume that the first token bucket and the third token bucket do not satisfy the second preset condition, storing the data message in a first cache queue corresponding to the first preset protocol type; The second preset condition includes: the first remaining token data amount is greater than or equal to the target data amount, and the third remaining token data amount is greater than or equal to the target data amount.

3. The method according to claim 2, characterized in that The storing the data message in the first cache queue corresponding to the first preset protocol type includes: Determine data flow information according to the data message; When it is determined that the first cache queue includes a first data flow queue corresponding to the data flow information, storing the data message in the first data flow queue; or, When it is determined that the first cache queue does not include the first data flow queue corresponding to the data flow information, the first data flow queue is created in the first cache queue according to the data flow information, and the data packet is stored in the first data flow queue.

4. The method according to claim 3, characterized in that: The method further comprises: In the case that unsent first cache data packets are stored in the first cache queue, the first cache data packets of each first data flow queue are polled and sent from multiple first data flow queues in the first cache queue according to the first remaining token data amount, the second remaining token data amount and the third remaining token data amount.

5. The method according to claim 1, characterized in that The sending or caching the data message according to the first token bucket includes: When the first remaining token data amount of the first token bucket is greater than or equal to the target data amount, sending the data message, and updating the first remaining token data amount according to the target data amount; or, When the first remaining token data amount is less than the target data amount, the data message is stored in the second cache queue.

6. The method according to claim 2, characterized in that The method further comprises: When the first cache queue is empty and unsent second cache data packets are stored in the second cache queue, the second cache data packets of each second data flow queue are polled and sent from multiple second data flow queues in the second cache queue according to the first remaining token data amount and the third remaining token data amount.

7. A data sending device, characterized in that: The device comprises: A determination module, used to determine the target protocol type and target data volume of the data message to be sent; A processing module, configured to send or cache the data message according to the target data volume, the first token bucket, the second token bucket, and the third token bucket when the target protocol type is a first preset protocol type; or, when the target protocol type is a second preset protocol type, send or cache the data message of the second preset protocol type according to the target data volume, the first token bucket, and the third token bucket; The first preset protocol type and the second preset protocol type are different protocol types, the second token bucket is a token bucket dedicated to data messages of the first preset protocol type, a first token fill rate corresponding to the first token bucket is greater than a second token fill rate corresponding to the second token bucket, a third token fill rate corresponding to the third token bucket is less than or equal to a target difference, and the target difference is a difference between the first token fill rate and the second token fill rate; The processing module is used to send the data message when the first token bucket and the second token bucket meet the first preset condition, and update the first remaining token data amount of the first token bucket and the second remaining token data amount of the second token bucket according to the target data amount; or, when the first token bucket and the second token bucket do not meet the first preset condition, send or cache the data message of the first preset protocol type according to the target data amount, the first token bucket and the third token bucket; wherein the first preset condition includes: the first remaining token data amount is greater than or equal to the target data amount, and the second remaining token data amount is greater than or equal to the target amount; The processing module is also used to store the data message in the second cache queue corresponding to the second preset protocol type if the third remaining token data amount of the third token bucket is less than the third total token data amount of the third token bucket; or, if the third remaining token data amount is equal to the third total token data amount of the third token bucket, send or cache the data message according to the first token bucket.

8. A network device, characterized in that: include: a memory having a computer program stored thereon; A processor, configured to execute the computer program in the memory to implement the steps of the method according to any one of claims 1 to 6.

9. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the steps of the method according to any one of claims 1 to 6 are implemented.

Citation Information

Patent Citations

  • Method of implementing improvement of user service quality in IP multimedia subsystem

    CN101159675A

  • Flow-classification-based grouping flow control system and control method

    CN102387082A