Data packet sending method, system and equipment for electric power multi-network customized queue

The routing and scheduling decisions are made through the ant colony algorithm, which solves the problem of unstable communication under the same priority of power service data flow, and realizes high reliability and secure communication of power service data.

CN119135618APending Publication Date: 2024-12-13GLOBAL ENERGY INTERCONNECTION RES INST CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202410971395.3
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-07-19
Publication Date
2024-12-13

AI Technical Summary

Technical Problem

In the case where multiple power service data streams have the same priority, it is difficult to ensure the communication mechanism of heartbeat messages, goose messages, etc. that inform the device security messages, resulting in unstable power service communication.

Method used

The ant colony algorithm is used to make routing network selection and scheduling decisions, and the power service data streams with different priorities and the same priority are allocated and sent SKB resources to ensure the transmission and reception of data packets.

Benefits of technology

Without modifying the hardware of the power communication equipment, the network communication capability of the power service data flow is improved and the security and stability of the power service is enhanced.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119135618A_ABST
    Figure CN119135618A_ABST
Patent Text Reader

Abstract

The invention discloses a data packet sending method, system and equipment for a power multi-network customized queue, and the method comprises the steps: classifying power services according to a field operation demand and a flow condition, and distributing priorities for all types of power services; performing routing network selection and scheduling decision through an ant colony algorithm according to various current network communication conditions and power business requirements; allocating and sending SKB resources to different power service data streams with different priorities and the same priority according to a pre-customized rule; based on the selected routing network and the scheduling decision, different power service data streams are sent by sending SKB resources, and then sending of a data packet is completed; wherein the data packet comprises different power business data streams. According to the invention, under the condition that the plurality of power service data streams have the same priority, the plurality of power service data still have network communication capability, and hardware of power communication equipment does not need to be modified, so that the safety and the robustness of power services are improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of multiple network routing selection and network protocol stack flow control for electric power services, and in particular to a method, system and device for sending electric power network data packets. Background Art

[0002] Faced with emerging formats such as "Internet Plus" and "Industry 4.0", network data traffic has surged in response to the professional and personalized demands of users in various industries for the network, as well as diversified terminal types, multiple access methods, and multiple communication methods such as person-to-person, person-to-thing, thing-to-thing, and network-to-network. When business data traffic of the same priority level bursts, network equipment may cache or discard part of the network data. The power business needs to ensure high reliability. Even in the most difficult times, it is best to ensure a minimum communication mechanism to ensure the stability of power equipment and power grids.

[0003] There are many types of power services. The control-type power services with higher priority include but are not limited to distributed power supply regulation, new energy storage regulation, distribution automation "three remote controls", precise load control, distribution network protection, intelligent distributed feeder automation, new power load management and other services. There are also relatively low-priority power data services such as data collection, image and video, and auxiliary operation and maintenance.

[0004] In order to ensure the business communication needs of power equipment, the equipment can adopt a multi-network access communication method, facing the selection of network nodes and routing addressing. When the power business is connected to the network in the traditional way, the network equipment uses different priority sending queues for different priority business data to queue, and generally adopts a first-in-first-out strategy to send data packets for the same priority power business data. For the situation where multiple power business data streams have the same priority, this strategy can only guarantee the communication mechanism of heartbeat messages, goose messages and other notification devices for safety messages by modifying the hardware of the power communication equipment. The power business needs to ensure high reliability. Even in the most difficult times, the network card sending queue is arranged to ensure that the power business of the same priority can send device heartbeat messages and other data messages to maintain device safety, thereby achieving the security of the power business. Summary of the invention

[0005] In order to solve the problem that the existing technology has the same priority for multiple power business data streams, the only way to achieve the security of power business is to modify the hardware of power communication equipment to ensure the communication mechanism of heartbeat messages, goose messages and other notification equipment security messages, the present invention proposes a data packet sending method of a power multi-network customized queue, including:

[0006] Classify power services according to on-site operation requirements and traffic conditions, and assign priorities to each type of power business;

[0007] According to the current network communication status and power business needs, the ant colony algorithm is used to select the routing network and make scheduling decisions;

[0008] Allocate and send SKB resources to different power business data flows of different priorities and the same priority according to pre-defined rules;

[0009] Based on the selected routing network and dispatching decision, different power business data streams are sent by sending SKB resources, thereby completing the sending of data packets;

[0010] The data packet includes: different power business data streams.

[0011] Optionally, the power services are classified according to the on-site operation requirements and traffic conditions, and priorities are assigned to various types of power services, including:

[0012] According to the on-site operation requirements and traffic usage, the power business is divided into fast forwarding business, guaranteed safe forwarding business, and best-effort business;

[0013] Setting the fast forwarding service as the first priority, or setting individual forwarding services as the first priority and reducing some fast forwarding services to the second priority according to the on-site situation;

[0014] Setting the secure forwarding service to a second priority;

[0015] The best effort service is set as the third priority.

[0016] Optionally, allocating and sending SKB resources to different power service data flows of different priorities and the same priority according to a pre-defined rule includes:

[0017] Different power services are marked through the power service rule module in the TCP / IP network protocol stack, and SKB resources are set for the power services corresponding to the priorities from high to low, and different business data with the same priority are allocated to send SKB resources based on pre-established rules.

[0018] Optionally, the routing network selection and scheduling decision are performed by using an ant colony algorithm according to the current multiple network communication conditions and power business requirements, including:

[0019] Add network selection and routing modules to maintain the routing table and network status table of the network that can be selected by the service to the main station;

[0020] Each network is considered as a node, and the selected routing and scheduling relationship between networks is considered as the path; the network delay of different networks in the power business is defined as the distance, and the network available resources are defined as the cost;

[0021] Initially, smaller pheromones are randomly placed on the routing and scheduling decisions selected by the network. Through pheromone updates, iterative optimization is performed to obtain the optimal routing network and scheduling decisions.

[0022] Optionally, at the initial stage, a smaller pheromone is randomly placed on the routing and scheduling decision selected by the network, and an iterative optimization is performed through pheromone update to obtain the optimal routing network and scheduling decision, including:

[0023] Step 1: Set the number of initialization iterations, the number of ants, and randomly place smaller pheromones on the path;

[0024] Step 2: Update the pheromone matrix zero value according to the pheromone concentration matrix and the scheduling advantage matrix;

[0025] Step 3: Decrease the pheromone concentration of all paths by p, compare the scheduling advantages of all ants in this iteration, and find the maximum value;

[0026] Step 4: Increase the pheromone concentration of the maximum path by q, traverse each row of the pheromone concentration matrix, obtain the non-zero pheromone set and the maximum value of the pheromone in the non-zero information geometry. If the non-zero pheromone set is empty, then all current network nodes are not suitable for power business, otherwise proceed to step 5;

[0027] Step 5: Compare the current ant number with the size of the critical value array. If the current ant number is smaller than the critical array, the current ant takes the maximum value in the non-zero set of pheromones and returns the network node corresponding to the maximum value. Otherwise, the current ant takes the network node corresponding to the random value in the non-zero set and returns it.

[0028] Step 6: Determine whether the number of iterations reaches the set maximum number of iterations. If not, add 1 to the number of iterations and return to step 2. Otherwise, go to step 7.

[0029] Step 7: The returned network nodes are used as the selected routing network, and the paths between the returned network nodes are used as scheduling decisions.

[0030] Optionally, the current ant takes the maximum value in the non-zero set of pheromones and returns the network node corresponding to the maximum value, including:

[0031] When the current ant takes multiple maximum values ​​in the non-zero set of pheromones, a corresponding network node is randomly selected and returned.

[0032] On the other hand, the present invention also provides a data packet sending system for a power multi-network customized queue, comprising:

[0033] Priority classification module, used to classify power services according to on-site operation requirements and traffic conditions, and assign priorities to various types of power services;

[0034] The network selection and routing module is used to make routing network selection and scheduling decisions through the ant colony algorithm according to the current network communication status and power business needs;

[0035] A resource allocation module, used to allocate and send SKB resources to different power business data flows of different priorities and the same priority according to pre-defined rules;

[0036] The data sending module is used to send different power business data streams by sending SKB resources based on the selected routing network and scheduling decision, thereby completing the sending of data packets.

[0037] Optionally, the priority division module is specifically used to:

[0038] According to the on-site operation requirements and traffic usage, the power business is divided into fast forwarding business, guaranteed safe forwarding business, and best-effort business;

[0039] Setting the fast forwarding service to a first priority;

[0040] Setting the secure forwarding service to a second priority;

[0041] The best effort service is set as the third priority.

[0042] Optionally, the network selection and routing module includes:

[0043] The table update submodule is used to maintain the routing table and network status table of the service to the selectable network of the master station;

[0044] Setting up submodules for treating each network as a node and the selected routing and scheduling relationship between networks as paths; defining the network delay of different networks of the power business as distance and the network available resources as cost;

[0045] The iterative optimization submodule is used to randomly place smaller pheromones on the routing and scheduling decisions selected by the network at the initial stage, and perform iterative optimization through pheromone updates to obtain the optimal routing network and scheduling decisions.

[0046] Optionally, the iterative optimization submodule is specifically used for:

[0047] Step 1: Set the number of initialization iterations, the number of ants, and randomly place smaller pheromones on the path;

[0048] Step 2: Update the pheromone matrix zero value according to the pheromone concentration matrix and the scheduling advantage matrix;

[0049] Step 3: Decrease the pheromone concentration of all paths by p, compare the scheduling advantages of all ants in this iteration, and find the maximum value;

[0050] Step 4: Increase the pheromone concentration of the maximum path by q, traverse each row of the pheromone concentration matrix, obtain the non-zero pheromone set and the maximum value of the pheromone in the non-zero information geometry. If the non-zero pheromone set is empty, then all current network nodes are not suitable for power business, otherwise proceed to step 5;

[0051] Step 5: Compare the current ant number with the size of the critical value array. If the current ant number is smaller than the critical array, the current ant takes the maximum value in the non-zero set of pheromones and returns the network node corresponding to the maximum value. Otherwise, the current ant takes the network node corresponding to the random value in the non-zero set and returns it.

[0052] Step 6: Determine whether the number of iterations reaches the set maximum number of iterations. If not, add 1 to the number of iterations and return to step 2. Otherwise, go to step 7.

[0053] Step 7: The returned network nodes are used as the selected routing network, and the paths between the returned network nodes are used as scheduling decisions.

[0054] Optionally, the current ant in the iterative optimization submodule takes the maximum value in the non-zero set of pheromones, and returns the network node corresponding to the maximum value. The specific implementation steps include:

[0055] When the current ant takes multiple maximum values ​​in the non-zero set of pheromones, a corresponding network node is randomly selected and returned.

[0056] In another aspect, the present application further provides a computing device, comprising: at least one processor and a memory;

[0057] The memory is used to store one or more programs;

[0058] When the one or more programs are executed by the at least one processor, a method for sending data packets of a power multi-network customized queue as described above is implemented.

[0059] On the other hand, the present application also provides a computer-readable storage medium having a computer program stored thereon, and when the computer program is executed, the method for sending data packets of a power multi-network customized queue as described above is implemented.

[0060] Compared with the prior art, the present invention has the following beneficial effects:

[0061] The present invention provides a method for sending data packets of a multi-network customized queue of electric power, including: classifying electric power services according to on-site operation requirements and traffic conditions, and assigning priorities to various types of electric power services; selecting routing networks and making scheduling decisions through ant colony algorithms according to current multiple network communication conditions and electric power service requirements; allocating and sending SKB resources to different electric power service data streams of different priorities and the same priority according to pre-customized rules; sending different electric power service data streams by sending SKB resources based on the selected routing network and scheduling decision, thereby completing the sending of data packets; wherein the data packets include: different electric power service data streams. The present invention enables multiple electric power service data to have network communication capabilities when multiple electric power service data streams have the same priority, and guarantees the message communication mechanism of notifying device safety (or other management messages) such as heartbeat messages and goose messages without modifying the hardware of electric power communication equipment, thereby increasing the security and robustness of electric power services. BRIEF DESCRIPTION OF THE DRAWINGS

[0062] Figure 1 A flow chart of a method for sending a power network data packet according to the present invention;

[0063] Figure 2 A flowchart of network selection and routing addressing by using ant colony algorithm of the present invention;

[0064] Figure 3 A schematic diagram of a method for sending a power network data packet according to an embodiment of the present invention;

[0065] Figure 4 A schematic diagram of SKB resource allocation for sending different service data flows of the same priority level according to an embodiment of the present invention;

[0066] Figure 5 The figure is a schematic diagram of the structure of a computer device of the present invention. DETAILED DESCRIPTION

[0067] The present invention proposes a method for sending data packets of a customized queue of a power multi-network. According to the currently selectable multiple network communication conditions and power business needs, an ant colony algorithm is used to make network selection and routing addressing (scheduling) decisions. A method of modifying the network protocol stack is adopted to reserve space and flow control for related power business data flows. When the flow overflows in a sudden situation, customized optimization is performed for the power business to match the power grid business needs. When multiple power business data flows have the same priority, multiple power business data are still enabled to have network communication capabilities. Without modifying the hardware of the power communication equipment, a message communication mechanism for notifying device safety (or other management messages) such as heartbeat messages and goose messages is guaranteed, thereby increasing the security and robustness of the power business.

[0068] In order to better understand the present invention, the content of the present invention is further described below in conjunction with the accompanying drawings and embodiments.

[0069] Embodiment 1:

[0070] A method for sending data packets in a multi-network customized queue of electric power, such as Figure 1 As shown, including:

[0071] Step S1: Classify the power services according to the on-site operation requirements and traffic conditions, and assign priorities to each type of power services;

[0072] Step S2: Based on the current network communication conditions and power business needs, the ant colony algorithm is used to select the routing network and make scheduling decisions;

[0073] Step S3: Allocate and send SKB resources to different power service data flows of different priorities and the same priority according to pre-defined rules;

[0074] Step S4: Send different power business data streams by sending SKB resources based on the selected routing network and scheduling decision, thereby completing the sending of data packets;

[0075] The data packet includes: different power business data streams.

[0076] The following further introduces each step in the present invention. First, the pre-defined rules involved in the present invention are introduced. The SKB resource mentioned in the text is the socket buffer:

[0077] Customize the rule scheme for allocating sending space for different power business data of the same priority (Qdisc stands for QueueDiscipline, queue rules).

[0078] The geiri_tc power business rule module is added to the TCP / IP network protocol stack net / core / dev.c to mark the priorities of different power businesses and set power business flow control strategies for different power businesses according to their priorities.

[0079] Implement the corresponding Qdisc_ops structure according to different power business flow control strategies, and replace the Qdisc and Qdisc_ops corresponding to the network device in register_netdevice. Here, Qdisc_ops represents the kernel network queue discipline structure, and register_netdevice represents the registration function in the kernel network device.

[0080] Rewrite the logic of sending network data packets in the Qdisc->enqueue (queue rules) function, and allocate SKB resources to different business data streams with the same priority according to pre-defined rules to ensure that multiple power business data streams have network communication capabilities when they have the same priority. The pre-defined rules here are a rule scheme for allocating sending space to different power business data with the same priority.

[0081] Step S1: Classify the power services according to the on-site operation requirements and traffic conditions, and assign priorities to each type of power services, including:

[0082] Customized optimization is carried out for power services to match the business needs of power grids, including but not limited to distributed power supply regulation, new energy storage regulation, distribution automation "three remote controls", precise load control, distribution network protection, intelligent distributed feeder automation, new power load management and other services. According to the on-site operation requirements and traffic conditions, power services are classified into types such as high-speed service hss, guarantee safety service, best-effort service bes, etc. and priorities are assigned. Then, a rule scheme (Qdisc Queue Discipline, queue rules) is customized for allocating and sending space for different power service data of the same priority.

[0083] Usually the fast forwarding service is set as the first priority, but depending on the on-site situation, for example, if some services are particularly important to this site, other fast forwarding services can be downgraded to the second level; the guaranteed security forwarding service is set to the second priority; and the best effort service is set to the third priority.

[0084]

[0085]

[0086] Step S2: Based on the current network communication conditions and power business needs, the ant colony algorithm is used to select the routing network and make scheduling decisions, including:

[0087] According to the current various network communication conditions and power business needs, the ant colony algorithm is used to make network selection and routing addressing (dispatching) decisions.

[0088] (1) Add the network selection and routing module geiri_route_ch to maintain the routing table and network status table (network delay and network available resources) of the service to the master station's selectable network;

[0089] (2) Treat each network as a node and the selected routing and scheduling relationships between networks as paths;

[0090] (3) The network node loads its own network delay, signal quality, and network available resource information onto the forward ant (i.e., antCount) to form pheromone, so that the forward ant antCount moves from the network node to the destination node;

[0091] (4) During a certain iteration, when an ant antCount selects a network for a certain power business, it traverses the row workCount-1 of the pheromone matrix corresponding to the pheromone matrix workCount to obtain the non-zero pheromone set and the maximum pheromone value in the non-zero set; if the non-zero set is empty, it means that all current network nodes are not suitable for the power business workCount, and -1 is directly returned; if it is not empty, the current ant number antCount is compared with the critical value array criticalNodeArr[workCount]. If it is less than, the current ant should take the maximum value in the non-zero pheromone set. If there are multiple maximum values, a random network node corresponding to the maximum value set is taken and returned; if it is greater than, the current ant takes the network node corresponding to the random value in the non-zero set and returns.

[0092] (5) The update Pheromone MatrixAnd Critical NodeArrOneIt method is used to update the pheromone concentration matrix and the ant number critical value array at the end of each election. Figure 2 shown.

[0093] (6) At the end of each iteration, the zero value of the pheromone concentration matrix is ​​first updated according to the initial scheduling advantage matrix. The zero value of the pheromone concentration matrix is ​​due to the fact that when the ants gradually allocate the power business sending queue, the network available resources are too large to allocate a new sending queue again. Therefore, the pheromone concentration should be decayed according to the number of iterations in the initial state; then the pheromone concentration of all paths is decayed by p, and then the optimal ant scheduling path in this selection process is found to increase the pheromone concentration; finally, each row of the pheromone concentration matrix is ​​traversed in turn to calculate the sum and maximum value of the pheromone concentration of each row. If the sum is zero, the critical ant number takes a random value. If it is non-zero, the critical ant number takes the number of ants multiplied by the probability of the maximum pheromone appearance position. In this way, when the next iteration is performed, the ants before the critical value take the optimal value, and the ants after the critical value take a random value.

[0094] (7) Ultimately, the optimal decision path is filtered out due to the gradual enhancement of pheromones;

[0095] The variables of the ant colony algorithm module are explained as follows: advantageMatrix represents the scheduling advantage matrix, advantageOneIt represents the scheduling advantage and of each ant in each generation process, antNum represents the number of ants, criticalNodeArr represents the critical value array of ant node selection optimal value, iteratorCount represents the number of generations, maxValueData represents the optimal value of each iteration, maxValueDataAntIndex represents the ant number of each generation optimal value, nodeImfoArr represents the optional network node information array, nodeInfoArrCopy is used to store the nodeInfoArr copy of each business task scheduling, nodeNum represents the number of optional networks, p represents the attenuation ratio of all path pheromones in each iteration, pathMatrix alAnt represents the scheduling allocation plan of all ants in each generation, pathMatrix oneAnt represents the scheduling allocation plan of one ant in each iteration, workInfoArr represents the array of power business information to be sent, q represents the increase ratio of the optimal path pheromone in each generation, resultData stores the scheduling advantage of all ants in each generation, thresholdValueTwolt represents the difference between the scheduling advantages of two generations, and weightMap represents the relative weight of the priority function when calculating the scheduling advantage.

[0096] Step S3: Allocate and send SKB resources to different power service data flows of different priorities and the same priority according to pre-defined rules, including:

[0097] Different power services are marked through the power service rule module in the TCP / IP network protocol stack, and SKB resources are set for the power services corresponding to the priorities from high to low, and different business data with the same priority are allocated to send SKB resources based on pre-established rules.

[0098] Step S3 specifically includes:

[0099] Add the geiri_tc power business rule module in the TCP / IP network protocol stack net / core / dev.c to mark different power businesses, and follow step 1 to match different flow control strategies.

[0100] Implement the corresponding Qdisc_ops structure according to different power business flow control strategies, and replace the Qdisc and Qdisc_ops corresponding to the network device in register_netdevice.

[0101] Rewrite the logic of sending network data packets in the Qdisc->enqueue function, and allocate SKB resources to different business data streams with the same priority according to the pre-customized rules in step 1 to ensure that multiple power business data streams have network communication capabilities when they have the same priority.

[0102] Step S4: Based on the selected routing network and scheduling decision, different power business data streams are sent by sending SKB resources, thereby completing the sending of data packets, including:

[0103] In qdisc_run, the network device driver corresponding to the selected routing network and scheduling decision (similar to dev->hard_start_xmit) is called to send data packets.

[0104] Example 2

[0105] Combine the following Figure 3 and Figure 4 The present invention further introduces a method for sending data packets of a power multi-network customized queue.

[0106] Customized optimization is carried out for power services to match the business needs of power grids, including but not limited to distributed power generation control, new energy storage control, distribution automation "three remote controls", precise load control, distribution network protection, intelligent distributed feeder automation, new power load management and other services. According to the on-site operation requirements and traffic conditions, power services are classified into types such as fast forwarding services (hss), guaranteed safe forwarding services (css), best effort services (bes), etc., and priorities are assigned. Then, a rule scheme (Qdisc QueueDiscipline, queue rules) is customized for allocating and sending space for different power service data of the same priority.

[0107]

[0108] 2. Based on the current various network communication conditions and power business needs, the ant colony algorithm is used to make network selection and routing addressing (scheduling) decisions.

[0109] 2.1 Added network selection and routing module geiri_route_ch to maintain the routing table and network status table (network delay and network available resources) of the service to the master station's selectable network

[0110] 2.2: Treat each network as a node and the selected routing and scheduling relationship between networks as the path

[0111] 2.3: Define the network delay of different networks in the power business as distance and the network available resources as cost

[0112] 2.4: Initially, smaller pheromones are randomly placed on the routing and scheduling decisions selected by the network. Through pheromone updates, eventually, the optimal decision path is filtered out due to the gradual enhancement of pheromones.

[0113] The core variables of the ant colony algorithm module are explained as follows: advantageMatrix represents the scheduling advantage matrix, advantageOneIt represents the scheduling advantage and of each ant in each generation process, antNum represents the number of ants, criticalNodeArr represents the critical value array of ant node selection optimal value, iteratorCount represents the number of generations, maxValueData represents the optimal value of each iteration, maxValueDataAntIndex represents the ant number of each generation optimal value, nodeImfoArr represents the optional network node information array, nodeInfoArrCopy is used to store the nodeInfoArr copy of each business task scheduling, nodeNum represents the number of optional networks, p represents the attenuation ratio of all path pheromones in each iteration, pathMatrix alAnt represents the scheduling allocation plan of all ants in each generation, pathMatrix oneAnt represents the scheduling allocation plan of an ant in each iteration, workInfoArr represents the array of power business information to be sent, q represents the increase ratio of the optimal path pheromone in each generation, resultData stores the scheduling advantage of all ants in each generation, thresholdValueTwolt represents the difference between the scheduling advantages of two generations, and weightMap represents the relative weight of the priority function when calculating the scheduling advantage.

[0114] During a certain iteration, when an ant antCount selects a network for a certain power business, it traverses the row workCount-1 of the pheromone matrix corresponding to the pheromone matrix workCount to obtain the non-zero pheromone set and the maximum pheromone value in the non-zero set; if the non-zero set is empty, it means that all current network nodes are not suitable for the power business workCount, and -1 is returned directly; if it is not empty, the current ant number antCount is compared with the critical value array criticalNodeArr[workCount]. If it is less than, the current ant should take the maximum value in the non-zero pheromone set. If there are multiple maximum values, a random corresponding network node in the maximum value set is taken and returned; if it is greater than, the current ant takes the network node corresponding to the random value in the non-zero set and returns.

[0115] The updatePheromoneMatrixAndCriticalNodeArrOneIt method updates the pheromone concentration matrix and the ant number critical value array at the end of each election, such as Figure 2 shown.

[0116] updatePheromoneMatrixAndCriticalNodeArrOnelt method execution flow chart (update pheromone matrix and critical node ArrOnelt)

[0117] At the end of each iteration, the zero value of the pheromone concentration matrix is ​​first updated according to the initial scheduling advantage matrix. The zero value of the pheromone concentration matrix is ​​due to the fact that when the ants gradually allocate containers, some host resources are occupied too much and new containers cannot be allocated again. Therefore, the pheromone concentration should be decayed according to the number of iterations in the initial state; then the pheromone concentration of all paths is decayed by p, and then the optimal ant scheduling path in this generation process is found to increase the pheromone concentration; finally, each row of the pheromone concentration matrix is ​​traversed in turn to calculate the sum and maximum value of the pheromone concentration of each row. If the sum is zero, the critical ant number takes a random value. If it is non-zero, the critical ant number takes the number of ants multiplied by the probability of the maximum pheromone appearance position. In this way, when the next iteration is performed, the ants before the critical value take the optimal value, and the ants after the critical value take a random value.

[0118] 3. Add the geiri_tc power business rule module in the TCP / IP network protocol stack net / core / dev.c to mark different power businesses, and follow step 1 to match different flow control strategies.

[0119] 4. Implement the corresponding Qdisc_ops structure according to different power business flow control strategies, and replace the Qdisc and Qdisc_ops corresponding to the network device in register_netdevice.

[0120] 5. Rewrite the logic of sending network data packets in the Qdisc->enqueue function, and allocate SKB resources to different business data streams with the same priority according to the pre-customized rules in step 1 to ensure that multiple power business data streams have network communication capabilities when they have the same priority.

[0121] 6. In qdisc_run, call the network device driver corresponding to step 2 (similar to dev->hard_start_xmit) to send data packets.

[0122] Example 3

[0123] The present invention based on the same inventive concept also provides a power network data packet sending system, comprising:

[0124] Priority classification module, used to classify power services according to on-site operation requirements and traffic conditions, and assign priorities to various types of power services;

[0125] The network selection and routing module is used to make routing network selection and scheduling decisions through the ant colony algorithm according to the current network communication status and power business needs;

[0126] A resource allocation module, used to allocate and send SKB resources to different power business data flows of different priorities and the same priority according to pre-defined rules;

[0127] The data sending module is used to send different power business data streams by sending SKB resources based on the selected routing network and scheduling decision, thereby completing the sending of data packets.

[0128] Optionally, the priority division module is specifically used to:

[0129] According to the on-site operation requirements and traffic usage, the power business is divided into fast forwarding business, guaranteed safe forwarding business, and best-effort business;

[0130] Setting the fast forwarding service to a first priority;

[0131] Setting the secure forwarding service to a second priority;

[0132] The best effort service is set as the third priority.

[0133] Optionally, the network selection and routing module includes:

[0134] The table update submodule is used to maintain the routing table and network status table of the service to the selectable network of the master station;

[0135] Setting up submodules for treating each network as a node and the selected routing and scheduling relationship between networks as paths; defining the network delay of different networks of the power business as distance and the network available resources as cost;

[0136] The iterative optimization submodule is used to randomly place smaller pheromones on the routing and scheduling decisions selected by the network at the initial stage, and perform iterative optimization through pheromone updates to obtain the optimal routing network and scheduling decisions.

[0137] Optionally, the iterative optimization submodule is specifically used for:

[0138] Step 1: Set the number of initialization iterations, the number of ants, and randomly place smaller pheromones on the path;

[0139] Step 2: Update the pheromone matrix zero value according to the pheromone concentration matrix and the scheduling advantage matrix;

[0140] Step 3: Decrease the pheromone concentration of all paths by p, compare the scheduling advantages of all ants in this iteration, and find the maximum value;

[0141] Step 4: Increase the pheromone concentration of the maximum path by q, traverse each row of the pheromone concentration matrix, obtain the non-zero pheromone set and the maximum value of the pheromone in the non-zero information geometry. If the non-zero pheromone set is empty, then all current network nodes are not suitable for power business, otherwise proceed to step 5;

[0142] Step 5: Compare the current ant number with the size of the critical value array. If the current ant number is smaller than the critical array, the current ant takes the maximum value in the non-zero set of pheromones and returns the network node corresponding to the maximum value. Otherwise, the current ant takes the network node corresponding to the random value in the non-zero set and returns it.

[0143] Step 6: Determine whether the number of iterations reaches the set maximum number of iterations. If not, add 1 to the number of iterations and return to step 2. Otherwise, go to step 7.

[0144] Step 7: The returned network nodes are used as the selected routing network, and the paths between the returned network nodes are used as scheduling decisions.

[0145] Optionally, the current ant in the iterative optimization submodule takes the maximum value in the non-zero set of pheromones, and returns the network node corresponding to the maximum value. The specific implementation steps include:

[0146] When the current ant takes multiple maximum values ​​in the non-zero set of pheromones, a corresponding network node is randomly selected and returned.

[0147] Example 4

[0148] like Figure 5 As shown, the present invention also provides an electronic device, which may be a computer device, a single-chip device, an intelligent mobile device, etc. The electronic device in this embodiment may include a processor, a memory, a transceiver component, etc. The memory, the processor, and the transceiver component are connected via a bus; the memory may be used to store an execution program, and an exemplary execution program may include instructions; the processor is used to execute the instructions stored in the memory. The memory may also be used to store data, which may be called and / or modified when the instructions are executed.

[0149] The processor may be a central processing unit (CPU), or other general-purpose processors, digital signal processors (DSP), application-specific integrated circuits (ASIC), field-programmable gate arrays (FPGA) or other programmable logic devices, discrete gates or transistor logic devices, discrete hardware components, etc. It is the computing core and control core of the terminal, which is suitable for implementing one or more instructions, specifically suitable for loading and executing one or more instructions in a storage medium to implement the corresponding method flow or corresponding functions, so as to implement the steps of a method for sending data packets of a multi-network customized queue of a power network in the above-mentioned embodiment.

[0150] Example 5

[0151] Based on the same inventive concept, the present invention also provides a readable storage medium, specifically an electronic device readable storage medium (Memory), which is a memory device in an electronic device for storing programs and data. It can be understood that the storage medium here can include both built-in storage media in electronic devices and, of course, extended storage media supported by electronic devices. The storage medium provides a storage space that stores the operating system of the terminal. In addition, one or more instructions suitable for being loaded and executed by a processor are also stored in the storage space, and these instructions can be one or more execution programs (including program codes). It should be noted that the storage medium here can be a high-speed RAM memory or a non-volatile memory, such as at least one disk memory. The processor loads and executes one or more instructions stored in the storage medium, which can implement the steps of a method for sending data packets of a multi-network customized queue of a power system in the above embodiment.

[0152] Those skilled in the art will appreciate that embodiments of the present invention may be provided as methods, systems, or computer program products. Therefore, the present invention may take the form of a complete hardware embodiment, a complete software embodiment, or an embodiment combining software and hardware. Moreover, the present invention may take the form of a computer program product implemented on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code.

[0153] The present invention is described with reference to flowcharts and / or block diagrams of methods, devices (systems), and computer program products according to embodiments of the present invention. It should be understood that each process and / or block in the flowchart and / or block diagram, as well as the combination of processes and / or blocks in the flowchart and / or block diagram, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing device to produce a machine, so that the instructions executed by the processor of the computer or other programmable data processing device generate instructions for implementing the processes in the flowchart and / or block diagram. Figure 1 A process or multiple processes and / or boxes Figure 1 A device that provides the functions specified in a block or multiple blocks.

[0154] These computer program instructions may also be stored in a computer-readable memory capable of directing a computer or other programmable data processing device to operate in a specific manner, so that the instructions stored in the computer-readable memory produce an article of manufacture comprising an instruction device, which implements the process Figure 1 A process or multiple processes and / or boxes Figure 1 A function specified in one or more boxes.

[0155] These computer program instructions can also be loaded onto a computer or other programmable data processing device so that a series of operating steps are executed on the computer or other programmable device to produce a computer-implemented process, thereby providing instructions for implementing the process. Figure 1 A process or multiple processes and / or boxes Figure 1 The steps for the functions specified in one or more boxes.

[0156] The above are merely embodiments of the present invention and are not intended to limit the present invention. Any modifications, equivalent substitutions, improvements, etc. made within the spirit and principles of the present invention are included in the scope of the claims of the present invention to be approved.

Claims

1. A method for sending data packets of a power multi-network customized queue, characterized in that: include: Classify power services according to on-site operation requirements and traffic conditions, and assign priorities to each type of power business; According to the current network communication status and power business needs, the ant colony algorithm is used to select the routing network and make scheduling decisions; Allocate and send SKB resources to different power business data flows of different priorities and the same priority according to pre-defined rules; Based on the selected routing network and dispatching decision, different power business data streams are sent by sending SKB resources, thereby completing the sending of data packets; The data packet includes: different power business data streams.

2. The method according to claim 1, characterized in that The power services are classified according to the on-site operation requirements and traffic conditions, and priorities are assigned to various types of power services, including: According to the on-site operation requirements and traffic usage, the power business is divided into fast forwarding business, guaranteed safe forwarding business, and best-effort business; Setting the fast forwarding service as the first priority, or setting individual forwarding services as the first priority and reducing some fast forwarding services to the second priority according to the on-site situation; Setting the secure forwarding service to a second priority; The best effort service is set as the third priority.

3. The method according to claim 1, characterized in that The allocating and sending SKB resources to different power service data flows with different priorities and the same priority according to the pre-defined rules includes: Different power services are marked through the power service rule module in the TCP / IP network protocol stack, and SKB resources are set for the power services corresponding to the priorities from high to low, and different business data with the same priority are allocated to send SKB resources based on pre-established rules.

4. The method according to claim 1, characterized in that According to the current network communication conditions and power business needs, the routing network selection and scheduling decision are made through the ant colony algorithm, including: Add network selection and routing modules to maintain the routing table and network status table of the network that can be selected by the service to the main station; Each network is considered as a node, and the selected routing and scheduling relationship between networks is considered as the path; the network delay of different networks in the power business is defined as the distance, and the network available resources are defined as the cost; Initially, smaller pheromones are randomly placed on the routing and scheduling decisions selected by the network. Through pheromone updates, iterative optimization is performed to obtain the optimal routing network and scheduling decisions.

5. The method according to claim 4, characterized in that At the initial stage, a smaller pheromone is randomly placed on the routing and scheduling decision selected by the network, and the pheromone is updated and iterative optimization is performed to obtain the optimal routing network and scheduling decision, including: Step 1: Set the number of initialization iterations, the number of ants, and randomly place smaller pheromones on the path; Step 2: Update the pheromone matrix zero value according to the pheromone concentration matrix and the scheduling advantage matrix; Step 3: Decrease the pheromone concentration of all paths by p, compare the scheduling advantages of all ants in this iteration, and find the maximum value; Step 4: Increase the pheromone concentration of the maximum path by q, traverse each row of the pheromone concentration matrix, obtain the non-zero pheromone set and the maximum value of the pheromone in the non-zero information geometry. If the non-zero pheromone set is empty, then all current network nodes are not suitable for power business, otherwise proceed to step 5; Step 5: Compare the current ant number with the size of the critical value array. If the current ant number is smaller than the critical array, the current ant takes the maximum value in the non-zero set of pheromones and returns the network node corresponding to the maximum value. Otherwise, the current ant takes the network node corresponding to the random value in the non-zero set and returns it. Step 6: Determine whether the number of iterations reaches the set maximum number of iterations. If not, add 1 to the number of iterations and return to step 2. Otherwise, go to step 7. Step 7: The returned network nodes are used as the selected routing network, and the paths between the returned network nodes are used as scheduling decisions.

6. The method according to claim 5, characterized in that The current ant takes the maximum value in the non-zero set of pheromones and returns the network node corresponding to the maximum value, including: When the current ant takes multiple maximum values ​​in the non-zero set of pheromones, a corresponding network node is randomly selected and returned.

7. A data packet sending system for a multi-network customized queue of electric power, characterized in that: include: Priority classification module, used to classify power services according to on-site operation requirements and traffic conditions, and assign priorities to various types of power services; The network selection and routing module is used to make routing network selection and scheduling decisions through the ant colony algorithm according to the current network communication status and power business needs; A resource allocation module, used to allocate and send SKB resources to different power business data flows of different priorities and the same priority according to pre-defined rules; The data sending module is used to send different power business data streams by sending SKB resources based on the selected routing network and scheduling decision, thereby completing the sending of data packets.

8. The system according to claim 7, characterized in that The priority division module is specifically used for: According to the on-site operation requirements and traffic usage, the power business is divided into fast forwarding business, guaranteed safe forwarding business, and best-effort business; Setting the fast forwarding service to a first priority; Setting the secure forwarding service to a second priority; The best effort service is set as the third priority.

9. A computer device, characterized in that: include: at least one processor and memory; The memory and the processor are connected via a bus; The memory is used to store one or more programs; When the one or more programs are executed by the at least one processor, a method for sending data packets of a power multi-network customized queue as described in any one of claims 1 to 6 is implemented.

10. A computer-readable storage medium, characterized in that: An execution program is stored thereon, and when the execution program is executed, a data packet sending method for a power multi-network customized queue as described in any one of claims 1 to 6 is implemented.