Congestion prevention processing method and device for edge gateway, equipment and medium
By actively monitoring the operating data of edge gateways and using congestion prediction models, congestion problems in edge gateways are prevented and data transmission efficiency and stability are improved.
Patent Information
- Application Number
- CN202411598769.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-11-11
- Publication Date
- 2025-02-25
AI Technical Summary
Edge gateways are prone to congestion problems during data transmission, resulting in delays, loss or system crashes in data transmission. The congestion processing efficiency of the prior art is low and the reaction time is long.
By actively monitoring the operating data of the edge gateway, using a pre-built congestion prediction model, accurately predict the probability of congestion, and implement preventive measures before congestion occurs, including scheduling and load balancing processing of business requests.
It effectively prevents congestion problems in edge gateways, improves the efficiency and stability of data transmission, promptly detects and deals with abnormal situations in the early stage of congestion, and improves the accuracy of congestion prediction.
Smart Images

Figure CN119520411A_ABST
Abstract
Description
Technical Field
[0001] The present application belongs to the technical field of Internet of Things, and specifically relates to a congestion prevention processing method, device, equipment and medium for an edge gateway. Background Art
[0002] The edge gateway is a device that connects terminal devices and cloud servers. It acts as an intermediate layer between terminal devices and cloud servers in the IoT system. It is responsible for collecting data from terminal devices, processing and storing it, and sending the processed and packaged data to the cloud server.
[0003] During data transmission, large amounts of data often cause edge gateways to face congestion problems, resulting in data transmission delays, loss, and even system crashes. Traditional congestion handling methods mainly rely on passive congestion control. When solutions are taken after congestion occurs, data transmission is often greatly affected. In addition, the efficiency of alleviating congestion problems is low, and congestion lasts for a long time.
[0004] Therefore, how to monitor and prevent the congestion problem of the edge gateway is a technical problem that needs to be solved urgently by technical personnel in this field. Summary of the invention
[0005] The embodiments of the present application provide a congestion prevention processing method, device, equipment and medium for an edge gateway, the purpose of which is to accurately predict congestion problems through active monitoring of operation data by the edge gateway, and effectively prevent congestion before it occurs, which is conducive to timely discovering abnormal situations in the early stage of congestion, improving the accuracy of congestion prediction, and thus ensuring data transmission efficiency and stability.
[0006] In a first aspect, this embodiment provides a congestion prevention processing method for an edge gateway, the method comprising:
[0007] Obtaining operation data of the edge gateway; wherein the operation data includes at least one of the number of data packets, data packet size, transmission rate, delay data, packet loss rate data and jitter data;
[0008] Inputting the operation data into a pre-built congestion prediction model, and determining the congestion probability according to an output result of the congestion prediction model;
[0009] When the congestion probability is greater than a preset probability, it is determined that there is a congestion risk, and the service request is scheduled according to a predetermined congestion prevention strategy.
[0010] Furthermore, before obtaining the operating data of the edge gateway, the method further includes:
[0011] Obtain observation data within a preset time before a historical congestion event, as well as reference data when the edge gateway is operating normally, and generate sample data based on the observation data and the reference data;
[0012] The sample data is used as an input variable for unsupervised training to learn the difference features between the observed data and the reference data before the congestion event, and then a congestion prediction model that identifies the difference features is constructed.
[0013] Furthermore, according to the predetermined congestion prevention strategy, the service request is scheduled and processed, including:
[0014] Identify the terminal device identifier in the service request, obtain the device priority corresponding to the terminal device identifier according to the congestion prevention strategy, and schedule the service request according to the device priority;
[0015] and / or,
[0016] Obtaining a data type of a service request, obtaining a service priority corresponding to the data type according to the congestion prevention strategy, and scheduling the service request according to the service priority;
[0017] and / or,
[0018] Identify the source address, source port number, destination address and destination port number of the service request, obtain the path priority corresponding to at least one of the source address, source port number, destination address and destination port number in the congestion defense strategy, and schedule the service request according to the path priority.
[0019] Furthermore, after the scheduling process of the service request is performed, the method further includes:
[0020] When it is identified that the operation data meets the congestion load balancing threshold, obtaining status data of each relevant edge gateway connected to the same edge server as the edge gateway;
[0021] When there is an idle state in each related edge gateway, the service request is load balanced.
[0022] Furthermore, load balancing is performed on business requests, including:
[0023] Sending a load balancing processing request to the edge server;
[0024] Receive feedback information from the edge server, obtain address information of a related edge gateway in an idle state according to the feedback information, and send the service request that allows diversion to the corresponding related edge gateway for processing according to the address information.
[0025] Furthermore, after the scheduling process of the service request is performed, the method further includes:
[0026] Acquire the latest operation data of the edge gateway, and determine the current congestion status of the edge gateway according to the latest operation data;
[0027] The congestion situation is fed back to the congestion prediction model, so that the congestion prediction model optimizes the congestion prediction performance according to the congestion situation.
[0028] Furthermore, the method further comprises:
[0029] When the timer reaches the update period of the congestion prevention policy and / or the congestion prevention policy is damaged, sending a congestion prevention policy acquisition request to the edge server;
[0030] Response information from the edge server is received, and the congestion prevention strategy is updated according to the response information.
[0031] In a second aspect, this embodiment provides a congestion prevention processing device for an edge gateway, the device comprising:
[0032] An operation data acquisition module, used to acquire the operation data of the edge gateway; wherein the operation data includes at least one of the number of data packets, data packet size, transmission rate, delay data, packet loss rate data and jitter data;
[0033] A congestion probability determination module, used to input the operation data into a pre-built congestion prediction model, and determine the congestion probability according to an output result of the congestion prediction model;
[0034] The service request scheduling module is used to determine that there is a congestion risk when the congestion probability is greater than a preset probability, and to schedule the service request according to a predetermined congestion prevention strategy.
[0035] Furthermore, the device also includes:
[0036] A congestion prediction model building module is used to obtain observation data within a preset time before a historical congestion event, as well as reference data when the edge gateway is operating normally, and generate sample data based on the observation data and the reference data;
[0037] The sample data is used as an input variable for unsupervised training to learn the difference features between the observed data and the reference data before the congestion event, and then a congestion prediction model that identifies the difference features is constructed.
[0038] Furthermore, the service request scheduling module is specifically used to:
[0039] Identify the terminal device identifier in the service request, obtain the device priority corresponding to the terminal device identifier according to the congestion prevention strategy, and schedule the service request according to the device priority;
[0040] and / or,
[0041] Obtaining a data type of a service request, obtaining a service priority corresponding to the data type according to the congestion prevention strategy, and scheduling the service request according to the service priority;
[0042] and / or,
[0043] Identify the source address, source port number, destination address and destination port number of the service request, obtain the path priority corresponding to at least one of the source address, source port number, destination address and destination port number in the congestion defense strategy, and schedule the service request according to the path priority.
[0044] Furthermore, the device also includes:
[0045] A load balancing processing module, configured to obtain status data of each related edge gateway connected to the same edge server as the edge gateway when it is identified that the operation data meets the congestion load balancing threshold;
[0046] When there is an idle state in each related edge gateway, the service request is load balanced.
[0047] Furthermore, the load balancing processing module is specifically used to:
[0048] Sending a load balancing processing request to the edge server;
[0049] Receive feedback information from the edge server, obtain address information of a related edge gateway in an idle state according to the feedback information, and send the service request that allows diversion to the corresponding related edge gateway for processing according to the address information.
[0050] Furthermore, the device also includes:
[0051] A performance optimization module, used to obtain the latest operation data of the edge gateway, and determine the current congestion status of the edge gateway according to the latest operation data;
[0052] The congestion situation is fed back to the congestion prediction model, so that the congestion prediction model optimizes the congestion prediction performance according to the congestion situation.
[0053] Furthermore, the device also includes:
[0054] A congestion prevention strategy update module, configured to send a congestion prevention strategy acquisition request to the edge server when a timer reaches an update period of the congestion prevention strategy and / or when the congestion prevention strategy is damaged;
[0055] Response information from the edge server is received, and the congestion prevention strategy is updated according to the response information.
[0056] In a third aspect, an embodiment of the present application provides an electronic device, which includes a processor, a memory, and a program or instruction stored in the memory and executable on the processor, wherein the program or instruction, when executed by the processor, implements the steps of the method described in the first aspect.
[0057] In a fourth aspect, an embodiment of the present application provides a readable storage medium, on which a program or instruction is stored, and when the program or instruction is executed by a processor, the steps of the method described in the first aspect are implemented.
[0058] In a fifth aspect, an embodiment of the present application provides a chip, comprising a processor and a communication interface, wherein the communication interface is coupled to the processor, and the processor is used to run a program or instruction to implement the method described in the first aspect.
[0059] In an embodiment of the present application, the operation data of the edge gateway is obtained; wherein the operation data includes at least one of the number of data packets, data packet size, transmission rate, delay data, packet loss rate data and jitter data; the operation data is input into a pre-constructed congestion prediction model, and the congestion probability is determined according to the output result of the congestion prediction model; when the congestion probability is greater than the preset probability, it is determined that there is a congestion risk, and the service request is scheduled and processed according to a predetermined congestion prevention strategy. Through the above-mentioned method of congestion prevention processing of an edge gateway, the edge gateway can actively monitor the operation data, accurately predict congestion problems, and effectively prevent congestion before it occurs, which is conducive to timely discovering abnormal conditions in the early stage of congestion, improving the accuracy of congestion prediction, and thus ensuring data transmission efficiency and stability. BRIEF DESCRIPTION OF THE DRAWINGS
[0060] Figure 1 It is a flow chart of a congestion prevention processing method for an edge gateway provided in Example 1 of the present application;
[0061] Figure 2 This is a schematic diagram of the edge gateway operating environment provided in Example 1 of the present application;
[0062] Figure 3 It is a flow chart of a congestion prevention processing method for an edge gateway provided in Embodiment 2 of the present application;
[0063] Figure 4 It is a flow chart of a congestion prevention processing method for an edge gateway provided in Embodiment 3 of the present application;
[0064] Figure 5 It is a flow chart of a congestion prevention processing method for an edge gateway provided in Embodiment 4 of the present application;
[0065] Figure 6 It is a functional unit diagram of a congestion prevention processing device of an edge gateway provided in Embodiment 4 of the present application;
[0066] Figure 7 It is a flow chart of a method for updating a congestion prevention strategy of an edge gateway provided in Embodiment 5 of the present application;
[0067] Figure 8 It is a structural schematic diagram of a congestion prevention processing device for an edge gateway provided in Example 6 of the present application;
[0068] Fig. 9 It is a structural diagram of an electronic device provided in Example 7 of the present application. DETAILED DESCRIPTION
[0069] In order to make the purpose, technical scheme and advantages of the present application clearer, the specific embodiments of the present application are further described in detail below in conjunction with the accompanying drawings. It is understood that the specific embodiments described herein are only used to explain the present application, rather than to limit the present application. It should also be noted that, for the convenience of description, only the part related to the present application but not all the contents are shown in the accompanying drawings. Before discussing the exemplary embodiments in more detail, it should be mentioned that some exemplary embodiments are described as processes or methods depicted as flow charts. Although the flow chart describes each operation (or step) as a sequential process, many of the operations therein can be implemented in parallel, concurrently or simultaneously. In addition, the order of each operation can be rearranged. The process can be terminated when its operation is completed, but it can also have additional steps not included in the accompanying drawings. The process can correspond to a method, a function, a procedure, a subroutine, a subprogram, etc.
[0070] The following will be combined with the drawings in the embodiments of the present application to clearly describe the technical solutions in the embodiments of the present application. Obviously, the described embodiments are part of the embodiments of the present application, rather than all the embodiments. All other embodiments obtained by ordinary technicians in this field based on the embodiments in the present application belong to the scope of protection of this application.
[0071] The terms "first", "second", etc. in the specification and claims of the present application are used to distinguish similar objects, and are not used to describe a specific order or sequence. It should be understood that the data used in this way can be interchangeable under appropriate circumstances, so that the embodiments of the present application can be implemented in an order other than those illustrated or described here, and the objects distinguished by "first", "second", etc. are generally of one type, and the number of objects is not limited. For example, the first object can be one or more. In addition, "and / or" in the specification and claims represents at least one of the connected objects, and the character " / " generally indicates that the objects associated with each other are in an "or" relationship.
[0072] In conjunction with the accompanying drawings, the following describes in detail a congestion prevention processing method, apparatus, device and medium for an edge gateway provided by an embodiment of the present application through specific embodiments and their application scenarios.
[0073] Embodiment 1
[0074] Figure 1 It is a flow chart of a congestion prevention processing method for an edge gateway provided in Example 1 of the present application.
[0075] like Figure 1 As shown, the specific steps include:
[0076] S101, obtaining operation data of the edge gateway; wherein the operation data includes at least one of the number of data packets, data packet size, transmission rate, delay data, packet loss rate data and jitter data;
[0077] The application scenario of this solution can be a scenario for preventing congestion problems of edge gateways.
[0078] Based on the above scenario, it can be understood that the executor of this scenario can be an edge gateway that actively monitors and prevents congestion, and no excessive restrictions are made here.
[0079] Edge gateways can be devices that connect terminal devices and cloud servers. By connecting to IoT devices, edge gateways can achieve real-time control and monitoring of devices, and analyze and make decisions on data. At the same time, edge gateways can also coordinate communications between terminal devices, thereby achieving effective management and control of the entire IoT environment.
[0080] Data packets can be the data unit in TCP / IP (Transmission Control Protocol / Internet Protocol) protocol communication transmission, at the network layer. In a packet switching network, a single message is divided into multiple data blocks, which are called packets, containing the address information of the sender and the receiver. These data packets are then transmitted along different paths in one or more networks and reassembled at the destination.
[0081] The number of data packets can be the total number of data packets that the edge gateway currently needs to process.
[0082] The data packet size may be the memory size occupied by a single data packet. The data packet size mainly depends on the size of the data it contains.
[0083] The transmission rate can be the number of bits that can be transmitted per unit time. Bit can be a unit of measurement for information volume, and it is also a bit in a binary number. The information contained in one bit of a binary number is one bit, such as the binary number 0100 is 4 bits.
[0084] Delay data can refer to the time interval from the first bit of a data packet entering the router to the last bit of a data packet output from the router. Delay is related to the length of the data packet. In testing, the time interval from the test instrument sending a test packet to receiving the data packet is usually used.
[0085] The packet loss rate data may refer to the ratio of the number of lost data packets to the number of sent data groups in the test.
[0086] The calculation method is:
[0087] [(number of input packets - number of output packets) / number of input packets] × 100%;
[0088] The packet loss rate is related to the size of the data packets and the frequency with which the data packets are sent.
[0089] Jitter data can refer to the small random variations in the time it takes for a packet to arrive in a network. Jitter data can be used to measure the inconsistency of delay between packets.
[0090] The way to obtain the operating data of the edge gateway is to use network monitoring software, such as Wire Shark and other tools, to connect to the edge gateway. The network monitoring software can capture the network traffic of the edge gateway and provide detailed statistical information, including the number and size of data packets. At the same time, use network performance testing tools such as iPerf and Speedtest to connect to the edge gateway, measure the transmission time and data volume, and calculate the transmission rate. The time difference between sending and receiving data packets can be measured to obtain delay data. The number of data packets sent and the number of data packets received are counted separately to calculate the packet loss rate.
[0091] S102, inputting the operation data into a pre-built congestion prediction model, and determining the congestion probability according to an output result of the congestion prediction model;
[0092] The pre-built congestion prediction model may be a big data model that can predict the congestion probability represented in the operation data of the edge gateway.
[0093] The method for determining the congestion probability is to input the currently acquired operation data of the edge gateway into a pre-built congestion prediction model, and the congestion prediction model calculates the degree of match between the features contained in the current operation data and the abnormal features based on the learned abnormal features of the operation data before the congestion time, obtains the degree of match output by the congestion prediction model, and determines the congestion probability based on the degree of match. For example, when the degree of match is higher, the corresponding congestion probability is larger.
[0094] S103: When the congestion probability is greater than a preset probability, it is determined that there is a congestion risk, and the service request is scheduled according to a predetermined congestion prevention strategy.
[0095] Congestion prevention strategies can be pre-defined by staff to prevent congestion when there is a risk of congestion. For example, limiting the order of data transmission, allocating data to other edge gateways for processing, etc.
[0096] The preset probability may be a predetermined minimum congestion probability for which congestion prevention measures need to be taken. When the congestion probability exceeds the preset probability, the edge gateway is very likely to have a congestion problem in a short period of time.
[0097] The method of determining whether there is a congestion risk may be to compare the obtained congestion probability with the preset probability. When the congestion probability value is greater than the preset probability, it is determined that there is a congestion risk. At this time, the congestion prevention processing measures are started, the congestion prevention strategy pre-obtained from the edge server is called, the congestion prevention strategy is read, and the service requests to be processed are allocated according to the provisions therein.
[0098] Based on the above solution, optionally, before obtaining the operation data of the edge gateway, the method further includes:
[0099] Obtain observation data within a preset time before a historical congestion event, as well as reference data when the edge gateway is operating normally, and generate sample data based on the observation data and the reference data;
[0100] The sample data is used as an input variable for unsupervised training to learn the difference features between the observed data and the reference data before the congestion event, and then a congestion prediction model that identifies the difference features is constructed.
[0101] The preset time may be the time period from the beginning of a congestion event, when the operation data begins to produce changes that can indicate that a congestion event is about to occur, to the time when the congestion event clearly occurs.
[0102] The observation data may be the operation data of the edge gateway collected within a preset time before the historical congestion event occurs.
[0103] The reference data may be operation data collected during the normal operation of the edge gateway.
[0104] The method for generating sample data is to identify operating data with congestion events from historical records, obtain the operating data within a preset time before the congestion event occurs as observation data, use the operating data of the edge gateway when operating normally in the historical records as reference data, and use the observation data and reference data together as sample data.
[0105] The congestion prediction model can be constructed by performing unsupervised training on sample data, analyzing the sample data, and learning an algorithm for extracting the difference features between the observed data and the reference data. The difference between the subsequently input operating data and the reference data can then be extracted, and the degree of match between the difference features and the trained difference features can be calculated.
[0106] The advantage of this setting of the scheme is that a congestion prediction model can be constructed based on historical observation data and reference data, so that the algorithm of the congestion prediction model is more in line with the actual operation of the edge gateway, which is conducive to improving the accuracy of the congestion prediction model.
[0107] In this solution, an application scenario of a congestion prevention processing method for an edge gateway is provided. Figure 2 Schematic diagram of the edge gateway operating environment provided in the first embodiment of the present application. Figure 2As shown, the edge gateway is connected to the edge server and the terminal device through the transmission network, wherein the edge gateway and the terminal device can be directly connected, such as the connection between edge gateway A and terminal device 1; the edge gateway and the terminal device can also be connected through a switch, such as the connection between edge gateway A and terminal device 2, and the switch can connect multiple terminal devices including terminal device 2 to the same edge gateway. Data can also be transmitted between edge gateways connected to the same edge server, such as the connection between edge gateway A and edge gateway B.
[0108] The service requests of terminal devices can be sent to the edge server through the edge gateway. During this process, the edge gateway monitors its own operating data and predicts the congestion probability through a pre-built congestion prediction model. If the predicted congestion probability determines that there is a congestion risk, the service requests of the terminal devices can be scheduled and processed in advance before congestion occurs, thereby avoiding congestion in the edge gateway.
[0109] For example, first, a congestion prediction model that can predict the probability of congestion events is constructed based on sample data, and the congestion prediction model can be tested with test data to ensure that the accuracy of the congestion prediction model meets the usage requirements. Then, the congestion prevention processing system is started. The congestion prevention processing system collects the operating data of the edge gateway, extracts the features of the operating data, and inputs the extracted feature matrix into the congestion prediction model. The congestion prediction model analyzes the input feature matrix according to the learned algorithm and outputs the corresponding congestion probability prediction result.
[0110] For the above process, you can use the following code to implement it:
[0111] This application provides a program code for determining congestion probability for reference:
[0112] import numpy as np
[0113] from sklearn.linear_model import LogisticRegression
[0114] data_packets=np.random.randint(100,1000,size=100)
[0115] packet_sizes=np.random.randint(1000,10000,size=100)
[0116] transmission_rates=np.random.randint(1000,5000,size=100)
[0117] latencies=np.random.uniform(1,10,size=100)
[0118] packet_loss_rates=np.random.uniform(0,0.1,size=100)
[0119] jitter_data=np.random.uniform(0.1,1,size=100)
[0120] #Merge running data into feature matrix
[0121] X=np.column_stack((data_packets,packet_sizes,transmission_rates,latencies,packet_loss_rates,jitter_data))
[0122] #1 means congestion, 0 means no congestion
[0123] y=np.random.choice([0,1],size=100)
[0124] #Create a congestion prediction model
[0125] model = LogisticRegression()
[0126] model.fit(X,y)
[0127] def predict_congestion_probability(run_data):
[0128] return model.predict_proba([run_data])[0][1]
[0129] #Test prediction function
[0130] test_run_data=[500,5000,3000,5,0.05,0.5]
[0131] congestion_probability=predict_congestion_probability(test_run_data)
[0132] print(f"Congestion probability is: {congestion_probability}")
[0133] In an embodiment of the present application, the operation data of the edge gateway is obtained; wherein the operation data includes at least one of the number of data packets, data packet size, transmission rate, delay data, packet loss rate data and jitter data; the operation data is input into a pre-constructed congestion prediction model, and the congestion probability is determined according to the output result of the congestion prediction model; when the congestion probability is greater than the preset probability, it is determined that there is a congestion risk, and the service request is scheduled and processed according to a predetermined congestion prevention strategy. Through the above-mentioned method of congestion prevention processing of an edge gateway, the edge gateway can actively monitor the operation data, accurately predict congestion problems, and effectively prevent congestion before it occurs, which is conducive to timely discovering abnormal conditions in the early stage of congestion, improving the accuracy of congestion prediction, and thus ensuring data transmission efficiency and stability.
[0134] Embodiment 2
[0135] Figure 3 It is a flow chart of a congestion prevention processing method for an edge gateway provided in Example 2 of the present application. This solution makes a better improvement on the above-mentioned embodiment, and the specific improvement is: according to a predetermined congestion prevention strategy, the service request is scheduled and processed, including: identifying the terminal device identifier in the service request, obtaining the device priority corresponding to the terminal device identifier according to the congestion defense strategy, and scheduling the service request according to the device priority; and / or, obtaining the data type of the service request, obtaining the service priority corresponding to the data type according to the congestion defense strategy, and scheduling the service request according to the service priority; and / or, identifying the source address, source port number, target address and target port number of the service request, obtaining the path priority corresponding to at least one of the source address, source port number, target address and target port number in the congestion defense strategy, and scheduling the service request according to the path priority.
[0136] like Figure 3 As shown, specifically including the following:
[0137] S301, obtaining operation data of the edge gateway; wherein the operation data includes at least one of the number of data packets, data packet size, transmission rate, delay data, packet loss rate data and jitter data;
[0138] S302, inputting the operation data into a pre-built congestion prediction model, and determining the congestion probability according to an output result of the congestion prediction model;
[0139] S303: When the congestion probability is greater than a preset probability, determining that there is a congestion risk;
[0140] S304, identifying the terminal device identifier in the service request, obtaining the device priority corresponding to the terminal device identifier according to the congestion prevention strategy, and scheduling the service request according to the device priority;
[0141] and / or,
[0142] Obtaining a data type of a service request, obtaining a service priority corresponding to the data type according to the congestion prevention strategy, and scheduling the service request according to the service priority;
[0143] and / or,
[0144] Identify the source address, source port number, destination address and destination port number of the service request, obtain the path priority corresponding to at least one of the source address, source port number, destination address and destination port number in the congestion defense strategy, and schedule the service request according to the path priority.
[0145] The terminal device identifier may be the identity information or location information that can represent the terminal device contained in the service request, such as MAC address (Media Access Control Address), IP address (Internet Protocol Address), etc. When the terminal device sends a service request, or sends a terminal service request to a terminal device, the terminal device identifier will be carried in the service request to assist in identifying and distinguishing the service request.
[0146] The data type may be a service category obtained by classifying the service request according to its content or purpose, and may indicate the function that the service request needs to implement. For example, the priority of a service request for alarm information is higher than the priority of a service request for data reporting.
[0147] Priority can be a basis for determining the processing order, with high priority being processed first and low priority being processed later. In a computer time-sharing operating system, if multiple operating programs are processed, priority is a parameter that determines the priority level of each operating program in receiving system resources.
[0148] The source address may be the IP address corresponding to the device sending the service request.
[0149] The source port number may be the identification number corresponding to the channel for sending the service request.
[0150] The target address may be the IP address corresponding to the server that receives the service request.
[0151] The target port number may be an identification number corresponding to the channel for receiving the service request.
[0152] The method for scheduling and processing service requests according to device priority may be to extract the terminal device identification contained in each service request, call the congestion prevention strategy pre-stored in the system, traverse the congestion prevention strategy, obtain the device priority corresponding to the terminal device identification, mark the device priority in the service request corresponding to the terminal device identification, sort the service requests according to the device priority, and transmit the service requests in descending order according to the device priority.
[0153] The method of scheduling and processing business requests according to business priorities may be to identify the content of each business request, determine the corresponding data type based on the content, call the congestion prevention strategy pre-stored in the system, traverse the congestion prevention strategy, obtain the business priority corresponding to the data type, mark the business priority in the business request corresponding to the data type, sort the business requests according to the business priority, and transmit the business requests in descending order according to the business priority.
[0154] The method for scheduling and processing the service requests according to the path priority may be to obtain at least one of the source address, source port number, target address and target port number of each service request, call the congestion prevention strategy pre-stored in the system, traverse the congestion prevention strategy, obtain the corresponding path priority therefrom, mark the path priority in the corresponding service request, sort the service requests according to the path priority, and transmit the service requests in descending order according to the path priority.
[0155] For example, in a feasible solution, if there is a congestion risk at the edge gateway, the terminal device identification of each service request is obtained, the device priority corresponding to each terminal device identification is determined according to the congestion defense strategy, the transmission rate of the service requests with lower device priority is limited, and the service requests with higher device priority are transmitted first. If the number of service requests with higher device priority is large, the source port number of the service requests with higher device priority can also be obtained, the path priority corresponding to each source port number is determined according to the congestion defense strategy, the transmission rate of the service requests with lower path priority is limited, and the service requests with higher path priority are transmitted first. And so on. The above-mentioned multiple priority determination methods can be used in combination according to the number of service requests to be processed.
[0156] The advantage of this setting is that before congestion occurs, service requests can be scheduled and processed according to the congestion prevention strategy, thereby limiting the transmission rate of some service requests, alleviating the load pressure of the edge gateway to a certain extent, and avoiding the occurrence of congestion events.
[0157] Embodiment 3
[0158] Figure 4 It is a flow chart of a congestion prevention processing method for an edge gateway provided in Example 3 of the present application. This solution makes a better improvement on the above-mentioned embodiment, and the specific improvement is: after obtaining the operation data of the automatic ticket vending and checking equipment, the method also includes: after performing the scheduling processing of the service request, the method also includes: when it is identified that the operation data meets the congestion load balancing threshold value, obtaining the status data of each related edge gateway connected to the same edge server as the edge gateway; when there is an idle state in each related edge gateway, load balancing processing is performed on the service request.
[0159] like Figure 4 As shown, specifically including the following:
[0160] S401, obtaining operation data of the edge gateway; wherein the operation data includes at least one of the number of data packets, data packet size, transmission rate, delay data, packet loss rate data and jitter data;
[0161] S402, inputting the operation data into a pre-built congestion prediction model, and determining the congestion probability according to an output result of the congestion prediction model;
[0162] S403: When the congestion probability is greater than a preset probability, determining that there is a congestion risk, and performing scheduling processing on the service request according to a predetermined congestion prevention strategy;
[0163] S404, when it is identified that the operation data meets the congestion load balancing threshold, obtaining status data of each related edge gateway connected to the same edge server as the edge gateway;
[0164] The congestion load balancing threshold value may be a minimum requirement for the operation data that the current edge gateway needs to perform load balancing processing. For example, when the transmission rate is less than 200 kbps, the load balancing processing needs to be started.
[0165] An edge server is a computing device located at the edge of a network, close to the data source or user terminal device. The main purpose of an edge server is to process and store data locally, reduce the latency of data transmission to a cloud data center or core network, and also reduce the load on the core network and the cloud.
[0166] The relevant edge gateway may be an edge gateway that is connected to the same edge server as the edge gateway and can perform data transmission with the edge server or the edge gateway.
[0167] The status data may be feedback information of the workload reported by the relevant edge gateway according to the number of service requests to be processed.
[0168] The method for obtaining the status data of the relevant edge gateway is to compare the current operating data with the congestion load balancing threshold value. If the operating data meets the requirements of the congestion load balancing threshold value, a request for obtaining the status data of the relevant edge gateway is sent to the edge server. After receiving the request, the edge server obtains the status data of all relevant edge gateways connected to it, integrates the status data, and sends it to the edge gateway whose current operating data meets the congestion load balancing threshold value.
[0169] S405: When there is an idle state in each of the relevant edge gateways, load balancing is performed on the service request.
[0170] The method of load balancing business requests is to read each status data after obtaining the status data of the relevant edge gateways to identify whether the workload of each relevant edge gateway has reached saturation. If there are relevant edge gateways that have not reached saturation, it is determined that there is an idle state in each relevant edge gateway. At this time, some business requests in the current edge gateway can be sent to the idle edge gateway for processing.
[0171] Based on the above solution, optionally, load balancing is performed on the service request, including:
[0172] Sending a load balancing processing request to the edge server;
[0173] Receive feedback information from the edge server, obtain address information of a related edge gateway in an idle state according to the feedback information, and send the service request that allows diversion to the corresponding related edge gateway for processing according to the address information.
[0174] Feedback information may be information generated by the edge server after receiving the load balancing request and confirming again whether the relevant edge gateway is in an idle state, indicating whether the load balancing process is agreed. If the relevant edge gateway is in an idle state and the load balancing process is agreed, the address information of the relevant edge gateway in the idle state is obtained and the address information is written into the feedback information.
[0175] The method of sending the load balancing processing request to the edge server may be to generate a load balancing processing request after identifying that there is an idle edge gateway in the relevant edge gateways, and send the load balancing processing request to the edge server to request the edge server to start the load balancing processing measure.
[0176] The business requests that are allowed to be diverted may be business requests that have no special requirements for the edge gateway and can be processed by other edge gateways.
[0177] The method of sending the business request that allows diversion to the corresponding relevant edge gateway can be to receive feedback information from the edge server, read the feedback information, and when the feedback information indicates that it agrees to load balancing processing, obtain the address information in the load information, screen the business requests to be processed, obtain the business request that allows diversion, send it to the obtained address information, and continue to process it by the relevant edge gateway in the idle state.
[0178] The advantage of setting up this solution is that it can load balance the edge gateways that still have congestion problems after scheduling, alleviate the congestion problem of the edge gateways by allocating some business requests to the relevant edge gateways for processing, and shorten the recovery time of the edge gateways.
[0179] Embodiment 4
[0180] Figure 5 This is a flow chart of a congestion prevention processing method for an edge gateway provided in Example 4 of the present application. This solution makes a better improvement on the above-mentioned embodiment, and the specific improvement is: after the scheduling processing of the service request, the method also includes: obtaining the latest operation data of the edge gateway, determining the current congestion situation of the edge gateway according to the latest operation data; feeding back the congestion situation to the congestion prediction model, so that the congestion prediction model optimizes the congestion prediction performance according to the congestion situation.
[0181] like Figure 5 As shown, specifically including the following:
[0182] S501, obtaining operation data of the edge gateway; wherein the operation data includes at least one of the number of data packets, data packet size, transmission rate, delay data, packet loss rate data and jitter data;
[0183] S502, inputting the operation data into a pre-built congestion prediction model, and determining the congestion probability according to an output result of the congestion prediction model;
[0184] S503: When the congestion probability is greater than a preset probability, it is determined that there is a congestion risk, and the service request is scheduled according to a predetermined congestion prevention strategy;
[0185] S504, obtaining the latest operation data of the edge gateway, and determining the current congestion status of the edge gateway according to the latest operation data;
[0186] The latest operation data of the edge gateway may be obtained by, after scheduling the service request, obtaining the operation data of the edge gateway as the latest operation data again through the network monitoring software and the network performance testing tool.
[0187] The current congestion situation of the edge gateway can be determined by comparing the latest operating data currently obtained with the reference data when the edge gateway is operating normally, and determining the current congestion situation of the edge gateway based on the difference between the latest operating data and the reference data. For example, if the transmission rate in the latest operating data is much smaller than the reference data, the edge gateway is determined to be in a congested state.
[0188] S505: Feedback the congestion situation to the congestion prediction model, so that the congestion prediction model optimizes congestion prediction performance according to the congestion situation.
[0189] The congestion prediction performance can be optimized by feeding back the detected congestion situation to the congestion prediction model, which determines the actual matching degree of the corresponding output according to the congestion degree of the edge gateway, and adjusts the corresponding parameters in the pre-built algorithm according to the matching degree, so that the congestion prediction model can obtain the actual matching degree according to the input operation data, thereby completing the optimization of the congestion prediction performance.
[0190] For example, Figure 6 Schematic diagram of functional units of a congestion prevention processing device for an edge gateway provided in Embodiment 4 of the present application, such as Figure 6 As shown, the congestion prevention device includes a real-time monitoring unit 601, a congestion prediction unit 602, an active congestion processing unit 603, and a congestion feedback unit 604. The real-time monitoring unit 601 is used to obtain the operation data of the edge gateway, the congestion prediction unit 602 is used to predict the congestion probability according to the operation data, the active congestion processing unit 603 is used to take processing measures when there is a congestion risk, and the congestion feedback unit 604 is used to feed back the latest operation data to the congestion prediction unit 602, so that it optimizes the congestion prediction model.
[0191] The advantage of this arrangement of the scheme is that the congestion prediction model can be optimized according to the actual congestion situation, so that the congestion prediction performance of the congestion prediction model can be continuously improved during use, making the prediction result more accurate.
[0192] Embodiment 5
[0193] Figure 7This is a flow chart of a method for updating a congestion prevention strategy for an edge gateway provided in Embodiment 5 of the present application. This solution makes a better improvement on the above embodiment, specifically: the method also includes: when the timer reaches the update period of the congestion prevention strategy, and / or the congestion prevention strategy is damaged, sending a congestion prevention strategy acquisition request to the edge server; receiving the response information of the edge server, and updating the congestion prevention strategy according to the response information.
[0194] like Figure 7 As shown, specifically including the following:
[0195] S701: When the timer reaches the update period of the congestion prevention policy and / or the congestion prevention policy is damaged, send a congestion prevention policy acquisition request to the edge server;
[0196] A timer can be used to record the duration in the system to implement software timing or enable a program to complete an operation at fixed intervals.
[0197] The update cycle may be a time interval pre-specified by the staff for the edge gateway to update its stored congestion prevention strategy.
[0198] The method of sending a congestion prevention strategy acquisition request can be that the timing duration in the timer is consistent with the update period of the congestion prevention strategy, and / or, when problems such as read failure and file query failure occur when reading the congestion prevention strategy, a congestion prevention strategy acquisition request is generated and sent to the edge server to request the edge server to feedback the latest congestion prevention strategy.
[0199] S702: Receive response information from the edge server, and update the congestion prevention strategy according to the response information.
[0200] The response information may be information obtained by the edge server after receiving the congestion prevention strategy acquisition request from the edge gateway, calling the latest version of the congestion prevention strategy at the corresponding storage location, and encoding it. If the congestion prevention strategy is modified or updated, the staff may upload the latest version of the congestion prevention strategy to the edge server for storage.
[0201] The congestion prevention strategy may be updated by, after receiving the response information from the edge server, decoding the congestion prevention strategy therein, deleting the original congestion prevention strategy, and entering the latest version of the congestion prevention strategy carried in the response information.
[0202] In a feasible method, the staff can also actively send a congestion prevention strategy update instruction to the edge gateway through the edge server. After the edge gateway updates the congestion prevention strategy according to the congestion prevention strategy update instruction, it resets the timer to restart the cumulative update cycle.
[0203] The benefit of this arrangement of the scheme is that the congestion prevention strategy can be updated in a timely manner, thereby preventing the occurrence of problems such as errors in the congestion prevention strategy or damage to the processing progress of the business request, which is conducive to maintaining the normal operation of the business request processing process.
[0204] Embodiment 6
[0205] Figure 8 It is a structural diagram of the congestion prevention processing device of the edge gateway provided in Example 4 of the present application.
[0206] like Figure 8 As shown, specifically including the following:
[0207] The operation data acquisition module 801 is used to acquire the operation data of the edge gateway; wherein the operation data includes at least one of the number of data packets, the size of data packets, the transmission rate, the delay data, the packet loss rate data and the jitter data;
[0208] A congestion probability determination module 802 is used to input the operation data into a pre-built congestion prediction model, and determine the congestion probability according to the output result of the congestion prediction model;
[0209] The service request scheduling module 803 is used to determine that there is a congestion risk when the congestion probability is greater than a preset probability, and to perform scheduling processing of the service request according to a predetermined congestion prevention strategy.
[0210] Optionally, the device further comprises:
[0211] A congestion prediction model building module is used to obtain observation data within a preset time before a historical congestion event, as well as reference data when the edge gateway is operating normally, and generate sample data based on the observation data and the reference data;
[0212] The sample data is used as an input variable for unsupervised training to learn the difference features between the observed data and the reference data before the congestion event, and then a congestion prediction model that identifies the difference features is constructed.
[0213] Optionally, the service request scheduling module is specifically used to:
[0214] Identify the terminal device identifier in the service request, obtain the device priority corresponding to the terminal device identifier according to the congestion prevention strategy, and schedule the service request according to the device priority;
[0215] and / or,
[0216] Obtaining a data type of a service request, obtaining a service priority corresponding to the data type according to the congestion prevention strategy, and scheduling the service request according to the service priority;
[0217] and / or,
[0218] Identify the source address, source port number, destination address and destination port number of the service request, obtain the path priority corresponding to at least one of the source address, source port number, destination address and destination port number in the congestion defense strategy, and schedule the service request according to the path priority.
[0219] Optionally, the device further comprises:
[0220] A load balancing processing module, configured to obtain status data of each related edge gateway connected to the same edge server as the edge gateway when it is identified that the operation data meets the congestion load balancing threshold;
[0221] When there is an idle state in each related edge gateway, the service request is load balanced.
[0222] Optionally, the load balancing processing module is specifically used to:
[0223] Sending a load balancing processing request to the edge server;
[0224] Receive feedback information from the edge server, obtain address information of a related edge gateway in an idle state according to the feedback information, and send the service request that allows diversion to the corresponding related edge gateway for processing according to the address information.
[0225] Optionally, the device further comprises:
[0226] A performance optimization module, used to obtain the latest operation data of the edge gateway, and determine the current congestion status of the edge gateway according to the latest operation data;
[0227] The congestion situation is fed back to the congestion prediction model, so that the congestion prediction model optimizes the congestion prediction performance according to the congestion situation.
[0228] Optionally, the device further comprises:
[0229] A congestion prevention strategy update module, configured to send a congestion prevention strategy acquisition request to the edge server when a timer reaches an update period of the congestion prevention strategy and / or when the congestion prevention strategy is damaged;
[0230] Response information from the edge server is received, and the congestion prevention strategy is updated according to the response information.
[0231] In an embodiment of the present application, an operation data acquisition module is used to obtain the operation data of the edge gateway; wherein the operation data includes at least one of the number of data packets, data packet size, transmission rate, delay data, packet loss rate data and jitter data; a congestion probability determination module is used to input the operation data into a pre-built congestion prediction model, and determine the congestion probability according to the output result of the congestion prediction model; a service request scheduling module is used to determine that there is a congestion risk when the congestion probability is greater than a preset probability, and schedule the service request according to a predetermined congestion prevention strategy. Through the above-mentioned congestion prevention processing device of an edge gateway, the edge gateway can actively monitor the operation data, accurately predict congestion problems, and effectively prevent congestion before it occurs, which is conducive to timely discovering abnormal conditions in the early stage of congestion, improving the accuracy of congestion prediction, and thus ensuring data transmission efficiency and stability.
[0232] A congestion prevention processing device for an edge gateway in an embodiment of the present application may be a device, or a component, an integrated circuit, or a chip in a terminal. The device may be a mobile electronic device or a non-mobile electronic device. Exemplarily, the mobile electronic device may be a mobile phone, a tablet computer, a laptop computer, a PDA, an in-vehicle electronic device, a wearable device, an ultra-mobile personal computer (UMPC), a netbook, or a personal digital assistant (PDA), etc., and the non-mobile electronic device may be a server, a network attached storage (NAS), a personal computer (PC), a television (TV), a teller machine or a self-service machine, etc., which is not specifically limited in the embodiment of the present application.
[0233] In the embodiment of the present application, a device for congestion prevention processing of an edge gateway may be a device having an operating system. The operating system may be an Android operating system, an iOS operating system, or other possible operating systems, which are not specifically limited in the embodiment of the present application.
[0234] The device for congestion prevention processing of an edge gateway provided in an embodiment of the present application can implement the various processes implemented in the above-mentioned method embodiments. To avoid repetition, they will not be described here.
[0235] Embodiment 7
[0236] like Fig. 9 As shown, an embodiment of the present application also provides an electronic device 900, including a processor 901, a memory 902, and a program or instruction stored in the memory 902 and executable on the processor 901. When the program or instruction is executed by the processor 901, each process of an embodiment of a method for congestion prevention processing of an edge gateway described above is implemented, and the same technical effect can be achieved. To avoid repetition, it will not be described here.
[0237] It should be noted that the electronic devices in the embodiments of the present application include the mobile electronic devices and non-mobile electronic devices mentioned above.
[0238] Embodiment 8
[0239] An embodiment of the present application also provides a readable storage medium, on which a program or instruction is stored. When the program or instruction is executed by a processor, each process of the above-mentioned method embodiment for congestion prevention processing of an edge gateway is implemented, and the same technical effect can be achieved. To avoid repetition, it will not be repeated here.
[0240] The processor is a processor in the electronic device described in the above embodiment. The readable storage medium includes a computer readable storage medium, such as a computer read-only memory (ROM), a random access memory (RAM), a magnetic disk or an optical disk.
[0241] Embodiment 9
[0242] An embodiment of the present application further provides a chip, which includes a processor and a communication interface, wherein the communication interface is coupled to the processor, and the processor is used to run programs or instructions to implement the various processes of the above-mentioned method embodiment for congestion prevention processing of an edge gateway, and can achieve the same technical effect. To avoid repetition, it will not be repeated here.
[0243] It should be understood that the chip mentioned in the embodiments of the present application can also be called a system-level chip, a system chip, a chip system or a system-on-chip chip, etc.
[0244] It should be noted that, in this article, the terms "comprise", "include" or any other variant thereof are intended to cover non-exclusive inclusion, so that the process, method, article or device including a series of elements includes not only those elements, but also includes other elements not explicitly listed, or also includes elements inherent to such process, method, article or device. In the absence of further restrictions, the elements defined by the sentence "comprise one..." do not exclude the presence of other identical elements in the process, method, article or device including the element. In addition, it should be pointed out that the scope of the methods and devices in the embodiments of the present application is not limited to performing functions in the order shown or discussed, and may also include performing functions in a substantially simultaneous manner or in reverse order according to the functions involved, for example, the described method may be performed in an order different from that described, and various steps may also be added, omitted, or combined. In addition, the features described with reference to certain examples may be combined in other examples.
[0245] Through the description of the above implementation methods, those skilled in the art can clearly understand that the above-mentioned embodiment methods can be implemented by means of software plus a necessary general hardware platform, and of course by hardware, but in many cases the former is a better implementation method. Based on such an understanding, the technical solution of the present application, or the part that contributes to the prior art, can be embodied in the form of a computer software product, which is stored in a storage medium (such as ROM / RAM, a disk, or an optical disk), and includes a number of instructions for a terminal (which can be a mobile phone, a computer, a server, or a network device, etc.) to execute the methods described in each embodiment of the present application.
[0246] The embodiments of the present application are described above in conjunction with the accompanying drawings, but the present application is not limited to the above-mentioned specific implementation methods. The above-mentioned specific implementation methods are merely illustrative and not restrictive. Under the guidance of the present application, ordinary technicians in this field can also make many forms without departing from the purpose of the present application and the scope of protection of the claims, all of which are within the protection of the present application.
[0247] The above are only preferred embodiments of the present application and the technical principles used. The present application is not limited to the specific embodiments described herein, and various obvious changes, readjustments and substitutions that can be made by those skilled in the art will not deviate from the scope of protection of the present application. Therefore, although the present application is described in more detail through the above embodiments, the present application is not limited to the above embodiments, and may include more other equivalent embodiments without departing from the concept of the present application, and the scope of the present application is determined by the scope of the claims.
Claims
1. A congestion prevention processing method for an edge gateway, characterized in that: The method is performed by an edge gateway, and the method includes: Obtaining operation data of the edge gateway; wherein the operation data includes at least one of the number of data packets, data packet size, transmission rate, delay data, packet loss rate data and jitter data; Inputting the operation data into a pre-built congestion prediction model, and determining the congestion probability according to an output result of the congestion prediction model; When the congestion probability is greater than a preset probability, it is determined that there is a congestion risk, and the service request is scheduled according to a predetermined congestion prevention strategy.
2. The congestion prevention processing method for edge gateway according to claim 1, characterized in that: Before obtaining the operation data of the edge gateway, the method further includes: Obtain observation data within a preset time before a historical congestion event, as well as reference data when the edge gateway is operating normally, and generate sample data based on the observation data and the reference data; The sample data is used as an input variable for unsupervised training to learn the difference features between the observed data and the reference data before the congestion event, and then a congestion prediction model that identifies the difference features is constructed.
3. The congestion prevention processing method for edge gateway according to claim 1, characterized in that: According to the pre-determined congestion prevention strategy, the service request is scheduled and processed, including: Identify the terminal device identifier in the service request, obtain the device priority corresponding to the terminal device identifier according to the congestion prevention strategy, and schedule the service request according to the device priority; and / or, Obtaining a data type of a service request, obtaining a service priority corresponding to the data type according to the congestion prevention strategy, and scheduling the service request according to the service priority; and / or, Identify the source address, source port number, destination address and destination port number of the service request, obtain the path priority corresponding to at least one of the source address, source port number, destination address and destination port number in the congestion defense strategy, and schedule the service request according to the path priority.
4. The congestion prevention processing method for edge gateway according to claim 1, characterized in that: After the scheduling process of the service request is performed, the method further includes: When it is identified that the operation data meets the congestion load balancing threshold, obtaining status data of each relevant edge gateway connected to the same edge server as the edge gateway; When there is an idle state in each related edge gateway, the service request is load balanced.
5. The edge gateway congestion prevention processing method according to claim 4, characterized in that: Load balancing of business requests, including: Sending a load balancing processing request to the edge server; Receive feedback information from the edge server, obtain address information of a related edge gateway in an idle state according to the feedback information, and send the service request that allows diversion to the corresponding related edge gateway for processing according to the address information.
6. The edge gateway congestion prevention processing method according to claim 1, characterized in that: After the scheduling process of the service request is performed, the method further includes: Acquire the latest operation data of the edge gateway, and determine the current congestion status of the edge gateway according to the latest operation data; The congestion situation is fed back to the congestion prediction model, so that the congestion prediction model optimizes the congestion prediction performance according to the congestion situation.
7. The edge gateway congestion prevention processing method according to claim 1, characterized in that: The method further comprises: When the timer reaches the update period of the congestion prevention policy and / or the congestion prevention policy is damaged, sending a congestion prevention policy acquisition request to the edge server; Response information from the edge server is received, and the congestion prevention strategy is updated according to the response information.
8. A congestion prevention processing device for an edge gateway, characterized in that: The device comprises: An operation data acquisition module, used to acquire the operation data of the edge gateway; wherein the operation data includes at least one of the number of data packets, data packet size, transmission rate, delay data, packet loss rate data and jitter data; A congestion probability determination module, used to input the operation data into a pre-built congestion prediction model, and determine the congestion probability according to an output result of the congestion prediction model; The service request scheduling module is used to determine that there is a congestion risk when the congestion probability is greater than a preset probability, and to schedule the service request according to a predetermined congestion prevention strategy.
9. An electronic device, characterized in that: It includes a processor, a memory, and a program or instruction stored in the memory and executable on the processor. When the program or instruction is executed by the processor, the steps of a congestion prevention processing method for an edge gateway as described in any one of claims 1 to 7 are implemented.
10. A readable storage medium, characterized in that: The readable storage medium stores a program or instruction, and when the program or instruction is executed by the processor, the steps of a congestion prevention processing method for an edge gateway as described in any one of claims 1-7 are implemented.
Citation Information
Patent Citations
Network congestion control method, device, equipment, medium and product
CN118590932A
Network congestion assessment method and mitigation system based on digital twinning
CN118631740A
Cited By
Elastic Internet of Things gateway based on edge large model and data processing method
CN120223548A