A routing management method and system based on microservices
By acquiring and judging the sending address and flow information of the data packet, monitoring the traffic in real time and setting alarm levels, the network traffic management problem is solved, network congestion is avoided, and network performance and user experience are improved.
Patent Information
- Application Number
- CN202211400429.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-11-09
- Publication Date
- 2024-11-05
- Estimated Expiration
- 2042-11-09
AI Technical Summary
The existing technology cannot effectively manage network traffic, resulting in network congestion and target routing equipment exceeding the acceptable range, resulting in resource waste.
By obtaining the sending address and flow information on the data packet, we can determine whether it meets the preset information. If it does not meet, we will return the sending address. If it meets, we will send it to the target routing device, and monitor the traffic in real time, set the alarm level and routing channel weight value. , adjust network traffic to avoid congestion.
The network traffic adjustment is achieved, network congestion is avoided, network performance and user experience are improved, and the efficiency of the routing process is improved.
Smart Images

Figure CN115766601B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of computer information processing technology, and in particular to a routing management method and system based on microservices. Background Art
[0002] Microservices is a service-oriented architecture (SOA) that advocates dividing a single application into a group of small services that coordinate and cooperate with each other to provide ultimate value to users. Each service runs in its own independent process, and services communicate with each other using lightweight communication mechanisms. Each service is built around a specific business and can be independently deployed to a production environment, a production-like environment, etc.
[0003] Routing is path finding. Routing refers to the process in which a router receives a data packet from one interface, directs it according to the destination address of the data packet, and forwards it to another interface. Routing information is a piece of information to the destination, which indicates the direction to the destination. Routing information is usually referred to as routing. Currently, in the Internet network, the choice of routing has a significant impact on the performance of the network. With the increase in the types of Internet applications and the growth in the number of users, network congestion has attracted more and more attention. Network congestion is a feedback phenomenon caused by network connection failure or serious overload of line equipment. The root cause is that the load provided by users to the network is greater than the network resource capacity and processing power, resulting in increased packet delay, increased number of packet discards, and decreased application system performance.
[0004] Currently, in order to prevent network congestion, each router in the network is periodically polled through the Simple Network Management Protocol SNMP to determine link utilization information and collect network flow information. The data flow information of the border router is determined from the related information of the network flow information, and the network traffic is scheduled according to the collected information. This scheduling method is relatively simple. When the number of routes of the receiving device is insufficient, the receiving device cannot continue to receive IGP data packets. At this time, the connection needs to be interrupted to send the IGP data packet to another receiving device, which will occupy network resources, cause network congestion, and reduce network performance.
[0005] Therefore, how to provide a method for effectively managing the selection of routes is a technical problem that needs to be solved at present. Summary of the invention
[0006] The embodiments of the present invention provide a microservice-based routing management method and system to solve the technical problems in the prior art that network traffic cannot be adjusted, network congestion cannot be avoided, and the target routing device cannot be prevented from exceeding the receivable range, thereby causing a waste of resources.
[0007] In order to achieve the above object, the present invention provides a microservice-based routing management method, the method comprising:
[0008] Obtaining a data packet received on a sending routing device, and obtaining sending address information and flow direction information carried in the data packet;
[0009] Determine whether the sending address information and the flow direction information are consistent with the preset sending address information and the preset flow direction information, if not, return the data packet to the sending address; if consistent, send the data packet to the target routing device;
[0010] The target routing device is monitored for traffic in real time, and an alarm level of the target routing device is set according to a relationship between the traffic monitored in real time and a preset traffic level, and the alarm level is sent to a network terminal.
[0011] In one embodiment, when determining whether the sending address information and the flow direction information conform to the preset sending address information and the preset flow direction information, if not, returning the data packet to the sending address; if conforming, sending the data packet to the target routing device, it includes:
[0012] Acquire the sending address information A0 and flow direction information B0 carried by the data packet in real time;
[0013] Calling a pre-stored preset sending address information matrix C, setting C (C1, C2, C3, C4, C5, ... Cn), wherein C1 is the first preset sending address information, C2 is the second preset sending address information, C3 is the third preset sending address information, C4 is the fourth preset sending address information, C5 is the fifth preset sending address information, and Cn is the nth preset sending address information;
[0014] Calling a pre-stored preset flow direction information matrix D, setting D (D1, D2, D3, D4, D5, ... Dn), where D1 is the first preset flow direction information, D2 is the second preset flow direction information, D3 is the third preset flow direction information, D4 is the fourth preset flow direction information, D5 is the fifth preset flow direction information, and Dn is the nth preset flow direction information;
[0015] When the sending address information A0 and the flow direction information B0 are not located in the preset target address information matrix C and the preset flow direction information matrix D, it is determined that the sending address information and the flow direction information do not conform to the preset sending address information and the preset flow direction information, and the data packet is returned to the sending address;
[0016] When the sending address information A0 and the flow direction information B0 are located within the preset target address information matrix C and the preset flow direction information matrix D, it is determined that the sending address information and the flow direction information are consistent with the preset sending address information and the preset flow direction information, and the data packet is sent to the target routing device.
[0017] In one of the embodiments, before sending the data packet to the target routing device, the method further includes:
[0018] A pre-stored blacklist and a pre-stored whitelist are called according to the data packet, and the data packet sent to the target routing device is screened and filtered according to the blacklist and the whitelist.
[0019] In one embodiment, after filtering the data packets sent to the target routing device according to the blacklist and the whitelist, the method further includes:
[0020] Acquire the number of network nodes E between the sending routing device and the target routing device, and determine the weight of the routing channel between the sending routing device and the target routing device according to the number of network nodes E;
[0021] A preset network node number matrix F, set F (F1, F2, F3, F4), where F1 is the first preset network node number, F2 is the second preset network node number, F3 is the third preset network node number, F4 is the fourth preset network node number, and F1 < F2 < F3 < F4;
[0022] The weight matrix G of the preset routing channel is set to G (G1, G2, G3, G4, G5), where G1 is the weight of the first preset routing channel, G2 is the weight of the second preset routing channel, G3 is the weight of the third preset routing channel, G4 is the weight of the fourth preset routing channel, and G5 is the weight of the fifth preset routing channel, and G1<G2<G3<G4<G5;
[0023] The weight of the routing channel between the sending routing device and the target routing device is set according to the relationship between the number of network nodes E and each preset number of network nodes:
[0024] When E<F1, the weight G1 of the first preset routing channel is selected as the weight of the routing channel between the sending routing device and the target routing device;
[0025] When F1≤E<F2, selecting the weight G2 of the second preset routing channel as the weight of the routing channel between the sending routing device and the target routing device;
[0026] When F2≤E<F3, selecting the weight G3 of the third preset routing channel as the weight of the routing channel between the sending routing device and the target routing device;
[0027] When F3≤E<F4, selecting the weight G4 of the fourth preset routing channel as the weight of the routing channel between the sending routing device and the target routing device;
[0028] When F4≤E, the weight G5 of the fifth preset routing channel is selected as the weight of the routing channel between the sending routing device and the target routing device.
[0029] In one of the embodiments, after determining the weight of the routing channel between the sending routing device and the target routing device according to the number of network nodes E, the method further includes:
[0030] Acquire the number of routes H that the target routing device can receive, and set the availability of the target routing device according to the number of routes H;
[0031] A matrix J of the number of routes that the target routing device can receive is set as J (J1, J2, J3, J4), where J1 is the first preset number of routes, J2 is the second preset number of routes, J3 is the third preset number of routes, J4 is the fourth preset number of routes, and J1<J2<J3<J4;
[0032] The availability matrix K of the preset target routing devices is set to K (K1, K2, K3, K4, K5), where K1 is the availability of the first preset target routing device, K2 is the availability of the second preset target routing device, K3 is the availability of the third preset target routing device, K4 is the availability of the fourth preset target routing device, K5 is the availability of the fifth preset target routing device, and K1<K2<K3<K4<K5;
[0033] The availability of the target routing device is set according to the relationship between the number of routes H that the target routing device can receive and the number of routes that each preset target routing device can receive:
[0034] When H<J1, the availability rate K1 of the first preset target routing device is selected as the availability rate of the target routing device;
[0035] When J1≤H<J2, the availability rate K2 of the second preset target routing device is selected as the availability rate of the target routing device;
[0036] When J2≤H<J3, the availability rate K3 of the third preset target routing device is selected as the availability rate of the target routing device;
[0037] When J3≤H<J4, the availability rate K4 of the fourth preset target routing device is selected as the availability rate of the target routing device;
[0038] When J4≤H, the availability rate K5 of the fifth preset target routing device is selected as the availability rate of the target routing device.
[0039] In one of the embodiments, after setting the availability of the target routing device according to the number of routes H, the method further includes:
[0040] Acquire the link utilization L of the target routing device, and modify the availability of the target routing device according to the link utilization L of the target routing device;
[0041] The link utilization matrix S of the preset target routing devices is set to S (S1, S2, S3, S4), where S1 is the link utilization of the first preset target routing device, S2 is the link utilization of the second preset target routing device, S3 is the link utilization of the third preset target routing device, S4 is the link utilization of the fourth preset target routing device, and S1<S2<S3<S4;
[0042] The availability correction coefficient matrix h of the preset target routing device is set to h (h1, h2, h3, h4, h5), where h1 is the availability correction coefficient of the first preset target routing device, h2 is the availability correction coefficient of the second preset target routing device, h3 is the availability correction coefficient of the third preset target routing device, h4 is the availability correction coefficient of the fourth preset target routing device, and h5 is the availability correction coefficient of the fifth preset target routing device, and 0.8
[0043] After the availability Ki of the i-th preset target routing device is selected as the availability of the target routing device, i=1,2,3,4,5, the availability of the target routing device is corrected according to the relationship between the link utilization of the target routing device and the link utilization of each preset target routing device:
[0044] When L<S1, the availability correction coefficient h1 of the first preset target routing device is selected to correct the availability Ki of the target routing device, and the availability of the target routing device after correction is Ki*h1;
[0045] When S1≤L<S2, the availability correction coefficient h2 of the second preset target routing device is selected to correct the availability Ki of the target routing device, and the availability of the target routing device after correction is Ki*h2;
[0046] When S2≤L<S3, the availability correction coefficient h3 of the third preset target routing device is selected to correct the availability Ki of the target routing device, and the availability of the target routing device after correction is Ki*h3;
[0047] When S3≤L<S4, the availability correction coefficient h4 of the fourth preset target routing device is selected to correct the availability Ki of the target routing device, and the availability of the target routing device after correction is Ki*h4;
[0048] When S4≤L, the availability correction coefficient h5 of the fifth preset target routing device is selected to correct the availability Ki of the target routing device, and the availability of the target routing device after correction is Ki*h5.
[0049] In one of the embodiments, after the availability of the target routing device is corrected according to the link utilization L of the target routing device, the method further includes:
[0050] After the availability of the target routing device is corrected according to the relationship between the link utilization of the target routing device and the link utilizations of each preset target routing device, the availability of the target routing device is Ki*hi, i=1, 2, 3, 4, 5, and according to the relationship between the availability Ki*hi of the target routing device and the preset availability α, it is determined whether the target routing device can receive the data packet;
[0051] If Ki*hi≥α, it is determined that the target routing device can receive the data packet, and the data packet received on the sending routing device is sent to the target routing device;
[0052] If Ki*hi<α, it is determined that the target routing device cannot receive the data packet, and the sending of the data packet to the target routing device is stopped.
[0053] In one embodiment, when setting the alarm level of the target routing device according to the relationship between the real-time monitored traffic and the preset traffic, it includes:
[0054] Obtain the traffic P monitored in real time, preset the traffic matrix Q, and set Q (Q1, Q2, Q3, Q4), where Q1 is the traffic of the first preset target routing device, Q2 is the traffic of the second preset target routing device, Q3 is the traffic of the third preset target routing device, and Q4 is the traffic of the fourth preset target routing device, and Q1<Q2<Q3<Q4;
[0055] A preset alarm level matrix R is set to R (R1, R2, R3, R4), where R1 is the first preset alarm level, R2 is the second preset alarm level, R3 is the third preset alarm level, R4 is the fourth preset alarm level, and R1 < R2 < R3 < R4;
[0056] The alarm level of the target routing device is set according to the relationship between the real-time monitored flow rate P and each preset flow rate:
[0057] When P<Q1, no alarm is issued;
[0058] When Q1≤P<Q2, the first preset alarm level R1 is selected as the alarm level of the target routing device;
[0059] When Q2≤P<Q3, selecting the second preset alarm level R2 as the alarm level of the target routing device;
[0060] When Q3≤P<Q4, selecting the third preset alarm level R3 as the alarm level of the target routing device;
[0061] When Q4≤P, the fourth preset alarm level R4 is selected as the alarm level of the target routing device.
[0062] In one embodiment, after sending the alarm level to the network terminal, the method further includes:
[0063] Obtain the MAC address of the target routing device, and send the MAC address of the target routing device to the network terminal.
[0064] In order to achieve the above object, the present invention also provides a microservice-based routing management system, the system comprising:
[0065] An acquisition module is used to acquire a data packet received by a sending routing device, and acquire the sending address information and flow direction information carried in the data packet;
[0066] A judgment module, used for judging whether the sending address information and the flow direction information conform to a preset sending address information matrix and a preset flow direction information matrix, and if not, returning the data packet to the sending address; if conforming, sending the data packet to a target routing device;
[0067] The alarm module is used to monitor the flow of the target routing device in real time, set the alarm level of the target routing device according to the relationship between the flow monitored in real time and the preset flow, and send the alarm level to the network terminal.
[0068] The present invention provides a microservice-based routing management method and system, which has the following beneficial effects compared with the prior art:
[0069] The present application obtains the data packet received on the sending routing device, and obtains the sending address information and flow direction information carried on the data packet, determines whether the sending address information and flow direction information conform to the preset sending address information and preset flow direction information, and if not, returns the data packet to the sending address; if conforming, sends the data packet to the target routing device, monitors the flow of the target routing device in real time, sets the alarm level of the target routing device according to the relationship between the real-time monitored flow and the preset flow, and sends the alarm level to the network terminal. The present invention realizes the adjustment of network flow by judging whether the target routing device can continue to receive data packets, avoids the phenomenon of network congestion, and further improves network performance and user experience by generating different alarm levels, and can greatly improve the efficiency of the entire routing process. BRIEF DESCRIPTION OF THE DRAWINGS
[0070] Figure 1 A schematic diagram of a process of a microservice-based routing management method in an embodiment of the present invention is shown;
[0071] Figure 2 A schematic structural diagram of a microservice-based routing management system in an embodiment of the present invention is shown. DETAILED DESCRIPTION
[0072] The specific implementation of the present invention is further described in detail below in conjunction with the accompanying drawings and examples. The following examples are used to illustrate the present invention, but are not intended to limit the scope of the present invention.
[0073] In the description of the present application, it should be understood that the terms "center", "up", "down", "front", "back", "left", "right", "vertical", "horizontal", "top", "bottom", "inside", "outside", etc., indicating orientations or positional relationships, are based on the orientations or positional relationships shown in the accompanying drawings, and are only for the convenience of describing the present application and simplifying the description, and do not indicate or imply that the device or element referred to must have a specific orientation, be constructed and operated in a specific orientation, and therefore should not be understood as a limitation on the present application.
[0074] The terms "first" and "second" are used for descriptive purposes only and should not be understood as indicating or implying relative importance or implicitly indicating the number of the indicated technical features. Thus, a feature defined as "first" or "second" may explicitly or implicitly include one or more of the features. In the description of this application, unless otherwise specified, "plurality" means two or more.
[0075] In the description of this application, it should be noted that, unless otherwise clearly specified and limited, the terms "installed", "connected", and "connected" should be understood in a broad sense, for example, it can be a fixed connection, a detachable connection, or an integral connection; it can be a mechanical connection or an electrical connection; it can be a direct connection, or it can be indirectly connected through an intermediate medium, or it can be the internal communication of two components. For ordinary technicians in this field, the specific meanings of the above terms in this application can be understood according to specific circumstances.
[0076] The following is a description of preferred embodiments of the present invention with reference to the accompanying drawings.
[0077] like Figure 1 As shown, an embodiment of the present invention discloses a microservice-based routing management method, the method comprising:
[0078] S101: Acquire a data packet received by a sending routing device, and acquire sending address information and flow direction information carried in the data packet;
[0079] S102: judging whether the sending address information and the flow direction information are consistent with the preset sending address information and the preset flow direction information, and if not, returning the data packet to the sending address; if consistent, sending the data packet to the target routing device;
[0080] S103: Monitor the flow of the target routing device in real time, set the alarm level of the target routing device according to the relationship between the flow monitored in real time and the preset flow, and send the alarm level to the network terminal.
[0081] In this embodiment, by obtaining the data packet received on the sending routing device, and obtaining the sending address information and flow direction information carried on the data packet, it is determined whether the sending address information and flow direction information conform to the preset sending address information and preset flow direction information. If not, the data packet is returned to the sending address; if it conforms, the data packet is sent to the target routing device, the flow of the target routing device is monitored in real time, and the alarm level of the target routing device is set according to the relationship between the real-time monitored flow and the preset flow, and the alarm level is sent to the network terminal. The present invention realizes the adjustment of network flow by determining whether the target routing device can continue to receive data packets, avoids the phenomenon of network congestion, and further improves network performance and enhances the user experience by generating different alarm levels, and can greatly improve the efficiency of the entire routing process.
[0082] In some embodiments of the present application, when determining whether the sending address information and the flow direction information conform to the preset sending address information and the preset flow direction information, if not, returning the data packet to the sending address; if conforming, sending the data packet to the target routing device, it includes:
[0083] Acquire the sending address information A0 and flow direction information B0 carried by the data packet in real time;
[0084] Calling a pre-stored preset sending address information matrix C, setting C (C1, C2, C3, C4, C5, ... Cn), wherein C1 is the first preset sending address information, C2 is the second preset sending address information, C3 is the third preset sending address information, C4 is the fourth preset sending address information, C5 is the fifth preset sending address information, and Cn is the nth preset sending address information;
[0085] Calling a pre-stored preset flow direction information matrix D, setting D (D1, D2, D3, D4, D5, ... Dn), where D1 is the first preset flow direction information, D2 is the second preset flow direction information, D3 is the third preset flow direction information, D4 is the fourth preset flow direction information, D5 is the fifth preset flow direction information, and Dn is the nth preset flow direction information;
[0086] When the sending address information A0 and the flow direction information B0 are not located in the preset target address information matrix C and the preset flow direction information matrix D, it is determined that the sending address information and the flow direction information do not conform to the preset sending address information and the preset flow direction information, and the data packet is returned to the sending address;
[0087] When the sending address information A0 and the flow direction information B0 are located within the preset target address information matrix C and the preset flow direction information matrix D, it is determined that the sending address information and the flow direction information are consistent with the preset sending address information and the preset flow direction information, and the data packet is sent to the target routing device.
[0088] In this embodiment, the data packet carries sending address information and flow direction information. By determining whether the sending address information and flow direction information conform to the preset sending address information and preset flow direction information, data packet transmission errors can be prevented, thereby simplifying the data packet transmission steps and improving the data packet transmission efficiency.
[0089] In some embodiments of the present application, before sending the data packet to the target routing device, the method further includes:
[0090] A pre-stored blacklist and a pre-stored whitelist are called according to the data packet, and the data packet sent to the target routing device is screened and filtered according to the blacklist and the whitelist.
[0091] In this embodiment, two routing strategies, whitelist and blacklist, are supported. Routing devices in the blacklist are prohibited from running. In the whitelist, only routing devices in the whitelist are allowed to connect and communicate, and data transmission is allowed. Other machine devices not in the whitelist are not allowed to connect to the router device, and data transmission is not allowed. By calling the blacklist and whitelist, this application can improve the flexibility of routing security management and reduce routing management costs.
[0092] In some embodiments of the present application, after filtering the data packets sent to the target routing device according to the blacklist and the whitelist, the method further includes:
[0093] Acquire the number of network nodes E between the sending routing device and the target routing device, and determine the weight of the routing channel between the sending routing device and the target routing device according to the number of network nodes E;
[0094] A preset network node number matrix F, set F (F1, F2, F3, F4), where F1 is the first preset network node number, F2 is the second preset network node number, F3 is the third preset network node number, F4 is the fourth preset network node number, and F1 < F2 < F3 < F4;
[0095] The weight matrix G of the preset routing channel is set to G (G1, G2, G3, G4, G5), where G1 is the weight of the first preset routing channel, G2 is the weight of the second preset routing channel, G3 is the weight of the third preset routing channel, G4 is the weight of the fourth preset routing channel, and G5 is the weight of the fifth preset routing channel, and G1<G2<G3<G4<G5;
[0096] The weight of the routing channel between the sending routing device and the target routing device is set according to the relationship between the number of network nodes E and each preset number of network nodes:
[0097] When E<F1, the weight G1 of the first preset routing channel is selected as the weight of the routing channel between the sending routing device and the target routing device;
[0098] When F1≤E<F2, selecting the weight G2 of the second preset routing channel as the weight of the routing channel between the sending routing device and the target routing device;
[0099] When F2≤E<F3, selecting the weight G3 of the third preset routing channel as the weight of the routing channel between the sending routing device and the target routing device;
[0100] When F3≤E<F4, selecting the weight G4 of the fourth preset routing channel as the weight of the routing channel between the sending routing device and the target routing device;
[0101] When F4≤E, the weight G5 of the fifth preset routing channel is selected as the weight of the routing channel between the sending routing device and the target routing device.
[0102] In this embodiment, a network node refers to a device connected to a network with an independent address and the function of transmitting or receiving data, that is, devices with their own unique network addresses are network nodes. The entire network is composed of these many network nodes. The weight is a number generated according to the path on the network. The router determines the best path based on this value and selects the best route through the weight. The smaller the weight, the better the route. Therefore, this application sets the weight of the routing channel between the sending routing device and the target routing device according to the relationship between the number of network nodes E and each preset number of network nodes. The best route can be selected, and then the best path for data packet transmission can be determined, network power consumption can be reduced, and load balancing can be achieved.
[0103] In some embodiments of the present application, after determining the weight of the routing channel between the sending routing device and the target routing device according to the number of network nodes E, the method further includes:
[0104] Acquire the number of routes H that the target routing device can receive, and set the availability of the target routing device according to the number of routes H;
[0105] A matrix J of the number of routes that the target routing device can receive is set as J (J1, J2, J3, J4), where J1 is the first preset number of routes, J2 is the second preset number of routes, J3 is the third preset number of routes, J4 is the fourth preset number of routes, and J1<J2<J3<J4;
[0106] The availability matrix K of the preset target routing devices is set to K (K1, K2, K3, K4, K5), where K1 is the availability of the first preset target routing device, K2 is the availability of the second preset target routing device, K3 is the availability of the third preset target routing device, K4 is the availability of the fourth preset target routing device, K5 is the availability of the fifth preset target routing device, and K1<K2<K3<K4<K5;
[0107] The availability of the target routing device is set according to the relationship between the number of routes H that the target routing device can receive and the number of routes that each preset target routing device can receive:
[0108] When H<J1, the availability rate K1 of the first preset target routing device is selected as the availability rate of the target routing device;
[0109] When J1≤H<J2, the availability rate K2 of the second preset target routing device is selected as the availability rate of the target routing device;
[0110] When J2≤H<J3, the availability rate K3 of the third preset target routing device is selected as the availability rate of the target routing device;
[0111] When J3≤H<J4, the availability rate K4 of the fourth preset target routing device is selected as the availability rate of the target routing device;
[0112] When J4≤H, the availability rate K5 of the fifth preset target routing device is selected as the availability rate of the target routing device.
[0113] In this embodiment, the number of routes H that the target routing device can receive is obtained, and the availability of the target routing device is set according to the number of routes H. Before sending a data packet to the target routing device, the present application obtains the number of routes that the target routing device can receive, and then determines the availability of the target routing device. This can effectively avoid the problem of data packets being interrupted after being sent to the target routing device, and can avoid repeated interruptions and establishment of connections in actual operation. The connection of the present application is stable and reliable, and will not affect the network traffic of the entire network system.
[0114] In some embodiments of the present application, after setting the availability of the target routing device according to the number of routes H, the method further includes:
[0115] Acquire the link utilization L of the target routing device, and modify the availability of the target routing device according to the link utilization L of the target routing device;
[0116] The link utilization matrix S of the preset target routing devices is set to S (S1, S2, S3, S4), where S1 is the link utilization of the first preset target routing device, S2 is the link utilization of the second preset target routing device, S3 is the link utilization of the third preset target routing device, S4 is the link utilization of the fourth preset target routing device, and S1<S2<S3<S4;
[0117] The availability correction coefficient matrix h of the preset target routing device is set to h (h1, h2, h3, h4, h5), where h1 is the availability correction coefficient of the first preset target routing device, h2 is the availability correction coefficient of the second preset target routing device, h3 is the availability correction coefficient of the third preset target routing device, h4 is the availability correction coefficient of the fourth preset target routing device, and h5 is the availability correction coefficient of the fifth preset target routing device, and 0.8
[0118] After the availability Ki of the i-th preset target routing device is selected as the availability of the target routing device, i=1,2,3,4,5, the availability of the target routing device is corrected according to the relationship between the link utilization of the target routing device and the link utilization of each preset target routing device:
[0119] When L<S1, the availability correction coefficient h1 of the first preset target routing device is selected to correct the availability Ki of the target routing device, and the availability of the target routing device after correction is Ki*h1;
[0120] When S1≤L<S2, the availability correction coefficient h2 of the second preset target routing device is selected to correct the availability Ki of the target routing device, and the availability of the target routing device after correction is Ki*h2;
[0121] When S2≤L<S3, the availability correction coefficient h3 of the third preset target routing device is selected to correct the availability Ki of the target routing device, and the availability of the target routing device after correction is Ki*h3;
[0122] When S3≤L<S4, the availability correction coefficient h4 of the fourth preset target routing device is selected to correct the availability Ki of the target routing device, and the availability of the target routing device after correction is Ki*h4;
[0123] When S4≤L, the availability correction coefficient h5 of the fifth preset target routing device is selected to correct the availability Ki of the target routing device, and the availability of the target routing device after correction is Ki*h5.
[0124] In this embodiment, by acquiring the link utilization, the load condition of the network link can be perceived. After selecting the availability Ki of the i-th preset target routing device as the availability of the target routing device, i=1,2,3,4,5, the availability of the target routing device is corrected according to the relationship between the link utilization of the target routing device and the link utilizations of each preset target routing device. The present application can further improve network performance and improve the stability of data transmission by correcting the availability of the target routing device.
[0125] In some embodiments of the present application, after the availability of the target routing device is corrected according to the link usage rate L of the target routing device, the method further includes:
[0126] After the availability of the target routing device is corrected according to the relationship between the link utilization rate of the target routing device and the link utilization rates of each preset target routing device, the availability of the target routing device is Ki*hi, i=1, 2, 3, 4, 5, and according to the relationship between the availability Ki*hi of the target routing device and the preset availability α, it is determined whether the target routing device can receive the data packet;
[0127] If Ki*hi≥α, it is determined that the target routing device can receive the data packet, and the data packet received on the sending routing device is sent to the target routing device;
[0128] If Ki*hi<α, it is determined that the target routing device cannot receive the data packet, and the sending of the data packet to the target routing device is stopped.
[0129] In this embodiment, after the availability of the target routing device is corrected according to the relationship between the link utilization rate of the target routing device and the link utilization rates of each preset target routing device, the availability of the target routing device is Ki*hi, i=1, 2, 3, 4, 5. According to the relationship between the availability Ki*hi of the target routing device and the preset availability α, it is determined whether the target routing device can receive a data packet. The present application can adjust the network traffic by determining whether the target routing device can receive a data packet, thereby avoiding network congestion.
[0130] In some embodiments of the present application, when setting the alarm level of the target routing device according to the relationship between the real-time monitored traffic and the preset traffic, it includes:
[0131] Obtain the traffic P monitored in real time, preset the traffic matrix Q, and set Q (Q1, Q2, Q3, Q4), where Q1 is the traffic of the first preset target routing device, Q2 is the traffic of the second preset target routing device, Q3 is the traffic of the third preset target routing device, and Q4 is the traffic of the fourth preset target routing device, and Q1<Q2<Q3<Q4;
[0132] A preset alarm level matrix R is set to R (R1, R2, R3, R4), where R1 is the first preset alarm level, R2 is the second preset alarm level, R3 is the third preset alarm level, R4 is the fourth preset alarm level, and R1 < R2 < R3 < R4;
[0133] The alarm level of the target routing device is set according to the relationship between the real-time monitored flow rate P and each preset flow rate:
[0134] When P<Q1, no alarm is issued;
[0135] When Q1≤P<Q2, the first preset alarm level R1 is selected as the alarm level of the target routing device;
[0136] When Q2≤P<Q3, selecting the second preset alarm level R2 as the alarm level of the target routing device;
[0137] When Q3≤P<Q4, selecting the third preset alarm level R3 as the alarm level of the target routing device;
[0138] When Q4≤P, the fourth preset alarm level R4 is selected as the alarm level of the target routing device.
[0139] In this embodiment, after the target routing device starts to receive data packets, the present application also monitors the traffic of the target routing device in real time, and sets the alarm level of the target routing device according to the relationship between the traffic P monitored in real time and each preset traffic. By setting the alarm level of the target routing device, the present application can avoid excessive traffic of the target routing device and ensure the stability of the traffic of the target routing device.
[0140] In some embodiments of the present application, after sending the alarm level to the network terminal, the method further includes:
[0141] Obtain the MAC address of the target routing device, and send the MAC address of the target routing device to the network terminal.
[0142] In this embodiment, by acquiring the MAC address of the target routing device and sending the MAC address of the target routing device to the network terminal, the target routing device can be quickly located.
[0143] like Figure 2 As shown, an embodiment of the present invention further discloses a microservice-based routing management system, the system comprising:
[0144] An acquisition module is used to acquire a data packet received by a sending routing device, and acquire the sending address information and flow direction information carried in the data packet;
[0145] A judgment module, used for judging whether the sending address information and the flow direction information conform to a preset sending address information matrix and a preset flow direction information matrix, and if not, returning the data packet to the sending address; if conforming, sending the data packet to a target routing device;
[0146] The alarm module is used to monitor the flow of the target routing device in real time, set the alarm level of the target routing device according to the relationship between the flow monitored in real time and the preset flow, and send the alarm level to the network terminal.
[0147] In summary, the embodiment of the present invention obtains the data packet received on the sending routing device, and obtains the sending address information and flow direction information carried on the data packet, and determines whether the sending address information and flow direction information conform to the preset sending address information and preset flow direction information. If not, the data packet is returned to the sending address; if it conforms, the data packet is sent to the target routing device, and the traffic of the target routing device is monitored in real time, and the alarm level of the target routing device is set according to the relationship between the real-time monitored traffic and the preset traffic, and the alarm level is sent to the network terminal. The present invention realizes the adjustment of network traffic by judging whether the target routing device can continue to receive data packets, avoids network congestion, and further improves network performance and user experience by generating different alarm levels, and can greatly improve the efficiency of the entire routing process.
[0148] In the description of the above embodiments, specific features, structures, materials or characteristics may be combined in a suitable manner in any one or more embodiments or examples.
[0149] Although the present invention has been described above with reference to the embodiments, various modifications may be made thereto and parts thereof may be replaced with equivalents without departing from the scope of the present invention. In particular, as long as there is no structural conflict, the various features in the embodiments disclosed by the present invention may be used in combination with each other in any manner, and the fact that these combinations are not fully described in this specification is only for the sake of omitting space and saving resources. Therefore, the present invention is not limited to the specific embodiments disclosed herein, but includes all technical solutions falling within the scope of the claims.
[0150] Those skilled in the art can understand that the above are only preferred embodiments of the present invention and are not intended to limit the present invention. Although the present invention has been described in detail with reference to the aforementioned embodiments, those skilled in the art can still modify the technical solutions recorded in the aforementioned embodiments or replace some of the technical features therein by equivalents. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present invention shall be included in the protection scope of the present invention.
Claims
1. A routing management method based on microservices, characterized in that: The method comprises: Obtaining a data packet received on a sending routing device, and obtaining sending address information and flow direction information carried in the data packet; Determine whether the sending address information and the flow direction information are consistent with the preset sending address information and the preset flow direction information, if not, return the data packet to the sending address; if consistent, send the data packet to the target routing device; Monitor the flow of the target routing device in real time, set the alarm level of the target routing device according to the relationship between the flow monitored in real time and the preset flow, and send the alarm level to the network terminal; When judging whether the sending address information and the flow direction information conform to the preset sending address information and the preset flow direction information, if not, returning the data packet to the sending address; if conforming, sending the data packet to the target routing device, it includes: Acquire the sending address information A0 and flow direction information B0 carried by the data packet in real time; Calling a pre-stored preset sending address information matrix C, setting C (C1, C2, C3, C4, C5, ..., Cn), wherein C1 is the first preset sending address information, C2 is the second preset sending address information, C3 is the third preset sending address information, C4 is the fourth preset sending address information, C5 is the fifth preset sending address information, and Cn is the nth preset sending address information; Calling a pre-stored preset flow direction information matrix D, setting D (D1, D2, D3, D4, D5, ..., Dn), where D1 is the first preset flow direction information, D2 is the second preset flow direction information, D3 is the third preset flow direction information, D4 is the fourth preset flow direction information, D5 is the fifth preset flow direction information, and Dn is the nth preset flow direction information; When the sending address information A0 and the flow direction information B0 are not located in the preset sending address information matrix C and the preset flow direction information matrix D, it is determined that the sending address information and the flow direction information do not conform to the preset sending address information and the preset flow direction information, and the data packet is returned to the sending address; When the sending address information A0 and the flow direction information B0 are located within the preset sending address information matrix C and the preset flow direction information matrix D, it is determined that the sending address information and the flow direction information are consistent with the preset sending address information and the preset flow direction information, and the data packet is sent to the target routing device.
2. The microservice-based routing management method according to claim 1, characterized in that: Before sending the data packet to the target routing device, the method further includes: A pre-stored blacklist and a pre-stored whitelist are called according to the data packet, and the data packet sent to the target routing device is screened and filtered according to the blacklist and the whitelist.
3. The microservice-based routing management method according to claim 2, characterized in that: After filtering the data packets sent to the target routing device according to the blacklist and the whitelist, the method further includes: Acquire the number of network nodes E between the sending routing device and the target routing device, and determine the weight of the routing channel between the sending routing device and the target routing device according to the number of network nodes E; A preset network node number matrix F, set F (F1, F2, F3, F4), where F1 is the first preset network node number, F2 is the second preset network node number, F3 is the third preset network node number, F4 is the fourth preset network node number, and F1 < F2 < F3 < F4; The weight matrix G of the preset routing channel is set to G (G1, G2, G3, G4, G5), where G1 is the weight of the first preset routing channel, G2 is the weight of the second preset routing channel, G3 is the weight of the third preset routing channel, G4 is the weight of the fourth preset routing channel, and G5 is the weight of the fifth preset routing channel, and G1<G2<G3<G4<G5; The weight of the routing channel between the sending routing device and the target routing device is set according to the relationship between the number of network nodes E and each preset number of network nodes: When E<F1, the weight G1 of the first preset routing channel is selected as the weight of the routing channel between the sending routing device and the target routing device; When F1≤E<F2, selecting the weight G2 of the second preset routing channel as the weight of the routing channel between the sending routing device and the target routing device; When F2≤E<F3, selecting the weight G3 of the third preset routing channel as the weight of the routing channel between the sending routing device and the target routing device; When F3≤E<F4, selecting the weight G4 of the fourth preset routing channel as the weight of the routing channel between the sending routing device and the target routing device; When F4≤E, the weight G5 of the fifth preset routing channel is selected as the weight of the routing channel between the sending routing device and the target routing device.
4. The microservice-based routing management method according to claim 3, characterized in that: After determining the weight of the routing channel between the sending routing device and the target routing device according to the number of network nodes E, the method further includes: Acquire the number of routes H that the target routing device can receive, and set the availability of the target routing device according to the number of routes H; A matrix J of the number of routes that the target routing device can receive is set as J (J1, J2, J3, J4), where J1 is the first preset number of routes, J2 is the second preset number of routes, J3 is the third preset number of routes, J4 is the fourth preset number of routes, and J1<J2<J3<J4; The availability matrix K of the preset target routing devices is set to K (K1, K2, K3, K4, K5), where K1 is the availability of the first preset target routing device, K2 is the availability of the second preset target routing device, K3 is the availability of the third preset target routing device, K4 is the availability of the fourth preset target routing device, K5 is the availability of the fifth preset target routing device, and K1<K2<K3<K4<K5; The availability of the target routing device is set according to the relationship between the number of routes H that the target routing device can receive and the number of routes that each preset target routing device can receive: When H<J1, the availability rate K1 of the first preset target routing device is selected as the availability rate of the target routing device; When J1≤H<J2, the availability rate K2 of the second preset target routing device is selected as the availability rate of the target routing device; When J2≤H<J3, the availability rate K3 of the third preset target routing device is selected as the availability rate of the target routing device; When J3≤H<J4, the availability rate K4 of the fourth preset target routing device is selected as the availability rate of the target routing device; When J4≤H, the availability rate K5 of the fifth preset target routing device is selected as the availability rate of the target routing device.
5. The microservice-based routing management method according to claim 4, characterized in that: After setting the availability of the target routing device according to the number of routes H, the method further includes: Acquire the link utilization L of the target routing device, and modify the availability of the target routing device according to the link utilization L of the target routing device; The link utilization matrix S of the preset target routing devices is set to S (S1, S2, S3, S4), where S1 is the link utilization of the first preset target routing device, S2 is the link utilization of the second preset target routing device, S3 is the link utilization of the third preset target routing device, S4 is the link utilization of the fourth preset target routing device, and S1<S2<S3<S4; The availability correction coefficient matrix h of the preset target routing device is set to h (h1, h2, h3, h4, h5), where h1 is the availability correction coefficient of the first preset target routing device, h2 is the availability correction coefficient of the second preset target routing device, h3 is the availability correction coefficient of the third preset target routing device, h4 is the availability correction coefficient of the fourth preset target routing device, and h5 is the availability correction coefficient of the fifth preset target routing device, and 0.8<h1<h2<h3<h4<h5<1.2; After the availability Ki of the i-th preset target routing device is selected as the availability of the target routing device, i=1,2,3,4,5, the availability of the target routing device is corrected according to the relationship between the link utilization of the target routing device and the link utilization of each preset target routing device: When L<S1, the availability correction coefficient h1 of the first preset target routing device is selected to correct the availability Ki of the target routing device, and the availability of the target routing device after correction is Ki*h1; When S1≤L<S2, the availability correction coefficient h2 of the second preset target routing device is selected to correct the availability Ki of the target routing device, and the availability of the target routing device after correction is Ki*h2; When S2≤L<S3, the availability correction coefficient h3 of the third preset target routing device is selected to correct the availability Ki of the target routing device, and the availability of the target routing device after correction is Ki*h3; When S3≤L<S4, the availability correction coefficient h4 of the fourth preset target routing device is selected to correct the availability Ki of the target routing device, and the availability of the target routing device after correction is Ki*h4; When S4≤L, the availability correction coefficient h5 of the fifth preset target routing device is selected to correct the availability Ki of the target routing device, and the availability of the target routing device after correction is Ki*h5.
6. The microservice-based routing management method according to claim 5, characterized in that: After the availability of the target routing device is corrected according to the link utilization L of the target routing device, the method further includes: After the availability of the target routing device is corrected according to the relationship between the link utilization of the target routing device and the link utilizations of each preset target routing device, the availability of the target routing device is Ki*hi, i=1, 2, 3, 4, 5, and according to the relationship between the availability Ki*hi of the target routing device and the preset availability α, it is determined whether the target routing device can receive the data packet; If Ki*hi≥α, it is determined that the target routing device can receive the data packet, and the data packet received on the sending routing device is sent to the target routing device; If Ki*hi<α, it is determined that the target routing device cannot receive the data packet, and the sending of the data packet to the target routing device is stopped.
7. The microservice-based routing management method according to claim 1, characterized in that: When setting the alarm level of the target routing device according to the relationship between the real-time monitored flow and the preset flow, it includes: Obtain the traffic P monitored in real time, preset the traffic matrix Q, and set Q (Q1, Q2, Q3, Q4), where Q1 is the traffic of the first preset target routing device, Q2 is the traffic of the second preset target routing device, Q3 is the traffic of the third preset target routing device, and Q4 is the traffic of the fourth preset target routing device, and Q1<Q2<Q3<Q4; A preset alarm level matrix R is set to R (R1, R2, R3, R4), where R1 is the first preset alarm level, R2 is the second preset alarm level, R3 is the third preset alarm level, R4 is the fourth preset alarm level, and R1 < R2 < R3 < R4; The alarm level of the target routing device is set according to the relationship between the real-time monitored flow rate P and each preset flow rate: When P<Q1, no alarm is issued; When Q1≤P<Q2, the first preset alarm level R1 is selected as the alarm level of the target routing device; When Q2≤P<Q3, selecting the second preset alarm level R2 as the alarm level of the target routing device; When Q3≤P<Q4, selecting the third preset alarm level R3 as the alarm level of the target routing device; When Q4≤P, the fourth preset alarm level R4 is selected as the alarm level of the target routing device.
8. The microservice-based routing management method according to claim 1, characterized in that: After sending the alarm level to the network terminal, the method further includes: Obtain the MAC address of the target routing device, and send the MAC address of the target routing device to the network terminal.
9. A routing management system based on microservices, characterized in that: The system comprises: An acquisition module is used to acquire a data packet received by a sending routing device, and acquire the sending address information and flow direction information carried in the data packet; A judgment module, used for judging whether the sending address information and the flow direction information conform to a preset sending address information matrix and a preset flow direction information matrix, and if not, returning the data packet to the sending address; if conforming, sending the data packet to a target routing device; An alarm module, used to monitor the flow of the target routing device in real time, set the alarm level of the target routing device according to the relationship between the flow monitored in real time and the preset flow, and send the alarm level to the network terminal; The judging module is used for: Acquire the sending address information A0 and flow direction information B0 carried by the data packet in real time; Calling a pre-stored preset sending address information matrix C, setting C (C1, C2, C3, C4, C5, ..., Cn), wherein C1 is the first preset sending address information, C2 is the second preset sending address information, C3 is the third preset sending address information, C4 is the fourth preset sending address information, C5 is the fifth preset sending address information, and Cn is the nth preset sending address information; Calling a pre-stored preset flow direction information matrix D, setting D (D1, D2, D3, D4, D5, ..., Dn), where D1 is the first preset flow direction information, D2 is the second preset flow direction information, D3 is the third preset flow direction information, D4 is the fourth preset flow direction information, D5 is the fifth preset flow direction information, and Dn is the nth preset flow direction information; When the sending address information A0 and the flow direction information B0 are not located in the preset sending address information matrix C and the preset flow direction information matrix D, it is determined that the sending address information and the flow direction information do not conform to the preset sending address information and the preset flow direction information, and the data packet is returned to the sending address; When the sending address information A0 and the flow direction information B0 are located within the preset sending address information matrix C and the preset flow direction information matrix D, it is determined that the sending address information and the flow direction information are consistent with the preset sending address information and the preset flow direction information, and the data packet is sent to the target routing device.
