Background
In modern wireless networks, the service requirements of users are various and time-varying, and it is difficult or even impossible for a certain fixed networking mode to support the various service requirements. Therefore, it is urgently needed to explore a method for intelligently reconstructing a user networking mode according to user service requirements under certain network conditions. The networking mode and the network parameter setting directly face to the current service requirement, so that the current user service requirement is supported to the maximum extent through the reconstruction of the network structure and the function. The quality of the reconstruction result is judged according to whether the reconstructed networking mode meets the service requirement of the current user. Due to the variability of network conditions and service requirements, the reconstruction process must be able to "refine the reconstructed results with past experience", i.e. an intelligent reconstruction based on a learning algorithm.
The method is used for developing research aiming at the requirements, and reconstructing an optimal networking mode capable of meeting the service requirements for new services through a neural network learning algorithm. In order to realize intelligent reconstruction of a networking mode, the method designs three networking modes aiming at the type characteristics of service requirements of network users: the system comprises a fully-connected dynamic time division networking mode, a multi-hop carrier detection networking mode and a multi-hop self-organizing time division multiple access networking mode.
The fully-connected Dynamic Time Division Multiple Access (DTDMA) mode is suitable for networking of network users in a fully-connected range, and supports network scale change, burst service transmission and fully-connected network topology control. As shown in fig. 1, the mode divides the time axis synchronization of the nodes in the whole network into a series of continuous network time frames with indefinite length, and each time frame comprises four stages of node synchronization, time slot request, time slot allocation and data transmission. And in the node synchronization stage, the nodes of the whole network complete the distributed network synchronization and generate the management nodes in the current time frame. The node sends self time slot request information to the management node in the time slot request stage. In the time slot allocation stage, the management node completes the unified allocation of the time slots according to the time slot requests and the service priorities of the nodes of the whole network, and broadcasts the time slot allocation information to inform other nodes in the network. After each node learns the data time slot allocated to itself, the transmission of its data packet is completed in the data sending stage. Meanwhile, the protocol can effectively support the network access of new nodes and the network exit of the nodes, thereby meeting the requirement of dynamic expansion of network scale.
The multi-hop Carrier detection networking mode (Carrier Sense Multiple Access with connectivity Avoidance, CSMA/CA) has the advantages of high flexibility and simple implementation, is suitable for networking of users in a multi-hop range, and is flexible in service transmission mode and large in burst traffic. In the mode, transmission initiated by a transmitting/receiving node meeting a certain condition through control frame interactive reservation is defined as main transmission, and a section of concurrent transmission gap is introduced between the main transmission reservation process and the Data frame transmission process. The main transmission receiving node adopts a dynamic adjustment scheme based on an exponential smoothing model to determine the length of a concurrent transmission gap time period, and other nodes in the transmission range of the main transmission CTS frame try to initiate or answer a secondary transmission reservation in the gap according to a certain rule. After the concurrent transmission gap, the master/slave transmission simultaneously initiates the Data frame transmission process. The protocol adopts a concurrent collision avoidance mechanism based on tolerable interference power estimation and an ACK frame sequential response strategy to ensure the reliable transmission of the master/slave transmission Data frames.
The multi-hop Self-organized Time Division Multiple Access (ESTDMA) networking mode is suitable for networking of users in a multi-hop transmission range, the transmission service mode is fixed, and the burst service volume is small. As shown in fig. 2, the mode is based on Self-organized Time Division Multiple Access (STDMA), and the Time slot in the STDMA protocol is divided into four stages, i.e., first allocation, second allocation, data transmission, and receiver response. In the first distribution stage, the node of the pre-selected current time slot interactively reserves the current time slot through an RTR/CTR frame. In the secondary allocation stage, the nodes adopt a time slot secondary allocation strategy based on competition. The node obtains the optimal probability of the time slot competing and reserving in the secondary allocation stage by solving the maximum value of the network throughput, and the probability competes and reserves the time slot which is collided or kept idle in the primary allocation stage. And the node which successfully reserves the current time slot transmits the data packet in the data transmission stage. And after receiving the data packet, the receiving node responds to the ACK frame to the sending node in the receiving party responding stage to complete transmission.
The neural network is an abstraction and simulation of a plurality of basic characteristics of human brain, and is a network structure which is composed of simple units and can simulate the interaction reaction of a biological nervous system to real world objects. It is based on human brain work mode to research self-adaptive and non-program information processing method. The working mechanism is characterized in that the processing function of the working mechanism is embodied through the action of the human quantitative neurons in the network, and the purpose of processing information by simulating the human brain is achieved starting from the structure of the simulated human brain and the function of a single neuron. Generally, a neural network consists of an input layer, a hidden layer and an output layer; the input layer corresponds to a plurality of attributes of each piece of data; the hidden layer can be one layer or multiple layers, and each layer is provided with a plurality of nodes; the output layer can be classified by different results output by a plurality of nodes. Each node has a threshold value and a weight value with each node of the next layer, and the parameters are finally determined by carrying out multiple iterations on input sample data, so that new data can be predicted.
Disclosure of Invention
The invention aims to face to user service and intelligently reconstruct a networking mode among a plurality of users in a network according to service requirements. Fig. 3 shows the basic idea of the invention: nine types of attributes including simulation input and user requirements and corresponding networking modes are vectorized and normalized to obtain an experience data set; learning the experience data set by using a neural network algorithm to obtain a training model and accuracy; and calling a training model to intelligently reconstruct the new service and selecting the optimal networking mode. The method comprises the following steps:
step 1: constructing an experience data set, wherein each piece of data comprises nine attributes and a judgment result, and the nine attributes are respectively networking scale, traffic, load, transmission distance, maximum hop count, bandwidth, mobility, time sensitivity and packet loss rate sensitivity; attributes are divided into two categories: the method comprises the following steps of simulation input and user requirements, wherein the simulation input comprises seven attributes of networking scale, traffic, load capacity, transmission distance, maximum hop count, bandwidth and mobility, and the user requirements comprise three attributes of traffic, time sensitivity and packet loss rate sensitivity, wherein the traffic is the simulation input and is also the user requirements; the judgment result is the networking mode to be selected finally, and there are three types of selectable protocols, which are: a fully-connected dynamic time division networking mode, a multi-hop carrier detection networking mode and a multi-hop self-organizing time division multiple access networking mode; for each piece of data, randomly assigning nine attributes of the piece of data, calculating the evaluation score of each networking mode under the condition, and selecting the networking mode with the highest score as the judgment result of the piece of data; and taking the result of the original value quantization of each piece of data as an empirical data set.
Step 2: learning the experience data set through a neural network algorithm, wherein the learning process comprises two steps: training and testing; the experience data set comprises enough data for a machine learning algorithm, and in each learning process, the experience data set is divided into a training set and a testing set at random; in the training process, parameters of an algorithm are determined through data in a training set to obtain a training model; during testing, calling a training model to judge each piece of data in a test set, and checking the accuracy of the training model; and through multiple learning, the mean value and the variance of the accuracy are obtained, the level of the accuracy of the algorithm and the stability of the algorithm are observed, and the primary training result with the maximum accuracy is stored and used as a training model called in prediction.
And step 3: the method comprises the steps of intelligently reconstructing an optimal networking mode facing a new service; taking new service contents, namely actual values of nine attributes corresponding to the services as input, quantizing the input actual values into data which can be used by a neural network algorithm according to the quantization rule in the step 1, calling a training model to obtain three outputs under the new service condition, judging and classifying the new services according to the approximate values of the three outputs, and reconstructing an optimal networking mode meeting the current new services.
The method for constructing the empirical data set according to the present invention has an empirical data set containing more than 1000 valid data. At each learning time, the empirical data set is divided into two parts at random: more than 500 pieces are used for training, and algorithm parameters are determined to obtain a training model; in addition, more than 500 pieces are used for testing, a training model obtained in the training process is called during testing, more than 500 pieces of data in the test set are judged one by one, the test result and the actual result are compared, and the final accuracy is counted. Through multiple learning verification, the accuracy of the algorithm is kept above 80%. When the system is oriented to new services, intelligent reconstruction can be rapidly carried out on the new services.
Detailed Description
The invention is described in further detail below with reference to the figures and examples.
The method is based on a neural network algorithm, faces to user services, and intelligently reconstructs networking modes among a plurality of nodes in a free space according to service requirements. In the following description, the description will refer to the fully connected dynamic Time Division networking mode referred to in the present invention as dtdma (dynamic Time Division Multiple Access), the multi-hop carrier detection networking mode as CSMA/ca (carrier Sense Multiple Access with sharing Access), and the multi-hop Self-organized Time Division Multiple Access networking mode as Enhanced Self-organized Time Division Multiple Access (ESTDMA).
The specific implementation steps of the intelligent reconstruction method are given as follows:
step 1: an empirical data set is constructed.
In an empirical data set designed by the method, each piece of data comprises nine attributes and a judgment result, wherein the nine attributes are respectively networking scale, traffic, load, transmission distance, maximum hop count, bandwidth, mobility, time sensitivity and packet loss rate sensitivity. Attributes are divided into two categories: simulation input and user requirements. The simulation input comprises seven attributes of networking scale, traffic, load capacity, transmission distance, maximum hop count, bandwidth and mobility, and the user requirement comprises three attributes of traffic, time sensitivity and packet loss rate sensitivity, wherein the traffic is the simulation input and is the user requirement. The judgment result is the finally selected networking mode, and the selectable networking modes are three types, respectively: the system comprises a fully-connected dynamic time division networking mode, a multi-hop carrier detection networking mode and a multi-hop self-organizing time division multiple access networking mode. For each piece of data, randomly assigning nine attributes of the piece of data, calculating the evaluation score of each networking mode under the condition, and selecting the networking mode with the highest score as the judgment result of the piece of data; and taking the result of the original value quantization of each piece of data as an empirical data set.
The specific method for raw data quantization in the empirical data set is as follows:
(1) the vector quantization is 1 when the network scale is [1, + ∞ ], 1, 2 when (8, 20), and 3 when (20, + ∞ ].
(2) The traffic has a value range of [0, + ∞ ], a vector quantization of 1 when [0, 200kbps ], a vector quantization of 2 when (200kbps, 2 Mbps), and a vector quantization of 3 when (2Mbps, + ∞).
(3) The loading amount was in the range of [0, 100% ], the vectorization was 1 when the loading amount was [0, 33% ], the vectorization was 2 when the loading amount was (33%, 66% ]), and the vectorization was 3 when the loading amount was (66%, 100% ]).
(4) The transmission distance has a value range of [0, + ∞ ], a vectorization of 1 when the value is [0, 1km ], a vectorization of 2 when the value is (1km, 20km ], and a vectorization of 3 when the value is (20km, + infinity).
(5) The maximum hop count is divided into two types, namely single hop and multi-hop, and the vectorization is 1 in the case of single hop and 2 in the case of multi-hop.
(6) The bandwidth has a value range of [12.8kbps, + ∞ ], and a vectorization of 1 is performed when the bandwidth is [12.8kbps, 512kbps ], a vectorization of 2 is performed when the bandwidth is (512kbps, 2 Mbps), and a vectorization of 3 is performed when the bandwidth is (2Mbps, + infinity).
(7) The mobility is divided into two types of "relative still" and "random motion", and the vectorization is 1 in the case of "relative still", and 2 in the case of "random motion".
(8) The time sensitivity is classified into three categories, i.e., "high", "medium", and "low", and when "high", the vectorization is 1, when "medium", the vectorization is 2, and when "low", the vectorization is 3.
(9) The packet loss rate sensitivity is classified into three categories, i.e., "high", "medium", and "low", and the vectorization is 1 for "high", 2 for "medium", and 3 for "low".
(10) The networking mode is divided into three types, wherein the vectorization is 1 in the case of a fully-connected dynamic time division networking mode, 2 in the case of a multi-hop carrier detection networking mode, and 3 in the case of a multi-hop self-organizing time division multiple access networking mode.
The specific construction method of the empirical data set is as follows:
(1) simulating to obtain evaluation index
Taking a piece of data as an example, nine attributes of the data are assigned randomly. As shown in table 1, the seven simulation input attributes of the piece of data are simulated on the simulation platform, and the evaluation indexes of the three networking modes shown in table 2 are respectively obtained: throughput, delay, and packet loss rate.
TABLE 1 original simulation input data
Table 2 three networking mode evaluation indexes
(2) Normalized evaluation index
For convenience of calculation, normalization processing is carried out on the evaluation indexes of the three networking modes obtained in the step (1): for each evaluation index, comparing the three networking modes, taking the minimum networking mode as 1, and taking the result obtained by dividing the value of the other two networking modes by the value of the minimum networking mode as the normalization result of the other two networking modes; and if the index of a certain networking mode is 0 for a certain evaluation index, marking the index as 0, and normalizing the other two networking modes according to the same method. The results of the normalization are shown in Table 3.
TABLE 3 normalized evaluation index
(3) Vectorizing raw data
The value mode and range of each attribute in the original data are different, and the original data cannot be directly used as the input of a machine learning algorithm or can not be subjected to function operation, so that the value of each attribute needs to be subjected to vectorization processing, and the value is changed into data which is suitable for the machine learning algorithm and can be subjected to function operation. The vectorized data are shown in table 4.
Table 4 vectorized data
(4) Calculating evaluation score by function operation, selecting networking mode
Through the steps, the normalized evaluation indexes of the three networking modes and the vectorized user requirements, namely the service volume, the time sensitivity and the packet loss rate sensitivity, are obtained, and the evaluation score of each networking mode can be calculated through the following formula:
y ═ throughput x traffic-time delay x time sensitivity-packet loss rate x packet loss rate sensitivity (1)
y is the evaluation score of each networking mode, the throughput, the time delay and the packet loss rate are normalized values, and the service volume, the time sensitivity and the packet loss rate sensitivity are vectorized values of the original data. Each networking mode is expected to achieve high throughput, low latency, and low packet loss. Therefore, the three user demand attributes are used as weights and are multiplied by the three evaluation indexes respectively, the product of throughput and service volume is positive, the product of time delay and time sensitivity and the product of packet loss rate and packet loss rate sensitivity is negative, and the evaluation scores of each networking mode are obtained through addition. The evaluation scores for the three networking modes are shown in table 5.
TABLE 5 evaluation scores for three networking modes
And selecting the networking mode with the highest score as the data, namely selecting the DTDMA as the final result of the data, and quantizing the judgment result into 1. A complete set of empirical data is shown in table 6.
TABLE 6A complete set of empirical data
(5) And repeating the steps to construct an empirical data set containing a plurality of pieces of data.
Step 2: learning the empirical data set through a neural network algorithm.
The learning process of the machine learning algorithm is divided into two steps: training and testing. Parameters of the algorithm can be determined through training to obtain a training model; the test may be used to verify the accuracy of the training model. The empirical data set contains enough data for the machine learning algorithm, and during each learning process, the empirical data set is randomly divided into two parts for training and testing respectively. And after the empirical data set is subjected to multiple learning, the average value and the variance of the accuracy are calculated. At each learning, the empirical data set is re-randomized into two parts to ensure that the data used for training and testing is different each time. After multiple times of learning, the average value and the variance of the accuracy of the learning algorithm are obtained through calculation, the average value can show the accuracy level of the algorithm, and the variance reflects the stability of the algorithm. Meanwhile, the primary training result with the maximum accuracy is stored and used as a training model called in prediction.
The specific learning method of the neural network algorithm is as follows:
(1) the empirical data set is randomly divided equally into two parts for training and testing respectively
(2) Training
As shown in figure 4, spiritThe network consists of an input layer, a hidden layer and an output layer: the input layer corresponds to a plurality of attributes of each piece of data; the hidden layer can be one layer or multiple layers, and each layer is provided with a plurality of nodes; the output layer can be classified by different results output by a plurality of nodes. For the hidden layer and the output layer, each node has a threshold value, a weight value is arranged between each node and each node of the previous layer, and the parameters are finally determined by carrying out multiple iterations on input sample data, so that new data can be predicted. FIG. 5 is a schematic diagram of a neuron node having n inputs, xiIs an input from the ith neuron, wiFor the connection weight of the ith neuron, θ is the node's own threshold, then the output y of the node can be expressed as:
the method adopts a single hidden layer structure, nine attributes correspond to nine inputs, and three classification results correspond to three outputs. The threshold value of each node and the connection weight with other nodes are determined through training. In step 1, the nine attributes are quantized to 1, 2, and 3, which can be directly used as input values, and at the output end, the final three categories of DTDMA, CSMA/CA, and ESTDMA are represented by "100", "010", and "001", respectively. When training is started, all parameters in the network, namely the threshold value of each node and the weight between every two nodes are assigned randomly in an interval [0, 1 ]; then, the data in the training set are sequentially substituted into the network for calculation, the calculated numerical value of the output end inevitably has an error with the corresponding classification result of the original data, parameters in the network are finely adjusted after each piece of data is calculated according to the error, and after all the data in the training set are substituted into the network for calculation once, the calculation is recorded as iteration once; and repeating the process, carrying out iterative computation for multiple times, and gradually adjusting network parameters until the error accuracy meets the requirement or the iteration times are enough, thereby obtaining the training model of the neural network.
(3) Testing
Sequentially taking out data from the test set for testing, taking values of nine attributes as input during each test, and obtaining three outputs at an output end through calculation of a neural network; the maximum value of the three outputs is approximate to 1, and the other two values are approximate to 0, so that the three outputs can be approximate to 100, 010 or 001, namely, the data is judged and classified according to the output approximate values; and comparing whether the judgment result of the test data is the same as the actual result. And after all the data in the test set are tested, recording the number of data with wrong judgment and the total number of the test set, and calculating the accuracy.
And step 3: and (3) intelligently reconstructing an optimal networking mode for new services.
And in the learning process of the experience data set, storing a training result with the highest accuracy as a training model. When the service is oriented to a new service, inputting service contents, namely actual numerical values corresponding to nine attributes, and converting the input actual numerical values into data which can be used by a machine learning algorithm according to the quantization rule in the step 1, namely quantizing the actual numerical values into 1, 2 and 3; then, the training model can be called to obtain three outputs under the new service condition, the new service is judged and classified according to the approximate values of the three outputs, namely 100, 010 or 001, and the optimal networking mode meeting the current new service is reconstructed.
Details not described in the present application are well within the skill of those in the art.