A method and system for collecting information from an Internet of Things gateway
By dynamically adjusting the weight coefficient of the transmission information queue and combining with the WFQ weight fair queuing algorithm, the problem of unreasonable bandwidth allocation in industrial data transmission is solved, and lower transmission delay and higher acquisition efficiency are achieved.
Patent Information
- Application Number
- CN202411132438.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-08-16
- Publication Date
- 2025-02-25
- Estimated Expiration
- 2044-08-16
AI Technical Summary
In the process of industrial data transmission, the bandwidth allocation is unreasonable due to the fixed weight WFQ weight fair queuing algorithm, resulting in uneven transmission delays, and reducing the efficiency of gateway information acquisition.
By analyzing the relationship between the packet length to be transmitted in the gateway and the queue bandwidth, calculating the transmission delay inequality, dynamically adjusting the weight coefficients of each transmission information queue, and combining the WFQ weight fair queuing algorithm, the data packets are allocated bandwidth.
It effectively reduces the delay of the gateway in data transmission, improves the efficiency of gateway information collection, and ensures the fast and smooth transmission of industrial data.
Smart Images

Figure CN119011501B_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the technical field of Internet of Things data transmission, and in particular to an Internet of Things gateway information collection method and system. Background Art
[0002] The gateway can connect two networks using different high-level protocols, and has become an indispensable part of the Internet of Things industry. The data acquisition gateway is a key component in the Internet of Things system, responsible for connecting sensors and data processing systems to ensure smooth transmission of data from the acquisition end to the processing end. In the industrial production process, sensors are usually used to collect industrial data, and then the industrial data is transmitted to the industrial cloud platform through the gateway to realize the collection of industrial data.
[0003] The main function of the industrial cloud platform is to analyze the collected data; however, the amount of industrial data that needs to be collected is very large. When the network bandwidth is limited, the gateway data will be accumulated, causing the communication link between the gateway and the Internet to be blocked.
[0004] In order to increase the speed of industrial data transmission to the industrial cloud platform and reduce congestion, the existing technology generally allocates the output process data bandwidth through the Weighted Fair Queuing (WFQ) scheduling algorithm to reduce network congestion, which improves the transmission efficiency of the gateway to a certain extent. Since the data collected at different times are different in the collection of industrial data, the length of the data packet in the queue in the gateway is not fixed, and the WFQ weighted fair queuing algorithm in the existing technology uses fixed weights to allocate bandwidth for data of different lengths collected at different times, resulting in unreasonable bandwidth allocation and reducing the efficiency of gateway information collection. Summary of the invention
[0005] In order to solve the above technical problems, the purpose of this application is to provide an Internet of Things gateway information collection method and system, and the technical solutions adopted are as follows:
[0006] In a first aspect, an embodiment of the present application provides a method for collecting information of an Internet of Things gateway, the method comprising the following steps:
[0007] S1, collects data packets in each transmission information queue currently transmitted to the IoT gateway;
[0008] S2, obtaining the bandwidth of each transmission information queue; for each transmission information queue, grouping all data packets in the transmission information queue according to the comparison results of the lengths of all data packets in the transmission information queue and the bandwidth to obtain each data group; obtaining the transmission delay unevenness according to the numerical distribution of the difference between the lengths of the data packets contained in all the data groups and the bandwidth;
[0009] S3, according to the transmission delay unevenness of all transmission information queues and the discreteness of their distribution, obtain the dynamic adjustment amount of the weight of each transmission information queue; obtain the weight coefficient of each transmission information queue at the moment before the current moment, and combine the dynamic adjustment amount of the weight of each transmission information queue to obtain the weight coefficient of each transmission information queue at the current moment;
[0010] S4, substitute the weight coefficients of all transmission information queues at the current moment into the WFQ weighted fair queuing algorithm, and transmit all data packets.
[0011] Further, the method for grouping all data packets comprises:
[0012] Starting from the first data packet in the transmission information queue, if the length of the first data packet is less than the bandwidth, add the next data packet in sequence. When the sum of the lengths of all data packets from the first data packet to the i-th data packet is greater than or equal to the bandwidth, all data packets from the first data packet to the i-th data packet are regarded as a data group. Repeat the data packet grouping operation in sequence until all data packets in the transmission information queue are grouped to obtain data groups.
[0013] Furthermore, the method for obtaining the transmission delay unevenness includes:
[0014] According to the difference between the length of all data packets contained in each data group in the transmission information queue and the bandwidth of the transmission information queue, the transmission delay ratio of each data group in the transmission information queue is obtained;
[0015] According to the discrete distribution of the transmission delay proportions of all data groups in the transmission information queue, the transmission delay fluctuation of the transmission information queue is obtained;
[0016] Obtain the degree of disorder of the transmission delay ratio of all data groups in the transmission information queue; and use the fusion result of the disorder degree and the transmission delay fluctuation of the transmission information queue as the transmission delay unevenness of each transmission information queue.
[0017] Furthermore, the method for obtaining the transmission delay ratio of each data group in the transmission information queue includes:
[0018] Obtain the difference between the data length of each data group and the bandwidth of the transmission information queue; obtain the bandwidth of the gateway; and use the ratio of the difference to the bandwidth of the gateway as the transmission delay ratio of each data group in the transmission information queue.
[0019] Further, obtaining the transmission delay fluctuation of the transmission information queue according to the distribution discreteness of the transmission delay proportions of all data groups in the transmission information queue includes: recording the transmission delay fluctuation of the transmission information queue as HK, Where n represents the number of data groups in the transmission information queue; Pd a Indicates the transmission delay ratio of the ath data group in the transmission information queue; Represents the mean of the transmission delay percentages of all data groups.
[0020] Furthermore, the method for obtaining the dynamic adjustment amount of the weight of each transmission information queue includes:
[0021] Arrange the transmission delay unevenness of all transmission information queues in ascending order to obtain the sequence number of each transmission information queue; use the sequence number of each transmission information queue as the priority level of each transmission information queue;
[0022] According to the discrete degree and priority level of the transmission delay unevenness of each transmission information queue, the dynamic adjustment amount of the weight of each transmission information queue is obtained.
[0023] Further, the weight dynamic adjustment amount of each transmission information queue is obtained according to the discrete degree and priority level of the transmission delay unevenness of each transmission information queue, including:
[0024] The dynamic adjustment amount of the weight of the jth transmission information queue is recorded as YC j , Y.C. j =(HKC j ―min(HKC))×FH j ; In the formula, HKC j represents the transmission delay unevenness of the jth transmission information queue; min(HKC) represents the minimum value of the transmission delay unevenness HKC of all transmission information queues; FH j Indicates the priority level of the jth transmission information queue.
[0025] Furthermore, the method for obtaining the weight coefficient of each transmission information queue at the current moment specifically includes:
[0026] The weight coefficient of the jth transmission information queue at the current time t is recorded as In the formula, represents the weight coefficient of the jth transmission information queue at the previous moment t-1 of the current moment; norm[] is a linear normalization function; Indicates the dynamic adjustment amount of the weight of the jth transmission information queue at the current time t.
[0027] Further, the weight coefficients of all transmission information queues at the current moment are substituted into the WFQ weighted fair queuing algorithm to transmit all data packets, including:
[0028] The weight coefficient of each transmission information queue is used as the weight when the WFQ weighted fair queuing algorithm allocates gateway bandwidth to each transmission information queue, and the gateway bandwidth is allocated to all transmission information queues; the data packets in each transmission information queue are transmitted through the allocated gateway bandwidth.
[0029] In a second aspect, an embodiment of the present application also provides an Internet of Things gateway information collection system, comprising a memory, a processor, and a computer program stored in the memory and running on the processor, wherein the processor implements the steps of any one of the above-mentioned Internet of Things gateway information collection methods when executing the computer program.
[0030] This application has at least the following beneficial effects:
[0031] The present application analyzes the problem that in the transmission process of real-time collected industrial data, the traditional fixed-weight WFQ weighted fair queuing algorithm is prone to delay jitter due to the different lengths of the real-time collected data, resulting in poor information transmission efficiency. First, by analyzing the data to be transmitted in the gateway, the relationship between the length of the data packet in the gateway and the queue bandwidth is analyzed, the delay attribute of the transmitted data in the transmission process is calculated, and the transmission delay unevenness is obtained, which accurately reflects the data delay jitter intensity in the transmission process. The bandwidth allocation method of the WFQ weighted fair queuing algorithm is further analyzed, and the dynamic adjustment amount of the weight is calculated in combination with the delay jitter intensity generated by each transmission information queue, the weight coefficient is adjusted, and the WFQ weighted fair queuing algorithm is substituted to allocate gateway bandwidth to each transmission information queue. By adjusting the weight coefficient, a relatively sufficient gateway bandwidth is allocated to the transmission queue with larger delay jitter, thereby effectively reducing the gateway data transmission delay and improving the gateway information collection efficiency. BRIEF DESCRIPTION OF THE DRAWINGS
[0032] In order to more clearly illustrate the technical solutions and advantages in the embodiments of the present application or the prior art, the drawings required for use in the embodiments or the prior art descriptions are briefly introduced below. Obviously, the drawings described below are only some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without creative work.
[0033] Figure 1 A flowchart of a method for collecting information from an Internet of Things gateway provided by an embodiment of the present application;
[0034] Figure 2 A schematic diagram of data packet grouping provided for one embodiment of the present application. DETAILED DESCRIPTION
[0035] The following will be combined with the drawings in the embodiments of the present application to clearly and completely describe the technical solutions in the embodiments of the present application. Obviously, the described embodiments are only part of the embodiments of the present application, not all of the embodiments. In the absence of conflict, the embodiments of the present application and the technical features in the embodiments can be combined with each other. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of this application.
[0036] Unless defined otherwise, all technical and scientific terms used herein have the same meaning as commonly understood by one of ordinary skill in the art to which this application belongs.
[0037] The following is a detailed description of a method and system for collecting information about an Internet of Things gateway provided by the present application in conjunction with the accompanying drawings.
[0038] See also Figure 1 , which shows a flowchart of a method for collecting information of an Internet of Things gateway provided by an embodiment of the present application, the method comprising the following steps:
[0039] S1, collects the data packets in each transmission information queue currently transmitted to the IoT gateway.
[0040] A specific implementation scenario of the embodiment of the present application is the collection and transmission scenario of industrial information of the Internet of Things of the industrial cloud platform; the gateway is a computer system or device that performs the important task of conversion, and its main function is to repackage the received information to meet the needs of the destination system.
[0041] The industrial information collection of this embodiment first uses sensors to collect industrial data, and then transmits the industrial data to the industrial cloud platform through the gateway. Different types of industrial data are collected using different types of sensors, and the industrial data can be temperature, humidity, pressure, wind speed, and monitoring video. The collected data is encapsulated into data packets, and further, the encapsulated data packets are transmitted to the gateway. After receiving the data packets, the gateway classifies all data packets into different transmission information queues through a classifier.
[0042] The prior art generally allocates the output process data bandwidth through the WFQ weighted fair queuing algorithm. However, in the collection of industrial data, the data collected at different times are different, which makes the length of the data packets in different transmission information queues of the gateway not fixed. The use of fixed weights to allocate bandwidth to different data causes unreasonable bandwidth allocation and reduces transmission efficiency. Therefore, this embodiment obtains the delay characteristics of the transmission data during the transmission process through the relationship between the length of the data packet in the gateway and the queue bandwidth, and selects different weights to allocate bandwidth to the queue according to the delay characteristics.
[0043] S2, obtaining the bandwidth of each transmission information queue; for each transmission information queue, grouping all data packets in the transmission information queue according to the comparison results of the lengths of all data packets in the transmission information queue and the bandwidth to obtain each data group; according to the numerical distribution of the differences between the lengths of the data packets contained in all data groups and the bandwidth, obtaining the transmission delay unevenness.
[0044] Since there are many kinds of objects and parameters that need to be detected in the process of industrial production, diversified sensor technologies must be adopted. Each sensor is designed to capture specific types of data, such as temperature, pressure, humidity, vibration, etc. Different types of sensors obtain different data. Moreover, the data collected by the same sensor in different time periods are also different, and the length of the data generated is also different. Bandwidth is the amount of data that can be transmitted per second by the channel. When transmitting data through the gateway, due to bandwidth limitations, data packets of different sizes may be transmitted at the same time or at different times. The transmission method is determined by the size of the data packet. During the transmission process, taking a transmission information queue as an example, if the sum of the sizes of two or more data packets is less than or equal to the bandwidth, the data packets can be transmitted together. If it is greater than the bandwidth, it needs to be transmitted in batches. In the process of packet grouping, the length of each data packet needs to be considered. If the length of the data packet is too long, it needs to be transmitted in batches, which increases the transmission time. If the length of the data packet is too short, there are too many data groups, which increases the number of transmissions and wastes transmission resources. Therefore, it is necessary to group the data packets according to the comparison between the length of the data packet and the bandwidth to find the best grouping method.
[0045] Specifically, the bandwidth bd of the transmission information queue is used to divide the data packets in the transmission information queue into groups. Obtain the bandwidth bd of the transmission information queue; start from the first data packet in the transmission information queue and group the data packets; the method of grouping the data packets is: start from the first data packet in the transmission information queue, if the length of the first data packet is less than the bandwidth, add the next data packet in sequence, and when the sum of the lengths of all data packets from the first data packet to the i-th data packet is greater than or equal to the bandwidth, then treat all data packets from the first data packet to the i-th data packet as a data group; repeat the data packet grouping operation in sequence until all data packets in the transmission information queue are grouped to obtain each data group.
[0046] Take the xth data packet as an example, Figure 2As shown, determine whether the length of the xth data packet is less than the bandwidth. If so, determine whether the sum of the lengths of the xth data packet plus the x+1th data packet is less than the bandwidth. If so, accumulate the x+2th data packet, and so on, until the sum of the lengths of the x+ath data packets is greater than or equal to the bandwidth, and group all the data packets between the xth and x+ath data packets into one group; then, starting from the next x+a+1th data packet, repeat the above steps until all data packets are grouped.
[0047] The total length of each data packet represents the amount of data in that data group. The larger the amount of data, the smaller the bandwidth of the gateway, the longer it takes to transmit that data group, and the more likely it is to cause data packet transmission delay in the transmission information queue. Therefore, obtain the bandwidth of the gateway; calculate the sum of the lengths of all data packets contained in each data group in the transmission information queue, and record it as the data length of each data group; further calculate the transmission delay proportion Pd of the ath data group a , Where Pd a Indicates the transmission delay ratio of the ath data group in the transmission information queue; LK a It represents the data length of the ath data group; bd represents the bandwidth of the transmission information queue; DB represents the bandwidth of the gateway.
[0048] The bandwidth of the current transmission information queue is the gateway bandwidth allocated to the transmission information queue during the last data transmission; when the total length of the data group in the transmission information queue is larger, the data length of the data group is larger, resulting in the difference between the data group length and the bandwidth of the transmission information queue during the transmission process. a ―The larger the bd is, the smaller the bandwidth of the gateway is, and the longer the delay time of the data packets in the transmission information queue is during the transmission process, which makes the value of the transmission delay ratio larger.
[0049] When transmitting through the gateway, different transmission information queues transmit at the same time. When the transmission delay ratio of all data groups in the transmission information queue is smaller and the data distribution is more balanced, the transmission information queue can better preempt the dequeue service, thereby adjusting the delay time of the transmission information queue and improving the transmission efficiency. Therefore, according to the numerical distribution of the transmission delay ratio of all data groups in the transmission information queue, the transmission delay fluctuation of the transmission information queue is calculated.
[0050] The transmission delay fluctuation of the transmission information queue is recorded as HK, Where n represents the number of data groups in the transmission information queue; Pd a Indicates the transmission delay ratio of the ath data group in the transmission information queue; Represents the mean of the transmission delay percentages of all data groups.
[0051] When the transmission delay time required for each group in the transmission information queue is smaller, the mean of the transmission delay ratio of all data groups is smaller; the smaller the difference between the transmission delay ratio of each data group and the mean, it means that after the data packets in the transmission information queue are grouped, the difference between the lengths of each data packet group is smaller, which makes the transmission delay fluctuation value of the queue smaller, and the data delay jitter during the transmission process is weaker. Smaller delay jitter makes industrial data faster and smoother during the transmission process.
[0052] Under normal circumstances, the more types of data packet groups there are in a transmission information queue, and the more data packet groups there are, the stronger the data delay jitter and the more chaotic the jitter intensity will be when the data in the transmission information queue is transmitted through the gateway. When using the WFQ weighted fair queuing algorithm for weight allocation, a larger weight should be assigned to the transmission information queue, and a larger bandwidth should be used for transmission to reduce delay.
[0053] Based on the above analysis, the degree of disorder of the transmission delay ratio of all data groups in each transmission information queue is obtained; the fusion result of the disorder degree and the transmission delay fluctuation of each transmission information queue is used as the transmission delay unevenness of each transmission information queue.
[0054] It should be noted that the degree of disorder of a set of data represents the randomness of the set of data, and the greater the degree of disorder, the greater the randomness of the data; in this embodiment, information entropy is used to calculate the degree of disorder; the calculation of information entropy is a well-known technology, and the specific calculation process will not be repeated. As other embodiments of the present application, the degree of disorder can be calculated by variance. Fusion means that there is a relationship of change in the same direction between each fused data and the result after fusion, and the larger the fused data, the larger the fusion result; in this embodiment, the transmission delay unevenness of each transmission information queue is the product of the degree of disorder and the transmission delay fluctuation of each transmission information queue. As other embodiments of the present application, the sum of the degree of disorder and the transmission delay fluctuation of each transmission information queue can be calculated as the transmission delay unevenness of each transmission information queue, which is determined by actual application and is not particularly limited in this application.
[0055] The degree of chaos reflects the distribution of the lengths of data packets in the transmission information queue. If the lengths of the data packets in the transmission information queue are equal and the delay jitter characteristics are small, the weight of the transmission information queue can be directly and evenly distributed. The greater the degree of chaos in the transmission information queue, the more uneven the transmission delay of the transmission information queue. It is necessary to increase the bandwidth allocation of the transmission information queue and reduce the delay jitter of the data in the transmission information queue during transmission.
[0056] S3, according to the transmission delay unevenness of all transmission information queues and the discreteness of their distribution, obtain the dynamic adjustment amount of the weight of each transmission information queue; obtain the weight coefficient of each transmission information queue at the moment before the current moment, and combine the dynamic adjustment amount of the weight of each transmission information queue to obtain the weight coefficient of each transmission information queue at the current moment.
[0057] When the transmission delay unevenness of the transmission information queue is larger, it means that the delay jitter generated by the transmission information queue is larger. When allocating weights, in order to reduce the delay jitter of the gateway in the process of transmitting data to the industrial cloud platform, a larger weight should be allocated to the transmission information queue. Therefore, the transmission delay unevenness of all transmission information queues is arranged in order from small to large, and the sequence number of each transmission information queue is obtained; the sequence number of each transmission information queue is used as the priority level of each transmission information queue.
[0058] The higher the priority of a queue, the greater the weight assigned to it. For example, if the sequence number of the transmission information queue is 3, then the priority of the transmission information queue is 3. Among them, the weight assigned to the priority level 1 is the smallest. Further, calculate the dynamic adjustment amount of the weight of each transmission information queue. The dynamic adjustment amount of the weight of the jth transmission information queue is recorded as YC j , Y.C. j =HKC j ―min(HKC))×FH j ; In the formula, HKC j represents the transmission delay unevenness of the jth transmission information queue; min(HKC) represents the minimum value of the transmission delay unevenness HKC of all transmission information queues; FH j Indicates the priority level of the jth transmission information queue.
[0059] When the transmission delay unevenness of the transmission information queue is large, it indicates that the delay fluctuation of the transmission information queue during the data transmission process is large, which means that the continuity and reliability of the service are lower. Therefore, the priority level FH of the data in the transmission information queue during the transmission process is j The larger the value of , the greater the weight that such a transmission information queue should enjoy in the network to ensure timely and stable transmission of key data. Furthermore, the difference between the transmission delay unevenness of the queue and the minimum transmission delay unevenness HKC j The larger the min(HKC), the worse the transmission stability of the transmission information queue. In the weight allocation, this should be converted into a higher priority to reduce the impact of potential delay jitter on service quality, so that the weight of the queue is dynamically adjusted. j The larger the value of .
[0060] If the value of the dynamic adjustment of the weight of the transmission information queue transmitted by the gateway is larger, it means that the delay jitter characteristics of the transmission information queue are stronger. At this time, the weight coefficient of the transmission information queue should be larger, so that the WFQ adjustment algorithm can reduce the delay jitter of the transmission information queue. Therefore, according to the dynamic adjustment of the weight of the transmission information queue during the gateway transmission process, the weight coefficient of the WFQ weighted fair queuing algorithm is adjusted. Set the initial weight coefficient to 1; adjust the weight coefficient of each transmission information queue at the previous moment in real time according to the dynamic adjustment of the weight of the transmission information queue at the current moment, and obtain the weight coefficient of each transmission information queue at the current moment.
[0061] The weight coefficient of the jth transmission information queue at the current time t is recorded as In the formula, represents the weight coefficient of the jth transmission information queue at the previous moment t-1 of the current moment; norm[] is a linear normalization function; Indicates the dynamic adjustment amount of the weight of the jth transmission information queue at the current time t.
[0062] The weight coefficient calculated in this embodiment can be changed according to the change of the real-time collected data, and sufficient bandwidth is allocated to the transmission information queue, thereby shortening the gateway delay jitter.
[0063] S4, substitute the weight coefficients of all transmission information queues at the current moment into the WFQ weighted fair queuing algorithm, and transmit all data packets.
[0064] The larger the value of the weight coefficient of the transmission information queue, the more sufficient the gateway bandwidth allocated to it by using the WFQ mobilization algorithm can reduce the delay jitter of the transmission information queue. Therefore, all the data packets in the transmission information queue are used as the input of the WFQ weighted fair queuing algorithm, and the weight coefficient of each transmission information queue is used as the weight when allocating gateway bandwidth to each transmission information queue. The WFQ weighted fair queuing algorithm is used to obtain the gateway bandwidth allocated to the transmission information queue. The gateway transmits the data in the transmission information queue to the industrial cloud platform by using the gateway bandwidth allocated to the transmission information queue. The specific implementation process of the WFQ weighted fair queuing algorithm is a well-known technology, and the specific calculation process will not be repeated.
[0065] In addition, the collected data is stored using the industrial cloud platform, and the collected data transmitted by the gateway is stored in the storage hard disk of the industrial cloud platform server using the consistent hashing algorithm in the distributed storage algorithm. The consistent hashing algorithm is a well-known technology, and the specific calculation process is not repeated here.
[0066] Based on the same inventive concept as the above method, an embodiment of the present application also provides an Internet of Things gateway information collection system, including a memory, a processor, and a computer program stored in the memory and running on the processor. When the processor executes the computer program, the steps of any one of the above-mentioned Internet of Things gateway information collection methods are implemented.
[0067] Through the above description of the implementation method in combination with the accompanying drawings, technical personnel in the relevant field can understand that for the convenience and simplicity of description, only the division of the above-mentioned functional modules is used as an example. In actual applications, the above-mentioned functions can be assigned to different functional modules as needed, that is, the internal structure of the device can be divided into different functional modules to complete all or part of the functions described above.
[0068] The above contents are only specific implementation methods of the present application, but the protection scope of the present application is not limited thereto. Any technician familiar with the technical field can easily think of changes or substitutions within the technical scope disclosed in the present application, which should be covered by the protection scope of the present application.
Claims
1. A method for collecting information of an Internet of Things gateway, characterized in that: The method comprises the following steps: S1, collects data packets in each transmission information queue currently transmitted to the IoT gateway; S2, obtaining the bandwidth of each transmission information queue; for each transmission information queue, grouping all data packets in the transmission information queue according to the comparison results of the lengths of all data packets in the transmission information queue and the bandwidth to obtain each data group; obtaining the transmission delay unevenness according to the numerical distribution of the difference between the lengths of the data packets contained in all the data groups and the bandwidth; S3, according to the transmission delay unevenness of all transmission information queues and the discreteness of their distribution, obtain the dynamic adjustment amount of the weight of each transmission information queue; obtain the weight coefficient of each transmission information queue at the moment before the current moment, and combine the dynamic adjustment amount of the weight of each transmission information queue to obtain the weight coefficient of each transmission information queue at the current moment; S4, substitute the weight coefficients of all transmission information queues at the current moment into the WFQ weighted fair queuing algorithm, and transmit all data packets; The method for obtaining the transmission delay unevenness includes: According to the difference between the length of all data packets contained in each data group in the transmission information queue and the bandwidth of the transmission information queue, the transmission delay ratio of each data group in the transmission information queue is obtained; According to the discrete distribution of the transmission delay proportions of all data groups in the transmission information queue, the transmission delay fluctuation of the transmission information queue is obtained; Obtaining the degree of disorder of the transmission delay ratio of all data groups in the transmission information queue; and combining the degree of disorder with the transmission delay fluctuation of the transmission information queue as the transmission delay unevenness of each transmission information queue; The method for obtaining the transmission delay ratio of each data group in the transmission information queue includes: Obtaining the difference between the data length of each data group and the bandwidth of the transmission information queue; obtaining the bandwidth of the gateway; and using the ratio of the difference to the bandwidth of the gateway as the transmission delay ratio of each data group in the transmission information queue; The method of obtaining the transmission delay fluctuation of the transmission information queue according to the distribution discreteness of the transmission delay proportions of all data groups in the transmission information queue includes: recording the transmission delay fluctuation of the transmission information queue as HK, Where n represents the number of data groups in the transmission information queue; Pd a Indicates the transmission delay ratio of the ath data group in the transmission information queue; Represents the mean of the transmission delay percentages of all data groups.
2. The method for collecting information of an Internet of Things gateway according to claim 1, characterized in that: The method for grouping all data packets comprises: Starting from the first data packet in the transmission information queue, if the length of the first data packet is less than the bandwidth, add the next data packet in sequence. When the sum of the lengths of all data packets from the first data packet to the i-th data packet is greater than or equal to the bandwidth, all data packets from the first data packet to the i-th data packet are regarded as a data group. Repeat the data packet grouping operation in sequence until all data packets in the transmission information queue are grouped to obtain data groups.
3. The method for collecting information of an Internet of Things gateway according to claim 1, characterized in that: The method for obtaining the dynamic adjustment amount of the weight of each transmission information queue includes: Arrange the transmission delay unevenness of all transmission information queues in ascending order to obtain the sequence number of each transmission information queue; use the sequence number of each transmission information queue as the priority level of each transmission information queue; According to the discrete degree and priority level of the transmission delay unevenness of each transmission information queue, the dynamic adjustment amount of the weight of each transmission information queue is obtained.
4. The method for collecting information of an Internet of Things gateway according to claim 3, characterized in that: The step of obtaining the dynamic weight adjustment amount of each transmission information queue according to the discrete degree and priority level of the transmission delay unevenness of each transmission information queue includes: The dynamic adjustment amount of the weight of the jth transmission information queue is recorded as YC j , Y.C. j =(HKC j ―min(HKC))×FH j ; In the formula, HKC j represents the transmission delay unevenness of the jth transmission information queue; min(HKC) represents the minimum value of the transmission delay unevenness HKC of all transmission information queues; FH j Indicates the priority level of the jth transmission information queue.
5. The method for collecting information of an Internet of Things gateway according to claim 1, characterized in that: The method for obtaining the weight coefficient of each transmission information queue at the current moment specifically includes: The weight coefficient of the jth transmission information queue at the current time t is recorded as In the formula, represents the weight coefficient of the jth transmission information queue at the previous moment t-1 of the current moment; norm[] is a linear normalization function; Indicates the dynamic adjustment amount of the weight of the jth transmission information queue at the current time t.
6. The method for collecting information of an Internet of Things gateway according to claim 1, characterized in that: Substituting the weight coefficients of all transmission information queues at the current moment into the WFQ weighted fair queuing algorithm to transmit all data packets includes: The weight coefficient of each transmission information queue is used as the weight when the WFQ weighted fair queuing algorithm allocates gateway bandwidth to each transmission information queue, and the gateway bandwidth is allocated to all transmission information queues; the data packets in each transmission information queue are transmitted through the allocated gateway bandwidth.
7. An Internet of Things gateway information collection system, comprising a memory, a processor, and a computer program stored in the memory and running on the processor, characterized in that: When the processor executes the computer program, the steps of the method for collecting information of an Internet of Things gateway as described in any one of claims 1 to 6 are implemented.
Citation Information
Patent Citations
Dynamic deficit weighted round robin scheduling method suitable for mine internet-of-thing multi-service transmission
CN108965160A