Disclosure of Invention
In order to solve the problems, the invention provides a small base station switch control method based on a deep neural network based on the idea that in an urban scene, a crowd moves along with an existing road and the position of the crowd at the next time point can be predicted.
In order to achieve the purpose, the invention provides the following technical scheme:
the small base station switch control method based on the deep neural network comprises the following steps:
the method comprises the following steps: collecting user information in a base station
Sampling once every a period of time, recording the user number, access time and user position information of the access base station, and putting a sample set L { (u) { (i,ti,pi) In which uiNumber for access user, tiFor recording the time of day, piFor the geographical position of the user, including the longitude coordinate xiAnd latitude coordinate yi;
Step two: data integration
The user data collected by the base station in the step one are sorted and combined into path data for model training, and data samples of all users are combined to obtain a sample set L finally used for trainingtrain={(p1,i,p2,i,p3,i,p4,i,p5,i,p6,i)};
Step three: building neural network model
Selecting a fully-connected neural network as a training model, calculating a training error by adopting an average square error, obtaining a training result by adopting a common forward propagation method during training, and updating parameters in the neural network by adopting a reverse propagation method;
step four: inputting data and training models
1) Selecting the set L obtained in the step twotrainOne sample of (1), the sample being denoted as dj=(p1,j,p2,j,p3,j,p4,j,p5,j,p6,j),djMiddle and top 5 data (p)1,j,p2,j,p3,j,p4,j,p5,j) For input, last 1 data p6,jFor comparing with the predicted result and calculating error;
2) inputting the first 5 data (p) of one sample into the neural network
1,j,p
2,j,p
3,j,p
4,j,p
5,j) The result of one training is obtained by adopting a forward propagation method in the neural network,i.e. predicted position coordinates
3) True values of predicted coordinates in the sample are
Calculating errors using actual and predicted coordinates
Updating parameters in the neural network by adopting a reverse propagation method to finish one-time sample training;
4) the whole sample set L
train is substituted and trained once, which is called a round of sample set training, so that a plurality of rounds of sample set training are carried out, and after each round of training, the training error of the round is calculated
When | E
i+1-E
i|<e
cWhen so, the training is stopped; at the moment, the parameters of the model are updated, and the model training is finished;
wherein E isiError for the ith round of training, ei,jTraining error for jth sample in ith round of training sample set, ecIs the minimum error constant;
step five: collecting the user data to be predicted, and predicting the position of the user at the next moment
1) Let the time to be predicted be tpredictAcquiring user data according to the step one, and recording the user data as L { (u)i',ti',pi')};
2) Integrating data according to the steps in the step two and recording the data as a set Lpredict={(p1',i,p'2,i,p'3,i,p'4,i,p'5,i)};
3) Will set LpredictThe sample in (1) is input into the model, so that the position prediction result of the user can be obtained, and the prediction result set is recorded as
Step six: calculating the number of future service users of the base station, and controlling the switch of the base station
1) Information of base station is recorded as set
Wherein the content of the first and second substances,
is a longitude coordinate of the location of the base station,
as latitude coordinate of base station location, num
iNumber of future serving users for the base station;
2) the prediction result set obtained from the step five
In the method, samples are selected in sequence
Calculating the distance between the base station and each base station in the set C
Obtain the number of the base station nearest to the sample
Corresponding num in set C
iAdding 1;
3) setting the threshold value for controlling the base station switch to numcTraversing all base station data in the set C, when numi≥numcWhen the base station is started, starting a corresponding base station i; when numi≤numcAnd closing the corresponding base station i.
Further, the process of sorting and merging the user data in the second step specifically includes the following steps:
1) selecting a fixed user number c from the set L, collecting the data of the user, and recording as a set
2) Mixing L with
cAccording to time of the sample
Sorting is carried out;
3) the samples in the set are grouped in groups of six in time order, each group being a new sample, i.e. each new sample being
k is a packet group number;
4) removing temporal data in new samples
Retaining only position coordinate data
Namely, it is
Get user (u)
iC) sample set for training, noted
5) The samples of other users are sorted according to the steps, and the sample sets of all users are combined together to obtain a sample set finally used for training, and the sample set is marked as Ltrain={(p1,i,p2,i,p3,i,p4,i,p5,i,p6,i)}。
Further, the neural network selected in the third step has 5 layers of neurons in total, the first layer has 10 input neurons, and the last layer has 2 output neurons, and is used for predicting unknown coordinates; and in the fourth step, each data in the sample data input to the neural network comprises 10 numbers of longitude and latitude coordinates for input, and the data corresponds to input neurons of the neural network one by one.
Further, in the fifth step, the prediction time and the time of collecting the sample are set within a certain time range.
Compared with the prior art, the invention has the following advantages and beneficial effects:
the method controls the switching on and off of the small base stations in the ultra-dense network by predicting the number of people to be served in the base stations, thereby achieving the purposes of reducing the power consumption of the base stations, reducing the interference among the base stations and optimizing the resource distribution in the ultra-dense network; in the process of establishing the mathematical model, the method combines data mining and machine learning, and improves the accuracy of prediction and the practicability of the system.
Detailed Description
The technical solutions provided by the present invention will be described in detail below with reference to specific examples, and it should be understood that the following specific embodiments are only illustrative of the present invention and are not intended to limit the scope of the present invention.
The invention uses a deep neural network model to establish a prediction model of the crowd position and predict the number of people to be served in a future small base station. Specifically, the small base station switch control method based on the deep neural network provided by the invention comprises the following steps:
the first step is as follows: user information in a base station is collected. Sampling once every minute, recording the user number, access time and user position information of the access base station, and putting a sample set L { (u) }i,ti,pi) In which uiNumber for access user, tiTo record the time of day, the time is accurate to minutes, piFor the geographical position of the user, including the longitude coordinate xiAnd latitude coordinate yi。
The second step is that: and data integration, namely, sorting and combining the user data collected by the base station in the first step into path data for model training.
1) In the set L, a fixed user number (u) is selectediC), collecting the data of the user and recording the data as a set
2) Mixing L with
cAccording to time of the sample
And (6) sorting.
3) The samples in the set are grouped in groups of six in time order, each group being a new sample, i.e. each new sample being
k is the packet group number.
4) Removing temporal data in new samples
Retaining only position coordinate data
Namely, it is
At this point, the user (u) is obtained
iC) sample set for training, noted
5) The samples of other users are sorted according to the steps, and the sample sets of all users are combined together to obtain a sample set finally used for training, and the sample set is recorded as
The third step: and constructing a neural network model.
And selecting a fully-connected neural network as a training model. The model has 5 layers of neurons in total, the first layer has 10 input neurons, the last layer has 2 output neurons to predict unknown coordinates, and the middle three layers each have 50 hidden neurons (the value can be automatically adjusted by an operator according to the complexity of an actual network). The training error is calculated by using the average square error, and the training step size is set to 0.001 (the value can be adjusted by an operator according to the complexity of the actual network). During training, a common forward propagation method is adopted to obtain a training result, and parameters in the neural network are updated by adopting a reverse propagation method.
The fourth step: data is input and the model is trained.
1) Selecting the set L obtained in the second steptrainOne sample of (1), the sample being denoted as dj=(p1,j,p2,j,p3,j,p4,j,p5,j,p6,j),djMiddle and top 5 data (p)1,j,p2,j,p3,j,p4,j,p5,j) For input, last 1 data p6,jFor comparison with the predicted result, calculating an error.
2) Inputting the first 5 data (p) of one sample into the neural network
1,j,p
2,j,p
3,j,p
4,j,p
5,j) Each datum is position data, comprises two numbers of longitude and latitude coordinates, the total number of 10 numbers is used for inputting, the datum corresponds to input neurons of the neural network one by one, and a result of one training is obtained by adopting a forward propagation method in the neural network and is recorded as
I.e. the predicted position coordinates.
3) True values of predicted coordinates in the sample are
Calculating errors using actual and predicted coordinates
And updating parameters in the neural network by adopting a reverse propagation method to finish one-time sample training.
4) The whole sample set L
trainAnd substituting and training once, which is called a round of sample set training. After one round of sample set training, calculating the training error of the round
(E
iError for the ith round of training, e
i,jTraining error for the jth sample in the set of samples for the ith round of training). Performing multiple rounds of sample set training, when | E
i+1-E
i|<e
c(e
cThe minimum error constant, which can be adjusted by the operator according to the actual network operation), the training is stopped. At this time, the parameters of the model are updated, and the model training is finished.
The fifth step: and collecting the data of the user to be predicted, and predicting the position of the user at the next moment.
1) Let the time to be predicted be tpredictAcquiring user data according to the step one, and recording the user data as L { (u)i',ti',pi')}(1≤tpredict-ti' ≦ 5) indicates that the time at which the sample was taken is within 5 minutes of the predicted time (this value may be adjusted by the operator on its own depending on the actual network operation).
2) Integrating the data according to the steps in the second step, and recording as a set Lpredict={(p1',i,p'2,i,p'3,i,p'4,i,p'5,i) The set of samples at this time is used for prediction, only input, no output, so there are only 5 position data per sample.
3) Will set L
predictThe sample in (1) is input into the model, so that the position prediction result of the user can be obtained, and the prediction result set is recorded as
And a sixth step: and calculating the number of future service users of the base station, and controlling the base station to be switched on and off.
1) Information of base station is recorded as set
Wherein the content of the first and second substances,
is the longitude coordinate, y, of the base station position
i cAs latitude coordinate of base station location, num
iThe number of future serving users for the base station is initialized to 0.
2) Set of predicted results from the fifth step
In the method, samples are selected in sequence
Calculating the distance between the base station and each base station in the set C
Obtain the number of the base station nearest to the sample
Corresponding num in set C
iPlus 1.
3) Setting the threshold value for controlling the base station switch to numc(the value can be determined by the operator according to the actual network operation condition), all the base station data in the set C are traversed, and when num is reachedi≥numcWhen the base station is started, starting a corresponding base station i; when numi≤numcAnd closing the corresponding base station i.
The technical means disclosed in the invention scheme are not limited to the technical means disclosed in the above embodiments, but also include the technical scheme formed by any combination of the above technical features. It should be noted that those skilled in the art can make various improvements and modifications without departing from the principle of the present invention, and such improvements and modifications are also considered to be within the scope of the present invention.