CPC H04L 41/0803 (2013.01) [G16Y 40/35 (2020.01); H04L 67/12 (2013.01); H04L 69/324 (2013.01)] | 1 Claim |
1. An online optimization method for a power consumption policy of a terminal of Internet of things (IoT), comprising:
S1: performing comprehensive scanning on a user terminal and a link, and obtaining a link behavior graph according to behavior data of the link, comprising the following specific steps:
S101: monitoring, by using a link analysis tool, interaction behaviors and relevant data between the user terminal and the link, comprising a category of interaction behaviors, specific content, behavior time, processing delay and transmission delay; and sampling and analyzing, by using a power consumption analysis device and a logic analysis device, a real-time current and a working state of the user terminal to obtain a sectional working state and an average current of each user terminal behavior;
S102: controlling the user terminal to maintain a passive response state, monitoring, by using a packet grabber, an active packet sending behavior of the link, and recording subsequent interaction behaviors and relevant data between the user terminal and the link;
S103: summarizing the interaction behaviors occurring in the link according to a link protocol to obtain a test behavior set of the link, sequentially selecting each item in the test behavior set as a to-be-tested behavior, controlling the user terminal to initiate the to-be-tested behavior to the link, monitoring, by using the link analysis tool, the interaction behaviors between the user terminal and the link, and recording the relevant data;
S104: classifying and summarizing the interaction behaviors acquired in steps S102 and S103, a part belonging to user terminal behaviors constituting a user terminal behavior table, wherein field content of the table comprises a category, specific content, behavior time, processing delay, transmission delay, a sectional working state of the user terminal behavior and a corresponding average current; a part belonging to the link behavior generating a link behavior graph of the link, wherein the link behavior graph comprises nodes and edges, the node representing behavior content of the link, which is usually a packet sending behavior, and the node comprising a behavior category, a behavior time, a processing delay and a transmission delay; and the edge representing a triggering condition of the behavior; and
S105: repeating steps S101 to S104 until all to-be-tested links generate link behavior graphs;
S2: inputting the link behavior graph in step S1 into a simulation based optimization (SBO) system to obtain power consumption parameters for minimizing power consumption of the user terminal, comprising the following specific steps:
S201: defining average currents of the user terminal in n working states s1, s2 . . . sn as c1, c2 . . . cn, respectively, the average power consumption P of the user terminal being P=(c1*t1+c2*t2 . . . +cn*tn)/(t1+t2+ . . . +tn)*V, where t1, t2 . . . tn represent the time when the user terminal is in different working states, and V represents an input voltage of the user terminal;
S202: characterizing a power consumption policy of the user terminal by using a parameter; and
S203: selecting a genetic algorithm as an optimization algorithm of the SBO system, searching for a set of power consumption parameters for minimizing power consumption within a parameter range, and continuously iterating until the number of iterative search times is greater than a preset threshold number of times or a variation error of a power consumption result between two adjacent iterations is less than a set value;
S3: performing centralized storage on the link behavior graph in step S1 and the power consumption parameters in step S2, and constructing a link behavior library according to a corresponding relationship thereof;
S4: regularly sending, by the user terminal, operation data and collected user link behavior data to a server, and evaluating, by the server, whether the power consumption policy of the user terminal needs to be optimized, an original state being maintained if optimization is not needed until the user terminal collects data next time, and step S5 being entered if optimization is needed; determining whether optimization is needed comprising the following steps:
recording a time proportion of the user terminal in a sleep state within a period of time, optimization being needed when the time proportion is lower than a threshold value, otherwise, optimization being not needed;
S5: generating, by the server, a link behavior subgraph according to the link behavior data collected by the user terminal, and matching the link behavior subgraph with the link behavior library in step S3 using a similarity algorithm, power consumption parameters of minimum power consumption corresponding to a matched link behavior graph from the link behavior library being acquired and step S7 being entered if the matching is successful, otherwise, step S6 being entered, comprising the specific steps:
S501: generating, by the server, the link behavior subgraph according to the link behavior data collected by the user terminal in a single sampling period, comprising the following steps:
S5011: traversing all the user terminal behaviors in the link behavior data, finding a corresponding item in the user terminal behavior table and updating attributes of parameters to cause attribute data in the user terminal behavior table to be consistent with that in the link behavior data;
S5012: traversing all link behaviors in the link behavior data, each link behavior corresponding to a node, and the attribute of the node comprising a sending time and a transmission delay of a node behavior; and
S5013: parsing a triggering condition corresponding to each link behavior according to the link behavior data and constructing the same in the form of an edge in the behavior graph;
S502: traversing all link behavior graphs in the link behavior library, calculating a similarity with the link behavior subgraph, and obtaining a link behavior graph with the highest similarity, if the highest similarity reaches a preset similarity threshold value, the link behavior subgraph being successfully matched in the link behavior library, power consumption parameters of minimum power consumption corresponding to the matched link behavior graph being acquired, and step S7 being entered; otherwise, step S6 being entered, comprising the specific steps:
S5021: representing the link behavior subgraph and the matched link behavior graph as an adjacency matrix and a node feature matrix of the graph;
S5022: constructing a graph matching model based on graph convolution networks (GCNs), taking the link behavior subgraph as an input graph and the matched link behavior graph as a target graph, and learning matching features of nodes, comprising:
aggregating neighbor information about the node, specifically expressed as:
![]() where W(l) represents a weight matrix of an lth layer, h(l-1)(vj) represents a feature of vj at an (l−1)th layer, hagg(l)(vi) represents the neighbor information aggregation of a vector vi, and N(vi) represents a set of neighbor nodes of the vector vi;
taking into account self-features of the vector vi, specifically expressed as:
hself(l)(vi)=Wself(l)h(l-1)(vi)
where Wself(l) represents a weight matrix of self-features of an lth layer, hself(l)(vi) represents a self-feature vector of a vector vi at the lth layer, and h(l-1)(vi) represents a feature of the vector vi of an (l−1)th layer; and
updating and combining the aggregated neighbor information and the self-features to obtain a new feature of the vector vi at the lth layer, specifically expressed as:
h(l)(vi)=ReLU(hagg(l)(vi)+hself(l)(vi));
where h(l)(vi) represents a total feature vector of the vector vi at the lth layer;
S5023: calculating a cosine similarity between nodes by using the learned matching features, specifically expressed as:
![]() where Cosine Similarity(vi, vj) represents a cosine similarity between two vectors vi and vj, vi represents an ith vector, vj represents a jth vector in a set of neighbor nodes of vi, k represents dimensional indexing of the vector, G represents a dimension of the vector, vi,k represents a component of the vector vi in a kth dimension, and vj,k represents a component of the vector vj in a kth dimension; and
S5024: outputting a node matching result between the link behavior subgraph and the matched link behavior graph according to the cosine similarity; and completing the matching of the nodes between the link behavior subgraph and the matched link behavior graph by adjusting model parameters iteratively and optimally;
S6: performing secondary generation on the link behavior subgraph generated in step S5 through a graph neural network generation algorithm to obtain a complete link behavior graph, inputting the link behavior graph into the SBO system in step S2, and obtaining power consumption parameters of minimum power consumption of a new link, comprising the following steps:
S601: encoding the link behavior subgraph, inputting the adjacency matrix and the node feature matrix into the graph matching model based on GCNs, and learning node features of the subgraph through multi-layer node feature propagation and aggregation;
S602: fusing the node features of the link behavior subgraph to obtain a feature representation of an overall subgraph;
S603: generating new nodes and edges by using a generative adversarial network model to construct a structure of the complete link behavior graph; and generating a node feature, and fusing the feature and a subgraph node feature to obtain a feature representation of the complete link behavior graph; and
S604: optimizing and repairing the structure of the complete link behavior graph by removing repeated edges to obtain the complete link behavior graph; and
S7: transmitting, by the server, the power consumption parameters of minimum power consumption to the user terminal through networking, and issuing a parameter update instruction to complete the upgrading of the power consumption policy of the user terminal.
|