Service flow sensing method and apparatus for edge computing, and electronic device
By using the service type-aware model of the fast-gated loop unit in edge computing, the operation complexity is reduced, the speed and accuracy of business flow classification recognition are improved, and the low complexity problem of business flow perception in edge computing is solved.
Patent Information
- Application Number
- PCT/CN2024/134753
- Authority / Receiving Office
- WO · WO
- Patent Type
- Applications
- Current Assignee / Owner
- Priority Date
- 2024-02-07
- Filing Date
- 2024-11-27
- Publication Date
- 2025-08-14
AI Technical Summary
The prior art cannot achieve low-complexity service flow sensing under edge computing conditions, especially in the power Internet of Things. Traditional neural network algorithms have large computing volumes and it is difficult to quickly identify diversified service flows.
Using a service type perception model based on multiple fast gated cycle units, the service type perception result is calculated by extracting the feature of the service flow and inputting the feature vectors of the fast gated cycle unit through the update gate and intermediate state of the fast gated cycle unit, and the calculation of reset gates in the traditional gated cycle unit is omitted based on this.
It reduces the complexity of service classification identification operations of edge computing, improves the speed and accuracy of service flow classification identification, and meets the requirements of the Internet of Things for high real-time and high accuracy of power.
Smart Images

Figure CN2024134753_14082025_PF_FP_ABST
Abstract
Description
Edge computing service flow perception method, device and electronic device Technical Field
[0001] The present invention relates to the field of artificial intelligence technology, and specifically to a business flow perception method for edge computing, a business flow perception device for edge computing, and an electronic device. Background Art
[0002] Edge computing within the power distribution IoT must meet the high real-time, high efficiency, and high accuracy requirements of the massive influx of diverse and differentiated power services. The services faced by the power distribution IoT are becoming increasingly complex and diverse. To achieve high quality of service (QoS), the ability to identify and optimize differentiated processing of incoming services is a prerequisite for improving the QoS of these diverse services.
[0003] Service-aware identification technologies have evolved from early methods such as port identification and deep packet inspection to machine learning-based approaches. Port identification methods often suffer from low recognition accuracy due to port number variations. To address the limitations of port-based methods, deep packet inspection, which focuses on the application layer and payload, offers a new approach to service flow identification. Deep packet inspection classifies and identifies data packets by inspecting their content, performing classification and processing based on known service flow patterns. Deep packet inspection offers advantages such as high recognition accuracy and fine service granularity. However, the increasing diversity of power IoT service protocols leads to high computational complexity for real-time classification. Even for some encrypted service packets, the latency for identification and processing is even longer. This significantly limits the application of deep packet inspection in accessing and processing heterogeneous, multi-source services on edge computing devices. Traditional neural network algorithms, however, suffer from high computational complexity, making it difficult to achieve rapid service classification and identification within the limited computing power of edge computing.
[0004] Therefore, how to achieve low-complexity business perception for edge computing has become an urgent problem to be solved. Summary of the Invention
[0005] The purpose of the embodiments of the present invention is to provide a business flow perception method for edge computing, a business flow perception device for edge computing, and an electronic device to solve the defect that existing methods cannot achieve low-complexity business perception for edge computing.
[0006] To achieve the above objectives, an embodiment of the present invention provides a service flow perception method for edge computing, including:
[0007] Get business flow;
[0008] Extracting features from the service flow to obtain a feature vector; the feature vector includes multiple feature parameters of the service flow;
[0009] Inputting the feature vector into a service type perception model to obtain a service type perception result of the service flow output by the service type perception model;
[0010] Allocate corresponding computing resources and communication resources to the service flow based on the service type perception result;
[0011] Among them, the business type perception model performs business type perception on all characteristic parameters of the business flow based on multiple fast gated cycle units, and the output value of the fast gated cycle unit is calculated based on the update gate and intermediate state of the fast gated cycle unit. The intermediate state and update gate of the fast gated cycle unit are respectively calculated based on the hidden layer output value of the previous fast gated cycle unit and the characteristic parameters input to the current fast gated cycle unit; the business type perception model is obtained by training based on the sample feature vector of the sample business flow after feature extraction.
[0012] Optionally, the service type perception model includes an input layer, a fast gated recurrent unit layer and an output layer;
[0013] The fast gated cycle unit layer includes a plurality of fast gated cycle unit groups corresponding to the number of characteristic parameters of the service flow; wherein each fast gated cycle unit group includes a plurality of cascaded fast gated cycle units;
[0014] The intermediate state and update gate of each fast gated recurrent unit are calculated based on the hidden layer output value of the previous fast gated recurrent unit, the characteristic parameters input to the current fast gated recurrent unit, the weight coefficient of the update gate of the current fast gated recurrent unit, the weight coefficient of the intermediate state of the current fast gated recurrent unit, and the offset.
[0015] Optionally, the update gate, intermediate state, and output value of each fast gated recurrent unit are expressed by the following formula: k =σ(U z y k-1 +W y x k +b z ); y′ k =tanh(U z y k-1 +W y x k +b z ); y k =(1-z k )⊙y k-1 +z k ⊙y′ k ;
[0016] Among them, y k-1represents the hidden layer output value of the previous fast gated recurrent unit, x k represents the characteristic parameters of the business flow input to the current fast gated cycle unit input, σ represents the Sigmoid function, tanh represents the tanh function, z k represents the update gate of the fast gated recurrent unit, y' k represents the updated intermediate state, y k Represents the output value of the current fast gated recurrent unit, U z Represents the weight coefficient of the update gate, W y Indicates the weight coefficient of the intermediate state, b z represents the offset, and k represents the kth service flow.
[0017] Optionally, the service type perception model is trained based on the following steps:
[0018] Repeat the following steps until the difference between two consecutive output values calculated by the service type perception model is less than a set threshold:
[0019] Get sample business flow;
[0020] Extracting features from the sample traffic flow to obtain a sample feature vector;
[0021] Inputting the sample feature vector into the service type perception model to obtain a sample service type perception result;
[0022] Calculating the difference between the sample service type perception result and the output value of the service type perception model calculated previously;
[0023] The output value of the fast gated loop unit of the service type perception model after the sample feature vector is continuously input n times is expressed by the following formula:
[0024] It represents the output value of the fast gated recurrent unit after inputting the k+1th sample feature vector n times; Indicates that the fast gated recurrent unit continuously inputs n-1 update gates at the k+1th sample feature vector; It represents the output value of the fast gated recurrent unit when the k-th sample feature vector is continuously input n times; It represents the intermediate state of the fast gated recurrent unit when the k+1th sample feature vector is continuously input n times; Represents the initial output value of the fast gated recurrent unit when the k+1th sample feature vector is input for the 0th time.
[0025] Optionally, extracting features from the service flow to obtain a feature vector includes:
[0026] Extracting a set number of data packets from the service flow as service sub-flows;
[0027] Feature extraction is performed on the service sub-flow to obtain a feature vector; the feature vector includes multiple feature parameters of the service sub-flow.
[0028] Optionally, the multiple characteristic parameters include: the data volume of the largest data packet in the business sub-stream, the data volume of the smallest data packet in the business sub-stream, the average data volume of the data packets in the business sub-stream, the average arrival time of the data packets in the business sub-stream, the mean arrival time interval of the data packets in the business sub-stream, the total data volume of the business sub-stream, the duration of the business sub-stream and at least two of the flag bits of the business sub-stream.
[0029] On the other hand, an embodiment of the present invention further provides a service flow perception device for edge computing, including:
[0030] Business access module, used to obtain business flows;
[0031] A service feature extraction module, configured to extract features from the service flow to obtain a feature vector; the feature vector includes multiple feature parameters of the service flow;
[0032] A service identification module, configured to input the feature vector into a service type perception model to obtain a service type perception result of the service flow output by the service type perception model;
[0033] A service flow scheduling module is used to allocate corresponding computing resources and communication resources to the service flow based on the service type perception result;
[0034] Among them, the business type perception model performs business type perception on all characteristic parameters of the business flow based on multiple fast gated cycle units, and the output value of the fast gated cycle unit is calculated based on the update gate and intermediate state of the fast gated cycle unit. The intermediate state of the fast gated cycle unit and the update gate are respectively calculated based on the hidden layer output value of the previous fast gated cycle unit and the characteristic parameters input to the current fast gated cycle unit; the business type perception model is obtained by training based on the sample feature vector of the sample business flow after feature extraction.
[0035] Optionally, the service type perception model includes an input layer, a fast gated recurrent unit layer and an output layer;
[0036] The fast gated cycle unit layer includes a plurality of fast gated cycle unit groups corresponding to the number of characteristic parameters of the service flow; wherein each fast gated cycle unit group includes a plurality of cascaded fast gated cycle units;
[0037] The intermediate state and update gate of each fast gated recurrent unit are calculated based on the hidden layer output value of the previous fast gated recurrent unit, the characteristic parameters input to the current fast gated recurrent unit, the weight coefficient of the update gate of the current fast gated recurrent unit, the weight coefficient of the intermediate state of the current fast gated recurrent unit, and the offset.
[0038] Optionally, the update gate, intermediate state, and output value of each fast gated recurrent unit are expressed by the following formula: k =σ(U z y k-1 +W y x k +b z ); y′ k =tanh(U z y k-1 +W y x k +b z ); y k =(1-z k )⊙y k-1 +z k ⊙y′ k ;
[0039] Among them, y k-1 represents the hidden layer output value of the previous fast gated recurrent unit, x k represents the characteristic parameters of the business flow input to the current fast gated cycle unit input, σ represents the Sigmoid function, tanh represents the tanh function, z k represents the update gate of the fast gated recurrent unit, y' k represents the updated intermediate state, y k Represents the output value of the current fast gated recurrent unit, U z Represents the weight coefficient of the update gate, W y Indicates the weight coefficient of the intermediate state, b z represents the offset, and k represents the kth service flow.
[0040] Optionally, the edge computing service flow perception device further includes a service perception training module, and the service perception training module is trained to obtain a service type perception model based on the following steps:
[0041] Repeat the following steps until the difference between two consecutive output values calculated by the service type perception model is less than a set threshold:
[0042] Get sample business flow;
[0043] Extracting features from the sample traffic flow to obtain a sample feature vector;
[0044] Inputting the sample feature vector into the service type perception model to obtain a sample service type perception result;
[0045] Calculating the difference between the sample service type perception result and the output value of the service type perception model calculated previously;
[0046] The output value of the fast gated loop unit of the service type perception model after the sample feature vector is continuously input n times is expressed by the following formula:
[0047] It represents the output value of the fast gated recurrent unit after inputting the k+1th sample feature vector n times; Indicates that the fast gated recurrent unit continuously inputs n-1 update gates at the k+1th sample feature vector; It represents the output value of the fast gated recurrent unit when the k-th sample feature vector is continuously input n times; It represents the intermediate state of the fast gated recurrent unit when the k+1th sample feature vector is continuously input n times; Represents the initial output value of the fast gated recurrent unit when the k+1th sample feature vector is input for the 0th time.
[0048] Optionally, extracting features from the service flow to obtain a feature vector includes:
[0049] Extracting a set number of data packets from the service flow as service sub-flows;
[0050] Feature extraction is performed on the service sub-flow to obtain a feature vector; the feature vector includes multiple feature parameters of the service sub-flow.
[0051] Optionally, the multiple characteristic parameters include: the data volume of the largest data packet in the business sub-stream, the data volume of the smallest data packet in the business sub-stream, the average data volume of the data packets in the business sub-stream, the average arrival time of the data packets in the business sub-stream, the mean arrival time interval of the data packets in the business sub-stream, the total data volume of the business sub-stream, the duration of the business sub-stream and at least two of the flag bits of the business sub-stream.
[0052] On the other hand, the present invention also provides an electronic device, including a memory, a processor, and a computer program stored in the memory and runnable on the processor, wherein the processor implements the above-mentioned edge computing service flow perception method when executing the program.
[0053] On the other hand, the present invention also provides a machine-readable storage medium on which a computer program is stored, which implements the above-mentioned edge computing business flow perception method when executed by a processor.
[0054] Through the above technical solution, the business type perception model of the embodiment of the present invention performs business type perception on all characteristic parameters of the business flow based on multiple fast gated cycle units, because the output value of the fast gated cycle unit is calculated based on the update gate and intermediate state of the fast gated cycle unit. Among them, the intermediate state and the update gate are calculated based on the hidden layer output value of the previous fast gated cycle unit and the characteristic parameters input to the current fast gated cycle unit. Therefore, the fast gated cycle unit of the embodiment of the present invention omits the calculation of the reset gate in the traditional gated cycle unit, and through the structure of the lightweight fast gated cycle unit, it is possible to reduce the computational complexity when performing business type perception on all characteristic parameters of the business flow, thereby improving the business classification and recognition speed of edge computing.
[0055] Other features and advantages of the embodiments of the present invention will be described in detail in the subsequent detailed description. BRIEF DESCRIPTION OF THE DRAWINGS
[0056] The accompanying drawings are used to provide a further understanding of the embodiments of the present invention and constitute a part of the specification. Together with the following detailed description, they are used to explain the embodiments of the present invention, but do not constitute a limitation of the embodiments of the present invention. In the accompanying drawings:
[0057] FIG1 is a flow chart of a service flow perception method for edge computing provided by the present invention;
[0058] FIG2 is a schematic diagram of the structure of a service type perception model provided by the present invention;
[0059] FIG3 is a schematic structural diagram of a fast gated cycling unit provided by the present invention;
[0060] FIG4 is a schematic diagram of a structure of a service flow perception device for edge computing provided by the present invention;
[0061] FIG5 is a second structural diagram of the edge computing service flow perception device provided by the present invention;
[0062] FIG6 is a schematic structural diagram of an electronic device provided by the present invention. DETAILED DESCRIPTION
[0063] The following describes the specific implementation of the embodiment of the present invention in detail with reference to the accompanying drawings. It should be understood that the specific implementation described herein is only used to illustrate and explain the embodiment of the present invention and is not used to limit the embodiment of the present invention.
[0064] Method Example
[0065] Referring to FIG. 1 , an embodiment of the present invention provides a service flow perception method for edge computing, including:
[0066] Step 100: Obtain business flow.
[0067] Electronic devices used for edge computing acquire business flows, which can include data from various businesses, such as electricity consumption information collection data, power distribution monitoring data, or sensor reporting data.
[0068] Step 200: Extract features from the service flow to obtain a feature vector; the feature vector includes multiple feature parameters of the service flow.
[0069] The electronic device extracts features from the service flow to obtain a feature vector; the feature vector includes multiple feature parameters of the service flow. In one embodiment, in order to improve the recognition speed of the service flow, partial data (i.e., service sub-flow) in the service flow can be extracted for feature extraction to obtain a feature vector. That is, step 200, extracting features from the service flow to obtain a feature vector, includes:
[0070] Step 210: Extract a set number of data packets from the service flow as service sub-flows.
[0071] Step 220: Extract features from the service sub-flow to obtain a feature vector.
[0072] For example, the electronic device may extract the first five data packets in a service flow to form a service sub-flow, and perform statistical extraction of characteristic parameters on these five data packets to obtain a feature vector. The feature vector includes multiple characteristic parameters of the service sub-flow. The multiple characteristic parameters include: the data volume of the largest data packet in the service sub-flow, the data volume of the smallest data packet in the service sub-flow, the average data volume of data packets in the service sub-flow, the average arrival time of data packets in the service sub-flow, the mean time interval between arrival of data packets in the service sub-flow, the total data volume of the service sub-flow, the duration of the service sub-flow, and at least two of the flag bits of the service sub-flow.
[0073] In order to comprehensively extract features from service subflows and improve the accuracy of service type perception for service subflows, in one embodiment, the multiple feature parameters in the feature vector include: the data volume x1 of the largest data packet in the service subflow, the data volume x2 of the smallest data packet in the service subflow, the average data volume x3 of the data packets in the service subflow, the average arrival time x4 of the data packets in the service subflow, the mean time interval between arrivals of the data packets in the service subflow, the total data volume x6 of the service subflow, the duration x7 of the service subflow, and the flag bit x8 of the service subflow. i It is expressed by the following formula: X i ={x1,x2,…,x7,x8}.
[0074] Step 300: Input the feature vector into a service type perception model to obtain a service type perception result of the service flow output by the service type perception model.
[0075] The electronic device inputs the feature vector into the service type perception model to obtain the service type perception result of the service flow output by the service type perception model. The service type perception model performs service type perception on all feature parameters of the service flow based on multiple fast gated cycle units, and the output value of the fast gated cycle unit is calculated based on the update gate and intermediate state of the fast gated cycle unit. The intermediate state of the fast gated cycle unit and the update gate are respectively calculated based on the hidden layer output value of the previous fast gated cycle unit and the feature parameter input to the current fast gated cycle unit. The service type perception model is obtained by training based on the sample feature vector of the sample service flow after feature extraction.
[0076] It should be noted that the input value of the fast gated cycle unit in the embodiment of the present invention is not a time series parameter, but a characteristic parameter value of a service sub-flow (ie, it does not have a time series characteristic).
[0077] Step 400: Allocate corresponding computing resources and communication resources to the business flow based on the business type perception result.
[0078] The electronic device allocates corresponding computing resources and communication resources to the service flow based on the service type perception result. Specifically, the electronic device controls and schedules the service flow queue based on the service type perception result, allocating software and hardware computing resources and communication resources to it, thereby identifying the connected service flow and optimizing its support capabilities for service differentiation and processing.
[0079] After allocating the corresponding computing resources and communication resources, the electronic device used for edge computing uses the allocated computing resources and communication resources to perform computing operations on the business flow, and the power system performs power distribution tasks based on the calculation results of the computing operations.
[0080] The business type perception model of the embodiment of the present invention performs business type perception on all characteristic parameters of the business flow based on multiple fast gated cycle units. Since the output value of the fast gated cycle unit is calculated based on the update gate and the intermediate state. Among them, the intermediate state and the update gate are respectively calculated based on the hidden layer output value of the previous fast gated cycle unit and the characteristic parameter input to the current fast gated cycle unit. Therefore, the fast gated cycle unit of the embodiment of the present invention omits the calculation of the reset gate in the traditional gated cycle unit. Through the structure of the lightweight fast gated cycle unit, it is possible to reduce the computational complexity when performing business type perception on all characteristic parameters of the business flow, thereby improving the business classification and recognition speed of edge computing.
[0081] In other aspects of the embodiments of the present invention, the service type perception model includes an input layer, a fast gated recurrent unit layer, and an output layer. The input layer is used to input the main characteristic parameters of the service substream. In one embodiment, the input layer is used to input the 8 characteristic parameters of the service substream. That is, the input layer is used to input the data volume x1 of the largest data packet in the service substream, the data volume x2 of the smallest data packet in the service substream, the average data volume x3 of the data packets in the service substream, the average arrival time x4 of the data packets in the service substream, the mean arrival time interval x5 of the data packets in the service substream, the total data volume x6 of the service substream, the duration x7 of the service substream, and the flag bit x8 of the service substream. The output layer uses the SoftMax classification function to obtain the service type perception result for the data output by the fast gated recurrent unit layer.
[0082] The fast gated cyclic unit layer includes multiple fast gated cyclic unit groups corresponding to the number of characteristic parameters of the service flow. For example, referring to Figure 2, when the feature vector has 8 characteristic parameters of the service sub-flow, the fast gated cyclic unit layer includes 8 fast gated cyclic unit groups. Each fast gated cyclic unit group includes multiple cascaded fast gated cyclic units. For example, in one embodiment, each fast gated cyclic unit group includes 5 cascaded fast gated cyclic units.
[0083] The intermediate state and update gate of each fast gated cycle unit are respectively calculated based on the hidden layer output value of the previous fast gated cycle unit, the characteristic parameters input to the current fast gated cycle unit, the weight coefficient of the update gate of the current fast gated cycle unit, the weight coefficient of the intermediate state of the current fast gated cycle unit, and the offset. The input value of the fast gated cycle unit in the embodiment of the present invention is not a time series parameter, but a characteristic parameter value of the business sub-flow (that is, it does not have a timing characteristic). The business type perception model of the embodiment of the present invention is based on a plurality of fast gated cycle unit groups corresponding to the number of characteristic parameters of the business flow, and performs business type perception on all characteristic parameters of the business flow. The fast gated cycle unit in this embodiment omits the calculation of the reset gate in the traditional gated cycle unit. Through the structure of the lightweight fast gated cycle unit, it is possible to reduce the computational complexity when performing business type perception on multiple characteristic parameters of the business sub-flow, thereby improving the business classification and recognition speed of edge computing.
[0084] In other aspects of the embodiment of the present invention, referring to FIG3 , the update gate, intermediate state, and output value of each fast gated cycle unit are expressed by the following formula: k =σ(U z y k-1 +W y x k +b z ); y′k =tanh(U z y k-1 +W y x k +b z ); y k =(1-z k )⊙y k-1 +z k ⊙y′ k ;
[0085] Among them, y k-1 represents the hidden layer output value of the previous fast gated recurrent unit, x k represents the characteristic parameters of the business flow input to the current fast gated cycle unit input, σ represents the Sigmoid function, tanh represents the tanh function, z k represents the update gate of the fast gated recurrent unit, y' k represents the updated intermediate state, y k Represents the output value of the current fast gated recurrent unit, U z Represents the weight coefficient of the update gate, W y Indicates the weight coefficient of the intermediate state, b z represents the offset, and k represents the kth service flow.
[0086] Compared with the traditional gated loop unit that uses time series parameters in its input value, the fast gated loop unit in the embodiment of the present invention uses the characteristic parameter value of the business sub-flow as its input, and the characteristic parameter value of the business sub-flow omits the calculation of resetting the gate in the traditional gated loop unit. Through the lightweight structure of the fast gated loop unit, the computational complexity is reduced when the business type is perceived for multiple characteristic parameters of the business sub-flow, thereby improving the business classification and recognition speed of edge computing.
[0087] In other aspects of the embodiments of the present invention, the service type perception model is trained based on the following steps:
[0088] Repeat the following steps until the difference between two consecutive output values calculated by the service type perception model is less than a set threshold:
[0089] Step 10: Get the sample business flow.
[0090] The electronic device can obtain sample traffic flows from the sample database module. The sample database module stores sample traffic flows that characterize traffic flow characteristics. The sample database module provides data samples for training the traffic type perception model and obtains data samples from the traffic type perception model to continuously enrich the database.
[0091] Step 20: Extract features from the sample service flow to obtain a sample feature vector.
[0092] The electronic device extracts features from the sample service flow to obtain a sample feature vector. Specifically, the electronic device may extract a set number of data packets from the sample service flow as a sample service sub-flow, and then extract features from the sample service sub-flow to obtain a feature vector. For example, the electronic device may extract the first five data packets from the sample service flow to form a sample service sub-flow, and perform statistical extraction of feature parameters on these five data packets to obtain a sample feature vector. The sample feature vector includes multiple feature parameters of the sample service sub-flow. The multiple feature parameters include: the data volume of the largest data packet in the sample service sub-flow, the data volume of the smallest data packet in the sample service sub-flow, the average data volume of the data packets in the sample service sub-flow, the average arrival time of the data packets in the sample service sub-flow, the mean time interval between arrivals of the data packets in the sample service sub-flow, the total data volume of the sample service sub-flow, the duration of the sample service sub-flow, and at least two of the flag bits of the sample service sub-flow.
[0093] In one embodiment, the multiple characteristic parameters in the sample feature vector include: the data volume of the largest data packet in the sample business sub-stream, the data volume of the smallest data packet in the sample business sub-stream, the average data volume of the data packets in the sample business sub-stream, the average arrival time of the data packets in the sample business sub-stream, the mean arrival time interval of the data packets in the sample business sub-stream, the total data volume of the sample business sub-stream, the duration of the sample business sub-stream and the flag bit of the sample business sub-stream.
[0094] Step 30: Input the sample feature vector into the service type perception model to obtain a sample service type perception result.
[0095] Step 40: Calculate the difference between the sample service type perception result and the output value of the service type perception model calculated last time.
[0096] The electronic device inputs the sample feature vector into the business type perception model to obtain a sample business type perception result, and calculates the difference between the sample business type perception result and the output value of the business type perception model calculated previously, until the difference between the output values of two consecutive calculations of the business type perception model is less than a set threshold, at which point the business type perception model training ends. That is, the embodiment of the present invention continuously inputs sample business streams from the sample database module until the output value of the fast gated recurrent unit tends to stabilize, that is, the fast gated recurrent unit maintains the input sample unchanged during the classification learning process, and ultimately minimizes the difference value between the previous and subsequent iterative calculations.
[0097] It should be noted that the threshold value can be set according to actual conditions, and the value of the threshold value is not specifically limited here.
[0098] The output value of the fast gated loop unit of the service type perception model after the sample feature vector is continuously input n times is expressed by the following formula:
[0099] It represents the output value of the fast gated recurrent unit after inputting the k+1th sample feature vector n times; Indicates that the fast gated recurrent unit continuously inputs n-1 update gates at the k+1th sample feature vector; It represents the output value of the fast gated recurrent unit when the k-th sample feature vector is continuously input n times; It represents the intermediate state of the fast gated recurrent unit when the k+1th sample feature vector is continuously input n times; Represents the initial output value of the fast gated recurrent unit when the k+1th sample feature vector is input for the 0th time.
[0100] The electronic device inputs the sample feature vector into the service type perception model to obtain a sample service type perception result, and calculates the difference between the sample service type perception result and the output value of the service type perception model calculated previously. This continues until the difference between the output values of two consecutive calculations of the service type perception model is less than a set threshold, at which point the service type perception model training ends. Thus, this embodiment of the present invention constructs a model training method for service type perception based on a fast gated recurrent unit, improving the accuracy of service type perception by the service type perception model.
[0101] The fast gated cycle unit may be one or more processors, controllers or chips having a communication interface and capable of implementing a communication protocol, and may also include a memory and related interfaces, a system transmission bus, etc. if necessary.
[0102] Device embodiment
[0103] Referring to FIG. 4 , another embodiment of the present invention further provides a service flow perception device for edge computing, including:
[0104] The service access module 401 is used to obtain service flows;
[0105] The service feature extraction module 402 is used to extract features from the service flow to obtain a feature vector; the feature vector includes multiple feature parameters of the service flow;
[0106] A service identification module 403 is configured to input the feature vector into a service type perception model to obtain a service type perception result of the service flow output by the service type perception model;
[0107] A service flow scheduling module 404 is configured to allocate corresponding computing resources and communication resources to the service flow based on the service type perception result;
[0108] Among them, the business type perception model performs business type perception on all characteristic parameters of the business flow based on multiple fast gated cycle units, and the output value of the fast gated cycle unit is calculated based on the update gate and intermediate state of the fast gated cycle unit. The intermediate state of the fast gated cycle unit and the update gate are respectively calculated based on the hidden layer output value of the previous fast gated cycle unit and the characteristic parameters input to the current fast gated cycle unit; the business type perception model is obtained by training the sample feature vector based on the feature extraction of the sample business flow.
[0109] Optionally, the service type perception model includes an input layer, a fast gated recurrent unit layer and an output layer;
[0110] The fast gated cycle unit layer includes a plurality of fast gated cycle unit groups corresponding to the number of characteristic parameters of the service flow; wherein each fast gated cycle unit group includes a plurality of cascaded fast gated cycle units;
[0111] The intermediate state and update gate of each fast gated recurrent unit are calculated based on the hidden layer output value of the previous fast gated recurrent unit, the characteristic parameters input to the current fast gated recurrent unit, the weight coefficient of the update gate of the current fast gated recurrent unit, the weight coefficient of the intermediate state of the current fast gated recurrent unit, and the offset.
[0112] Optionally, the update gate, intermediate state, and output value of each fast gated recurrent unit are expressed by the following formula: k =σ(U z y k-1 +W y x k +b z ); ′ k =tanh(U z y k-1 +W y x k +b z ); y k =(1-z k )⊙y k-1 +z k ⊙y′ k ;
[0113] Among them, y k-1 represents the hidden layer output value of the previous fast gated recurrent unit, x krepresents the characteristic parameters of the business flow input to the current fast gated cycle unit input, σ represents the Sigmoid function, tanh represents the tanh function, z k represents the update gate of the fast gated recurrent unit, y' k represents the updated intermediate state, y k Represents the output value of the current fast gated recurrent unit, U z Represents the weight coefficient of the update gate, W y Indicates the weight coefficient of the intermediate state, b z represents the offset, and k represents the kth service flow.
[0114] Optionally, the edge computing service flow perception device further includes a service perception training module 405, wherein the service perception training module 405 is trained to obtain a service type perception model based on the following steps:
[0115] Repeat the following steps until the difference between two consecutive output values calculated by the service type perception model is less than a set threshold:
[0116] Get sample business flow;
[0117] Extracting features from the sample traffic flow to obtain a sample feature vector;
[0118] Inputting the sample feature vector into the service type perception model to obtain a sample service type perception result;
[0119] Calculating the difference between the sample service type perception result and the output value of the service type perception model calculated previously;
[0120] The output value of the fast gated loop unit of the service type perception model after the sample feature vector is continuously input n times is expressed by the following formula:
[0121] It represents the output value of the fast gated recurrent unit after inputting the k+1th sample feature vector n times; Indicates that the fast gated recurrent unit continuously inputs n-1 update gates at the k+1th sample feature vector; It represents the output value of the fast gated recurrent unit when the k-th sample feature vector is continuously input n times; It represents the intermediate state of the fast gated recurrent unit when the k+1th sample feature vector is continuously input n times; Represents the initial output value of the fast gated recurrent unit when the k+1th sample feature vector is input for the 0th time.
[0122] Optionally, extracting features from the service flow to obtain a feature vector includes:
[0123] Extracting a set number of data packets from the service flow as service sub-flows;
[0124] Feature extraction is performed on the service sub-flow to obtain a feature vector; the feature vector includes multiple feature parameters of the service sub-flow.
[0125] Optionally, the multiple characteristic parameters include: the data volume of the largest data packet in the business sub-stream, the data volume of the smallest data packet in the business sub-stream, the average data volume of the data packets in the business sub-stream, the average arrival time of the data packets in the business sub-stream, the mean arrival time interval of the data packets in the business sub-stream, the total data volume of the business sub-stream, the duration of the business sub-stream and at least two of the flag bits of the business sub-stream.
[0126] 5 , the edge computing service flow perception device further includes a sample database module 406. The sample database module is used to store sample service flows that characterize service flow characteristics, provide data samples for training the service type perception model, and obtain data samples from the service identification module to continuously enrich the database.
[0127] The edge computing service flow perception device includes a processor and a memory. The above-mentioned service access module 401, service feature extraction module 402, service identification module 403, service flow scheduling module 404, service perception training module 405 and sample database module 406 are all stored in the memory as program units, and the processor executes the above-mentioned program units stored in the memory to realize the corresponding functions.
[0128] The processor includes a kernel, which calls the corresponding program unit from the memory. There can be one or more kernels.
[0129] The memory may include non-permanent memory in a computer-readable medium, random access memory (RAM) and / or non-volatile memory, such as read-only memory (ROM) or flash RAM, and the memory includes at least one memory chip.
[0130] Figure 6 illustrates a schematic diagram of the physical structure of an electronic device. As shown in Figure 6, the electronic device may include: a processor (processor) 610, a communication interface (Communications Interface) 620, a memory (memory) 630 and a communication bus 640, wherein the processor 610, the communication interface 620, and the memory 630 communicate with each other through the communication bus 640. The processor 610 can call the logic instructions in the memory 630 to execute the business flow perception method of edge computing, which includes: obtaining a business flow; performing feature extraction on the business flow to obtain a feature vector; the feature vector includes multiple feature parameters of the business flow; inputting the feature vector into a business type perception model to obtain a business type perception result of the business flow output by the business type perception model; allocating corresponding computing resources and communication resources to the business flow based on the business type perception result; wherein, the business type perception model performs business type perception on all feature parameters of the business flow based on multiple fast gated loop units, and the output value of the fast gated loop unit is calculated based on the update gate and intermediate state of the fast gated loop unit, and the intermediate state of the fast gated loop unit and the update gate are respectively calculated based on the hidden layer output value of the previous fast gated loop unit and the feature parameters input to the current fast gated loop unit; the business type perception model is trained based on the sample feature vector of the sample business flow after feature extraction.
[0131] In addition, the logic instructions in the above-mentioned memory 630 can be implemented in the form of a software functional unit and can be stored in a computer-readable storage medium when sold or used as an independent product. Based on this understanding, the technical solution of the present invention, or the part that contributes to the prior art, or the part of the technical solution, can be embodied in the form of a software product. The computer software product is stored in a storage medium and includes several instructions for enabling a computer device (which can be a personal computer, a server, or a network device, etc.) to perform all or part of the steps of the method described in each embodiment of the present invention. The aforementioned storage medium includes: various media that can store program codes, such as a USB flash drive, a mobile hard disk, a read-only memory (ROM), a random access memory (RAM), a magnetic disk or an optical disk.
[0132] On the other hand, the present invention also provides a machine-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements a business flow perception method for performing edge computing, the method comprising: obtaining a business flow; performing feature extraction on the business flow to obtain a feature vector; the feature vector includes multiple feature parameters of the business flow; inputting the feature vector into a business type perception model to obtain a business type perception result of the business flow output by the business type perception model; allocating corresponding computing resources and communication resources to the business flow based on the business type perception result; wherein, the business type perception model performs business type perception on all feature parameters of the business flow based on multiple fast gated loop units, and the output value of the fast gated loop unit is calculated based on the update gate and intermediate state of the fast gated loop unit, and the intermediate state of the fast gated loop unit and the update gate are respectively calculated based on the hidden layer output value of the previous fast gated loop unit and the feature parameters input to the current fast gated loop unit; the business type perception model is trained based on the sample feature vector of the sample business flow after feature extraction.
[0133] The device embodiments described above are merely illustrative. The units described as separate components may or may not be physically separate, and the components shown as units may or may not be physical units, i.e., they may be located in one location or distributed across multiple network units. Some or all of the modules may be selected based on actual needs to achieve the objectives of the present embodiment. Persons of ordinary skill in the art will be able to understand and implement the present invention without inventive effort.
[0134] Through the description of the above embodiments, those skilled in the art can clearly understand that each embodiment can be implemented by means of software plus a necessary general hardware platform, or of course, by hardware. Based on this understanding, the essence of the above technical solution or the part that contributes to the existing technology can be embodied in the form of a software product. The computer software product can be stored in a computer-readable storage medium, such as ROM / RAM, a magnetic disk, an optical disk, etc., and includes a number of instructions for enabling a computer device (which can be a personal computer, a server, or a network device, etc.) to execute the methods described in each embodiment or certain parts of the embodiments.
[0135] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention, rather than to limit it. Although the present invention has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that they can still modify the technical solutions described in the aforementioned embodiments, or make equivalent replacements for some of the technical features therein. However, these modifications or replacements do not deviate the essence of the corresponding technical solutions from the spirit and scope of the technical solutions of the various embodiments of the present invention.
Claims
1. A service flow perception method for edge computing, characterized in that: include: Get business flow; Extracting features from the service flow to obtain a feature vector; The feature vector includes a plurality of feature parameters of the service flow; Inputting the feature vector into a service type perception model to obtain a service type perception result of the service flow output by the service type perception model; Allocate corresponding computing resources and communication resources to the service flow based on the service type perception result; The service type perception model performs service type perception on all characteristic parameters of a service flow based on multiple fast gated cyclic units. The output value of a fast gated cyclic unit is calculated based on the update gate and intermediate state of the fast gated cyclic unit. The intermediate state and update gate of the fast gated cyclic unit are respectively calculated based on the hidden layer output value of the previous fast gated cyclic unit and the characteristic parameter input to the current fast gated cyclic unit. The service type perception model is obtained by training based on the sample feature vector extracted from the sample service flow. The extracting features of the service flow to obtain a feature vector includes: Extracting a set number of data packets from the service flow as service sub-flows; Extracting features of the service sub-flow to obtain a feature vector; the feature vector includes multiple feature parameters of the service sub-flow; The input value of the fast gated cycle unit is not a time series parameter, but a characteristic parameter value of a service sub-flow that does not have a time series characteristic.
2. The edge computing service flow perception method according to claim 1, characterized in that: The business type perception model includes an input layer, a fast gated recurrent unit layer and an output layer; The fast gated cycle unit layer includes a plurality of fast gated cycle unit groups corresponding to the number of characteristic parameters of the service flow; wherein each fast gated cycle unit group includes a plurality of cascaded fast gated cycle units; The intermediate state and update gate of each fast gated recurrent unit are calculated based on the hidden layer output value of the previous fast gated recurrent unit, the characteristic parameters input to the current fast gated recurrent unit, the weight coefficient of the update gate of the current fast gated recurrent unit, the weight coefficient of the intermediate state of the current fast gated recurrent unit, and the offset.
3. The edge computing service flow perception method according to claim 2, characterized in that: The update gate, intermediate state, and output value of each fast gated recurrent unit are expressed by the following formula: z k =σ(U z y k-1 +W y x k +b z ); y' k =tanh(U z y k-1 +W y x k +b z ); y k =(1-z k )⊙y k-1 +z k ⊙y′ k ; Among them, y k-1 represents the hidden layer output value of the previous fast gated recurrent unit, x k represents the characteristic parameters of the business flow input to the current fast gated cycle unit, σ represents the Sigmoid function, tanh represents the tanh function, z k represents the update gate of the fast gated recurrent unit, y' k represents the updated intermediate state, y k Represents the output value of the current fast gated recurrent unit, U z Represents the weight coefficient of the update gate, W y Indicates the weight coefficient of the intermediate state, b z represents the offset, and k represents the kth service flow.
4. The edge computing service flow perception method according to claim 1, characterized in that: The service type perception model is trained based on the following steps: Repeat the following steps until the difference between two consecutive output values calculated by the service type perception model is less than a set threshold: Get sample business flow; Extracting features from the sample traffic flow to obtain a sample feature vector; Inputting the sample feature vector into the service type perception model to obtain a sample service type perception result; Calculating the difference between the sample service type perception result and the output value of the service type perception model calculated previously; The output value of the fast gated loop unit of the service type perception model after the sample feature vector is continuously input n times is expressed by the following formula: It represents the output value of the fast gated recurrent unit after inputting the k+1th sample feature vector n times; Indicates that the fast gated recurrent unit continuously inputs n-1 update gates at the k+1th sample feature vector; It represents the output value of the fast gated recurrent unit when the k-th sample feature vector is continuously input n times; It represents the intermediate state of the fast gated recurrent unit when the k+1th sample feature vector is continuously input n times; Represents the initial output value of the fast gated recurrent unit when the k+1th sample feature vector is input for the 0th time.
5. The edge computing service flow perception method according to claim 1, characterized in that: The multiple characteristic parameters include: the data volume of the largest data packet in the service substream, the data volume of the smallest data packet in the service substream, the average data volume of the data packets in the service substream, the average arrival time of the data packets in the service substream, the mean arrival time interval of the data packets in the service substream, the total data volume of the service substream, the duration of the service substream and at least two of the flag bits of the service substream.
6. A service flow perception device for edge computing, characterized in that: include: Business access module, used to obtain business flows; A service feature extraction module, configured to extract features from the service flow to obtain a feature vector; The feature vector includes multiple feature parameters of the service flow; A service identification module, configured to input the feature vector into a service type perception model to obtain a service type perception result of the service flow output by the service type perception model; A service flow scheduling module is used to allocate corresponding computing resources and communication resources to the service flow based on the service type perception result; The service type perception model performs service type perception on all characteristic parameters of a service flow based on multiple fast gated cyclic units. The output value of a fast gated cyclic unit is calculated based on the update gate and intermediate state of the fast gated cyclic unit. The intermediate state and update gate of the fast gated cyclic unit are respectively calculated based on the hidden layer output value of the previous fast gated cyclic unit and the characteristic parameter input to the current fast gated cyclic unit. The service type perception model is obtained by training based on the sample feature vector extracted from the sample service flow. The extracting features of the service flow to obtain a feature vector includes: Extracting a set number of data packets from the service flow as service sub-flows; Extracting features of the service sub-flow to obtain a feature vector; the feature vector includes multiple feature parameters of the service sub-flow; The input value of the fast gated cycle unit is not a time series parameter, but a characteristic parameter value of a service sub-flow that does not have a time series characteristic.
7. The edge computing service flow perception device according to claim 6, characterized in that: The business type perception model includes an input layer, a fast gated recurrent unit layer and an output layer; The fast gated cycle unit layer includes a plurality of fast gated cycle unit groups corresponding to the number of characteristic parameters of the service flow; wherein each fast gated cycle unit group includes a plurality of cascaded fast gated cycle units; The intermediate state and update gate of each fast gated recurrent unit are calculated based on the hidden layer output value of the previous fast gated recurrent unit, the characteristic parameters input to the current fast gated recurrent unit, the weight coefficient of the update gate of the current fast gated recurrent unit, the weight coefficient of the intermediate state of the current fast gated recurrent unit, and the offset.
8. The edge computing service flow perception device according to claim 7, characterized in that: The update gate, intermediate state, and output value of each fast gated recurrent unit are expressed by the following formula: k =σ(U z y k-1 +W y x k +b z ); y′ k =tanh(U z y k-1 +W y x k +b z ); y k =(1-z k )⊙y k-1 +z k ⊙y′ k ; Among them, y k-1 represents the hidden layer output value of the previous fast gated recurrent unit, x k represents the characteristic parameters of the business flow input to the current fast gated cycle unit, σ represents the Sigmoid function, tanh represents the tanh function, z k represents the update gate of the fast gated recurrent unit, y' k represents the updated intermediate state, y k Represents the output value of the current fast gated recurrent unit, U z Represents the weight coefficient of the update gate, W y Indicates the weight coefficient of the intermediate state, b z represents the offset, and k represents the kth service flow.
9. The edge computing service flow perception device according to claim 6, characterized in that: The edge computing service flow perception device further includes a service perception training module, which is configured to obtain a service type perception model through training based on the following steps: Repeat the following steps until the difference between two consecutive output values calculated by the service type perception model is less than a set threshold: Get sample business flow; Extracting features from the sample traffic flow to obtain a sample feature vector; Inputting the sample feature vector into the service type perception model to obtain a sample service type perception result; Calculating the difference between the sample service type perception result and the output value of the service type perception model calculated previously; The output value of the fast gated loop unit of the service type perception model after the sample feature vector is continuously input n times is expressed by the following formula: It represents the output value of the fast gated recurrent unit after inputting the k+1th sample feature vector n times; Indicates that the fast gated recurrent unit continuously inputs n-1 update gates at the k+1th sample feature vector; It represents the output value of the fast gated recurrent unit when the k-th sample feature vector is continuously input n times; It represents the intermediate state of the fast gated recurrent unit when the k+1th sample feature vector is continuously input n times; Represents the initial output value of the fast gated recurrent unit when the k+1th sample feature vector is input for the 0th time.
10. The edge computing service flow perception device according to claim 6, characterized in that: The multiple characteristic parameters include: the data volume of the largest data packet in the service substream, the data volume of the smallest data packet in the service substream, the average data volume of the data packets in the service substream, the average arrival time of the data packets in the service substream, the mean arrival time interval of the data packets in the service substream, the total data volume of the service substream, the duration of the service substream and at least two of the flag bits of the service substream.
11. An electronic device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein: When the processor executes the program, the business flow perception method for edge computing described in any one of claims 1 to 5 is implemented.
12. A machine-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the business flow perception method for edge computing described in any one of claims 1 to 5 is implemented.
Citation Information
Patent Citations
A network flow prediction method based on an improved gating recurrent neural network
CN109816095A
Edge computing service awareness method and device and edge computing equipment
CN116170384A
Service flow sensing method and device for edge computing and electronic equipment
CN117725489A
Methods and devices for reducing dimension of eigenvectors
US20200104984A1