Queue priority adjustment method, device, electronic device and storage medium
By optimizing the information parameters and sensitivity coefficient groups of the switch output queue, and adjusting the priority, the problem of queues seizing resources in time-sensitive networks is solved, and network performance and stability are improved.
Patent Information
- Application Number
- CN202211676312.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-12-26
- Publication Date
- 2024-10-22
- Estimated Expiration
- 2042-12-26
AI Technical Summary
In time-sensitive networks, with the expansion of network service categories, differences in the minimum effective transmission performance of each service package lead to queue preemption of resources, resulting in poor network performance.
By obtaining the information parameters and sensitivity coefficient groups of each output queue on the switch, the fitness function evaluation value is calculated, and the particle swarm optimization algorithm and charge search algorithm are used to optimize the sensitivity coefficient group, and the urgency of the output queue is evaluated and the priority is adjusted to ensure Improvement and stability of network performance.
With the expansion of network service categories, the phenomenon of queue preemption of resources is avoided, the TNS network performance is maintained at a high level, the delay and packet drop rate of data packets are ensured within a reasonable range, and the overall network performance is improved.
Smart Images

Figure CN115987913B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of switches, and in particular to a queue priority adjustment method, a queue priority adjustment device, an electronic device and a computer-readable storage medium. Background Art
[0002] In a TSN (Time-Sensitive Networking) network, those important and periodically transmitted traffic that need to ensure low latency are generally called TSN streams. The parameters used to define TSN stream requirements usually include the sender, receiver, stream identifier, maximum frame size, transmission cycle, number of frames sent in one cycle, maximum acceptable delay, deadline for reaching the receiver, jitter of actual transmission time, and whether frame replication is required.
[0003] At present, the mechanism for queuing and temporarily storing packets at the output queue of the switch outlet is usually defined through 802.1Qbv. In a switch with TSN function, a time-triggered gate switch (TT-Gate) with precise timing will be used to switch the gate of a specific queue on time according to the gate control list (GCL) set by the CNC (Central Network Controller), so that the packets of a specific queue will be sent out according to the time scheduled by the CNC and set in the GCL, thus realizing the "Time-Aware Shaper" (TAS) defined in the standard.
[0004] Generally, 802.1Qbv queue priority sorting and TAS can effectively maintain good performance of each queue. However, with the expansion of network service categories, the difference in the minimum effective transmission performance of each service package will lead to the phenomenon of queue resource preemption in special circumstances, resulting in poor TNS network performance. Summary of the invention
[0005] The embodiment of the present invention provides a queue priority adjustment method, device, electronic device and computer-readable storage medium to solve the problem that as the network service categories expand, the difference in the minimum effective transmission performance of each service package leads to the phenomenon of queue preemption of resources under special circumstances, resulting in poor TNS network performance.
[0006] An embodiment of the present invention discloses a queue priority adjustment method, the method comprising:
[0007] Obtain information parameters and sensitivity coefficient groups of each output queue on the switch;
[0008] Calculating the fitness function evaluation value of each of the output queues according to the information parameters;
[0009] Based on the fitness function evaluation value, the sensitivity coefficient group is optimized by using a particle swarm optimization algorithm, or when the number of times the sensitivity coefficient group is optimized by using a particle swarm optimization algorithm is greater than a preset number, based on the fitness function evaluation value, the sensitivity coefficient group is optimized by using a charge search algorithm;
[0010] Evaluating the urgency of each of the output queues by using the optimized sensitivity coefficient group and the information parameter;
[0011] The priority of each of the output queues is adjusted according to the urgency.
[0012] Optionally, the information parameters include actual delay, standard delay, actual packet loss rate and standard packet loss rate.
[0013] Optionally, the sensitivity coefficient group includes a sensitivity coefficient of packet loss rate and a sensitivity coefficient of delay.
[0014] Optionally, the optimizing the sensitivity coefficient group based on the fitness function evaluation value by using a particle swarm optimization algorithm includes:
[0015] Determining the best fitness function evaluation value from each of the fitness function evaluation values;
[0016] Determining the best sensitivity coefficient group from each of the sensitivity coefficient groups according to the best fitness function evaluation value;
[0017] Based on the optimal sensitivity coefficient group, the sensitivity coefficient group is optimized by using a particle swarm optimization algorithm to obtain an optimized sensitivity coefficient group.
[0018] Optionally, the optimizing the sensitivity coefficient group by using a charge search algorithm based on the fitness function evaluation value includes:
[0019] Determining the best fitness function evaluation value from each of the fitness function evaluation values;
[0020] Determining the best sensitivity coefficient group from each of the sensitivity coefficient groups according to the best fitness function evaluation value;
[0021] Based on the optimal sensitivity coefficient group, the sensitivity coefficient group is optimized by using a charge search algorithm to obtain an optimized sensitivity coefficient group.
[0022] Optionally, the preset number of times is determined according to the convergence degree of the particle swarm optimization algorithm and the charge search algorithm.
[0023] Optionally, after adjusting the priority of each output queue according to the urgency, the method further includes:
[0024] The gate switches of the output queue are opened in sequence from high to low according to the priority.
[0025] An embodiment of the present invention also provides a queue priority adjustment system, including:
[0026] A data acquisition module is used to obtain information parameters and sensitivity coefficient groups of each output queue on the switch;
[0027] An evaluation value calculation module, used for calculating the fitness function evaluation value of each output queue according to the information parameter;
[0028] A coefficient optimization module, configured to optimize the sensitive coefficient group by using a particle swarm optimization algorithm based on the fitness function evaluation value, or to optimize the sensitive coefficient group by using a charge search algorithm based on the fitness function evaluation value when the number of times the particle swarm optimization algorithm is executed to optimize the sensitive coefficient group is greater than a preset number of times;
[0029] An urgency evaluation module, used to evaluate the urgency of each of the output queues by using the optimized sensitivity coefficient group and the information parameter;
[0030] The priority adjustment module is used to adjust the priority of each output queue according to the urgency.
[0031] Optionally, the information parameters include actual delay, standard delay, actual packet loss rate and standard packet loss rate.
[0032] Optionally, the sensitivity coefficient group includes a sensitivity coefficient of packet loss rate and a sensitivity coefficient of delay.
[0033] Optionally, the coefficient optimization module includes:
[0034] An optimal evaluation value determination submodule, used to determine the optimal fitness function evaluation value from each of the fitness function evaluation values;
[0035] An optimal coefficient group determination submodule, used to determine the optimal sensitivity coefficient group from each of the sensitivity coefficient groups according to the optimal fitness function evaluation value;
[0036] The first coefficient optimization submodule is used to optimize the sensitivity coefficient group based on the optimal sensitivity coefficient group by using a particle swarm optimization algorithm to obtain an optimized sensitivity coefficient group.
[0037] Optionally, the coefficient optimization module includes:
[0038] An optimal evaluation value determination submodule, used to determine the optimal fitness function evaluation value from each of the fitness function evaluation values;
[0039] An optimal coefficient group determination submodule, used to determine the optimal sensitivity coefficient group from each of the sensitivity coefficient groups according to the optimal fitness function evaluation value;
[0040] The second coefficient optimization submodule is used to optimize the sensitivity coefficient group based on the optimal sensitivity coefficient group by using a charge search algorithm to obtain an optimized sensitivity coefficient group.
[0041] Optionally, the preset number of times is determined according to the convergence degree of the particle swarm optimization algorithm and the charge search algorithm.
[0042] Optionally, it also includes:
[0043] The gate switch opening module is used to open the gate switches of the output queue in sequence from high to low according to the priority.
[0044] The embodiment of the present invention further discloses an electronic device, comprising a processor, a communication interface, a memory and a communication bus, wherein the processor, the communication interface and the memory communicate with each other via the communication bus;
[0045] The memory is used to store computer programs;
[0046] The processor is used to implement the method described in the embodiment of the present invention when executing the program stored in the memory.
[0047] The embodiment of the present invention further discloses a computer-readable storage medium having instructions stored thereon, which, when executed by one or more processors, enables the processors to execute the method described in the embodiment of the present invention.
[0048] The embodiment of the present invention has the following advantages: obtaining information parameters and sensitivity coefficient groups of each output queue on the switch, calculating the fitness function evaluation value of each output queue according to the information parameters, optimizing the sensitivity coefficient group by using a particle swarm optimization algorithm based on the fitness function evaluation value, or optimizing the sensitivity coefficient group by using a charge search algorithm based on the fitness function evaluation value when the number of times the particle swarm optimization algorithm is used to optimize the sensitivity coefficient group is greater than a preset number of times, evaluating the urgency of each output queue by using the optimized sensitivity coefficient group and information parameters, and adjusting the priority of each output queue according to the urgency. By using two PSO algorithms and a CSS algorithm to optimize the sensitivity coefficient group, the particle swarm optimization algorithm is used in the initial stage of restart to ensure that the network performance can be quickly improved (the packet loss rate and delay are quickly reduced), and after the particle swarm optimization algorithm is optimized for a preset number of times, the charge search algorithm is used to ensure that the network performance can be optimized, so that the entire network performance can be maintained at a high level in each period, avoiding the phenomenon of queues occupying resources under special conditions due to the difference in the minimum effective transmission performance of each service packet as the network service category expands, resulting in poor TNS network performance. BRIEF DESCRIPTION OF THE DRAWINGS
[0049] Figure 1 is a flowchart of a queue priority adjustment method provided in an embodiment of the present invention;
[0050] Figure 2 is a schematic diagram of the relationship between electric field and distance provided in an embodiment of the present invention;
[0051] Figure 3 is a schematic diagram of a charge subjected to Coulomb force provided in an embodiment of the present invention;
[0052] Figure 4 It is one of the schematic diagrams of the performance comparison between PSO and CSS provided in the embodiment of the present invention;
[0053] Figure 5 This is a second schematic diagram of a performance comparison between PSO and CSS provided in an embodiment of the present invention;
[0054] Figure 6 is a CNC equipment architecture diagram provided in an embodiment of the present invention;
[0055] Figure 7 is a control strategy diagram for adjusting the priority of an output queue provided in an embodiment of the present invention;
[0056] Figure 8 is a structural block diagram of a queue priority device provided in an embodiment of the present invention;
[0057] Fig. 9is a structural block diagram of an electronic device provided in an embodiment of the present invention;
[0058] Fig.10 It is a block diagram of a computer-readable storage medium provided in an embodiment of the present invention. DETAILED DESCRIPTION
[0059] In order to make the above-mentioned objects, features and advantages of the present invention more obvious and easy to understand, the present invention is further described in detail below with reference to the accompanying drawings and specific embodiments.
[0060] Reference Figure 1 , shows a flowchart of a queue priority adjustment method provided in an embodiment of the present invention, the steps of the queue priority adjustment method include:
[0061] Step 101: Obtain information parameters and sensitivity coefficient groups of each output queue on the switch.
[0062] The information parameters include the actual delay D of each output queue. real (t), is the standard delay D(t), and the actual packet loss rate L real (t), and standard packet loss rate L(t), etc.
[0063] As an important layer 2 switching network device, the switch is an information transfer station in the network architecture. It forwards the data received from a certain port from other ports according to certain rules. Its performance directly affects the overall network speed of the network. During the data packet transfer process, the data packets will be assigned to the output queues on the switch according to the data packet category.
[0064] Specifically, when the system is initialized or a new service packet is detected, information parameters such as actual delay, standard delay, actual packet loss rate, standard packet loss rate, and a sensitivity coefficient group of each output queue on the switch are obtained.
[0065] Step 102: Calculate the fitness function evaluation value of each output queue according to the information parameters.
[0066] Among them, the fitness function evaluation value is an indicator used to evaluate the sensitivity coefficient group to the system network performance. The fitness function of this embodiment uses the delay value with the output queue priority weight and the root mean square error (Root Mean Square Error) of the packet loss rate, which is the following mathematical expression.
[0067]
[0068] Among them, F is the evaluation value of the fitness function, n j is the total number of network service packets of the jth priority, D real(t) is the actual delay, D(t) is the standard delay, L real (t) is the actual packet loss rate and L(t) is the standard packet loss rate.
[0069] The smaller the root mean square error F in formula (1), the smaller the delay and packet loss rate of the overall network service data packet, which means the better network performance. Therefore, the adaptability function is the smallest case.
[0070] Specifically, information parameters such as the actual delay, standard delay, actual packet loss rate, standard packet loss rate, etc. of each output queue can be input into formula (1), so that the fitness function evaluation value of each output queue can be calculated.
[0071] Step 103: Based on the fitness function evaluation value, the sensitivity coefficient group is optimized using a particle swarm optimization algorithm, or when the number of times the sensitivity coefficient group is optimized using the particle swarm optimization algorithm is greater than a preset number, based on the fitness function evaluation value, the sensitivity coefficient group is optimized using a charge search algorithm.
[0072] Among them, the particle swarm optimization algorithm (PSO) has a short operation time and a fast convergence speed. Therefore, the PSO algorithm can be used as a control strategy in the early stage of system startup initialization and when new network service data packets are detected, and the sensitivity coefficient group can be optimized through the PSO algorithm.
[0073] The Charge Swarm Search (CSS) algorithm has good full-area search capability. Therefore, after the PSO algorithm is used to optimize the preset cycle (preset number of times), the CSS algorithm with good full-area search capability can be used as the control strategy to optimize the sensitivity coefficient group through the CSS algorithm.
[0074] Specifically, at the beginning of system startup initialization and when new network service data packets are detected, the sensitivity coefficient group is optimized based on the fitness function evaluation value using the PSO algorithm with short calculation time and fast convergence speed, so as to evaluate the urgency of each output queue through the optimized sensitivity coefficient group and adjust the priority of the output queue.
[0075] When the number of times the particle swarm optimization algorithm is used to optimize the sensitivity coefficient group exceeds the preset number, the CSS algorithm with better full-area search capability is used to optimize the sensitivity coefficient group, so as to evaluate the urgency of each output queue through the optimized sensitivity coefficient group and adjust the priority of the output queue.
[0076] Step 104: Evaluate the urgency of each output queue using the optimized sensitivity coefficient group and the information parameter.
[0077] Specifically, after the optimized sensitivity coefficient group is obtained, the urgency of each output queue can be evaluated according to the optimized sensitivity coefficient group and information parameters of each queue.
[0078] Step 105: Adjust the priority of each output queue according to the urgency.
[0079] Specifically, after the urgency of each output queue is evaluated, the priority of the output queue may be adjusted according to the urgency of each output queue.
[0080] In the embodiment of the present invention, the information parameters and sensitivity coefficient groups of each output queue on the switch are obtained, the fitness function evaluation value of each output queue is calculated according to the information parameters, and the sensitivity coefficient group is optimized by using the particle swarm optimization algorithm based on the fitness function evaluation value, or when the number of times the particle swarm optimization algorithm is used to optimize the sensitivity coefficient group is greater than the preset number of times, the charge search algorithm is used to optimize the sensitivity coefficient group based on the fitness function evaluation value, and the urgency of each output queue is evaluated by the optimized sensitivity coefficient group and information parameters, and the priority of each output queue is adjusted according to the urgency. By using the two algorithms of PSO algorithm and CSS algorithm to optimize the sensitivity coefficient group, the particle swarm optimization algorithm is used in the initial stage of restart to ensure that the network performance can be quickly improved (the packet loss rate and delay are quickly reduced), and after the particle swarm optimization algorithm is optimized for the preset number of times, the charge search algorithm is used to ensure that the network performance can be optimized, so that the overall network performance can be maintained at a high level in each period, avoiding the phenomenon of queues occupying resources under special conditions due to the difference in the minimum effective transmission performance of each service packet as the network service category expands, resulting in poor TNS network performance.
[0081] Based on the above embodiment, a variant embodiment of the above embodiment is proposed. It should be noted that in order to make the description concise, only the differences from the above embodiment are described in the variant embodiment.
[0082] In an optional embodiment of the embodiment of the present invention, the sensitivity coefficient group includes a sensitivity coefficient of a packet loss rate and a sensitivity coefficient of a delay.
[0083] The sensitivity coefficient group includes the initial sensitivity coefficients of packet loss rate and delay. The initial sensitivity coefficient of delay is not accurate enough, which results in inaccurate calculation of urgency and easily leads to deviation in the scheduling order of output queues.
[0084] Specifically, after the initialized sensitivity coefficient of packet loss rate and the sensitivity coefficient of delay are optimized by the PSO algorithm or the CSS algorithm, the urgency of each output queue can be evaluated according to the optimized sensitivity coefficient of packet loss rate and the sensitivity coefficient of delay of each queue and the information parameter. The specific urgency evaluation method is as follows:
[0085]
[0086] Among them, C i (t) is the urgency, c1 is the sensitivity coefficient of packet loss rate, c2 is the sensitivity coefficient of delay, D real (t) is the actual delay, D(t) is the standard delay, L real (t) is the actual packet loss rate and L(t) is the standard packet loss rate.
[0087] After evaluating the urgency of each output queue, the priority of the output queue may be adjusted according to the urgency of each output queue.
[0088] In an optional embodiment of the embodiments of the present invention, the sensitivity coefficient group is optimized based on the fitness function evaluation value using a particle swarm optimization algorithm, including: determining an optimal fitness function evaluation value from each of the fitness function evaluation values; determining an optimal sensitivity coefficient group from each of the sensitivity coefficient groups based on the optimal fitness function evaluation value; and optimizing the sensitivity coefficient group based on the optimal sensitivity coefficient group using a particle swarm optimization algorithm to obtain an optimized sensitivity coefficient group.
[0089] Specifically, after calculating the fitness function evaluation value of each output queue, the best fitness function evaluation value can be determined from the fitness function evaluation values of each output queue, and the sensitivity coefficient group of the output queue corresponding to the best fitness function evaluation value is the best sensitivity coefficient group.
[0090] Therefore, the best sensitivity coefficient group and the sensitivity coefficient group of the target output queue can be input into the particle swarm optimization algorithm to obtain the optimized sensitivity coefficient group.
[0091] The PSO optimization algorithm imitates the behavior of migratory birds, has good convergence and fast computing time, but is easy to fall into the regional optimal solution, so that each group of sensitivity coefficients moves closer to the best position in the solution space (this embodiment is a two-dimensional space). In each calculation cycle (the lowest common multiple of all network service packet cycles), each sensitivity coefficient group will get a fitness function evaluation value according to the fitness function to determine the best sensitivity coefficient group to move closer to the destination. The mathematical formulas for updating the speed and position of the sensitivity coefficient group in the solution space are as follows (3) and (4).
[0092] v ij (t+1)=v ij (t)+p ij (t)-x ij (t))+p gj (t)-x ij (t))(3)
[0093] xij (t+1)=x ij (t)+v ij (t+1)(4)
[0094] v ij (t) represents the speed of the jth dimension of the i-th group of sensitive coefficients at the t-th iteration; x ij (t) represents the position of the jth dimension of the i-th group of sensitive coefficients at the t-th iteration; p ij (t) represents the historical best position of the jth dimension of the i-th group of sensitivity coefficients; p gj (t) represents the global optimal position of the jth dimension among all sensitivity coefficient groups, that is, the optimal sensitivity coefficient group.
[0095] Therefore, the sensitivity coefficient group can be optimized by using the above equations (3) and (4).
[0096] In an optional embodiment of the present invention, the sensitivity coefficient group is optimized based on the fitness function evaluation value using a charge search algorithm, including: determining an optimal fitness function evaluation value from each of the fitness function evaluation values; determining an optimal sensitivity coefficient group from each of the sensitivity coefficient groups based on the optimal fitness function evaluation value; and optimizing the sensitivity coefficient group based on the optimal sensitivity coefficient group using a charge search algorithm to obtain an optimized sensitivity coefficient group.
[0097] Specifically, after calculating the fitness function evaluation value of each output queue, the best fitness function evaluation value can be determined from the fitness function evaluation values of each output queue, and the sensitivity coefficient group of the output queue corresponding to the best fitness function evaluation value is the best sensitivity coefficient group.
[0098] Therefore, the best sensitivity coefficient group and the sensitivity coefficient group of the target output queue can be input into the charge search algorithm to obtain the optimized sensitivity coefficient group.
[0099] CSS optimization algorithm, each set of parameter combinations imitates the Coulomb force on the charge, which is attracted and approached by the high-charge charge. The charge will generate an electric field around itself. The relationship between the electric field and the distance is shown in Figure 2 , showing a schematic diagram of the relationship between an electric field and a distance provided in an embodiment of the present invention, and the mathematical expression is as shown in equation (5).
[0100]
[0101] Where: q i is the charge of the ith charge; E ij represents the j-th dimension electric field of the i-th charge; k e is the Coulomb constant; r ij is the j-dimensional distance between the two charges.
[0102] The self-charge is simulated in the fitness function to get the evaluation value. The higher the charge, the higher the evaluation. The charge is calculated using the fitness function evaluation value calculated by formula (1) and formula (6):
[0103]
[0104] F biggest is the historical maximum root mean square error, F smallest is the historical minimum root mean square error, and n is the number of parameter combinations (charges).
[0105] The Coulomb force on a charge is the product of the electric field and its own charge, as shown in formula (7).
[0106] F ij =q j E ij (7)
[0107] After knowing the magnitude and direction of the total Coulomb force on each point charge (the Coulomb force is not a single direction, and the total force on each other charge must be calculated), the Coulomb force is then combined with the kinematic formula and Newtonian mechanics to determine the new position of each point charge at the next moment. See the schematic diagram for details. Figure 3 , which shows a schematic diagram of a charge subjected to Coulomb force provided in an embodiment of the present invention. Then the current moving speed of the point charge is calculated based on the new and old positions. Refer to the following kinematic formula (8):
[0108]
[0109] Where: X i,new is the new position of the i-th point charge, X i,old is the position of the i-th point charge at this time, v i,old is the velocity of the ith point charge at this moment, m i is the mass of the i-th point charge, where m is defined i =q i , F i The Coulomb force on the i-th point charge at this time is calculated using equation (7).
[0110] From the analysis of formula (5), the upper formula (5) means that the closer the charge is to the optimal solution, the smaller its Coulomb attraction is, and the charge will not blindly approach the optimal solution, because it may only be a regional optimal solution. The lower formula (5) means that when it is too far away from a certain charge, it will not be affected by its Coulomb attraction, which means that the charge will search in its own solution search space to ensure the diversity of the possibilities of the optimal solution. Combining the above two points, we can know that CSS has a strong ability to search for the global optimal solution.
[0111] In an optional embodiment of the embodiment of the present invention, the preset number of times is determined according to the convergence degree of the particle swarm optimization algorithm and the charge search algorithm.
[0112] Specifically, the preset number of times can be determined according to the convergence degree of the particle swarm optimization algorithm and the charge search algorithm.
[0113] Reference Figure 4 and Figure 5 , Figure 4 FIG. 1 shows one of the schematic diagrams for comparing the performance of a PSO and a CSS provided in an embodiment of the present invention. Figure 5 The second schematic diagram of the performance comparison between PSO and CSS provided in an embodiment of the present invention is shown. The two algorithms are used to perform four-dimensional root mean square error (RMSE) on other mathematical models. It can be seen that PSO has the advantages of faster convergence and lower computational complexity compared to CSS, while CSS is better at searching for the global optimal solution than PSO, but the single computational complexity is higher than PSO. Among them, in the early stage, the root mean square error of the PSO algorithm decreases faster, and the CSS algorithm decreases slower, that is, in the early stage, the convergence degree of the PSO algorithm is high, and the convergence degree of the CSS algorithm is low, so the PSO algorithm is used first. In the later stage, the root mean square error of the CSS algorithm is smaller, and the root mean square error of the PSO algorithm is larger, that is, in the later stage, the convergence degree of the PSO algorithm is low, and the convergence degree of the CSS algorithm is high, so the CSS algorithm is used later. The specific preset number of times (calculation cycle) of the PSO algorithm can be taken as Figure 4 The (time) value near the intersection of the root mean square error line of the PSO algorithm and the root mean square error line of the CSS algorithm is specifically set according to needs, and is not limited in the implementation of the present invention.
[0114] In an optional embodiment of the present invention, after adjusting the priority of each output queue according to the urgency, the method further includes: opening the gate switches of the output queues in order from high to low according to the priority.
[0115] Specifically, after the priorities of the output queues are adjusted, the gate switches of the output queues may be opened in sequence from high to low according to the priorities, so as to better transmit the data packets in each output queue.
[0116] In order to better understand the embodiments of the present invention, Figure 6 , Figure 7 An exemplary description is given.
[0117] Reference Figure 6, showing a CNC equipment architecture diagram provided in an embodiment of the present invention. The central network controller (CNC) is connected to the switch (TSN Switch), and the central network controller includes a computing unit, a data packet capture module, a data packet storage module, a control command sending module and a network interface module, wherein the data packet capture module and the data packet storage module are responsible for receiving and storing service data packets on the TSN network environment; the control command sending module controls the switch with the result of the control strategy algorithm; and the network interface module is used for CNC control and the import of user commands.
[0118] Reference Figure 7 , showing a control strategy diagram for output queue priority adjustment provided in an embodiment of the present invention. When the system is initialized or a new service data packet is detected, the control strategy is restarted, and the PSO algorithm is used in the initial restart to ensure that the network performance can be quickly improved (the packet loss rate and delay are quickly reduced). After n calculation cycles, the PSO algorithm is changed to the CSS algorithm to ensure that the network performance can be optimized. After the mth (m>n) calculation cycle or the data transmission is completed, the optimization process ends.
[0119] In the above embodiment, a composite optimization algorithm (PSO algorithm and CSS algorithm) is used to reduce the packet switching rate and delay of service data packets, thereby maintaining the optimal performance of TSN network services.
[0120] It should be noted that, for the sake of simplicity, the method embodiments are described as a series of action combinations, but those skilled in the art should be aware that the embodiments of the present invention are not limited by the order of the actions described, because according to the embodiments of the present invention, certain steps can be performed in other orders or simultaneously. Secondly, those skilled in the art should also be aware that the embodiments described in the specification are all preferred embodiments, and the actions involved are not necessarily required by the embodiments of the present invention.
[0121] Reference Figure 8 , shows a structural block diagram of a queue priority device provided in an embodiment of the present invention, including:
[0122] Adjust the data acquisition module 801 to obtain information parameters and sensitivity coefficient groups of each output queue on the switch;
[0123] An evaluation value calculation module 802, used to calculate the fitness function evaluation value of each output queue according to the information parameter;
[0124] A coefficient optimization module 803 is used to optimize the sensitivity coefficient group using a particle swarm optimization algorithm based on the fitness function evaluation value, or to optimize the sensitivity coefficient group using a charge search algorithm based on the fitness function evaluation value when the number of times the particle swarm optimization algorithm is executed to optimize the sensitivity coefficient group is greater than a preset number of times;
[0125] An urgency evaluation module 804 is used to evaluate the urgency of each output queue by using the optimized sensitivity coefficient group and the information parameter;
[0126] The priority adjustment module is used to adjust the priority of each output queue according to the urgency.
[0127] In an optional embodiment of the embodiment of the present invention, the information parameters include actual delay, standard delay, actual packet loss rate and standard packet loss rate.
[0128] In an optional embodiment of the embodiment of the present invention, the sensitivity coefficient group includes a sensitivity coefficient of a packet loss rate and a sensitivity coefficient of a delay.
[0129] In an optional embodiment of the present invention, the coefficient optimization module includes:
[0130] An optimal evaluation value determination submodule, used to determine the optimal fitness function evaluation value from each of the fitness function evaluation values;
[0131] An optimal coefficient group determination submodule, used to determine the optimal sensitivity coefficient group from each of the sensitivity coefficient groups according to the optimal fitness function evaluation value;
[0132] The first coefficient optimization submodule is used to optimize the sensitivity coefficient group based on the optimal sensitivity coefficient group by using a particle swarm optimization algorithm to obtain an optimized sensitivity coefficient group.
[0133] In an optional embodiment of the present invention, the coefficient optimization module includes:
[0134] An optimal evaluation value determination submodule, used to determine the optimal fitness function evaluation value from each of the fitness function evaluation values;
[0135] An optimal coefficient group determination submodule, used to determine the optimal sensitivity coefficient group from each of the sensitivity coefficient groups according to the optimal fitness function evaluation value;
[0136] The second coefficient optimization submodule is used to optimize the sensitivity coefficient group based on the optimal sensitivity coefficient group by using a charge search algorithm to obtain an optimized sensitivity coefficient group.
[0137] In an optional embodiment of the embodiment of the present invention, the preset number of times is determined according to the convergence degree of the particle swarm optimization algorithm and the charge search algorithm.
[0138] In an optional embodiment of the embodiment of the present invention, it also includes:
[0139] The gate switch opening module is used to open the gate switches of the output queue in sequence from high to low according to the priority.
[0140] In the above embodiment, the information parameters and sensitivity coefficient groups of each output queue on the switch are obtained through the queue priority device, and the fitness function evaluation value of each output queue is calculated according to the information parameters. Based on the fitness function evaluation value, the particle swarm optimization algorithm is used to optimize the sensitivity coefficient group, or when the number of times the particle swarm optimization algorithm is used to optimize the sensitivity coefficient group is greater than the preset number of times, the charge search algorithm is used to optimize the sensitivity coefficient group based on the fitness function evaluation value, and the urgency of each output queue is evaluated by the optimized sensitivity coefficient group and information parameters, and the priority of each output queue is adjusted according to the urgency. By using two PSO algorithms and CSS algorithms to optimize the sensitivity coefficient group, the particle swarm optimization algorithm is used in the initial stage of restart to ensure that the network performance can be quickly improved (the packet loss rate and delay are quickly reduced). After the particle swarm optimization algorithm is optimized for the preset number of times, the charge search algorithm is used to ensure that the network performance can be optimized, so that the entire network performance can be maintained at a high level in each period, avoiding the phenomenon of queues occupying resources under special circumstances due to the difference in the minimum effective transmission performance of each service packet as the network service category expands, resulting in poor TNS network performance.
[0141] As for the device embodiment, since it is basically similar to the method embodiment, the description is relatively simple, and the relevant parts can be referred to the partial description of the method embodiment.
[0142] In addition, an embodiment of the present invention further provides an electronic device, including: a processor, a memory, and a computer program stored in the memory and executable on the processor. When the computer program is executed by the processor, the various processes of the above-mentioned data acquisition method embodiment are implemented, and the same technical effect can be achieved. To avoid repetition, it will not be described here.
[0143] The embodiment of the present invention further provides a computer-readable storage medium, on which a computer program is stored, and when the computer program is executed by a processor, each process of the above-mentioned data acquisition method embodiment is implemented, and the same technical effect can be achieved. To avoid repetition, it is not repeated here. The computer-readable storage medium is, for example, a read-only memory (ROM), a random access memory (RAM), a magnetic disk or an optical disk.
[0144] Fig. 9 A schematic diagram of the hardware structure of an electronic device for implementing various embodiments of the present invention.
[0145] The electronic device 900 includes but is not limited to: a radio frequency unit 901, a network module 902, an audio output unit 903, an input unit 904, a sensor 905, a display unit 906, a user input unit 907, an interface unit 906, a memory 909, a processor 910, and a power supply 911. Those skilled in the art will appreciate that Fig. 9 The electronic device structure shown in the figure does not constitute a limitation on the electronic device, and the electronic device may include more or fewer components than shown in the figure, or combine certain components, or arrange the components differently. In the embodiments of the present invention, the electronic device includes but is not limited to a mobile phone, a tablet computer, a laptop computer, a PDA, a vehicle-mounted terminal, a wearable device, and a pedometer.
[0146] It should be understood that in the embodiment of the present invention, the radio frequency unit 901 can be used for receiving and sending signals during information transmission or communication. Specifically, after receiving downlink data from the base station, it is sent to the processor 910 for processing; in addition, uplink data is sent to the base station. Generally, the radio frequency unit 901 includes but is not limited to an antenna, at least one amplifier, a transceiver, a coupler, a low noise amplifier, a duplexer, etc. In addition, the radio frequency unit 901 can also communicate with the network and other devices through a wireless communication system.
[0147] The electronic device provides users with wireless broadband Internet access through the network module 902, such as helping users to send and receive emails, browse web pages, and access streaming media.
[0148] The audio output unit 903 can convert the audio data received by the RF unit 901 or the network module 902 or stored in the memory 909 into an audio signal and output it as sound. Moreover, the audio output unit 903 can also provide audio output related to a specific function performed by the electronic device 900 (for example, a call signal reception sound, a message reception sound, etc.). The audio output unit 903 includes a speaker, a buzzer, a receiver, etc.
[0149] The input unit 904 is used to receive audio or video signals. The input unit 904 may include a graphics processor (GPU) 9041 and a microphone 9042, and the graphics processor 9041 processes the image data of a static picture or video obtained by an image capture device (such as a camera) in a video capture mode or an image capture mode. The processed image frame can be displayed on the display unit 906. The image frame processed by the graphics processor 9041 can be stored in the memory 909 (or other storage medium) or sent via the radio frequency unit 901 or the network module 902. The microphone 9042 can receive sound and can process such sound into audio data. The processed audio data can be converted into a format output that can be sent to a mobile communication base station via the radio frequency unit 901 in the case of a telephone call mode.
[0150] The electronic device 900 also includes at least one sensor 905, such as a light sensor, a motion sensor, and other sensors. Specifically, the light sensor includes an ambient light sensor and a proximity sensor, wherein the ambient light sensor can adjust the brightness of the display panel 9061 according to the brightness of the ambient light, and the proximity sensor can turn off the display panel 9061 and / or the backlight when the electronic device 900 is moved to the ear. As a type of motion sensor, the accelerometer sensor can detect the magnitude of acceleration in each direction (generally three axes), and can detect the magnitude and direction of gravity when stationary, which can be used to identify the posture of the electronic device (such as horizontal and vertical screen switching, related games, magnetometer posture calibration), vibration recognition related functions (such as pedometer, tapping), etc.; the sensor 905 can also include a fingerprint sensor, a pressure sensor, an iris sensor, a molecular sensor, a gyroscope, a barometer, a hygrometer, a thermometer, an infrared sensor, etc., which will not be repeated here.
[0151] The display unit 906 is used to display information input by the user or information provided to the user. The display unit 906 may include a display panel 9061, which may be configured in the form of a liquid crystal display (LCD), an organic light-emitting diode (OLED), or the like.
[0152] The user input unit 907 can be used to receive input digital or character information, and to generate key signal input related to user settings and function control of the electronic device. Specifically, the user input unit 907 includes a touch panel 9071 and other input devices 9072. The touch panel 9071, also known as a touch screen, can collect the user's touch operation on or near it (such as the user's operation on the touch panel 9071 or near the touch panel 9071 using any suitable object or accessory such as a finger, stylus, etc.). The touch panel 9071 may include two parts: a touch detection device and a touch controller. Among them, the touch detection device detects the user's touch orientation, detects the signal brought by the touch operation, and transmits the signal to the touch controller; the touch controller receives the touch information from the touch detection device, converts it into the contact point coordinates, and then sends it to the processor 910, receives the command sent by the processor 910 and executes it. In addition, the touch panel 9071 can be implemented using various types such as resistive, capacitive, infrared and surface acoustic waves. In addition to the touch panel 9071, the user input unit 907 may also include other input devices 9072. Specifically, other input devices 9072 may include but are not limited to a physical keyboard, function keys (such as volume control keys, switch keys, etc.), a trackball, a mouse, and a joystick, which will not be repeated here.
[0153] Furthermore, the touch panel 9071 may be overlaid on the display panel 9061. When the touch panel 9071 detects a touch operation on or near it, it transmits the information to the processor 910 to determine the type of the touch event. Then, the processor 910 provides a corresponding visual output on the display panel 9061 according to the type of the touch event. Fig. 9 In the figure, the touch panel 9071 and the display panel 9061 are used as two independent components to realize the input and output functions of the electronic device. However, in some embodiments, the touch panel 9071 and the display panel 9061 can be integrated to realize the input and output functions of the electronic device, which is not limited here.
[0154] The interface unit 908 is an interface for connecting an external device to the electronic device 900. For example, the external device may include a wired or wireless headset port, an external power supply (or battery charger) port, a wired or wireless data port, a memory card port, a port for connecting a device with an identification module, an audio input / output (I / O) port, a video I / O port, a headphone port, etc. The interface unit 908 may be used to receive input (e.g., information parameters, power, etc.) from an external device and transmit the received input to one or more elements within the electronic device 900 or may be used to transmit data between the electronic device 900 and an external device.
[0155] The memory 909 can be used to store software programs and various data. The memory 909 can mainly include a program storage area and a data storage area, wherein the program storage area can store an operating system, an application required for at least one function (such as a sound playback function, an image playback function, etc.), etc.; the data storage area can store data created according to the use of the mobile phone (such as audio data, a phone book, etc.), etc. In addition, the memory 909 can include a high-speed random access memory, and can also include a non-volatile memory, such as at least one disk storage device, a flash memory device, or other volatile solid-state storage devices.
[0156] The processor 910 is the control center of the electronic device. It uses various interfaces and lines to connect various parts of the entire electronic device. It executes various functions of the electronic device and processes data by running or executing software programs and / or modules stored in the memory 909, and calling data stored in the memory 909, so as to monitor the electronic device as a whole. The processor 910 may include one or more processing units; preferably, the processor 910 may integrate an application processor and a modem processor, wherein the application processor mainly processes the operating system, user interface, and application programs, and the modem processor mainly processes wireless communications. It is understandable that the above-mentioned modem processor may not be integrated into the processor 910.
[0157] The electronic device 900 may also include a power supply 911 (such as a battery) for supplying power to each component. Preferably, the power supply 911 may be logically connected to the processor 910 through a power management system, thereby implementing functions such as charging, discharging, and power consumption management through the power management system.
[0158] In addition, the electronic device 900 includes some functional modules not shown, which will not be described in detail here.
[0159] The embodiment of the present invention also provides a computer readable storage medium, such as Fig.10 As shown, the computer readable storage medium stores a computer program 1001, and when the computer program 1001 is executed by the processor, each process of the above data acquisition method embodiment is implemented, and the same technical effect can be achieved. To avoid repetition, it is not repeated here. The computer readable storage medium is, for example, a read-only memory (ROM), a random access memory (RAM), a magnetic disk or an optical disk.
[0160] It should be noted that, in this article, the terms "include", "comprises" or any other variations thereof are intended to cover non-exclusive inclusion, so that a process, method, article or device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, article or device. In the absence of further restrictions, an element defined by the sentence "comprises a ..." does not exclude the existence of other identical elements in the process, method, article or device including the element.
[0161] Through the description of the above implementation methods, those skilled in the art can clearly understand that the above-mentioned embodiment methods can be implemented by means of software plus a necessary general hardware platform, and of course by hardware, but in many cases the former is a better implementation method. Based on such an understanding, the technical solution of the present invention, or the part that contributes to the prior art, can be embodied in the form of a software product, which is stored in a storage medium (such as ROM / RAM, a magnetic disk, or an optical disk), and includes a number of instructions for enabling a terminal (which can be a mobile phone, a computer, a server, an air conditioner, or a network device, etc.) to execute the methods described in each embodiment of the present invention.
[0162] The embodiments of the present invention are described above in conjunction with the accompanying drawings, but the present invention is not limited to the above-mentioned specific implementation modes, which are merely illustrative rather than restrictive. Under the guidance of the present invention, ordinary technicians in this field can also make many forms without departing from the scope of protection of the present invention and the claims, all of which are within the protection of the present invention.
[0163] Those of ordinary skill in the art will appreciate that the units and algorithm steps of each example described in conjunction with the embodiments disclosed in the embodiments of the present invention can be implemented in electronic hardware, or a combination of computer software and electronic hardware. Whether these functions are performed in hardware or software depends on the specific application and design constraints of the technical solution. Professional and technical personnel can use different methods to implement the described functions for each specific application, but such implementation should not be considered to be beyond the scope of the present invention.
[0164] Those skilled in the art can clearly understand that, for the convenience and brevity of description, the specific working processes of the systems, devices and units described above can refer to the corresponding processes in the aforementioned method embodiments and will not be repeated here.
[0165] In the embodiments provided in the present application, it should be understood that the disclosed devices and methods can be implemented in other ways. For example, the device embodiments described above are only schematic. For example, the division of the units is only a logical function division. There may be other division methods in actual implementation, such as multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be through some interfaces, indirect coupling or communication connection of devices or units, which can be electrical, mechanical or other forms.
[0166] The units described as separate components may or may not be physically separated, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed on multiple network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution of this embodiment.
[0167] In addition, each functional unit in each embodiment of the present invention may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit.
[0168] If the functions are implemented in the form of software functional units and sold or used as independent products, they can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present invention, or the part that contributes to the prior art, or the part of the technical solution, can be embodied in the form of a software product. The computer software product is stored in a storage medium, including several instructions for a computer device (which can be a personal computer, server, or network device, etc.) to perform all or part of the steps of the method described in each embodiment of the present invention. The aforementioned storage medium includes: various media that can store program codes, such as USB flash drives, mobile hard disks, ROM, RAM, magnetic disks, or optical disks.
[0169] The above is only a specific embodiment of the present invention, but the protection scope of the present invention is not limited thereto. Any person skilled in the art can easily think of changes or substitutions within the technical scope disclosed by the present invention, which should be included in the protection scope of the present invention. Therefore, the protection scope of the present invention should be based on the protection scope of the claims.
Claims
1. A queue priority adjustment method, characterized in that: The method comprises: Obtain information parameters and a sensitivity coefficient group of each output queue on the switch, wherein the information parameters include actual delay, standard delay, actual packet loss rate, and standard packet loss rate, and the sensitivity coefficient group includes a sensitivity coefficient of packet loss rate and a sensitivity coefficient of delay; Calculating the fitness function evaluation value of each of the output queues according to the information parameters; Based on the fitness function evaluation value, the particle swarm optimization algorithm is used to optimize the sensitivity coefficient group, or when the number of times the particle swarm optimization algorithm is used to optimize the sensitivity coefficient group is greater than a preset number of times, based on the fitness function evaluation value, the charge search algorithm is used to optimize the sensitivity coefficient group, and the preset number of times is determined according to the convergence degree of the particle swarm optimization algorithm and the charge search algorithm; Evaluating the urgency of each of the output queues by using the optimized sensitivity coefficient group and the information parameter; adjusting the priority of each of the output queues according to the urgency, and opening the gate switches of the output queues in order from high to low according to the priority; The step of optimizing the sensitivity coefficient group based on the fitness function evaluation value by using a particle swarm optimization algorithm comprises: determining an optimal fitness function evaluation value from each fitness function evaluation value; determining an optimal sensitivity coefficient group from each sensitivity coefficient group according to the optimal fitness function evaluation value; optimizing the sensitivity coefficient group based on the optimal sensitivity coefficient group by using a particle swarm optimization algorithm to obtain an optimized sensitivity coefficient group; The method of optimizing the sensitivity coefficient group based on the fitness function evaluation value by using a charge search algorithm includes: determining an optimal fitness function evaluation value from each of the fitness function evaluation values; determining an optimal sensitivity coefficient group from each of the sensitivity coefficient groups according to the optimal fitness function evaluation value; and optimizing the sensitivity coefficient group based on the optimal sensitivity coefficient group by using a charge search algorithm to obtain an optimized sensitivity coefficient group.
2. A queue priority adjustment device, characterized in that: include: A data acquisition module, used to acquire information parameters and sensitivity coefficient groups of each output queue on the switch, wherein the information parameters include actual delay, standard delay, actual packet loss rate and standard packet loss rate, and the sensitivity coefficient group includes a sensitivity coefficient of packet loss rate and a sensitivity coefficient of delay; An evaluation value calculation module, used for calculating the fitness function evaluation value of each output queue according to the information parameter; A coefficient optimization module, configured to optimize the sensitive coefficient group by using a particle swarm optimization algorithm based on the fitness function evaluation value, or optimize the sensitive coefficient group by using a charge search algorithm based on the fitness function evaluation value when the number of times the particle swarm optimization algorithm is executed to optimize the sensitive coefficient group is greater than a preset number of times, wherein the preset number of times is determined according to the convergence degree of the particle swarm optimization algorithm and the charge search algorithm; An urgency evaluation module, used to evaluate the urgency of each of the output queues by using the optimized sensitivity coefficient group and the information parameter; A priority adjustment module, used to adjust the priority of each output queue according to the urgency, and open the gate switches of the output queues in order from high to low according to the priority; The coefficient optimization module comprises: An optimal evaluation value determination submodule, used to determine the optimal fitness function evaluation value from each of the fitness function evaluation values; An optimal coefficient group determination submodule, used to determine the optimal sensitivity coefficient group from each of the sensitivity coefficient groups according to the optimal fitness function evaluation value; A first coefficient optimization submodule is used to optimize the sensitivity coefficient group based on the optimal sensitivity coefficient group by using a particle swarm optimization algorithm to obtain an optimized sensitivity coefficient group; The coefficient optimization module comprises: An optimal evaluation value determination submodule, used to determine the optimal fitness function evaluation value from each of the fitness function evaluation values; An optimal coefficient group determination submodule, used to determine the optimal sensitivity coefficient group from each of the sensitivity coefficient groups according to the optimal fitness function evaluation value; The second coefficient optimization submodule is used to optimize the sensitivity coefficient group based on the optimal sensitivity coefficient group by using a charge search algorithm to obtain an optimized sensitivity coefficient group.
3. An electronic device, characterized in that: It includes a processor, a communication interface, a memory and a communication bus, wherein the processor, the communication interface and the memory communicate with each other through the communication bus; The memory is used to store computer programs; The processor is used to implement the method according to claim 1 when executing the program stored in the memory.
4. A computer-readable storage medium having instructions stored thereon, which, when executed by one or more processors, cause the processors to perform the method of claim 1.
